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 |
---|---|---|---|---|---|---|
Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. | public Observable<ServiceResponse<OCRInner>> oCRUrlInputWithServiceResponseAsync(String language, String contentType, BodyModelInner imageUrl) {
if (this.client.baseUrl() == null) {
throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null.");
}
if (language == null) {
throw new IllegalArgumentException("Parameter language is required and cannot be null.");
}
if (contentType == null) {
throw new IllegalArgumentException("Parameter contentType is required and cannot be null.");
}
if (imageUrl == null) {
throw new IllegalArgumentException("Parameter imageUrl is required and cannot be null.");
}
Validator.validate(imageUrl);
final Boolean cacheImage = null;
final Boolean enhanced = null;
String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl());
return service.oCRUrlInput(language, cacheImage, enhanced, contentType, imageUrl, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<OCRInner>>>() {
@Override
public Observable<ServiceResponse<OCRInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<OCRInner> clientResponse = oCRUrlInputDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String detectLanguage(String text) {\n\t\treturn dictionary.detectLanguage(text);\n\t}",
"public boolean translateImageToText();",
"@SuppressWarnings(\"static-access\")\n\tpublic void detection(Request text) {\n\t\t//Fichiertxt fichier;\n\t\ttry {\t\t\t\t\t\n\t\t\t//enregistrement et affichage de la langue dans une variable lang\n\t\t\ttext.setLang(identifyLanguage(text.getCorpText()));\n\t\t\t//Ajoute le fichier traité dans la Base\n\t\t\tajouterTexte(text);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"fichier texte non trouvé\");\n\t e.printStackTrace();\n\t\t}\n\t}",
"public MashapeResponse<JSONObject> classifytext(String lang, String text) {\n return classifytext(lang, text, \"\");\n }",
"static WordList get(Language language) {\n return switch (language) {\n case ENGLISH -> readResource(\"bip39_english.txt\");\n };\n }",
"void readText(final Bitmap imageBitmap){\n\t\tif(imageBitmap != null) {\n\t\t\t\n\t\t\tTextRecognizer textRecognizer = new TextRecognizer.Builder(this).build();\n\t\t\t\n\t\t\tif(!textRecognizer.isOperational()) {\n\t\t\t\t// Note: The first time that an app using a Vision API is installed on a\n\t\t\t\t// device, GMS will download a native libraries to the device in order to do detection.\n\t\t\t\t// Usually this completes before the app is run for the first time. But if that\n\t\t\t\t// download has not yet completed, then the above call will not detect any text,\n\t\t\t\t// barcodes, or faces.\n\t\t\t\t// isOperational() can be used to check if the required native libraries are currently\n\t\t\t\t// available. The detectors will automatically become operational once the library\n\t\t\t\t// downloads complete on device.\n\t\t\t\tLog.w(TAG, \"Detector dependencies are not yet available.\");\n\t\t\t\t\n\t\t\t\t// Check for low storage. If there is low storage, the native library will not be\n\t\t\t\t// downloaded, so detection will not become operational.\n\t\t\t\tIntentFilter lowstorageFilter = new IntentFilter(Intent.ACTION_DEVICE_STORAGE_LOW);\n\t\t\t\tboolean hasLowStorage = registerReceiver(null, lowstorageFilter) != null;\n\t\t\t\t\n\t\t\t\tif (hasLowStorage) {\n\t\t\t\t\tToast.makeText(this,\"Low Storage\", Toast.LENGTH_LONG).show();\n\t\t\t\t\tLog.w(TAG, \"Low Storage\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tFrame imageFrame = new Frame.Builder()\n\t\t\t\t\t.setBitmap(imageBitmap)\n\t\t\t\t\t.build();\n\t\t\t\n\t\t\tSparseArray<TextBlock> textBlocks = textRecognizer.detect(imageFrame);\n\t\t\tdata.setText(\"\");\n\t\t\tfor (int i = 0; i < textBlocks.size(); i++) {\n\t\t\t\tTextBlock textBlock = textBlocks.get(textBlocks.keyAt(i));\n\t\t\t\tPoint[] points = textBlock.getCornerPoints();\n\t\t\t\tLog.i(TAG, textBlock.getValue());\n\t\t\t\tString corner = \"\";\n\t\t\t\tfor(Point point : points){\n\t\t\t\t\tcorner += point.toString();\n\t\t\t\t}\n\t\t\t\t//data.setText(data.getText() + \"\\n\" + corner);\n\t\t\t\tdata.setText(data.getText()+ \"\\n \"+ textBlock.getValue() + \" \\n\" );\n\t\t\t\t// Do something with value\n /*List<? extends Text> textComponents = textBlock.getComponents();\n for(Text currentText : textComponents) {\n // Do your thing here }\n mImageDetails.setText(mImageDetails.getText() + \"\\n\" + currentText);\n }*/\n\t\t\t}\n\t\t}\n\t}",
"public String getEnglish()\n {\n if (spanishWord.substring(0,3).equals(\"el \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n else if (spanishWord.substring(0, 3).equals(\"la \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n if (spanishWord.equals(\"estudiante\"))\n {\n return \"student\"; \n }\n else if (spanishWord.equals(\"aprender\"))\n {\n return \"to learn\";\n }\n else if (spanishWord.equals(\"entender\"))\n {\n return\"to understand\";\n }\n else if (spanishWord.equals(\"verde\"))\n {\n return \"green\";\n }\n else\n {\n return null;\n }\n }",
"java.lang.String getLanguage();",
"java.lang.String getLanguage();",
"private void detextTextFromImage(Bitmap imageBitmap) {\n\n\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(imageBitmap);\n\n FirebaseVisionTextRecognizer firebaseVisionTextRecognizer = FirebaseVision.getInstance().getCloudTextRecognizer();\n\n firebaseVisionTextRecognizer.processImage(image)\n .addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText firebaseVisionText) {\n String text = firebaseVisionText.getText();\n\n if (text.isEmpty() || text == null)\n Toast.makeText(ctx, \"Can not identify. Try again!\", Toast.LENGTH_SHORT).show();\n\n else {\n\n startTranslateIntent(text);\n }\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n e.printStackTrace();\n }\n });\n\n\n }",
"public synchronized Result process(String text, String lang) {\n // Check that service has been initialized.\n if (!this.initialized) {\n logInitializationError();\n return null;\n }\n this.cas.reset();\n this.cas.setDocumentText(text);\n if (lang != null) {\n this.cas.setDocumentLanguage(lang);\n }\n try {\n this.ae.process(this.cas);\n } catch (AnalysisEngineProcessException e) {\n getLogger().log(Level.SEVERE, \"\", e);\n return null;\n }\n return this.resultExtractor.getResult(this.cas, this.serviceSpec);\n }",
"private static AnalysisResults.Builder retrieveText(ByteString imageBytes) throws IOException {\n AnalysisResults.Builder analysisBuilder = new AnalysisResults.Builder();\n\n Image image = Image.newBuilder().setContent(imageBytes).build();\n ImmutableList<Feature> features =\n ImmutableList.of(Feature.newBuilder().setType(Feature.Type.TEXT_DETECTION).build(),\n Feature.newBuilder().setType(Feature.Type.LOGO_DETECTION).build());\n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addAllFeatures(features).setImage(image).build();\n ImmutableList<AnnotateImageRequest> requests = ImmutableList.of(request);\n\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n BatchAnnotateImagesResponse batchResponse = client.batchAnnotateImages(requests);\n\n if (batchResponse.getResponsesList().isEmpty()) {\n return analysisBuilder;\n }\n\n AnnotateImageResponse response = Iterables.getOnlyElement(batchResponse.getResponsesList());\n\n if (response.hasError()) {\n return analysisBuilder;\n }\n\n // Add extracted raw text to builder.\n if (!response.getTextAnnotationsList().isEmpty()) {\n // First element has the entire raw text from the image.\n EntityAnnotation textAnnotation = response.getTextAnnotationsList().get(0);\n\n String rawText = textAnnotation.getDescription();\n analysisBuilder.setRawText(rawText);\n }\n\n // If a logo was detected with a confidence above the threshold, use it to set the store.\n if (!response.getLogoAnnotationsList().isEmpty()\n && response.getLogoAnnotationsList().get(0).getScore()\n > LOGO_DETECTION_CONFIDENCE_THRESHOLD) {\n String store = response.getLogoAnnotationsList().get(0).getDescription();\n analysisBuilder.setStore(store);\n }\n } catch (ApiException e) {\n // Return default builder if image annotation request failed.\n return analysisBuilder;\n }\n\n return analysisBuilder;\n }",
"public java.lang.String getLanguage() {\n return _courseImage.getLanguage();\n }",
"public void ocrExtraction(BufferedImage image) {\n\t\tFile outputfile = new File(\"temp.png\");\n\t\toutputfile.deleteOnExit();\n\t\tString ocrText = \"\", currLine = \"\";\n\t\ttry {\n\t\t\tImageIO.write(image, \"png\", outputfile);\n\n\t\t\t// System call to Tesseract OCR\n\t\t\tRuntime r = Runtime.getRuntime();\n\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText -psm 6\");\n//\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText\");\n\t\t\tp.waitFor();\n\n\t\t\t// Read text file generated by tesseract\n\t\t\tFile f = new File(\"ocrText.txt\");\n\t\t\tf.deleteOnExit();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\t\t\n\t\t\twhile ((currLine = br.readLine()) != null) {\n\t\t\t\tocrText += (currLine + \" \");\n\t\t\t}\n\t\t\tif(ocrText.trim().isEmpty()) {\n\t\t\t\tocrText = \"OCR_FAIL\";\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttextField.setText(ocrText.trim());\n\t\ttextField.requestFocus();\n\t\ttextField.selectAll();\n\t}",
"String getLanguage();",
"String getLanguage();",
"String getLanguage();",
"public String getTitile(String language) {\n if (language.startsWith(\"e\")) {\n return enTitle;\n } else {\n return localTitle;\n }\n }",
"public String scanText(BufferedImage image) throws IOException {\n File tmpImgFile = File.createTempFile(\"tmpImg\", \".jpg\");\n ImageIO.write(image, \"jpg\", tmpImgFile);\n String rawData = TesseractWrapper.runTesseract(tmpImgFile.getAbsolutePath());\n tmpImgFile.delete();\n return rawData;\n }",
"public MashapeResponse<JSONObject> classifytext(String lang, String text, String exclude) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n if (lang != null && !lang.equals(\"\")) {\n\tparameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n\tparameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n\tparameters.put(\"exclude\", exclude);\n }\n \n \n return (MashapeResponse<JSONObject>) HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers);\n }",
"protected VideoText[] analyze(File imageFile, String id) throws TextAnalyzerException {\n boolean languagesInstalled;\n if (dictionaryService.getLanguages().length == 0) {\n languagesInstalled = false;\n logger.warn(\"There are no language packs installed. All text extracted from video will be considered valid.\");\n } else {\n languagesInstalled = true;\n }\n\n List<VideoText> videoTexts = new ArrayList<VideoText>();\n TextFrame textFrame = null;\n try {\n textFrame = textExtractor.extract(imageFile);\n } catch (IOException e) {\n logger.warn(\"Error reading image file {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n } catch (TextExtractorException e) {\n logger.warn(\"Error extracting text from {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n }\n\n int i = 1;\n for (TextLine line : textFrame.getLines()) {\n VideoText videoText = new VideoTextImpl(id + \"-\" + i++);\n videoText.setBoundary(line.getBoundaries());\n Textual text = null;\n if (languagesInstalled) {\n String[] potentialWords = line.getText() == null ? new String[0] : line.getText().split(\"\\\\W\");\n String[] languages = dictionaryService.detectLanguage(potentialWords);\n if (languages.length == 0) {\n // There are languages installed, but these words are part of one of those languages\n logger.debug(\"No languages found for '{}'.\", line.getText());\n continue;\n } else {\n String language = languages[0];\n DICT_TOKEN[] tokens = dictionaryService.cleanText(potentialWords, language);\n StringBuilder cleanLine = new StringBuilder();\n for (int j = 0; j < potentialWords.length; j++) {\n if (tokens[j] == DICT_TOKEN.WORD) {\n if (cleanLine.length() > 0) {\n cleanLine.append(\" \");\n }\n cleanLine.append(potentialWords[j]);\n }\n }\n // TODO: Ensure that the language returned by the dictionary is compatible with the MPEG-7 schema\n text = new TextualImpl(cleanLine.toString(), language);\n }\n } else {\n logger.debug(\"No languages installed. For better results, please install at least one language pack\");\n text = new TextualImpl(line.getText());\n }\n videoText.setText(text);\n videoTexts.add(videoText);\n }\n return videoTexts.toArray(new VideoText[videoTexts.size()]);\n }",
"public List<Result> recognize(IplImage image);",
"public static String getImgText(final String imageLocation) {\n\n return getImgText(new File(imageLocation));\n }",
"private String getLanguage(Prediction prediction, String content)\n throws IOException {\n Preconditions.checkNotNull(prediction);\n Preconditions.checkNotNull(content);\n\n Input input = new Input();\n Input.InputInput inputInput = new Input.InputInput();\n inputInput.set(\"csvInstance\", Lists.newArrayList(content));\n input.setInput(inputInput);\n Output result = prediction.trainedmodels().predict(Utils.getProjectId(),\n Constants.MODEL_ID, input).execute();\n return result.getOutputLabel();\n }",
"public Thread classifytext(String lang, String text, String exclude, MashapeCallback<JSONObject> callback) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n \n if (lang != null && !lang.equals(\"\")) {\n \n parameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n \n parameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n \n parameters.put(\"exclude\", exclude);\n }\n \n return HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers,\n callback);\n }",
"public Thread classifytext(String lang, String text, MashapeCallback<JSONObject> callback) {\n return classifytext(lang, text, \"\", callback);\n }",
"public static String getImgText(final File file) {\n\n final ITesseract instance = new Tesseract();\n try {\n\n return instance.doOCR(file);\n } catch (TesseractException e) {\n\n e.getMessage();\n return \"Error while reading image\";\n }\n }",
"private String autoDetectLanguage(ArrayList<File> progFiles) {\n for (File f : progFiles) {\n String f_extension = getFileExtension(f).toLowerCase();\n if (Arrays.asList(IAGConstant.PYTHON_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_PYTHON3;\n }\n if (Arrays.asList(IAGConstant.CPP_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_CPP;\n }\n }\n return IAGConstant.LANGUAGE_UNKNOWN;\n }",
"private String html2safetynet(String text, String language) {\n\n // Convert from html to plain text\n text = TextUtils.html2txt(text, true);\n\n // Remove separator between positions\n text = PositionUtils.replaceSeparator(text, \" \");\n\n // Replace positions with NAVTEX versions\n PositionAssembler navtexPosAssembler = PositionAssembler.newNavtexPositionAssembler();\n text = PositionUtils.updatePositionFormat(text, navtexPosAssembler);\n\n // Remove verbose words, such as \"the\", from the text\n text = TextUtils.removeWords(text, SUPERFLUOUS_WORDS);\n\n // NB: unlike NAVTEX, we do not split into 40-character lines\n\n return text.toUpperCase();\n }",
"private String tesseract(Bitmap bitmap) {\n return \"NOT IMPLEMENTED\";\n }",
"public static String customTextFilter(BufferedImage img, String txt) {\n\n int newHeight = img.getHeight() / 200;\n int newWidth = img.getWidth() / 200;\n String html = \"\";\n int aux = 0;\n\n for (int i = 0; i < 200; i++) {\n if (i > 0) {\n html += \"\\n<br>\\n\";\n }\n for (int j = 0; j < 200; j++) {\n if (aux == txt.length()) {\n html += \"<b> </b>\";\n aux = 0;\n } else {\n Color c = regionAvgColor(j * newWidth, (j * newWidth) + newWidth,\n i * newHeight, (i * newHeight) + newHeight, newHeight,\n newWidth, img);\n html += \"<b style='color:rgb(\" + c.getRed() + \",\"\n + c.getGreen() + \",\" + c.getBlue() + \");'>\"\n + txt.substring(aux, aux + 1) + \"</b>\";\n aux++;\n }\n }\n }\n String style = \"body{\\nfont-size: 15px\\n}\";\n String title = \"Imagen Texto\";\n int styleIndex = HTML.indexOf(\"?S\"), titleIndex = HTML.indexOf(\"?T\"),\n bodyIndex = HTML.indexOf(\"?B\");\n String htmlFile = HTML.substring(0, styleIndex) + style;\n htmlFile += HTML.substring(styleIndex + 2, titleIndex) + title;\n htmlFile += HTML.substring(titleIndex + 2, bodyIndex) + html;\n htmlFile += HTML.substring(bodyIndex + 2);\n return htmlFile;\n }",
"private String getTranslation(String language, String id)\n {\n Iterator<Translation> translations = mTranslationState.iterator();\n \n while (translations.hasNext()) {\n Translation translation = translations.next();\n \n if (translation.getLang().equals(language)) {\n Iterator<TranslationText> texts = translation.texts.iterator();\n \n while (texts.hasNext()) {\n TranslationText text = texts.next();\n \n if (text.getId().equals(id)) {\n text.setUsed(true);\n return text.getValue();\n }\n }\n }\n }\n \n return \"[Translation Not Available]\";\n }",
"private String getLanguage(String fileName)\n {\n if (fileName.endsWith(\".C\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".Java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".CPP\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".Class\"))\n {\n return \"Java\";\n }\n if (fileName.endsWith(\".c\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".cpp\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".class\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".h\"))\n {\n return \"C\";\n }\n else\n {\n return \"??\";\n }\n }",
"@DISPID(-2147413012)\n @PropGet\n java.lang.String language();",
"public String getLanguage();",
"public String detectAndDecode(Mat img) {\n return detectAndDecode_2(nativeObj, img.nativeObj);\n }",
"String getLang();",
"@Override\n public DetectDominantLanguageResult detectDominantLanguage(DetectDominantLanguageRequest request) {\n request = beforeClientExecution(request);\n return executeDetectDominantLanguage(request);\n }",
"private void processTextRecognitionResult(FirebaseVisionText texts) {\n List<FirebaseVisionText.Block> blocks = texts.getBlocks();\n if (blocks.size() == 0) {\n Toast.makeText(getApplicationContext(), \"onDevice: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n for (int i = 0; i < blocks.size(); i++) {\n List<FirebaseVisionText.Line> lines = blocks.get(i).getLines();\n for (int j = 0; j < lines.size(); j++) {\n List<FirebaseVisionText.Element> elements = lines.get(j).getElements();\n for (int k = 0; k < elements.size(); k++) {\n GraphicOverlay.Graphic textGraphic = new TextGraphic(mGraphicOverlay, elements.get(k));\n mGraphicOverlay.add(textGraphic);\n\n }\n }\n }\n }",
"@Override\n public void onSuccess(Text visionText) {\n\n Log.d(TAG, \"onSuccess: \");\n extractText(visionText);\n }",
"public String getText() {\n if (Language.isEnglish()) {\n return textEn;\n } else {\n return textFr;\n }\n }",
"public Elements getTextFromWeb(String lang, String word) {\n\t\tToast t = Toast.makeText(this, \"Buscando...\", Toast.LENGTH_SHORT);\n\t\tt.setGravity(Gravity.TOP, 0, 0); // el show lo meto en el try\n\t\tseleccionado.setText(\"\");\n\t\tresultados.clear();\n\t\tlv.setAdapter(new ArrayAdapter<String>(this, R.layout.my_item_list,\n\t\t\t\tresultados));\n\n\t\tElements res = null;\n\t\tif (!networkAvailable(getApplicationContext())) {\n\t\t\tToast.makeText(this, \"¡Necesitas acceso a internet!\",\n\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t} else {\n\t\t\tString url = \"http://www.wordreference.com/es/translation.asp?tranword=\";\n\t\t\tif (lang == \"aEspa\") {\n\t\t\t\turl += word;\n\t\t\t\tt.show();\n\t\t\t\t/* De ingles a español */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarWR(doc);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\turl = \"http://www.wordreference.com/es/en/translation.asp?spen=\"\n\t\t\t\t\t\t+ word;\n\t\t\t\tt.show();\n\t\t\t\t/* De español a ingles */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\t// no hay\n\t\t\t\t\t// else if (doc.toString().contains(\n\t\t\t\t\t// \"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t// res = procesarWR2(doc);\n\t\t\t\t\t// }\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}",
"CLanguage getClanguage();",
"private Spannable applyWordMarkup(String text) {\n SpannableStringBuilder ssb = new SpannableStringBuilder();\n int languageCodeStart = 0;\n int untranslatedStart = 0;\n\n int textLength = text.length();\n for (int i = 0; i < textLength; i++) {\n char c = text.charAt(i);\n if (c == '.') {\n if (++i < textLength) {\n c = text.charAt(i);\n if (c == '.') {\n ssb.append(c);\n } else if (c == 'c') {\n languageCodeStart = ssb.length();\n } else if (c == 'C') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.language_code_tag),\n languageCodeStart, ssb.length(), 0);\n languageCodeStart = ssb.length();\n } else if (c == 'u') {\n untranslatedStart = ssb.length();\n } else if (c == 'U') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.untranslated_word),\n untranslatedStart, ssb.length(), 0);\n untranslatedStart = ssb.length();\n } else if (c == '0') {\n Resources res = getResources();\n ssb.append(res.getString(R.string.no_translations));\n }\n }\n } else\n ssb.append(c);\n }\n\n return ssb;\n }",
"public Future<String> getLanguage() throws DynamicCallException, ExecutionException {\n return call(\"getLanguage\");\n }",
"private void processCloudTextRecognitionResult(FirebaseVisionCloudText text) {\n // Task completed successfully\n if (text == null) {\n Toast.makeText(getApplicationContext(), \"onCloud: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n List<FirebaseVisionCloudText.Page> pages = text.getPages();\n for (int i = 0; i < pages.size(); i++) {\n FirebaseVisionCloudText.Page page = pages.get(i);\n List<FirebaseVisionCloudText.Block> blocks = page.getBlocks();\n for (int j = 0; j < blocks.size(); j++) {\n List<FirebaseVisionCloudText.Paragraph> paragraphs = blocks.get(j).getParagraphs();\n for (int k = 0; k < paragraphs.size(); k++) {\n FirebaseVisionCloudText.Paragraph paragraph = paragraphs.get(k);\n List<FirebaseVisionCloudText.Word> words = paragraph.getWords();\n for (int l = 0; l < words.size(); l++) {\n GraphicOverlay.Graphic cloudTextGraphic = new CloudTextGraphic(mGraphicOverlay, words.get(l));\n mGraphicOverlay.add(cloudTextGraphic);\n }\n }\n }\n }\n }",
"public interface WordAnalyser {\n\n /**\n * Gets the bounds of all words it encounters in the image\n * \n */\n List<Rectangle> getWordBoundaries();\n\n /**\n * Gets the partial binary pixel matrix of the given word.\n * \n * @param wordBoundary\n * The bounds of the word\n */\n BinaryImage getWordMatrix(Rectangle wordBoundary);\n\n}",
"public void setLanguage(java.lang.String language) {\n _courseImage.setLanguage(language);\n }",
"private void runTextRecognition() {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(mSelectedImage);\n FirebaseVisionTextRecognizer recognizer = FirebaseVision.getInstance()\n .getOnDeviceTextRecognizer();\n //mTextButton.setEnabled(false);\n recognizer.processImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n //mTextButton.setEnabled(true);\n processTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n //mTextButton.setEnabled(true);\n e.printStackTrace();\n }\n });\n }",
"Language findByName(String name);",
"private Word askForWord(Language lastLanguage) throws LanguageException {\n Language language = askForLanguage();\r\n if(language == null || language.equals(lastLanguage)) {\r\n throw new LanguageException();\r\n }\r\n // Step 2 : Name of the word\r\n String name = askForLine(\"Name of the word : \");\r\n Word searchedWord = czech.searchWord(language, name);\r\n if(searchedWord != null) {\r\n System.out.println(\"Word \" + name + \" found !\");\r\n return searchedWord;\r\n }\r\n System.out.println(\"Word \" + name + \" not found.\");\r\n // Step 3 : Gender/Phonetic of the word\r\n String gender = askForLine(\"\\tGender of the word : \");\r\n String phonetic = askForLine(\"\\tPhonetic of the word : \");\r\n // Last step : Creation of the word\r\n Word word = new Word(language, name, gender, phonetic);\r\n int id = czech.getListWords(language).get(-1).getId() + 1;\r\n word.setId(id);\r\n czech.getListWords(language).put(-1, word);\r\n return word;\r\n }",
"public static String RunOCR(Bitmap bitview, Context context, String activityName) {\n TextRecognizer textRecognizer = new TextRecognizer.Builder(context).build();\n if(!textRecognizer.isOperational()){\n // Note: The first time that an app using a Vision API is installed on a\n // device, GMS will download a native libraries to the device in order to do detection.\n // Usually this completes before the app is run for the first time. But if that\n // download has not yet completed, then the above call will not detect any text,\n // barcodes, or faces.\n //\n // isOperational() can be used to check if the required native libraries are currently\n // available. The detectors will automatically become operational once the library\n // downloads complete on device.\n Log.w(activityName, \"Detector dependencies are not yet available\");\n return \"FAILED -Text Recognizer ERROR-\";\n } else {\n Frame frame = new Frame.Builder().setBitmap(bitview).build();\n SparseArray<TextBlock> items = textRecognizer.detect(frame);\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i< items.size(); ++i){\n TextBlock item = items.valueAt(i);\n stringBuilder.append(item.getValue());\n stringBuilder.append(\"\\n\");\n }\n String ocr = stringBuilder.toString();\n Log.i(activityName, \"List of OCRs:\\n\" +ocr+\"\\n\");\n return ocr;\n }\n }",
"public String findExtension(String lang) {\n if (lang == null)\n return \".txt\";\n else if (lang.equals(\"C++\"))\n return \".cpp\";\n else if (lang.equals(\"C\"))\n return \".c\";\n else if (lang.equals(\"PYT\"))\n return \".py\";\n else if (lang.equals(\"JAV\"))\n return \".java\";\n else\n return \".txt\";\n }",
"public AbstractLetterFactory decideLanguage(String lang){\n if(lang==\"ENG\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'m', 'a', 'y', 'n', 'o', 'o', 't', 'h'};\n return new EnglishLetterFactory();\n\n }\n else if(lang==\"RUS\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'м','а', 'ы', 'н', 'о', 'о', 'т', 'х'};\n return new RussianLetterFactory();\n }\n\n return new EnglishLetterFactory();\n\n }",
"private List<String> getLabels(Image image) {\n\t\ttry (ImageAnnotatorClient vision = ImageAnnotatorClient.create()) {\n\n\t\t\t// Creates the request for label detection. The API requires a list, but since the storage\n\t\t\t// bucket doesn't support batch uploads, the list will have only one request per function call\n\t\t\tList<AnnotateImageRequest> requests = new ArrayList<>();\n\t\t\tFeature feat = Feature.newBuilder().setType(Type.LABEL_DETECTION).build();\n\t\t\tAnnotateImageRequest request = AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(image).build();\n\t\t\trequests.add(request);\n\n\t\t\t// Performs label detection on the image file\n\t\t\tList<AnnotateImageResponse> responses = vision.batchAnnotateImages(requests).getResponsesList();\n\n\t\t\t// Iterates through the responses, though in reality there will only be one response\n\t\t\tfor (AnnotateImageResponse res : responses) {\n\t\t\t\tif (res.hasError()) {\n\t\t\t\t\tlogger.log(Level.SEVERE, \"Error getting annotations: \" + res.getError().getMessage());\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Return the first 3 generated labels\n\t\t\t\treturn res.getLabelAnnotationsList().stream().limit(3L).map(e -> e.getDescription())\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"private void pirateRecipe(String text) {\n if (\"excitedze\".equals(text)) {\n LanguageManager languagemanager = this.mc.getLanguageManager();\n Language language = languagemanager.getLanguage(\"en_pt\");\n if (languagemanager.getCurrentLanguage().compareTo(language) == 0) {\n return;\n }\n\n languagemanager.setCurrentLanguage(language);\n this.mc.gameSettings.language = language.getCode();\n net.minecraftforge.client.ForgeHooksClient.refreshResources(this.mc, net.minecraftforge.resource.VanillaResourceType.LANGUAGES);\n this.mc.gameSettings.saveOptions();\n }\n\n }",
"public byte[] decode_text(byte[] image) {\n int length = 0;\n int offset = 32;\n // loop through 32 bytes of data to determine text length\n for (int i = 0; i < 32; ++i) // i=24 will also work, as only the 4th\n // byte contains real data\n {\n length = (length << 1) | (image[i] & 1);\n }\n\n byte[] result = new byte[length];\n\n // loop through each byte of text\n for (int b = 0; b < result.length; ++b) {\n // loop through each bit within a byte of text\n for (int i = 0; i < 8; ++i, ++offset) {\n // assign bit: [(new byte value) << 1] OR [(text byte) AND 1]\n result[b] = (byte) ((result[b] << 1) | (image[offset] & 1));\n }\n }\n return result;\n }",
"public abstract void startVoiceRecognition(String language);",
"@Override\n public void run() {\n try {\n byte[] photoData = IOUtils.toByteArray(inputStream);\n inputStream.close();\n //Mat src = Imgcodecs.imdecode(new MatOfByte(photoData), Imgcodecs.CV_LOAD_IMAGE_UNCHANGED);\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n\n\n\n// //OCR PREPROCESSING FOR FAREHA'S MODULE\n// try{\n//// Mat src = Utils.loadResource(reportAnalysisActivity.this, R.drawable.bloodf, Imgcodecs.CV_LOAD_IMAGE_GRAYSCALE);\n// //boolean ans = src.isContinuous();\n// //1. Resizing\n// double ratio = (double)src.width()/src.height();\n// if(src.width()>768){\n// int newHeight = (int)(768/ratio);\n// Imgproc.resize(src,src,new Size(768,newHeight ));\n// }\n// else if(src.height()>1024){\n// int newWidth = (int)(1024*ratio);\n// Imgproc.resize(src,src,new Size(newWidth,1024));\n// }\n//\n// //2. denoising\n// Photo.fastNlMeansDenoising(src,src,10,7,21);\n// }\n// catch(Exception e){}\n//\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n//\n Image inputImage = new Image();\n inputImage.encodeContent(photoData);\n\n Feature desiredFeature = new Feature();\n desiredFeature.setType(\"TEXT_DETECTION\");\n\n BatchAnnotateImagesRequest batchRequest =\n new BatchAnnotateImagesRequest();\n final AnnotateImageRequest request = new AnnotateImageRequest();\n request.setImage(inputImage);\n request.setFeatures(Arrays.asList(desiredFeature));\n batchRequest.setRequests(Arrays.asList(request));\n BatchAnnotateImagesResponse batchResponse = vision.images().annotate(batchRequest).execute();\n text = batchResponse.getResponses().get(0).getFullTextAnnotation();\n\n int block_number = -1;\n int current_block = 0;\n ArrayList<Vertex> block_coords = new ArrayList<Vertex>();\n\n for (Page page : text.getPages()) {\n for (Block block : page.getBlocks()) {\n\n block_number++;\n //Save vertices of all the blocks\n block_coords.add(block.getBoundingBox().getVertices().get(0));\n allBlocks.add(block);\n\n for (Paragraph paragraph : block.getParagraphs()) {\n for (Word word : paragraph.getWords()) {\n String c_word = \"\";\n for (Symbol symbol : word.getSymbols()) {\n c_word += symbol.getText();\n }\n if (c_word.equals(\"WBC\") || c_word.equals(\"RBC\") ||\n c_word.equals(\"HB\") || c_word.equals(\"Hb\") || c_word.contains(\"Hemoglobin\") || c_word.equals(\"Haemoglobin\")\n || c_word.equals(\"Hematocrit\") || c_word.equals(\"HCT\") || c_word.equals(\"MCV\") || c_word.equals(\"MCH\")\n || c_word.equals(\"MCHC\") || c_word.contains(\"Platelet\") || c_word.equals(\"PLT\") || c_word.equals(\"ESR\")\n || c_word.equals(\"LYM\") || c_word.equals(\"LYM#\") || c_word.equals(\"LYM%\") || c_word.contains(\"Lym\")\n || c_word.equals(\"NEUT#\") || c_word.contains(\"NUET%\") || c_word.equals(\"NEUT\") || c_word.contains(\"Neut\")\n || c_word.contains(\"Monocytes\") || c_word.contains(\"Eosinophils\")\n || c_word.equals(\"Mixed Cells\") ||c_word.equals(\"Basophils\") ||c_word.equals(\"Bands\") ||\n c_word.contains(\"Bilirubin\") || c_word.equals(\"ALT\") || c_word.equals(\"SGPT\") || c_word.equals(\"ALK-Phos\") || c_word.contains(\"Alk\")\n || c_word.equals(\"ALK\")) {\n\n //Store the y coords of blocks containing testnames in array if not already saved\n if (testnameBlocks_coords.isEmpty() || !testnameBlocks_coords.contains(block_coords.get(block_number)))\n testnameBlocks_coords.add(block_coords.get(block_number));\n }\n }\n }\n }\n\n }\n\n //Sort the array containing the blocks that contain the test names in an order of largest y coordinates\n Collections.sort(testnameBlocks_coords, new Comparator<Vertex>() {\n @Override\n public int compare(Vertex x1, Vertex x2) {\n int result= Integer.compare(x1.getY(), x2.getY());\n if(result==0){\n //both ys are equal so we compare the x\n result=Integer.compare(x1.getX(), x2.getX());\n }\n return result;\n }\n });\n\n //Save the names of the testnames in order in test_name array\n int blocknum = 0;\n for (int j = 0; j < testnameBlocks_coords.size(); j++) {\n for (int i = 0; i < allBlocks.size(); i++) {\n if (allBlocks.get(i).getBoundingBox().getVertices().get(0) == testnameBlocks_coords.get(j)) {\n blocknum = i; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n for (Paragraph paragraph : allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for (Word word : paragraph.getWords()) {\n String name = \"\";\n for (Symbol symbol : word.getSymbols()) {\n name += symbol.getText();\n //save the testnames in testnames array\n }\n if (name.equals(\"%\") || name.equals(\"#\") || name.equals(\"Count\") || name.equals(\",\")\n || name.equals(\"Level\")) {\n StringBuilder stringBuilder = new StringBuilder(testnames.get(testnames.size() - 1));\n stringBuilder.append(name);\n testnames.add(testnames.size() - 1, stringBuilder.toString());\n testnames.remove(testnames.size() - 1);\n }\n else if (name.equals(\"WBC\") || name.equals(\"RBC\") ||\n name.equals(\"HB\") || name.equals(\"Hb\") || name.contains(\"Hemoglobin\") || name.equals(\"Haemoglobin\")\n || name.equals(\"Hematocrit\") || name.equals(\"HCT\") || name.equals(\"MCV\") || name.equals(\"MCH\")\n || name.equals(\"MCHC\") || name.contains(\"Platelet\") || name.equals(\"PLT\") || name.equals(\"ESR\")\n || name.equals(\"LYM\") || name.equals(\"LYM#\") || name.equals(\"LYM%\") || name.contains(\"Lym\")\n || name.equals(\"NEUT#\") || name.contains(\"NUET%\") || name.equals(\"NEUT\") || name.contains(\"Neut\")\n || name.contains(\"Monocytes\") || name.contains(\"Eosinophils\")\n || name.equals(\"Mixed Cells\") ||name.equals(\"Basophils\") ||name.equals(\"Bands\") ||\n name.contains(\"Bilirubin\") || name.equals(\"ALT\") || name.equals(\"SGPT\") || name.equals(\"ALK-Phos\") || name.contains(\"Alk.\")\n || name.equals(\"ALK\"))\n testnames.add(name);\n\n }\n }\n\n }\n\n //Below is the procedure to find the values of testvalues\n int result_block_index = 0;\n int num_of_values=0;\n int diff=0;\n ArrayList<Integer> ignoreIndex=new ArrayList<Integer>();\n Boolean isFloat=true;\n float value=0;\n\n while(num_of_values<testnames.size()){\n //next block of values\n if(!testvaluesBlocks_coords.isEmpty()){\n int previous_result_block_index = result_block_index; //Index at which the value block lies\n diff = Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX())<diff && previous_result_block_index!=i){\n if(!ignoreIndex.contains(i)){\n diff= Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX());\n result_block_index=i;\n }\n\n }\n }\n }\n //first block of values\n else{\n //Getting values from te first block\n diff=Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY())<diff && block_coords.indexOf(testnameBlocks_coords.get(0))!=i){\n if(!ignoreIndex.contains(i)){\n diff= testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY();\n result_block_index=i;\n }\n\n }\n }\n }\n isFloat=false;\n for(Paragraph paragraph: allBlocks.get(result_block_index).getParagraphs()){\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n\n }\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n if(value_string.contains(\"-\")){\n isFloat=false;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n break;\n }\n try{\n value= Float.parseFloat(value_string);\n num_of_values++;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n isFloat=true;\n\n }\n catch (NumberFormatException e){\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n }\n\n\n\n\n }\n }\n\n if(isFloat){\n //Save y coordinates of value block\n testvaluesBlocks_coords.add(block_coords.get(result_block_index).getY());\n }\n }\n //sort test values coordinates array\n Collections.sort(testvaluesBlocks_coords);\n\n //save the values in an array\n for(int i=0; i<testvaluesBlocks_coords.size();i++){\n for(int j=0; j<allBlocks.size();j++){\n if(allBlocks.get(j).getBoundingBox().getVertices().get(0).getY()==testvaluesBlocks_coords.get(i)){\n blocknum=j; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n //save values in array\n for (Paragraph paragraph: allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n }\n\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n try{\n value= Float.parseFloat(value_string);\n //save the testnames in testnames array\n testValues.add(Float.parseFloat(value_string));\n }\n catch(NumberFormatException n){\n\n }\n }\n\n }\n }\n\n for (int a = 0; a < testnames.size(); a++) {\n Log.e(testnames.get(a), Float.toString(testValues.get(a)));\n }\n\n //Convert the testname and testvalues array to string so they can be passed on\n StringBuilder sb = new StringBuilder();\n StringBuilder sb2 = new StringBuilder();\n for (int i = 0; i < testnames.size(); i++) {\n sb.append(testnames.get(i)).append(\",\");\n sb2.append(testValues.get(i)).append(\",\");\n\n }\n\n //Save the values and testnames so they can be passed on to next activity\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(reportAnalysisActivity.this);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"testnames\", sb.toString());\n editor.putString(\"testvalues\", sb2.toString());\n editor.putString(\"gender\", gender);\n editor.apply();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Intent reportresultScreen = new Intent(view.getContext(), reportResult_Activity.class);\n startActivity(reportresultScreen);\n }\n });\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n done=true;\n }",
"@Override\n public String recognizeImage(final Bitmap bitmap) {\n Trace.beginSection(\"recognizeImage\");\n\n Trace.beginSection(\"preprocessBitmap\");\n // Preprocess the image data from 0-255 int to normalized float based\n // on the provided parameters.\n bitmapToInputData(bitmap);\n Trace.endSection(); // preprocessBitmap\n\n // Run the inference call.\n Trace.beginSection(\"run\");\n\n tfLite.run(imgData, tfoutput_recognize);\n\n Trace.endSection();\n postPro = new Postprocessing(tfoutput_recognize);\n predictClass = postPro.postRecognize();\n Trace.endSection(); // \"recognizeImage\"\n\n //LOGGER.w(\"\"+(System.currentTimeMillis()-startTime));\n return labels.get(predictClass);\n }",
"boolean hasLanguage();",
"List<Label> findAllByLanguage(String language);",
"public String getDescription(String lang) {\n/* 188 */ return getLangAlt(lang, \"description\");\n/* */ }",
"public String getLanguage() throws DynamicCallException, ExecutionException {\n return (String)call(\"getLanguage\").get();\n }",
"public String getPredefinedTextMessage( String language, int preDefindeMsgId );",
"public void englishlanguage() {\nSystem.out.println(\"englishlanguage\");\n\t}",
"public interface LanguageProvider {\n\tLanguageService study();\n}",
"DetectionResult getObjInImage(Mat image);",
"private void runTextRecognition(Bitmap bitmap) {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionTextDetector detector = FirebaseVision.getInstance().getVisionTextDetector();\n\n detector.detectInImage(image).addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n processTextRecognitionResult(texts);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n e.printStackTrace();\n }\n });\n }",
"private void performOCR(){\n }",
"private static String italianAnalyzer(String label) throws IOException\r\n\t{\r\n\t\t// recupero le stopWords dell'ItalianAnalyzer\r\n\t\tCharArraySet stopWords = ItalianAnalyzer.getDefaultStopSet();\r\n\t\t// andiamo a tokenizzare la label\r\n\t\tTokenStream tokenStream = new StandardTokenizer(Version.LUCENE_48, new StringReader(label));\r\n\t\t// richiamo l'Elision Filter che si occupa di elidere le lettere apostrofate\r\n\t\ttokenStream = new ElisionFilter(tokenStream, stopWords);\r\n\t\t// richiamo il LowerCaseFilter\r\n\t\ttokenStream = new LowerCaseFilter(Version.LUCENE_48, tokenStream);\r\n\t\t// richiamo lo StopFilter per togliere le stop word\r\n\t\ttokenStream = new StopFilter(Version.LUCENE_48, tokenStream, stopWords);\r\n\t\t// eseguo il processo di stemming italiano per ogni token\r\n\t\ttokenStream = new ItalianLightStemFilter(tokenStream);\r\n\t\t\r\n\t\t/*\r\n\t\t * ricostruisco la stringa in precedenza tokenizzata\r\n\t\t */\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t CharTermAttribute charTermAttribute = tokenStream.addAttribute(CharTermAttribute.class);\r\n\t tokenStream.reset();\r\n\r\n\t while (tokenStream.incrementToken()) \r\n\t {\r\n\t String term = charTermAttribute.toString();\r\n\t sb.append(term + \" \");\r\n\t }\r\n \r\n\t tokenStream.close();\r\n\t // elimino l'ultimo carattere (spazio vuoto)\r\n\t String l = sb.toString().substring(0,sb.toString().length()-1);\r\n\t \r\n\t// ritorno la label stemmata\r\n return l;\r\n\t\r\n\t}",
"private void runCloudTextRecognition(Bitmap bitmap) {\n FirebaseVisionCloudDetectorOptions options =\n new FirebaseVisionCloudDetectorOptions.Builder()\n .setModelType(FirebaseVisionCloudDetectorOptions.LATEST_MODEL)\n .setMaxResults(15)\n .build();\n mCameraButtonCloud.setEnabled(false);\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionCloudDocumentTextDetector detector = FirebaseVision.getInstance()\n .getVisionCloudDocumentTextDetector(options);\n detector.detectInImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionCloudText>() {\n @Override\n public void onSuccess(FirebaseVisionCloudText texts) {\n mCameraButtonCloud.setEnabled(true);\n processCloudTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n mCameraButtonCloud.setEnabled(true);\n e.printStackTrace();\n }\n });\n }",
"PsiFile[] findFilesWithPlainTextWords( String word);",
"public void detectLanguage(final View view)\n {\n Toast.makeText(getApplicationContext(), \"Under Construction\", Toast.LENGTH_SHORT).show();\n }",
"public BufferedImage add_text(BufferedImage image, String text) {\n // convert all items to byte arrays: image, message, message length\n byte img[] = get_byte_data(image);\n byte msg[] = text.getBytes();\n byte len[] = bit_conversion(msg.length);\n try {\n encode_text(img, len, 0); // 0 first positiong\n encode_text(img, msg, 32); // 4 bytes of space for length:\n // 4bytes*8bit = 32 bits\n }\n catch (Exception e) {\n JOptionPane.showMessageDialog(\n null,\n \"Target File cannot hold message!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n return image;\n }",
"String translate(String text, String fromLanguage, String toLanguage) throws TranslationException;",
"java.lang.String getTargetLanguageCode();",
"private void verifyTextAndLabels(){\n common.explicitWaitVisibilityElement(\"//*[@id=\\\"content\\\"]/article/h2\");\n\n //Swedish labels\n common.timeoutMilliSeconds(500);\n textAndLabelsSwedish();\n\n //Change to English\n common.selectEnglish();\n\n //English labels\n textAndLabelsEnglish();\n }",
"private ArrayList<OWLLiteral> getLabels(OWLEntity entity, OWLOntology ontology, String lang) {\n\t\tOWLDataFactory df = OWLManager.createOWLOntologyManager().getOWLDataFactory();\n\t\tOWLAnnotationProperty label = df.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI());\t\n\n\t\tArrayList<OWLLiteral> labels = new ArrayList<OWLLiteral>();\n\t\tfor (OWLAnnotation annotation : entity.getAnnotations(ontology, label)) {\n\t\t\tif (annotation.getValue() instanceof OWLLiteral) {\n\t\t\t\tOWLLiteral val = (OWLLiteral) annotation.getValue();\n\t\t\t\tif (val.hasLang(\"en\")) {\n\t\t\t\t\tlabels.add(val);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn labels;\n\t}",
"public static BufferedImage getTextImage (String text, String fontName, float fontSize) {\n\t\tBufferedImage img = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);\n\t\tGraphics2D g2d = img.createGraphics();\n\t\tFont font = ExternalResourceManager.getFont(fontName).deriveFont(fontSize);\n\t\tg2d.setFont(font);\n//\t\tnew Font\n\t\tFontMetrics fm = g2d.getFontMetrics();\n\t\tint w = fm.stringWidth(text), h = fm.getHeight();\n\t\tg2d.dispose();\n\t\t// draw image\n\t\timg = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);\n\t\tg2d = img.createGraphics();\n\t\tg2d.setFont(font);\n fm = g2d.getFontMetrics();\n g2d.setColor(Color.BLACK);\n g2d.setBackground(new Color(0, 0, 0, 0));\n g2d.drawString(text, 0, fm.getAscent());\n g2d.dispose();\n\t\treturn img;\n\t}",
"String translateEnglishToDothraki(String englishText) throws Exception\n\t{\n\t\tString urlHalf1 = \"https://api.funtranslations.com/translate/dothraki.json?text=\";\n\t\tString url = urlHalf1 + englishText;\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString jsonData = getJsonData(url);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tString translation = \"\";\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject treeObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement contents = treeObject.get(\"contents\");\n\n\t\t\tif (contents.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject contentsObject = contents.getAsJsonObject();\n\n\t\t\t\tJsonElement translateElement = contentsObject.get(\"translated\");\n\n\t\t\t\ttranslation = translateElement.getAsString();\n\t\t\t}\n\t\t}\n\n\t\treturn translation;\n\t}",
"int getLocalizedText();",
"Builder addInLanguage(Text value);",
"default String getOriginalText() {\n return meta(\"nlpcraft:nlp:origtext\");\n }",
"public static String getTranslation(String original, String originLanguage, String targetLanguage) {\n\t\tif (Options.getDebuglevel() > 1)\n\t\t\tSystem.out.println(\"Translating: \" + original);\n\t\ttry {\n\t\t\tDocument doc = Jsoup\n\t\t\t\t\t.connect(\"http://translate.reference.com/\" + originLanguage + \"/\" + targetLanguage + \"/\" + original)\n\t\t\t\t\t.userAgent(\"PlagTest\").get();\n\t\t\tElement e = doc.select(\"textarea[Placeholder=Translation]\").first();\n\t\t\tString text = e.text().trim();\n\t\t\tif (text.equalsIgnoreCase(original.trim()))\n\t\t\t\treturn null;\n\t\t\treturn text;\n\t\t} catch (Exception e1) {\n\t\t}\n\t\treturn null;\n\t}",
"public String extractText(String urlString) {\n String text = \"\";\n try {\n URL url = new URL(urlString);\n text = ArticleExtractor.INSTANCE.getText(url); \n } catch (Exception ex) {\n Logger.getLogger(TextExtractor.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return text;\n }",
"com.google.ads.googleads.v6.resources.LanguageConstant getLanguageConstant();",
"public void selectLanguage(String language) {\n\n String xpath = String.format(EST_LANGUAGE, language);\n List<WebElement> elements = languages.findElements(By.xpath(xpath));\n for (WebElement element : elements) {\n if (element.isDisplayed()) {\n element.click();\n break;\n }\n }\n }",
"@Override\n public String getText() {\n return analyzedWord;\n }",
"public String classify(String text){\n\t\treturn mClassifier.classify(text).bestCategory();\n\t}",
"public String getThaiWordFromEngWord(String englishWord) {\n Cursor cursor = mDatabase.query(\n TABLE_NAME,\n new String[]{COL_THAI_WORD},\n COL_ENG_WORD + \"=?\",\n new String[]{englishWord},\n null,\n null,\n null\n );\n if (cursor.getCount() > 0) {\n cursor.moveToFirst();\n return cursor.getString(cursor.getColumnIndex(COL_THAI_WORD));\n } else {\n return englishWord;\n }\n }",
"@Source(\"gr/grnet/pithos/resources/translate.png\")\n ImageResource selectAll();",
"public void Croppedimage(CropImage.ActivityResult result, ImageView iv, EditText et )\n {\n Uri resultUri = null; // get image uri\n if (result != null) {\n resultUri = result.getUri();\n }\n\n\n //set image to image view\n iv.setImageURI(resultUri);\n\n\n //get drawable bitmap for text recognition\n BitmapDrawable bitmapDrawable = (BitmapDrawable) iv.getDrawable();\n\n Bitmap bitmap = bitmapDrawable.getBitmap();\n\n TextRecognizer recognizer = new TextRecognizer.Builder(getApplicationContext()).build();\n\n if(!recognizer.isOperational())\n {\n Toast.makeText(this, \"Error No Text To Recognize\", Toast.LENGTH_LONG).show();\n }\n else\n {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n SparseArray<TextBlock> items = recognizer.detect(frame);\n StringBuilder ab = new StringBuilder();\n\n //get text from ab until there is no text\n for(int i = 0 ; i < items.size(); i++)\n {\n TextBlock myItem = items.valueAt(i);\n ab.append(myItem.getValue());\n\n }\n\n //set text to edit text\n et.setText(ab.toString());\n }\n\n }",
"@DISPID(-2147413103)\n @PropGet\n java.lang.String lang();",
"public String getLocale () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"private String getPhrase(String key) {\r\n if (\"pl\".equals(System.getProperty(\"user.language\")) && phrasesPL.containsKey(key)) {\r\n return phrasesPL.get(key);\r\n } else if (phrasesEN.containsKey(key)) {\r\n return phrasesEN.get(key);\r\n }\r\n return \"Translation not found!\";\r\n }",
"public String detectObject(Bitmap bitmap) {\n results = classifierObject.recognizeImage(bitmap);\n\n // Toast.makeText(context, results.toString(), Toast.LENGTH_LONG).show();\n return String.valueOf(results.toString());\n }",
"@Override\n protected int onIsLanguageAvailable(String lang, String country, String variant) {\n if (\"eng\".equals(lang)) {\n // We support two specific robot languages, the british robot language\n // and the american robot language.\n if (\"USA\".equals(country) || \"GBR\".equals(country)) {\n // If the engine supported a specific variant, we would have\n // something like.\n //\n // if (\"android\".equals(variant)) {\n // return TextToSpeech.LANG_COUNTRY_VAR_AVAILABLE;\n // }\n return TextToSpeech.LANG_COUNTRY_AVAILABLE;\n }\n\n // We support the language, but not the country.\n return TextToSpeech.LANG_AVAILABLE;\n }\n\n return TextToSpeech.LANG_NOT_SUPPORTED;\n }",
"public void setLanguage(String language);",
"String text();",
"public WordInfo searchWord(String word) {\n\t\tSystem.out.println(\"Dic:SearchWord: \"+word);\n\n\t\tDocument doc;\n\t\ttry {\n\t\t\tdoc = Jsoup.connect(\"https://dictionary.cambridge.org/dictionary/english-vietnamese/\" + word).get();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\tElements elements = doc.select(\".dpos-h.di-head.normal-entry\");\n\t\tif (elements.isEmpty()) {\n\t\t\tSystem.out.println(\" not found\");\n\t\t\treturn null;\n\t\t}\n\n\t\tWordInfo wordInfo = new WordInfo(word);\n\n\t\t// Word\n\t\telements = doc.select(\".tw-bw.dhw.dpos-h_hw.di-title\");\n\n\t\tif (elements.size() == 0) {\n\t\t\tSystem.out.println(\" word not found in doc!\");\n\t\t\treturn null;\n\t\t}\n\n\t\twordInfo.setWordDictionary(elements.get(0).html());\n\n\t\t// Type\n\t\telements = doc.select(\".pos.dpos\");\n\n\t\tif(elements.size() > 0) {\n\t\t\twordInfo.setType(WordInfo.getTypeShort(elements.get(0).html()));\n//\t\t\tif (wordInfo.getTypeShort().equals(\"\"))\n//\t\t\t\tSystem.out.println(\" typemis: \"+wordInfo.getType());\n\t\t}\n\n\t\t// Pronoun\n\t\telements = doc.select(\".ipa.dipa\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setAPI(\"/\"+elements.get(0).html()+\"/\");\n\n\t\t// Trans\n\t\telements = doc.select(\".trans.dtrans\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setTrans(elements.get(0).html());\n\n\t\tSystem.out.println(\" found\");\n\t\treturn wordInfo;\n\t}"
]
| [
"0.6340801",
"0.5908911",
"0.58815557",
"0.56125695",
"0.54998386",
"0.5477398",
"0.5472436",
"0.54383487",
"0.54383487",
"0.54241633",
"0.5411288",
"0.5399041",
"0.53873235",
"0.5367456",
"0.53567713",
"0.53567713",
"0.53567713",
"0.5354653",
"0.5304111",
"0.5296139",
"0.52609426",
"0.5256295",
"0.52469003",
"0.5227871",
"0.5227503",
"0.51627934",
"0.51366884",
"0.5132681",
"0.5124243",
"0.50965005",
"0.5073502",
"0.50573194",
"0.5053984",
"0.50325114",
"0.50287145",
"0.5026039",
"0.49775523",
"0.49756226",
"0.49754003",
"0.49698895",
"0.4965898",
"0.49589223",
"0.4947393",
"0.49402016",
"0.4936062",
"0.491651",
"0.49079528",
"0.4901984",
"0.4901873",
"0.48954538",
"0.48754418",
"0.48720878",
"0.48705855",
"0.48639196",
"0.4862045",
"0.4859524",
"0.4857446",
"0.483705",
"0.48177797",
"0.48138455",
"0.4799299",
"0.4758428",
"0.475805",
"0.4751387",
"0.47349215",
"0.47277245",
"0.4724874",
"0.46811676",
"0.4679775",
"0.46651345",
"0.46608913",
"0.46405634",
"0.46393868",
"0.46346596",
"0.46283433",
"0.46246725",
"0.4622929",
"0.46218535",
"0.46208444",
"0.4619674",
"0.46116024",
"0.4601757",
"0.4601488",
"0.45977402",
"0.4596848",
"0.4596606",
"0.45920032",
"0.4591659",
"0.45892608",
"0.45795617",
"0.45766595",
"0.4571272",
"0.45672256",
"0.45600197",
"0.45597628",
"0.4557801",
"0.45491737",
"0.45459962",
"0.4545532",
"0.4545111",
"0.45398226"
]
| 0.0 | -1 |
Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. | public Observable<OCRInner> oCRUrlInputAsync(String language, String contentType, BodyModelInner imageUrl, Boolean cacheImage, Boolean enhanced) {
return oCRUrlInputWithServiceResponseAsync(language, contentType, imageUrl, cacheImage, enhanced).map(new Func1<ServiceResponse<OCRInner>, OCRInner>() {
@Override
public OCRInner call(ServiceResponse<OCRInner> response) {
return response.body();
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String detectLanguage(String text) {\n\t\treturn dictionary.detectLanguage(text);\n\t}",
"public boolean translateImageToText();",
"@SuppressWarnings(\"static-access\")\n\tpublic void detection(Request text) {\n\t\t//Fichiertxt fichier;\n\t\ttry {\t\t\t\t\t\n\t\t\t//enregistrement et affichage de la langue dans une variable lang\n\t\t\ttext.setLang(identifyLanguage(text.getCorpText()));\n\t\t\t//Ajoute le fichier traité dans la Base\n\t\t\tajouterTexte(text);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"fichier texte non trouvé\");\n\t e.printStackTrace();\n\t\t}\n\t}",
"public MashapeResponse<JSONObject> classifytext(String lang, String text) {\n return classifytext(lang, text, \"\");\n }",
"static WordList get(Language language) {\n return switch (language) {\n case ENGLISH -> readResource(\"bip39_english.txt\");\n };\n }",
"void readText(final Bitmap imageBitmap){\n\t\tif(imageBitmap != null) {\n\t\t\t\n\t\t\tTextRecognizer textRecognizer = new TextRecognizer.Builder(this).build();\n\t\t\t\n\t\t\tif(!textRecognizer.isOperational()) {\n\t\t\t\t// Note: The first time that an app using a Vision API is installed on a\n\t\t\t\t// device, GMS will download a native libraries to the device in order to do detection.\n\t\t\t\t// Usually this completes before the app is run for the first time. But if that\n\t\t\t\t// download has not yet completed, then the above call will not detect any text,\n\t\t\t\t// barcodes, or faces.\n\t\t\t\t// isOperational() can be used to check if the required native libraries are currently\n\t\t\t\t// available. The detectors will automatically become operational once the library\n\t\t\t\t// downloads complete on device.\n\t\t\t\tLog.w(TAG, \"Detector dependencies are not yet available.\");\n\t\t\t\t\n\t\t\t\t// Check for low storage. If there is low storage, the native library will not be\n\t\t\t\t// downloaded, so detection will not become operational.\n\t\t\t\tIntentFilter lowstorageFilter = new IntentFilter(Intent.ACTION_DEVICE_STORAGE_LOW);\n\t\t\t\tboolean hasLowStorage = registerReceiver(null, lowstorageFilter) != null;\n\t\t\t\t\n\t\t\t\tif (hasLowStorage) {\n\t\t\t\t\tToast.makeText(this,\"Low Storage\", Toast.LENGTH_LONG).show();\n\t\t\t\t\tLog.w(TAG, \"Low Storage\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tFrame imageFrame = new Frame.Builder()\n\t\t\t\t\t.setBitmap(imageBitmap)\n\t\t\t\t\t.build();\n\t\t\t\n\t\t\tSparseArray<TextBlock> textBlocks = textRecognizer.detect(imageFrame);\n\t\t\tdata.setText(\"\");\n\t\t\tfor (int i = 0; i < textBlocks.size(); i++) {\n\t\t\t\tTextBlock textBlock = textBlocks.get(textBlocks.keyAt(i));\n\t\t\t\tPoint[] points = textBlock.getCornerPoints();\n\t\t\t\tLog.i(TAG, textBlock.getValue());\n\t\t\t\tString corner = \"\";\n\t\t\t\tfor(Point point : points){\n\t\t\t\t\tcorner += point.toString();\n\t\t\t\t}\n\t\t\t\t//data.setText(data.getText() + \"\\n\" + corner);\n\t\t\t\tdata.setText(data.getText()+ \"\\n \"+ textBlock.getValue() + \" \\n\" );\n\t\t\t\t// Do something with value\n /*List<? extends Text> textComponents = textBlock.getComponents();\n for(Text currentText : textComponents) {\n // Do your thing here }\n mImageDetails.setText(mImageDetails.getText() + \"\\n\" + currentText);\n }*/\n\t\t\t}\n\t\t}\n\t}",
"public String getEnglish()\n {\n if (spanishWord.substring(0,3).equals(\"el \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n else if (spanishWord.substring(0, 3).equals(\"la \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n if (spanishWord.equals(\"estudiante\"))\n {\n return \"student\"; \n }\n else if (spanishWord.equals(\"aprender\"))\n {\n return \"to learn\";\n }\n else if (spanishWord.equals(\"entender\"))\n {\n return\"to understand\";\n }\n else if (spanishWord.equals(\"verde\"))\n {\n return \"green\";\n }\n else\n {\n return null;\n }\n }",
"java.lang.String getLanguage();",
"java.lang.String getLanguage();",
"private void detextTextFromImage(Bitmap imageBitmap) {\n\n\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(imageBitmap);\n\n FirebaseVisionTextRecognizer firebaseVisionTextRecognizer = FirebaseVision.getInstance().getCloudTextRecognizer();\n\n firebaseVisionTextRecognizer.processImage(image)\n .addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText firebaseVisionText) {\n String text = firebaseVisionText.getText();\n\n if (text.isEmpty() || text == null)\n Toast.makeText(ctx, \"Can not identify. Try again!\", Toast.LENGTH_SHORT).show();\n\n else {\n\n startTranslateIntent(text);\n }\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n e.printStackTrace();\n }\n });\n\n\n }",
"public synchronized Result process(String text, String lang) {\n // Check that service has been initialized.\n if (!this.initialized) {\n logInitializationError();\n return null;\n }\n this.cas.reset();\n this.cas.setDocumentText(text);\n if (lang != null) {\n this.cas.setDocumentLanguage(lang);\n }\n try {\n this.ae.process(this.cas);\n } catch (AnalysisEngineProcessException e) {\n getLogger().log(Level.SEVERE, \"\", e);\n return null;\n }\n return this.resultExtractor.getResult(this.cas, this.serviceSpec);\n }",
"private static AnalysisResults.Builder retrieveText(ByteString imageBytes) throws IOException {\n AnalysisResults.Builder analysisBuilder = new AnalysisResults.Builder();\n\n Image image = Image.newBuilder().setContent(imageBytes).build();\n ImmutableList<Feature> features =\n ImmutableList.of(Feature.newBuilder().setType(Feature.Type.TEXT_DETECTION).build(),\n Feature.newBuilder().setType(Feature.Type.LOGO_DETECTION).build());\n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addAllFeatures(features).setImage(image).build();\n ImmutableList<AnnotateImageRequest> requests = ImmutableList.of(request);\n\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n BatchAnnotateImagesResponse batchResponse = client.batchAnnotateImages(requests);\n\n if (batchResponse.getResponsesList().isEmpty()) {\n return analysisBuilder;\n }\n\n AnnotateImageResponse response = Iterables.getOnlyElement(batchResponse.getResponsesList());\n\n if (response.hasError()) {\n return analysisBuilder;\n }\n\n // Add extracted raw text to builder.\n if (!response.getTextAnnotationsList().isEmpty()) {\n // First element has the entire raw text from the image.\n EntityAnnotation textAnnotation = response.getTextAnnotationsList().get(0);\n\n String rawText = textAnnotation.getDescription();\n analysisBuilder.setRawText(rawText);\n }\n\n // If a logo was detected with a confidence above the threshold, use it to set the store.\n if (!response.getLogoAnnotationsList().isEmpty()\n && response.getLogoAnnotationsList().get(0).getScore()\n > LOGO_DETECTION_CONFIDENCE_THRESHOLD) {\n String store = response.getLogoAnnotationsList().get(0).getDescription();\n analysisBuilder.setStore(store);\n }\n } catch (ApiException e) {\n // Return default builder if image annotation request failed.\n return analysisBuilder;\n }\n\n return analysisBuilder;\n }",
"public java.lang.String getLanguage() {\n return _courseImage.getLanguage();\n }",
"public void ocrExtraction(BufferedImage image) {\n\t\tFile outputfile = new File(\"temp.png\");\n\t\toutputfile.deleteOnExit();\n\t\tString ocrText = \"\", currLine = \"\";\n\t\ttry {\n\t\t\tImageIO.write(image, \"png\", outputfile);\n\n\t\t\t// System call to Tesseract OCR\n\t\t\tRuntime r = Runtime.getRuntime();\n\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText -psm 6\");\n//\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText\");\n\t\t\tp.waitFor();\n\n\t\t\t// Read text file generated by tesseract\n\t\t\tFile f = new File(\"ocrText.txt\");\n\t\t\tf.deleteOnExit();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\t\t\n\t\t\twhile ((currLine = br.readLine()) != null) {\n\t\t\t\tocrText += (currLine + \" \");\n\t\t\t}\n\t\t\tif(ocrText.trim().isEmpty()) {\n\t\t\t\tocrText = \"OCR_FAIL\";\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttextField.setText(ocrText.trim());\n\t\ttextField.requestFocus();\n\t\ttextField.selectAll();\n\t}",
"String getLanguage();",
"String getLanguage();",
"String getLanguage();",
"public String getTitile(String language) {\n if (language.startsWith(\"e\")) {\n return enTitle;\n } else {\n return localTitle;\n }\n }",
"public String scanText(BufferedImage image) throws IOException {\n File tmpImgFile = File.createTempFile(\"tmpImg\", \".jpg\");\n ImageIO.write(image, \"jpg\", tmpImgFile);\n String rawData = TesseractWrapper.runTesseract(tmpImgFile.getAbsolutePath());\n tmpImgFile.delete();\n return rawData;\n }",
"public MashapeResponse<JSONObject> classifytext(String lang, String text, String exclude) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n if (lang != null && !lang.equals(\"\")) {\n\tparameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n\tparameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n\tparameters.put(\"exclude\", exclude);\n }\n \n \n return (MashapeResponse<JSONObject>) HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers);\n }",
"protected VideoText[] analyze(File imageFile, String id) throws TextAnalyzerException {\n boolean languagesInstalled;\n if (dictionaryService.getLanguages().length == 0) {\n languagesInstalled = false;\n logger.warn(\"There are no language packs installed. All text extracted from video will be considered valid.\");\n } else {\n languagesInstalled = true;\n }\n\n List<VideoText> videoTexts = new ArrayList<VideoText>();\n TextFrame textFrame = null;\n try {\n textFrame = textExtractor.extract(imageFile);\n } catch (IOException e) {\n logger.warn(\"Error reading image file {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n } catch (TextExtractorException e) {\n logger.warn(\"Error extracting text from {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n }\n\n int i = 1;\n for (TextLine line : textFrame.getLines()) {\n VideoText videoText = new VideoTextImpl(id + \"-\" + i++);\n videoText.setBoundary(line.getBoundaries());\n Textual text = null;\n if (languagesInstalled) {\n String[] potentialWords = line.getText() == null ? new String[0] : line.getText().split(\"\\\\W\");\n String[] languages = dictionaryService.detectLanguage(potentialWords);\n if (languages.length == 0) {\n // There are languages installed, but these words are part of one of those languages\n logger.debug(\"No languages found for '{}'.\", line.getText());\n continue;\n } else {\n String language = languages[0];\n DICT_TOKEN[] tokens = dictionaryService.cleanText(potentialWords, language);\n StringBuilder cleanLine = new StringBuilder();\n for (int j = 0; j < potentialWords.length; j++) {\n if (tokens[j] == DICT_TOKEN.WORD) {\n if (cleanLine.length() > 0) {\n cleanLine.append(\" \");\n }\n cleanLine.append(potentialWords[j]);\n }\n }\n // TODO: Ensure that the language returned by the dictionary is compatible with the MPEG-7 schema\n text = new TextualImpl(cleanLine.toString(), language);\n }\n } else {\n logger.debug(\"No languages installed. For better results, please install at least one language pack\");\n text = new TextualImpl(line.getText());\n }\n videoText.setText(text);\n videoTexts.add(videoText);\n }\n return videoTexts.toArray(new VideoText[videoTexts.size()]);\n }",
"public List<Result> recognize(IplImage image);",
"public static String getImgText(final String imageLocation) {\n\n return getImgText(new File(imageLocation));\n }",
"public Thread classifytext(String lang, String text, String exclude, MashapeCallback<JSONObject> callback) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n \n if (lang != null && !lang.equals(\"\")) {\n \n parameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n \n parameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n \n parameters.put(\"exclude\", exclude);\n }\n \n return HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers,\n callback);\n }",
"private String getLanguage(Prediction prediction, String content)\n throws IOException {\n Preconditions.checkNotNull(prediction);\n Preconditions.checkNotNull(content);\n\n Input input = new Input();\n Input.InputInput inputInput = new Input.InputInput();\n inputInput.set(\"csvInstance\", Lists.newArrayList(content));\n input.setInput(inputInput);\n Output result = prediction.trainedmodels().predict(Utils.getProjectId(),\n Constants.MODEL_ID, input).execute();\n return result.getOutputLabel();\n }",
"public Thread classifytext(String lang, String text, MashapeCallback<JSONObject> callback) {\n return classifytext(lang, text, \"\", callback);\n }",
"public static String getImgText(final File file) {\n\n final ITesseract instance = new Tesseract();\n try {\n\n return instance.doOCR(file);\n } catch (TesseractException e) {\n\n e.getMessage();\n return \"Error while reading image\";\n }\n }",
"private String autoDetectLanguage(ArrayList<File> progFiles) {\n for (File f : progFiles) {\n String f_extension = getFileExtension(f).toLowerCase();\n if (Arrays.asList(IAGConstant.PYTHON_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_PYTHON3;\n }\n if (Arrays.asList(IAGConstant.CPP_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_CPP;\n }\n }\n return IAGConstant.LANGUAGE_UNKNOWN;\n }",
"private String html2safetynet(String text, String language) {\n\n // Convert from html to plain text\n text = TextUtils.html2txt(text, true);\n\n // Remove separator between positions\n text = PositionUtils.replaceSeparator(text, \" \");\n\n // Replace positions with NAVTEX versions\n PositionAssembler navtexPosAssembler = PositionAssembler.newNavtexPositionAssembler();\n text = PositionUtils.updatePositionFormat(text, navtexPosAssembler);\n\n // Remove verbose words, such as \"the\", from the text\n text = TextUtils.removeWords(text, SUPERFLUOUS_WORDS);\n\n // NB: unlike NAVTEX, we do not split into 40-character lines\n\n return text.toUpperCase();\n }",
"private String tesseract(Bitmap bitmap) {\n return \"NOT IMPLEMENTED\";\n }",
"public static String customTextFilter(BufferedImage img, String txt) {\n\n int newHeight = img.getHeight() / 200;\n int newWidth = img.getWidth() / 200;\n String html = \"\";\n int aux = 0;\n\n for (int i = 0; i < 200; i++) {\n if (i > 0) {\n html += \"\\n<br>\\n\";\n }\n for (int j = 0; j < 200; j++) {\n if (aux == txt.length()) {\n html += \"<b> </b>\";\n aux = 0;\n } else {\n Color c = regionAvgColor(j * newWidth, (j * newWidth) + newWidth,\n i * newHeight, (i * newHeight) + newHeight, newHeight,\n newWidth, img);\n html += \"<b style='color:rgb(\" + c.getRed() + \",\"\n + c.getGreen() + \",\" + c.getBlue() + \");'>\"\n + txt.substring(aux, aux + 1) + \"</b>\";\n aux++;\n }\n }\n }\n String style = \"body{\\nfont-size: 15px\\n}\";\n String title = \"Imagen Texto\";\n int styleIndex = HTML.indexOf(\"?S\"), titleIndex = HTML.indexOf(\"?T\"),\n bodyIndex = HTML.indexOf(\"?B\");\n String htmlFile = HTML.substring(0, styleIndex) + style;\n htmlFile += HTML.substring(styleIndex + 2, titleIndex) + title;\n htmlFile += HTML.substring(titleIndex + 2, bodyIndex) + html;\n htmlFile += HTML.substring(bodyIndex + 2);\n return htmlFile;\n }",
"private String getTranslation(String language, String id)\n {\n Iterator<Translation> translations = mTranslationState.iterator();\n \n while (translations.hasNext()) {\n Translation translation = translations.next();\n \n if (translation.getLang().equals(language)) {\n Iterator<TranslationText> texts = translation.texts.iterator();\n \n while (texts.hasNext()) {\n TranslationText text = texts.next();\n \n if (text.getId().equals(id)) {\n text.setUsed(true);\n return text.getValue();\n }\n }\n }\n }\n \n return \"[Translation Not Available]\";\n }",
"private String getLanguage(String fileName)\n {\n if (fileName.endsWith(\".C\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".Java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".CPP\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".Class\"))\n {\n return \"Java\";\n }\n if (fileName.endsWith(\".c\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".cpp\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".class\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".h\"))\n {\n return \"C\";\n }\n else\n {\n return \"??\";\n }\n }",
"@DISPID(-2147413012)\n @PropGet\n java.lang.String language();",
"public String getLanguage();",
"public String detectAndDecode(Mat img) {\n return detectAndDecode_2(nativeObj, img.nativeObj);\n }",
"String getLang();",
"private void processTextRecognitionResult(FirebaseVisionText texts) {\n List<FirebaseVisionText.Block> blocks = texts.getBlocks();\n if (blocks.size() == 0) {\n Toast.makeText(getApplicationContext(), \"onDevice: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n for (int i = 0; i < blocks.size(); i++) {\n List<FirebaseVisionText.Line> lines = blocks.get(i).getLines();\n for (int j = 0; j < lines.size(); j++) {\n List<FirebaseVisionText.Element> elements = lines.get(j).getElements();\n for (int k = 0; k < elements.size(); k++) {\n GraphicOverlay.Graphic textGraphic = new TextGraphic(mGraphicOverlay, elements.get(k));\n mGraphicOverlay.add(textGraphic);\n\n }\n }\n }\n }",
"@Override\n public DetectDominantLanguageResult detectDominantLanguage(DetectDominantLanguageRequest request) {\n request = beforeClientExecution(request);\n return executeDetectDominantLanguage(request);\n }",
"@Override\n public void onSuccess(Text visionText) {\n\n Log.d(TAG, \"onSuccess: \");\n extractText(visionText);\n }",
"public String getText() {\n if (Language.isEnglish()) {\n return textEn;\n } else {\n return textFr;\n }\n }",
"public Elements getTextFromWeb(String lang, String word) {\n\t\tToast t = Toast.makeText(this, \"Buscando...\", Toast.LENGTH_SHORT);\n\t\tt.setGravity(Gravity.TOP, 0, 0); // el show lo meto en el try\n\t\tseleccionado.setText(\"\");\n\t\tresultados.clear();\n\t\tlv.setAdapter(new ArrayAdapter<String>(this, R.layout.my_item_list,\n\t\t\t\tresultados));\n\n\t\tElements res = null;\n\t\tif (!networkAvailable(getApplicationContext())) {\n\t\t\tToast.makeText(this, \"¡Necesitas acceso a internet!\",\n\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t} else {\n\t\t\tString url = \"http://www.wordreference.com/es/translation.asp?tranword=\";\n\t\t\tif (lang == \"aEspa\") {\n\t\t\t\turl += word;\n\t\t\t\tt.show();\n\t\t\t\t/* De ingles a español */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarWR(doc);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\turl = \"http://www.wordreference.com/es/en/translation.asp?spen=\"\n\t\t\t\t\t\t+ word;\n\t\t\t\tt.show();\n\t\t\t\t/* De español a ingles */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\t// no hay\n\t\t\t\t\t// else if (doc.toString().contains(\n\t\t\t\t\t// \"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t// res = procesarWR2(doc);\n\t\t\t\t\t// }\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}",
"CLanguage getClanguage();",
"private Spannable applyWordMarkup(String text) {\n SpannableStringBuilder ssb = new SpannableStringBuilder();\n int languageCodeStart = 0;\n int untranslatedStart = 0;\n\n int textLength = text.length();\n for (int i = 0; i < textLength; i++) {\n char c = text.charAt(i);\n if (c == '.') {\n if (++i < textLength) {\n c = text.charAt(i);\n if (c == '.') {\n ssb.append(c);\n } else if (c == 'c') {\n languageCodeStart = ssb.length();\n } else if (c == 'C') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.language_code_tag),\n languageCodeStart, ssb.length(), 0);\n languageCodeStart = ssb.length();\n } else if (c == 'u') {\n untranslatedStart = ssb.length();\n } else if (c == 'U') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.untranslated_word),\n untranslatedStart, ssb.length(), 0);\n untranslatedStart = ssb.length();\n } else if (c == '0') {\n Resources res = getResources();\n ssb.append(res.getString(R.string.no_translations));\n }\n }\n } else\n ssb.append(c);\n }\n\n return ssb;\n }",
"public Future<String> getLanguage() throws DynamicCallException, ExecutionException {\n return call(\"getLanguage\");\n }",
"private void processCloudTextRecognitionResult(FirebaseVisionCloudText text) {\n // Task completed successfully\n if (text == null) {\n Toast.makeText(getApplicationContext(), \"onCloud: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n List<FirebaseVisionCloudText.Page> pages = text.getPages();\n for (int i = 0; i < pages.size(); i++) {\n FirebaseVisionCloudText.Page page = pages.get(i);\n List<FirebaseVisionCloudText.Block> blocks = page.getBlocks();\n for (int j = 0; j < blocks.size(); j++) {\n List<FirebaseVisionCloudText.Paragraph> paragraphs = blocks.get(j).getParagraphs();\n for (int k = 0; k < paragraphs.size(); k++) {\n FirebaseVisionCloudText.Paragraph paragraph = paragraphs.get(k);\n List<FirebaseVisionCloudText.Word> words = paragraph.getWords();\n for (int l = 0; l < words.size(); l++) {\n GraphicOverlay.Graphic cloudTextGraphic = new CloudTextGraphic(mGraphicOverlay, words.get(l));\n mGraphicOverlay.add(cloudTextGraphic);\n }\n }\n }\n }\n }",
"public interface WordAnalyser {\n\n /**\n * Gets the bounds of all words it encounters in the image\n * \n */\n List<Rectangle> getWordBoundaries();\n\n /**\n * Gets the partial binary pixel matrix of the given word.\n * \n * @param wordBoundary\n * The bounds of the word\n */\n BinaryImage getWordMatrix(Rectangle wordBoundary);\n\n}",
"public void setLanguage(java.lang.String language) {\n _courseImage.setLanguage(language);\n }",
"private void runTextRecognition() {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(mSelectedImage);\n FirebaseVisionTextRecognizer recognizer = FirebaseVision.getInstance()\n .getOnDeviceTextRecognizer();\n //mTextButton.setEnabled(false);\n recognizer.processImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n //mTextButton.setEnabled(true);\n processTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n //mTextButton.setEnabled(true);\n e.printStackTrace();\n }\n });\n }",
"Language findByName(String name);",
"private Word askForWord(Language lastLanguage) throws LanguageException {\n Language language = askForLanguage();\r\n if(language == null || language.equals(lastLanguage)) {\r\n throw new LanguageException();\r\n }\r\n // Step 2 : Name of the word\r\n String name = askForLine(\"Name of the word : \");\r\n Word searchedWord = czech.searchWord(language, name);\r\n if(searchedWord != null) {\r\n System.out.println(\"Word \" + name + \" found !\");\r\n return searchedWord;\r\n }\r\n System.out.println(\"Word \" + name + \" not found.\");\r\n // Step 3 : Gender/Phonetic of the word\r\n String gender = askForLine(\"\\tGender of the word : \");\r\n String phonetic = askForLine(\"\\tPhonetic of the word : \");\r\n // Last step : Creation of the word\r\n Word word = new Word(language, name, gender, phonetic);\r\n int id = czech.getListWords(language).get(-1).getId() + 1;\r\n word.setId(id);\r\n czech.getListWords(language).put(-1, word);\r\n return word;\r\n }",
"public String findExtension(String lang) {\n if (lang == null)\n return \".txt\";\n else if (lang.equals(\"C++\"))\n return \".cpp\";\n else if (lang.equals(\"C\"))\n return \".c\";\n else if (lang.equals(\"PYT\"))\n return \".py\";\n else if (lang.equals(\"JAV\"))\n return \".java\";\n else\n return \".txt\";\n }",
"public static String RunOCR(Bitmap bitview, Context context, String activityName) {\n TextRecognizer textRecognizer = new TextRecognizer.Builder(context).build();\n if(!textRecognizer.isOperational()){\n // Note: The first time that an app using a Vision API is installed on a\n // device, GMS will download a native libraries to the device in order to do detection.\n // Usually this completes before the app is run for the first time. But if that\n // download has not yet completed, then the above call will not detect any text,\n // barcodes, or faces.\n //\n // isOperational() can be used to check if the required native libraries are currently\n // available. The detectors will automatically become operational once the library\n // downloads complete on device.\n Log.w(activityName, \"Detector dependencies are not yet available\");\n return \"FAILED -Text Recognizer ERROR-\";\n } else {\n Frame frame = new Frame.Builder().setBitmap(bitview).build();\n SparseArray<TextBlock> items = textRecognizer.detect(frame);\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i< items.size(); ++i){\n TextBlock item = items.valueAt(i);\n stringBuilder.append(item.getValue());\n stringBuilder.append(\"\\n\");\n }\n String ocr = stringBuilder.toString();\n Log.i(activityName, \"List of OCRs:\\n\" +ocr+\"\\n\");\n return ocr;\n }\n }",
"public AbstractLetterFactory decideLanguage(String lang){\n if(lang==\"ENG\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'m', 'a', 'y', 'n', 'o', 'o', 't', 'h'};\n return new EnglishLetterFactory();\n\n }\n else if(lang==\"RUS\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'м','а', 'ы', 'н', 'о', 'о', 'т', 'х'};\n return new RussianLetterFactory();\n }\n\n return new EnglishLetterFactory();\n\n }",
"private List<String> getLabels(Image image) {\n\t\ttry (ImageAnnotatorClient vision = ImageAnnotatorClient.create()) {\n\n\t\t\t// Creates the request for label detection. The API requires a list, but since the storage\n\t\t\t// bucket doesn't support batch uploads, the list will have only one request per function call\n\t\t\tList<AnnotateImageRequest> requests = new ArrayList<>();\n\t\t\tFeature feat = Feature.newBuilder().setType(Type.LABEL_DETECTION).build();\n\t\t\tAnnotateImageRequest request = AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(image).build();\n\t\t\trequests.add(request);\n\n\t\t\t// Performs label detection on the image file\n\t\t\tList<AnnotateImageResponse> responses = vision.batchAnnotateImages(requests).getResponsesList();\n\n\t\t\t// Iterates through the responses, though in reality there will only be one response\n\t\t\tfor (AnnotateImageResponse res : responses) {\n\t\t\t\tif (res.hasError()) {\n\t\t\t\t\tlogger.log(Level.SEVERE, \"Error getting annotations: \" + res.getError().getMessage());\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Return the first 3 generated labels\n\t\t\t\treturn res.getLabelAnnotationsList().stream().limit(3L).map(e -> e.getDescription())\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"private void pirateRecipe(String text) {\n if (\"excitedze\".equals(text)) {\n LanguageManager languagemanager = this.mc.getLanguageManager();\n Language language = languagemanager.getLanguage(\"en_pt\");\n if (languagemanager.getCurrentLanguage().compareTo(language) == 0) {\n return;\n }\n\n languagemanager.setCurrentLanguage(language);\n this.mc.gameSettings.language = language.getCode();\n net.minecraftforge.client.ForgeHooksClient.refreshResources(this.mc, net.minecraftforge.resource.VanillaResourceType.LANGUAGES);\n this.mc.gameSettings.saveOptions();\n }\n\n }",
"public byte[] decode_text(byte[] image) {\n int length = 0;\n int offset = 32;\n // loop through 32 bytes of data to determine text length\n for (int i = 0; i < 32; ++i) // i=24 will also work, as only the 4th\n // byte contains real data\n {\n length = (length << 1) | (image[i] & 1);\n }\n\n byte[] result = new byte[length];\n\n // loop through each byte of text\n for (int b = 0; b < result.length; ++b) {\n // loop through each bit within a byte of text\n for (int i = 0; i < 8; ++i, ++offset) {\n // assign bit: [(new byte value) << 1] OR [(text byte) AND 1]\n result[b] = (byte) ((result[b] << 1) | (image[offset] & 1));\n }\n }\n return result;\n }",
"public abstract void startVoiceRecognition(String language);",
"@Override\n public void run() {\n try {\n byte[] photoData = IOUtils.toByteArray(inputStream);\n inputStream.close();\n //Mat src = Imgcodecs.imdecode(new MatOfByte(photoData), Imgcodecs.CV_LOAD_IMAGE_UNCHANGED);\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n\n\n\n// //OCR PREPROCESSING FOR FAREHA'S MODULE\n// try{\n//// Mat src = Utils.loadResource(reportAnalysisActivity.this, R.drawable.bloodf, Imgcodecs.CV_LOAD_IMAGE_GRAYSCALE);\n// //boolean ans = src.isContinuous();\n// //1. Resizing\n// double ratio = (double)src.width()/src.height();\n// if(src.width()>768){\n// int newHeight = (int)(768/ratio);\n// Imgproc.resize(src,src,new Size(768,newHeight ));\n// }\n// else if(src.height()>1024){\n// int newWidth = (int)(1024*ratio);\n// Imgproc.resize(src,src,new Size(newWidth,1024));\n// }\n//\n// //2. denoising\n// Photo.fastNlMeansDenoising(src,src,10,7,21);\n// }\n// catch(Exception e){}\n//\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n//\n Image inputImage = new Image();\n inputImage.encodeContent(photoData);\n\n Feature desiredFeature = new Feature();\n desiredFeature.setType(\"TEXT_DETECTION\");\n\n BatchAnnotateImagesRequest batchRequest =\n new BatchAnnotateImagesRequest();\n final AnnotateImageRequest request = new AnnotateImageRequest();\n request.setImage(inputImage);\n request.setFeatures(Arrays.asList(desiredFeature));\n batchRequest.setRequests(Arrays.asList(request));\n BatchAnnotateImagesResponse batchResponse = vision.images().annotate(batchRequest).execute();\n text = batchResponse.getResponses().get(0).getFullTextAnnotation();\n\n int block_number = -1;\n int current_block = 0;\n ArrayList<Vertex> block_coords = new ArrayList<Vertex>();\n\n for (Page page : text.getPages()) {\n for (Block block : page.getBlocks()) {\n\n block_number++;\n //Save vertices of all the blocks\n block_coords.add(block.getBoundingBox().getVertices().get(0));\n allBlocks.add(block);\n\n for (Paragraph paragraph : block.getParagraphs()) {\n for (Word word : paragraph.getWords()) {\n String c_word = \"\";\n for (Symbol symbol : word.getSymbols()) {\n c_word += symbol.getText();\n }\n if (c_word.equals(\"WBC\") || c_word.equals(\"RBC\") ||\n c_word.equals(\"HB\") || c_word.equals(\"Hb\") || c_word.contains(\"Hemoglobin\") || c_word.equals(\"Haemoglobin\")\n || c_word.equals(\"Hematocrit\") || c_word.equals(\"HCT\") || c_word.equals(\"MCV\") || c_word.equals(\"MCH\")\n || c_word.equals(\"MCHC\") || c_word.contains(\"Platelet\") || c_word.equals(\"PLT\") || c_word.equals(\"ESR\")\n || c_word.equals(\"LYM\") || c_word.equals(\"LYM#\") || c_word.equals(\"LYM%\") || c_word.contains(\"Lym\")\n || c_word.equals(\"NEUT#\") || c_word.contains(\"NUET%\") || c_word.equals(\"NEUT\") || c_word.contains(\"Neut\")\n || c_word.contains(\"Monocytes\") || c_word.contains(\"Eosinophils\")\n || c_word.equals(\"Mixed Cells\") ||c_word.equals(\"Basophils\") ||c_word.equals(\"Bands\") ||\n c_word.contains(\"Bilirubin\") || c_word.equals(\"ALT\") || c_word.equals(\"SGPT\") || c_word.equals(\"ALK-Phos\") || c_word.contains(\"Alk\")\n || c_word.equals(\"ALK\")) {\n\n //Store the y coords of blocks containing testnames in array if not already saved\n if (testnameBlocks_coords.isEmpty() || !testnameBlocks_coords.contains(block_coords.get(block_number)))\n testnameBlocks_coords.add(block_coords.get(block_number));\n }\n }\n }\n }\n\n }\n\n //Sort the array containing the blocks that contain the test names in an order of largest y coordinates\n Collections.sort(testnameBlocks_coords, new Comparator<Vertex>() {\n @Override\n public int compare(Vertex x1, Vertex x2) {\n int result= Integer.compare(x1.getY(), x2.getY());\n if(result==0){\n //both ys are equal so we compare the x\n result=Integer.compare(x1.getX(), x2.getX());\n }\n return result;\n }\n });\n\n //Save the names of the testnames in order in test_name array\n int blocknum = 0;\n for (int j = 0; j < testnameBlocks_coords.size(); j++) {\n for (int i = 0; i < allBlocks.size(); i++) {\n if (allBlocks.get(i).getBoundingBox().getVertices().get(0) == testnameBlocks_coords.get(j)) {\n blocknum = i; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n for (Paragraph paragraph : allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for (Word word : paragraph.getWords()) {\n String name = \"\";\n for (Symbol symbol : word.getSymbols()) {\n name += symbol.getText();\n //save the testnames in testnames array\n }\n if (name.equals(\"%\") || name.equals(\"#\") || name.equals(\"Count\") || name.equals(\",\")\n || name.equals(\"Level\")) {\n StringBuilder stringBuilder = new StringBuilder(testnames.get(testnames.size() - 1));\n stringBuilder.append(name);\n testnames.add(testnames.size() - 1, stringBuilder.toString());\n testnames.remove(testnames.size() - 1);\n }\n else if (name.equals(\"WBC\") || name.equals(\"RBC\") ||\n name.equals(\"HB\") || name.equals(\"Hb\") || name.contains(\"Hemoglobin\") || name.equals(\"Haemoglobin\")\n || name.equals(\"Hematocrit\") || name.equals(\"HCT\") || name.equals(\"MCV\") || name.equals(\"MCH\")\n || name.equals(\"MCHC\") || name.contains(\"Platelet\") || name.equals(\"PLT\") || name.equals(\"ESR\")\n || name.equals(\"LYM\") || name.equals(\"LYM#\") || name.equals(\"LYM%\") || name.contains(\"Lym\")\n || name.equals(\"NEUT#\") || name.contains(\"NUET%\") || name.equals(\"NEUT\") || name.contains(\"Neut\")\n || name.contains(\"Monocytes\") || name.contains(\"Eosinophils\")\n || name.equals(\"Mixed Cells\") ||name.equals(\"Basophils\") ||name.equals(\"Bands\") ||\n name.contains(\"Bilirubin\") || name.equals(\"ALT\") || name.equals(\"SGPT\") || name.equals(\"ALK-Phos\") || name.contains(\"Alk.\")\n || name.equals(\"ALK\"))\n testnames.add(name);\n\n }\n }\n\n }\n\n //Below is the procedure to find the values of testvalues\n int result_block_index = 0;\n int num_of_values=0;\n int diff=0;\n ArrayList<Integer> ignoreIndex=new ArrayList<Integer>();\n Boolean isFloat=true;\n float value=0;\n\n while(num_of_values<testnames.size()){\n //next block of values\n if(!testvaluesBlocks_coords.isEmpty()){\n int previous_result_block_index = result_block_index; //Index at which the value block lies\n diff = Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX())<diff && previous_result_block_index!=i){\n if(!ignoreIndex.contains(i)){\n diff= Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX());\n result_block_index=i;\n }\n\n }\n }\n }\n //first block of values\n else{\n //Getting values from te first block\n diff=Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY())<diff && block_coords.indexOf(testnameBlocks_coords.get(0))!=i){\n if(!ignoreIndex.contains(i)){\n diff= testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY();\n result_block_index=i;\n }\n\n }\n }\n }\n isFloat=false;\n for(Paragraph paragraph: allBlocks.get(result_block_index).getParagraphs()){\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n\n }\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n if(value_string.contains(\"-\")){\n isFloat=false;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n break;\n }\n try{\n value= Float.parseFloat(value_string);\n num_of_values++;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n isFloat=true;\n\n }\n catch (NumberFormatException e){\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n }\n\n\n\n\n }\n }\n\n if(isFloat){\n //Save y coordinates of value block\n testvaluesBlocks_coords.add(block_coords.get(result_block_index).getY());\n }\n }\n //sort test values coordinates array\n Collections.sort(testvaluesBlocks_coords);\n\n //save the values in an array\n for(int i=0; i<testvaluesBlocks_coords.size();i++){\n for(int j=0; j<allBlocks.size();j++){\n if(allBlocks.get(j).getBoundingBox().getVertices().get(0).getY()==testvaluesBlocks_coords.get(i)){\n blocknum=j; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n //save values in array\n for (Paragraph paragraph: allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n }\n\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n try{\n value= Float.parseFloat(value_string);\n //save the testnames in testnames array\n testValues.add(Float.parseFloat(value_string));\n }\n catch(NumberFormatException n){\n\n }\n }\n\n }\n }\n\n for (int a = 0; a < testnames.size(); a++) {\n Log.e(testnames.get(a), Float.toString(testValues.get(a)));\n }\n\n //Convert the testname and testvalues array to string so they can be passed on\n StringBuilder sb = new StringBuilder();\n StringBuilder sb2 = new StringBuilder();\n for (int i = 0; i < testnames.size(); i++) {\n sb.append(testnames.get(i)).append(\",\");\n sb2.append(testValues.get(i)).append(\",\");\n\n }\n\n //Save the values and testnames so they can be passed on to next activity\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(reportAnalysisActivity.this);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"testnames\", sb.toString());\n editor.putString(\"testvalues\", sb2.toString());\n editor.putString(\"gender\", gender);\n editor.apply();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Intent reportresultScreen = new Intent(view.getContext(), reportResult_Activity.class);\n startActivity(reportresultScreen);\n }\n });\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n done=true;\n }",
"@Override\n public String recognizeImage(final Bitmap bitmap) {\n Trace.beginSection(\"recognizeImage\");\n\n Trace.beginSection(\"preprocessBitmap\");\n // Preprocess the image data from 0-255 int to normalized float based\n // on the provided parameters.\n bitmapToInputData(bitmap);\n Trace.endSection(); // preprocessBitmap\n\n // Run the inference call.\n Trace.beginSection(\"run\");\n\n tfLite.run(imgData, tfoutput_recognize);\n\n Trace.endSection();\n postPro = new Postprocessing(tfoutput_recognize);\n predictClass = postPro.postRecognize();\n Trace.endSection(); // \"recognizeImage\"\n\n //LOGGER.w(\"\"+(System.currentTimeMillis()-startTime));\n return labels.get(predictClass);\n }",
"boolean hasLanguage();",
"List<Label> findAllByLanguage(String language);",
"public String getDescription(String lang) {\n/* 188 */ return getLangAlt(lang, \"description\");\n/* */ }",
"public String getLanguage() throws DynamicCallException, ExecutionException {\n return (String)call(\"getLanguage\").get();\n }",
"public String getPredefinedTextMessage( String language, int preDefindeMsgId );",
"public void englishlanguage() {\nSystem.out.println(\"englishlanguage\");\n\t}",
"public interface LanguageProvider {\n\tLanguageService study();\n}",
"DetectionResult getObjInImage(Mat image);",
"private void runTextRecognition(Bitmap bitmap) {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionTextDetector detector = FirebaseVision.getInstance().getVisionTextDetector();\n\n detector.detectInImage(image).addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n processTextRecognitionResult(texts);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n e.printStackTrace();\n }\n });\n }",
"private void performOCR(){\n }",
"private static String italianAnalyzer(String label) throws IOException\r\n\t{\r\n\t\t// recupero le stopWords dell'ItalianAnalyzer\r\n\t\tCharArraySet stopWords = ItalianAnalyzer.getDefaultStopSet();\r\n\t\t// andiamo a tokenizzare la label\r\n\t\tTokenStream tokenStream = new StandardTokenizer(Version.LUCENE_48, new StringReader(label));\r\n\t\t// richiamo l'Elision Filter che si occupa di elidere le lettere apostrofate\r\n\t\ttokenStream = new ElisionFilter(tokenStream, stopWords);\r\n\t\t// richiamo il LowerCaseFilter\r\n\t\ttokenStream = new LowerCaseFilter(Version.LUCENE_48, tokenStream);\r\n\t\t// richiamo lo StopFilter per togliere le stop word\r\n\t\ttokenStream = new StopFilter(Version.LUCENE_48, tokenStream, stopWords);\r\n\t\t// eseguo il processo di stemming italiano per ogni token\r\n\t\ttokenStream = new ItalianLightStemFilter(tokenStream);\r\n\t\t\r\n\t\t/*\r\n\t\t * ricostruisco la stringa in precedenza tokenizzata\r\n\t\t */\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t CharTermAttribute charTermAttribute = tokenStream.addAttribute(CharTermAttribute.class);\r\n\t tokenStream.reset();\r\n\r\n\t while (tokenStream.incrementToken()) \r\n\t {\r\n\t String term = charTermAttribute.toString();\r\n\t sb.append(term + \" \");\r\n\t }\r\n \r\n\t tokenStream.close();\r\n\t // elimino l'ultimo carattere (spazio vuoto)\r\n\t String l = sb.toString().substring(0,sb.toString().length()-1);\r\n\t \r\n\t// ritorno la label stemmata\r\n return l;\r\n\t\r\n\t}",
"private void runCloudTextRecognition(Bitmap bitmap) {\n FirebaseVisionCloudDetectorOptions options =\n new FirebaseVisionCloudDetectorOptions.Builder()\n .setModelType(FirebaseVisionCloudDetectorOptions.LATEST_MODEL)\n .setMaxResults(15)\n .build();\n mCameraButtonCloud.setEnabled(false);\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionCloudDocumentTextDetector detector = FirebaseVision.getInstance()\n .getVisionCloudDocumentTextDetector(options);\n detector.detectInImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionCloudText>() {\n @Override\n public void onSuccess(FirebaseVisionCloudText texts) {\n mCameraButtonCloud.setEnabled(true);\n processCloudTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n mCameraButtonCloud.setEnabled(true);\n e.printStackTrace();\n }\n });\n }",
"PsiFile[] findFilesWithPlainTextWords( String word);",
"public void detectLanguage(final View view)\n {\n Toast.makeText(getApplicationContext(), \"Under Construction\", Toast.LENGTH_SHORT).show();\n }",
"public BufferedImage add_text(BufferedImage image, String text) {\n // convert all items to byte arrays: image, message, message length\n byte img[] = get_byte_data(image);\n byte msg[] = text.getBytes();\n byte len[] = bit_conversion(msg.length);\n try {\n encode_text(img, len, 0); // 0 first positiong\n encode_text(img, msg, 32); // 4 bytes of space for length:\n // 4bytes*8bit = 32 bits\n }\n catch (Exception e) {\n JOptionPane.showMessageDialog(\n null,\n \"Target File cannot hold message!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n return image;\n }",
"String translate(String text, String fromLanguage, String toLanguage) throws TranslationException;",
"java.lang.String getTargetLanguageCode();",
"private void verifyTextAndLabels(){\n common.explicitWaitVisibilityElement(\"//*[@id=\\\"content\\\"]/article/h2\");\n\n //Swedish labels\n common.timeoutMilliSeconds(500);\n textAndLabelsSwedish();\n\n //Change to English\n common.selectEnglish();\n\n //English labels\n textAndLabelsEnglish();\n }",
"private ArrayList<OWLLiteral> getLabels(OWLEntity entity, OWLOntology ontology, String lang) {\n\t\tOWLDataFactory df = OWLManager.createOWLOntologyManager().getOWLDataFactory();\n\t\tOWLAnnotationProperty label = df.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI());\t\n\n\t\tArrayList<OWLLiteral> labels = new ArrayList<OWLLiteral>();\n\t\tfor (OWLAnnotation annotation : entity.getAnnotations(ontology, label)) {\n\t\t\tif (annotation.getValue() instanceof OWLLiteral) {\n\t\t\t\tOWLLiteral val = (OWLLiteral) annotation.getValue();\n\t\t\t\tif (val.hasLang(\"en\")) {\n\t\t\t\t\tlabels.add(val);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn labels;\n\t}",
"public static BufferedImage getTextImage (String text, String fontName, float fontSize) {\n\t\tBufferedImage img = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);\n\t\tGraphics2D g2d = img.createGraphics();\n\t\tFont font = ExternalResourceManager.getFont(fontName).deriveFont(fontSize);\n\t\tg2d.setFont(font);\n//\t\tnew Font\n\t\tFontMetrics fm = g2d.getFontMetrics();\n\t\tint w = fm.stringWidth(text), h = fm.getHeight();\n\t\tg2d.dispose();\n\t\t// draw image\n\t\timg = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);\n\t\tg2d = img.createGraphics();\n\t\tg2d.setFont(font);\n fm = g2d.getFontMetrics();\n g2d.setColor(Color.BLACK);\n g2d.setBackground(new Color(0, 0, 0, 0));\n g2d.drawString(text, 0, fm.getAscent());\n g2d.dispose();\n\t\treturn img;\n\t}",
"String translateEnglishToDothraki(String englishText) throws Exception\n\t{\n\t\tString urlHalf1 = \"https://api.funtranslations.com/translate/dothraki.json?text=\";\n\t\tString url = urlHalf1 + englishText;\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString jsonData = getJsonData(url);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tString translation = \"\";\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject treeObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement contents = treeObject.get(\"contents\");\n\n\t\t\tif (contents.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject contentsObject = contents.getAsJsonObject();\n\n\t\t\t\tJsonElement translateElement = contentsObject.get(\"translated\");\n\n\t\t\t\ttranslation = translateElement.getAsString();\n\t\t\t}\n\t\t}\n\n\t\treturn translation;\n\t}",
"Builder addInLanguage(Text value);",
"int getLocalizedText();",
"public static String getTranslation(String original, String originLanguage, String targetLanguage) {\n\t\tif (Options.getDebuglevel() > 1)\n\t\t\tSystem.out.println(\"Translating: \" + original);\n\t\ttry {\n\t\t\tDocument doc = Jsoup\n\t\t\t\t\t.connect(\"http://translate.reference.com/\" + originLanguage + \"/\" + targetLanguage + \"/\" + original)\n\t\t\t\t\t.userAgent(\"PlagTest\").get();\n\t\t\tElement e = doc.select(\"textarea[Placeholder=Translation]\").first();\n\t\t\tString text = e.text().trim();\n\t\t\tif (text.equalsIgnoreCase(original.trim()))\n\t\t\t\treturn null;\n\t\t\treturn text;\n\t\t} catch (Exception e1) {\n\t\t}\n\t\treturn null;\n\t}",
"default String getOriginalText() {\n return meta(\"nlpcraft:nlp:origtext\");\n }",
"public String extractText(String urlString) {\n String text = \"\";\n try {\n URL url = new URL(urlString);\n text = ArticleExtractor.INSTANCE.getText(url); \n } catch (Exception ex) {\n Logger.getLogger(TextExtractor.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return text;\n }",
"public void selectLanguage(String language) {\n\n String xpath = String.format(EST_LANGUAGE, language);\n List<WebElement> elements = languages.findElements(By.xpath(xpath));\n for (WebElement element : elements) {\n if (element.isDisplayed()) {\n element.click();\n break;\n }\n }\n }",
"com.google.ads.googleads.v6.resources.LanguageConstant getLanguageConstant();",
"@Override\n public String getText() {\n return analyzedWord;\n }",
"public String getThaiWordFromEngWord(String englishWord) {\n Cursor cursor = mDatabase.query(\n TABLE_NAME,\n new String[]{COL_THAI_WORD},\n COL_ENG_WORD + \"=?\",\n new String[]{englishWord},\n null,\n null,\n null\n );\n if (cursor.getCount() > 0) {\n cursor.moveToFirst();\n return cursor.getString(cursor.getColumnIndex(COL_THAI_WORD));\n } else {\n return englishWord;\n }\n }",
"public String classify(String text){\n\t\treturn mClassifier.classify(text).bestCategory();\n\t}",
"@Source(\"gr/grnet/pithos/resources/translate.png\")\n ImageResource selectAll();",
"public void Croppedimage(CropImage.ActivityResult result, ImageView iv, EditText et )\n {\n Uri resultUri = null; // get image uri\n if (result != null) {\n resultUri = result.getUri();\n }\n\n\n //set image to image view\n iv.setImageURI(resultUri);\n\n\n //get drawable bitmap for text recognition\n BitmapDrawable bitmapDrawable = (BitmapDrawable) iv.getDrawable();\n\n Bitmap bitmap = bitmapDrawable.getBitmap();\n\n TextRecognizer recognizer = new TextRecognizer.Builder(getApplicationContext()).build();\n\n if(!recognizer.isOperational())\n {\n Toast.makeText(this, \"Error No Text To Recognize\", Toast.LENGTH_LONG).show();\n }\n else\n {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n SparseArray<TextBlock> items = recognizer.detect(frame);\n StringBuilder ab = new StringBuilder();\n\n //get text from ab until there is no text\n for(int i = 0 ; i < items.size(); i++)\n {\n TextBlock myItem = items.valueAt(i);\n ab.append(myItem.getValue());\n\n }\n\n //set text to edit text\n et.setText(ab.toString());\n }\n\n }",
"@DISPID(-2147413103)\n @PropGet\n java.lang.String lang();",
"public String getLocale () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"private String getPhrase(String key) {\r\n if (\"pl\".equals(System.getProperty(\"user.language\")) && phrasesPL.containsKey(key)) {\r\n return phrasesPL.get(key);\r\n } else if (phrasesEN.containsKey(key)) {\r\n return phrasesEN.get(key);\r\n }\r\n return \"Translation not found!\";\r\n }",
"public void setLanguage(String language);",
"public String detectObject(Bitmap bitmap) {\n results = classifierObject.recognizeImage(bitmap);\n\n // Toast.makeText(context, results.toString(), Toast.LENGTH_LONG).show();\n return String.valueOf(results.toString());\n }",
"@Override\n protected int onIsLanguageAvailable(String lang, String country, String variant) {\n if (\"eng\".equals(lang)) {\n // We support two specific robot languages, the british robot language\n // and the american robot language.\n if (\"USA\".equals(country) || \"GBR\".equals(country)) {\n // If the engine supported a specific variant, we would have\n // something like.\n //\n // if (\"android\".equals(variant)) {\n // return TextToSpeech.LANG_COUNTRY_VAR_AVAILABLE;\n // }\n return TextToSpeech.LANG_COUNTRY_AVAILABLE;\n }\n\n // We support the language, but not the country.\n return TextToSpeech.LANG_AVAILABLE;\n }\n\n return TextToSpeech.LANG_NOT_SUPPORTED;\n }",
"String text();",
"public WordInfo searchWord(String word) {\n\t\tSystem.out.println(\"Dic:SearchWord: \"+word);\n\n\t\tDocument doc;\n\t\ttry {\n\t\t\tdoc = Jsoup.connect(\"https://dictionary.cambridge.org/dictionary/english-vietnamese/\" + word).get();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\tElements elements = doc.select(\".dpos-h.di-head.normal-entry\");\n\t\tif (elements.isEmpty()) {\n\t\t\tSystem.out.println(\" not found\");\n\t\t\treturn null;\n\t\t}\n\n\t\tWordInfo wordInfo = new WordInfo(word);\n\n\t\t// Word\n\t\telements = doc.select(\".tw-bw.dhw.dpos-h_hw.di-title\");\n\n\t\tif (elements.size() == 0) {\n\t\t\tSystem.out.println(\" word not found in doc!\");\n\t\t\treturn null;\n\t\t}\n\n\t\twordInfo.setWordDictionary(elements.get(0).html());\n\n\t\t// Type\n\t\telements = doc.select(\".pos.dpos\");\n\n\t\tif(elements.size() > 0) {\n\t\t\twordInfo.setType(WordInfo.getTypeShort(elements.get(0).html()));\n//\t\t\tif (wordInfo.getTypeShort().equals(\"\"))\n//\t\t\t\tSystem.out.println(\" typemis: \"+wordInfo.getType());\n\t\t}\n\n\t\t// Pronoun\n\t\telements = doc.select(\".ipa.dipa\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setAPI(\"/\"+elements.get(0).html()+\"/\");\n\n\t\t// Trans\n\t\telements = doc.select(\".trans.dtrans\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setTrans(elements.get(0).html());\n\n\t\tSystem.out.println(\" found\");\n\t\treturn wordInfo;\n\t}"
]
| [
"0.6340444",
"0.5907014",
"0.5881825",
"0.5613604",
"0.5501345",
"0.5476807",
"0.54720134",
"0.5439289",
"0.5439289",
"0.5422724",
"0.5412727",
"0.5398816",
"0.53872037",
"0.53670835",
"0.5357576",
"0.5357576",
"0.5357576",
"0.5356866",
"0.53034747",
"0.5297329",
"0.5260379",
"0.5254473",
"0.5246585",
"0.5228318",
"0.52282864",
"0.51628226",
"0.51364416",
"0.5131521",
"0.5125658",
"0.5094378",
"0.5072984",
"0.50591296",
"0.5053911",
"0.5033745",
"0.5029701",
"0.5023699",
"0.49775946",
"0.49752378",
"0.49746957",
"0.49692988",
"0.49669984",
"0.49603295",
"0.494737",
"0.49402708",
"0.4936638",
"0.49160838",
"0.49070477",
"0.490414",
"0.4901063",
"0.48966298",
"0.48771858",
"0.4871494",
"0.48709062",
"0.48640007",
"0.4860736",
"0.48604217",
"0.48568577",
"0.48375824",
"0.4816498",
"0.4812896",
"0.47998497",
"0.476058",
"0.47586524",
"0.47517806",
"0.4735092",
"0.47282943",
"0.47255528",
"0.46790475",
"0.46785977",
"0.46641326",
"0.46611255",
"0.46398386",
"0.46395934",
"0.46347702",
"0.46280068",
"0.46261424",
"0.46224535",
"0.46215943",
"0.46206397",
"0.46187946",
"0.46137336",
"0.4603326",
"0.46020162",
"0.45985487",
"0.4598176",
"0.459762",
"0.45945558",
"0.45927325",
"0.45888606",
"0.4577679",
"0.4577485",
"0.45715407",
"0.45659322",
"0.45604816",
"0.45601782",
"0.4558132",
"0.45481235",
"0.4547136",
"0.4546162",
"0.45450872",
"0.4538884"
]
| 0.0 | -1 |
Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. | public Observable<ServiceResponse<OCRInner>> oCRUrlInputWithServiceResponseAsync(String language, String contentType, BodyModelInner imageUrl, Boolean cacheImage, Boolean enhanced) {
if (this.client.baseUrl() == null) {
throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null.");
}
if (language == null) {
throw new IllegalArgumentException("Parameter language is required and cannot be null.");
}
if (contentType == null) {
throw new IllegalArgumentException("Parameter contentType is required and cannot be null.");
}
if (imageUrl == null) {
throw new IllegalArgumentException("Parameter imageUrl is required and cannot be null.");
}
Validator.validate(imageUrl);
String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl());
return service.oCRUrlInput(language, cacheImage, enhanced, contentType, imageUrl, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<OCRInner>>>() {
@Override
public Observable<ServiceResponse<OCRInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<OCRInner> clientResponse = oCRUrlInputDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String detectLanguage(String text) {\n\t\treturn dictionary.detectLanguage(text);\n\t}",
"public boolean translateImageToText();",
"@SuppressWarnings(\"static-access\")\n\tpublic void detection(Request text) {\n\t\t//Fichiertxt fichier;\n\t\ttry {\t\t\t\t\t\n\t\t\t//enregistrement et affichage de la langue dans une variable lang\n\t\t\ttext.setLang(identifyLanguage(text.getCorpText()));\n\t\t\t//Ajoute le fichier traité dans la Base\n\t\t\tajouterTexte(text);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"fichier texte non trouvé\");\n\t e.printStackTrace();\n\t\t}\n\t}",
"public MashapeResponse<JSONObject> classifytext(String lang, String text) {\n return classifytext(lang, text, \"\");\n }",
"static WordList get(Language language) {\n return switch (language) {\n case ENGLISH -> readResource(\"bip39_english.txt\");\n };\n }",
"void readText(final Bitmap imageBitmap){\n\t\tif(imageBitmap != null) {\n\t\t\t\n\t\t\tTextRecognizer textRecognizer = new TextRecognizer.Builder(this).build();\n\t\t\t\n\t\t\tif(!textRecognizer.isOperational()) {\n\t\t\t\t// Note: The first time that an app using a Vision API is installed on a\n\t\t\t\t// device, GMS will download a native libraries to the device in order to do detection.\n\t\t\t\t// Usually this completes before the app is run for the first time. But if that\n\t\t\t\t// download has not yet completed, then the above call will not detect any text,\n\t\t\t\t// barcodes, or faces.\n\t\t\t\t// isOperational() can be used to check if the required native libraries are currently\n\t\t\t\t// available. The detectors will automatically become operational once the library\n\t\t\t\t// downloads complete on device.\n\t\t\t\tLog.w(TAG, \"Detector dependencies are not yet available.\");\n\t\t\t\t\n\t\t\t\t// Check for low storage. If there is low storage, the native library will not be\n\t\t\t\t// downloaded, so detection will not become operational.\n\t\t\t\tIntentFilter lowstorageFilter = new IntentFilter(Intent.ACTION_DEVICE_STORAGE_LOW);\n\t\t\t\tboolean hasLowStorage = registerReceiver(null, lowstorageFilter) != null;\n\t\t\t\t\n\t\t\t\tif (hasLowStorage) {\n\t\t\t\t\tToast.makeText(this,\"Low Storage\", Toast.LENGTH_LONG).show();\n\t\t\t\t\tLog.w(TAG, \"Low Storage\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tFrame imageFrame = new Frame.Builder()\n\t\t\t\t\t.setBitmap(imageBitmap)\n\t\t\t\t\t.build();\n\t\t\t\n\t\t\tSparseArray<TextBlock> textBlocks = textRecognizer.detect(imageFrame);\n\t\t\tdata.setText(\"\");\n\t\t\tfor (int i = 0; i < textBlocks.size(); i++) {\n\t\t\t\tTextBlock textBlock = textBlocks.get(textBlocks.keyAt(i));\n\t\t\t\tPoint[] points = textBlock.getCornerPoints();\n\t\t\t\tLog.i(TAG, textBlock.getValue());\n\t\t\t\tString corner = \"\";\n\t\t\t\tfor(Point point : points){\n\t\t\t\t\tcorner += point.toString();\n\t\t\t\t}\n\t\t\t\t//data.setText(data.getText() + \"\\n\" + corner);\n\t\t\t\tdata.setText(data.getText()+ \"\\n \"+ textBlock.getValue() + \" \\n\" );\n\t\t\t\t// Do something with value\n /*List<? extends Text> textComponents = textBlock.getComponents();\n for(Text currentText : textComponents) {\n // Do your thing here }\n mImageDetails.setText(mImageDetails.getText() + \"\\n\" + currentText);\n }*/\n\t\t\t}\n\t\t}\n\t}",
"public String getEnglish()\n {\n if (spanishWord.substring(0,3).equals(\"el \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n else if (spanishWord.substring(0, 3).equals(\"la \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n if (spanishWord.equals(\"estudiante\"))\n {\n return \"student\"; \n }\n else if (spanishWord.equals(\"aprender\"))\n {\n return \"to learn\";\n }\n else if (spanishWord.equals(\"entender\"))\n {\n return\"to understand\";\n }\n else if (spanishWord.equals(\"verde\"))\n {\n return \"green\";\n }\n else\n {\n return null;\n }\n }",
"java.lang.String getLanguage();",
"java.lang.String getLanguage();",
"private void detextTextFromImage(Bitmap imageBitmap) {\n\n\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(imageBitmap);\n\n FirebaseVisionTextRecognizer firebaseVisionTextRecognizer = FirebaseVision.getInstance().getCloudTextRecognizer();\n\n firebaseVisionTextRecognizer.processImage(image)\n .addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText firebaseVisionText) {\n String text = firebaseVisionText.getText();\n\n if (text.isEmpty() || text == null)\n Toast.makeText(ctx, \"Can not identify. Try again!\", Toast.LENGTH_SHORT).show();\n\n else {\n\n startTranslateIntent(text);\n }\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n e.printStackTrace();\n }\n });\n\n\n }",
"public synchronized Result process(String text, String lang) {\n // Check that service has been initialized.\n if (!this.initialized) {\n logInitializationError();\n return null;\n }\n this.cas.reset();\n this.cas.setDocumentText(text);\n if (lang != null) {\n this.cas.setDocumentLanguage(lang);\n }\n try {\n this.ae.process(this.cas);\n } catch (AnalysisEngineProcessException e) {\n getLogger().log(Level.SEVERE, \"\", e);\n return null;\n }\n return this.resultExtractor.getResult(this.cas, this.serviceSpec);\n }",
"private static AnalysisResults.Builder retrieveText(ByteString imageBytes) throws IOException {\n AnalysisResults.Builder analysisBuilder = new AnalysisResults.Builder();\n\n Image image = Image.newBuilder().setContent(imageBytes).build();\n ImmutableList<Feature> features =\n ImmutableList.of(Feature.newBuilder().setType(Feature.Type.TEXT_DETECTION).build(),\n Feature.newBuilder().setType(Feature.Type.LOGO_DETECTION).build());\n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addAllFeatures(features).setImage(image).build();\n ImmutableList<AnnotateImageRequest> requests = ImmutableList.of(request);\n\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n BatchAnnotateImagesResponse batchResponse = client.batchAnnotateImages(requests);\n\n if (batchResponse.getResponsesList().isEmpty()) {\n return analysisBuilder;\n }\n\n AnnotateImageResponse response = Iterables.getOnlyElement(batchResponse.getResponsesList());\n\n if (response.hasError()) {\n return analysisBuilder;\n }\n\n // Add extracted raw text to builder.\n if (!response.getTextAnnotationsList().isEmpty()) {\n // First element has the entire raw text from the image.\n EntityAnnotation textAnnotation = response.getTextAnnotationsList().get(0);\n\n String rawText = textAnnotation.getDescription();\n analysisBuilder.setRawText(rawText);\n }\n\n // If a logo was detected with a confidence above the threshold, use it to set the store.\n if (!response.getLogoAnnotationsList().isEmpty()\n && response.getLogoAnnotationsList().get(0).getScore()\n > LOGO_DETECTION_CONFIDENCE_THRESHOLD) {\n String store = response.getLogoAnnotationsList().get(0).getDescription();\n analysisBuilder.setStore(store);\n }\n } catch (ApiException e) {\n // Return default builder if image annotation request failed.\n return analysisBuilder;\n }\n\n return analysisBuilder;\n }",
"public java.lang.String getLanguage() {\n return _courseImage.getLanguage();\n }",
"public void ocrExtraction(BufferedImage image) {\n\t\tFile outputfile = new File(\"temp.png\");\n\t\toutputfile.deleteOnExit();\n\t\tString ocrText = \"\", currLine = \"\";\n\t\ttry {\n\t\t\tImageIO.write(image, \"png\", outputfile);\n\n\t\t\t// System call to Tesseract OCR\n\t\t\tRuntime r = Runtime.getRuntime();\n\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText -psm 6\");\n//\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText\");\n\t\t\tp.waitFor();\n\n\t\t\t// Read text file generated by tesseract\n\t\t\tFile f = new File(\"ocrText.txt\");\n\t\t\tf.deleteOnExit();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\t\t\n\t\t\twhile ((currLine = br.readLine()) != null) {\n\t\t\t\tocrText += (currLine + \" \");\n\t\t\t}\n\t\t\tif(ocrText.trim().isEmpty()) {\n\t\t\t\tocrText = \"OCR_FAIL\";\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttextField.setText(ocrText.trim());\n\t\ttextField.requestFocus();\n\t\ttextField.selectAll();\n\t}",
"String getLanguage();",
"String getLanguage();",
"String getLanguage();",
"public String getTitile(String language) {\n if (language.startsWith(\"e\")) {\n return enTitle;\n } else {\n return localTitle;\n }\n }",
"public String scanText(BufferedImage image) throws IOException {\n File tmpImgFile = File.createTempFile(\"tmpImg\", \".jpg\");\n ImageIO.write(image, \"jpg\", tmpImgFile);\n String rawData = TesseractWrapper.runTesseract(tmpImgFile.getAbsolutePath());\n tmpImgFile.delete();\n return rawData;\n }",
"public MashapeResponse<JSONObject> classifytext(String lang, String text, String exclude) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n if (lang != null && !lang.equals(\"\")) {\n\tparameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n\tparameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n\tparameters.put(\"exclude\", exclude);\n }\n \n \n return (MashapeResponse<JSONObject>) HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers);\n }",
"protected VideoText[] analyze(File imageFile, String id) throws TextAnalyzerException {\n boolean languagesInstalled;\n if (dictionaryService.getLanguages().length == 0) {\n languagesInstalled = false;\n logger.warn(\"There are no language packs installed. All text extracted from video will be considered valid.\");\n } else {\n languagesInstalled = true;\n }\n\n List<VideoText> videoTexts = new ArrayList<VideoText>();\n TextFrame textFrame = null;\n try {\n textFrame = textExtractor.extract(imageFile);\n } catch (IOException e) {\n logger.warn(\"Error reading image file {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n } catch (TextExtractorException e) {\n logger.warn(\"Error extracting text from {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n }\n\n int i = 1;\n for (TextLine line : textFrame.getLines()) {\n VideoText videoText = new VideoTextImpl(id + \"-\" + i++);\n videoText.setBoundary(line.getBoundaries());\n Textual text = null;\n if (languagesInstalled) {\n String[] potentialWords = line.getText() == null ? new String[0] : line.getText().split(\"\\\\W\");\n String[] languages = dictionaryService.detectLanguage(potentialWords);\n if (languages.length == 0) {\n // There are languages installed, but these words are part of one of those languages\n logger.debug(\"No languages found for '{}'.\", line.getText());\n continue;\n } else {\n String language = languages[0];\n DICT_TOKEN[] tokens = dictionaryService.cleanText(potentialWords, language);\n StringBuilder cleanLine = new StringBuilder();\n for (int j = 0; j < potentialWords.length; j++) {\n if (tokens[j] == DICT_TOKEN.WORD) {\n if (cleanLine.length() > 0) {\n cleanLine.append(\" \");\n }\n cleanLine.append(potentialWords[j]);\n }\n }\n // TODO: Ensure that the language returned by the dictionary is compatible with the MPEG-7 schema\n text = new TextualImpl(cleanLine.toString(), language);\n }\n } else {\n logger.debug(\"No languages installed. For better results, please install at least one language pack\");\n text = new TextualImpl(line.getText());\n }\n videoText.setText(text);\n videoTexts.add(videoText);\n }\n return videoTexts.toArray(new VideoText[videoTexts.size()]);\n }",
"public List<Result> recognize(IplImage image);",
"public static String getImgText(final String imageLocation) {\n\n return getImgText(new File(imageLocation));\n }",
"public Thread classifytext(String lang, String text, String exclude, MashapeCallback<JSONObject> callback) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n \n if (lang != null && !lang.equals(\"\")) {\n \n parameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n \n parameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n \n parameters.put(\"exclude\", exclude);\n }\n \n return HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers,\n callback);\n }",
"private String getLanguage(Prediction prediction, String content)\n throws IOException {\n Preconditions.checkNotNull(prediction);\n Preconditions.checkNotNull(content);\n\n Input input = new Input();\n Input.InputInput inputInput = new Input.InputInput();\n inputInput.set(\"csvInstance\", Lists.newArrayList(content));\n input.setInput(inputInput);\n Output result = prediction.trainedmodels().predict(Utils.getProjectId(),\n Constants.MODEL_ID, input).execute();\n return result.getOutputLabel();\n }",
"public Thread classifytext(String lang, String text, MashapeCallback<JSONObject> callback) {\n return classifytext(lang, text, \"\", callback);\n }",
"public static String getImgText(final File file) {\n\n final ITesseract instance = new Tesseract();\n try {\n\n return instance.doOCR(file);\n } catch (TesseractException e) {\n\n e.getMessage();\n return \"Error while reading image\";\n }\n }",
"private String autoDetectLanguage(ArrayList<File> progFiles) {\n for (File f : progFiles) {\n String f_extension = getFileExtension(f).toLowerCase();\n if (Arrays.asList(IAGConstant.PYTHON_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_PYTHON3;\n }\n if (Arrays.asList(IAGConstant.CPP_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_CPP;\n }\n }\n return IAGConstant.LANGUAGE_UNKNOWN;\n }",
"private String html2safetynet(String text, String language) {\n\n // Convert from html to plain text\n text = TextUtils.html2txt(text, true);\n\n // Remove separator between positions\n text = PositionUtils.replaceSeparator(text, \" \");\n\n // Replace positions with NAVTEX versions\n PositionAssembler navtexPosAssembler = PositionAssembler.newNavtexPositionAssembler();\n text = PositionUtils.updatePositionFormat(text, navtexPosAssembler);\n\n // Remove verbose words, such as \"the\", from the text\n text = TextUtils.removeWords(text, SUPERFLUOUS_WORDS);\n\n // NB: unlike NAVTEX, we do not split into 40-character lines\n\n return text.toUpperCase();\n }",
"private String tesseract(Bitmap bitmap) {\n return \"NOT IMPLEMENTED\";\n }",
"public static String customTextFilter(BufferedImage img, String txt) {\n\n int newHeight = img.getHeight() / 200;\n int newWidth = img.getWidth() / 200;\n String html = \"\";\n int aux = 0;\n\n for (int i = 0; i < 200; i++) {\n if (i > 0) {\n html += \"\\n<br>\\n\";\n }\n for (int j = 0; j < 200; j++) {\n if (aux == txt.length()) {\n html += \"<b> </b>\";\n aux = 0;\n } else {\n Color c = regionAvgColor(j * newWidth, (j * newWidth) + newWidth,\n i * newHeight, (i * newHeight) + newHeight, newHeight,\n newWidth, img);\n html += \"<b style='color:rgb(\" + c.getRed() + \",\"\n + c.getGreen() + \",\" + c.getBlue() + \");'>\"\n + txt.substring(aux, aux + 1) + \"</b>\";\n aux++;\n }\n }\n }\n String style = \"body{\\nfont-size: 15px\\n}\";\n String title = \"Imagen Texto\";\n int styleIndex = HTML.indexOf(\"?S\"), titleIndex = HTML.indexOf(\"?T\"),\n bodyIndex = HTML.indexOf(\"?B\");\n String htmlFile = HTML.substring(0, styleIndex) + style;\n htmlFile += HTML.substring(styleIndex + 2, titleIndex) + title;\n htmlFile += HTML.substring(titleIndex + 2, bodyIndex) + html;\n htmlFile += HTML.substring(bodyIndex + 2);\n return htmlFile;\n }",
"private String getTranslation(String language, String id)\n {\n Iterator<Translation> translations = mTranslationState.iterator();\n \n while (translations.hasNext()) {\n Translation translation = translations.next();\n \n if (translation.getLang().equals(language)) {\n Iterator<TranslationText> texts = translation.texts.iterator();\n \n while (texts.hasNext()) {\n TranslationText text = texts.next();\n \n if (text.getId().equals(id)) {\n text.setUsed(true);\n return text.getValue();\n }\n }\n }\n }\n \n return \"[Translation Not Available]\";\n }",
"private String getLanguage(String fileName)\n {\n if (fileName.endsWith(\".C\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".Java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".CPP\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".Class\"))\n {\n return \"Java\";\n }\n if (fileName.endsWith(\".c\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".cpp\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".class\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".h\"))\n {\n return \"C\";\n }\n else\n {\n return \"??\";\n }\n }",
"@DISPID(-2147413012)\n @PropGet\n java.lang.String language();",
"public String getLanguage();",
"public String detectAndDecode(Mat img) {\n return detectAndDecode_2(nativeObj, img.nativeObj);\n }",
"String getLang();",
"private void processTextRecognitionResult(FirebaseVisionText texts) {\n List<FirebaseVisionText.Block> blocks = texts.getBlocks();\n if (blocks.size() == 0) {\n Toast.makeText(getApplicationContext(), \"onDevice: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n for (int i = 0; i < blocks.size(); i++) {\n List<FirebaseVisionText.Line> lines = blocks.get(i).getLines();\n for (int j = 0; j < lines.size(); j++) {\n List<FirebaseVisionText.Element> elements = lines.get(j).getElements();\n for (int k = 0; k < elements.size(); k++) {\n GraphicOverlay.Graphic textGraphic = new TextGraphic(mGraphicOverlay, elements.get(k));\n mGraphicOverlay.add(textGraphic);\n\n }\n }\n }\n }",
"@Override\n public DetectDominantLanguageResult detectDominantLanguage(DetectDominantLanguageRequest request) {\n request = beforeClientExecution(request);\n return executeDetectDominantLanguage(request);\n }",
"@Override\n public void onSuccess(Text visionText) {\n\n Log.d(TAG, \"onSuccess: \");\n extractText(visionText);\n }",
"public String getText() {\n if (Language.isEnglish()) {\n return textEn;\n } else {\n return textFr;\n }\n }",
"public Elements getTextFromWeb(String lang, String word) {\n\t\tToast t = Toast.makeText(this, \"Buscando...\", Toast.LENGTH_SHORT);\n\t\tt.setGravity(Gravity.TOP, 0, 0); // el show lo meto en el try\n\t\tseleccionado.setText(\"\");\n\t\tresultados.clear();\n\t\tlv.setAdapter(new ArrayAdapter<String>(this, R.layout.my_item_list,\n\t\t\t\tresultados));\n\n\t\tElements res = null;\n\t\tif (!networkAvailable(getApplicationContext())) {\n\t\t\tToast.makeText(this, \"¡Necesitas acceso a internet!\",\n\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t} else {\n\t\t\tString url = \"http://www.wordreference.com/es/translation.asp?tranword=\";\n\t\t\tif (lang == \"aEspa\") {\n\t\t\t\turl += word;\n\t\t\t\tt.show();\n\t\t\t\t/* De ingles a español */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarWR(doc);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\turl = \"http://www.wordreference.com/es/en/translation.asp?spen=\"\n\t\t\t\t\t\t+ word;\n\t\t\t\tt.show();\n\t\t\t\t/* De español a ingles */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\t// no hay\n\t\t\t\t\t// else if (doc.toString().contains(\n\t\t\t\t\t// \"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t// res = procesarWR2(doc);\n\t\t\t\t\t// }\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}",
"CLanguage getClanguage();",
"private Spannable applyWordMarkup(String text) {\n SpannableStringBuilder ssb = new SpannableStringBuilder();\n int languageCodeStart = 0;\n int untranslatedStart = 0;\n\n int textLength = text.length();\n for (int i = 0; i < textLength; i++) {\n char c = text.charAt(i);\n if (c == '.') {\n if (++i < textLength) {\n c = text.charAt(i);\n if (c == '.') {\n ssb.append(c);\n } else if (c == 'c') {\n languageCodeStart = ssb.length();\n } else if (c == 'C') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.language_code_tag),\n languageCodeStart, ssb.length(), 0);\n languageCodeStart = ssb.length();\n } else if (c == 'u') {\n untranslatedStart = ssb.length();\n } else if (c == 'U') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.untranslated_word),\n untranslatedStart, ssb.length(), 0);\n untranslatedStart = ssb.length();\n } else if (c == '0') {\n Resources res = getResources();\n ssb.append(res.getString(R.string.no_translations));\n }\n }\n } else\n ssb.append(c);\n }\n\n return ssb;\n }",
"public Future<String> getLanguage() throws DynamicCallException, ExecutionException {\n return call(\"getLanguage\");\n }",
"private void processCloudTextRecognitionResult(FirebaseVisionCloudText text) {\n // Task completed successfully\n if (text == null) {\n Toast.makeText(getApplicationContext(), \"onCloud: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n List<FirebaseVisionCloudText.Page> pages = text.getPages();\n for (int i = 0; i < pages.size(); i++) {\n FirebaseVisionCloudText.Page page = pages.get(i);\n List<FirebaseVisionCloudText.Block> blocks = page.getBlocks();\n for (int j = 0; j < blocks.size(); j++) {\n List<FirebaseVisionCloudText.Paragraph> paragraphs = blocks.get(j).getParagraphs();\n for (int k = 0; k < paragraphs.size(); k++) {\n FirebaseVisionCloudText.Paragraph paragraph = paragraphs.get(k);\n List<FirebaseVisionCloudText.Word> words = paragraph.getWords();\n for (int l = 0; l < words.size(); l++) {\n GraphicOverlay.Graphic cloudTextGraphic = new CloudTextGraphic(mGraphicOverlay, words.get(l));\n mGraphicOverlay.add(cloudTextGraphic);\n }\n }\n }\n }\n }",
"public interface WordAnalyser {\n\n /**\n * Gets the bounds of all words it encounters in the image\n * \n */\n List<Rectangle> getWordBoundaries();\n\n /**\n * Gets the partial binary pixel matrix of the given word.\n * \n * @param wordBoundary\n * The bounds of the word\n */\n BinaryImage getWordMatrix(Rectangle wordBoundary);\n\n}",
"public void setLanguage(java.lang.String language) {\n _courseImage.setLanguage(language);\n }",
"private void runTextRecognition() {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(mSelectedImage);\n FirebaseVisionTextRecognizer recognizer = FirebaseVision.getInstance()\n .getOnDeviceTextRecognizer();\n //mTextButton.setEnabled(false);\n recognizer.processImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n //mTextButton.setEnabled(true);\n processTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n //mTextButton.setEnabled(true);\n e.printStackTrace();\n }\n });\n }",
"Language findByName(String name);",
"private Word askForWord(Language lastLanguage) throws LanguageException {\n Language language = askForLanguage();\r\n if(language == null || language.equals(lastLanguage)) {\r\n throw new LanguageException();\r\n }\r\n // Step 2 : Name of the word\r\n String name = askForLine(\"Name of the word : \");\r\n Word searchedWord = czech.searchWord(language, name);\r\n if(searchedWord != null) {\r\n System.out.println(\"Word \" + name + \" found !\");\r\n return searchedWord;\r\n }\r\n System.out.println(\"Word \" + name + \" not found.\");\r\n // Step 3 : Gender/Phonetic of the word\r\n String gender = askForLine(\"\\tGender of the word : \");\r\n String phonetic = askForLine(\"\\tPhonetic of the word : \");\r\n // Last step : Creation of the word\r\n Word word = new Word(language, name, gender, phonetic);\r\n int id = czech.getListWords(language).get(-1).getId() + 1;\r\n word.setId(id);\r\n czech.getListWords(language).put(-1, word);\r\n return word;\r\n }",
"public String findExtension(String lang) {\n if (lang == null)\n return \".txt\";\n else if (lang.equals(\"C++\"))\n return \".cpp\";\n else if (lang.equals(\"C\"))\n return \".c\";\n else if (lang.equals(\"PYT\"))\n return \".py\";\n else if (lang.equals(\"JAV\"))\n return \".java\";\n else\n return \".txt\";\n }",
"public static String RunOCR(Bitmap bitview, Context context, String activityName) {\n TextRecognizer textRecognizer = new TextRecognizer.Builder(context).build();\n if(!textRecognizer.isOperational()){\n // Note: The first time that an app using a Vision API is installed on a\n // device, GMS will download a native libraries to the device in order to do detection.\n // Usually this completes before the app is run for the first time. But if that\n // download has not yet completed, then the above call will not detect any text,\n // barcodes, or faces.\n //\n // isOperational() can be used to check if the required native libraries are currently\n // available. The detectors will automatically become operational once the library\n // downloads complete on device.\n Log.w(activityName, \"Detector dependencies are not yet available\");\n return \"FAILED -Text Recognizer ERROR-\";\n } else {\n Frame frame = new Frame.Builder().setBitmap(bitview).build();\n SparseArray<TextBlock> items = textRecognizer.detect(frame);\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i< items.size(); ++i){\n TextBlock item = items.valueAt(i);\n stringBuilder.append(item.getValue());\n stringBuilder.append(\"\\n\");\n }\n String ocr = stringBuilder.toString();\n Log.i(activityName, \"List of OCRs:\\n\" +ocr+\"\\n\");\n return ocr;\n }\n }",
"public AbstractLetterFactory decideLanguage(String lang){\n if(lang==\"ENG\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'m', 'a', 'y', 'n', 'o', 'o', 't', 'h'};\n return new EnglishLetterFactory();\n\n }\n else if(lang==\"RUS\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'м','а', 'ы', 'н', 'о', 'о', 'т', 'х'};\n return new RussianLetterFactory();\n }\n\n return new EnglishLetterFactory();\n\n }",
"private List<String> getLabels(Image image) {\n\t\ttry (ImageAnnotatorClient vision = ImageAnnotatorClient.create()) {\n\n\t\t\t// Creates the request for label detection. The API requires a list, but since the storage\n\t\t\t// bucket doesn't support batch uploads, the list will have only one request per function call\n\t\t\tList<AnnotateImageRequest> requests = new ArrayList<>();\n\t\t\tFeature feat = Feature.newBuilder().setType(Type.LABEL_DETECTION).build();\n\t\t\tAnnotateImageRequest request = AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(image).build();\n\t\t\trequests.add(request);\n\n\t\t\t// Performs label detection on the image file\n\t\t\tList<AnnotateImageResponse> responses = vision.batchAnnotateImages(requests).getResponsesList();\n\n\t\t\t// Iterates through the responses, though in reality there will only be one response\n\t\t\tfor (AnnotateImageResponse res : responses) {\n\t\t\t\tif (res.hasError()) {\n\t\t\t\t\tlogger.log(Level.SEVERE, \"Error getting annotations: \" + res.getError().getMessage());\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Return the first 3 generated labels\n\t\t\t\treturn res.getLabelAnnotationsList().stream().limit(3L).map(e -> e.getDescription())\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"private void pirateRecipe(String text) {\n if (\"excitedze\".equals(text)) {\n LanguageManager languagemanager = this.mc.getLanguageManager();\n Language language = languagemanager.getLanguage(\"en_pt\");\n if (languagemanager.getCurrentLanguage().compareTo(language) == 0) {\n return;\n }\n\n languagemanager.setCurrentLanguage(language);\n this.mc.gameSettings.language = language.getCode();\n net.minecraftforge.client.ForgeHooksClient.refreshResources(this.mc, net.minecraftforge.resource.VanillaResourceType.LANGUAGES);\n this.mc.gameSettings.saveOptions();\n }\n\n }",
"public byte[] decode_text(byte[] image) {\n int length = 0;\n int offset = 32;\n // loop through 32 bytes of data to determine text length\n for (int i = 0; i < 32; ++i) // i=24 will also work, as only the 4th\n // byte contains real data\n {\n length = (length << 1) | (image[i] & 1);\n }\n\n byte[] result = new byte[length];\n\n // loop through each byte of text\n for (int b = 0; b < result.length; ++b) {\n // loop through each bit within a byte of text\n for (int i = 0; i < 8; ++i, ++offset) {\n // assign bit: [(new byte value) << 1] OR [(text byte) AND 1]\n result[b] = (byte) ((result[b] << 1) | (image[offset] & 1));\n }\n }\n return result;\n }",
"public abstract void startVoiceRecognition(String language);",
"@Override\n public void run() {\n try {\n byte[] photoData = IOUtils.toByteArray(inputStream);\n inputStream.close();\n //Mat src = Imgcodecs.imdecode(new MatOfByte(photoData), Imgcodecs.CV_LOAD_IMAGE_UNCHANGED);\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n\n\n\n// //OCR PREPROCESSING FOR FAREHA'S MODULE\n// try{\n//// Mat src = Utils.loadResource(reportAnalysisActivity.this, R.drawable.bloodf, Imgcodecs.CV_LOAD_IMAGE_GRAYSCALE);\n// //boolean ans = src.isContinuous();\n// //1. Resizing\n// double ratio = (double)src.width()/src.height();\n// if(src.width()>768){\n// int newHeight = (int)(768/ratio);\n// Imgproc.resize(src,src,new Size(768,newHeight ));\n// }\n// else if(src.height()>1024){\n// int newWidth = (int)(1024*ratio);\n// Imgproc.resize(src,src,new Size(newWidth,1024));\n// }\n//\n// //2. denoising\n// Photo.fastNlMeansDenoising(src,src,10,7,21);\n// }\n// catch(Exception e){}\n//\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n//\n Image inputImage = new Image();\n inputImage.encodeContent(photoData);\n\n Feature desiredFeature = new Feature();\n desiredFeature.setType(\"TEXT_DETECTION\");\n\n BatchAnnotateImagesRequest batchRequest =\n new BatchAnnotateImagesRequest();\n final AnnotateImageRequest request = new AnnotateImageRequest();\n request.setImage(inputImage);\n request.setFeatures(Arrays.asList(desiredFeature));\n batchRequest.setRequests(Arrays.asList(request));\n BatchAnnotateImagesResponse batchResponse = vision.images().annotate(batchRequest).execute();\n text = batchResponse.getResponses().get(0).getFullTextAnnotation();\n\n int block_number = -1;\n int current_block = 0;\n ArrayList<Vertex> block_coords = new ArrayList<Vertex>();\n\n for (Page page : text.getPages()) {\n for (Block block : page.getBlocks()) {\n\n block_number++;\n //Save vertices of all the blocks\n block_coords.add(block.getBoundingBox().getVertices().get(0));\n allBlocks.add(block);\n\n for (Paragraph paragraph : block.getParagraphs()) {\n for (Word word : paragraph.getWords()) {\n String c_word = \"\";\n for (Symbol symbol : word.getSymbols()) {\n c_word += symbol.getText();\n }\n if (c_word.equals(\"WBC\") || c_word.equals(\"RBC\") ||\n c_word.equals(\"HB\") || c_word.equals(\"Hb\") || c_word.contains(\"Hemoglobin\") || c_word.equals(\"Haemoglobin\")\n || c_word.equals(\"Hematocrit\") || c_word.equals(\"HCT\") || c_word.equals(\"MCV\") || c_word.equals(\"MCH\")\n || c_word.equals(\"MCHC\") || c_word.contains(\"Platelet\") || c_word.equals(\"PLT\") || c_word.equals(\"ESR\")\n || c_word.equals(\"LYM\") || c_word.equals(\"LYM#\") || c_word.equals(\"LYM%\") || c_word.contains(\"Lym\")\n || c_word.equals(\"NEUT#\") || c_word.contains(\"NUET%\") || c_word.equals(\"NEUT\") || c_word.contains(\"Neut\")\n || c_word.contains(\"Monocytes\") || c_word.contains(\"Eosinophils\")\n || c_word.equals(\"Mixed Cells\") ||c_word.equals(\"Basophils\") ||c_word.equals(\"Bands\") ||\n c_word.contains(\"Bilirubin\") || c_word.equals(\"ALT\") || c_word.equals(\"SGPT\") || c_word.equals(\"ALK-Phos\") || c_word.contains(\"Alk\")\n || c_word.equals(\"ALK\")) {\n\n //Store the y coords of blocks containing testnames in array if not already saved\n if (testnameBlocks_coords.isEmpty() || !testnameBlocks_coords.contains(block_coords.get(block_number)))\n testnameBlocks_coords.add(block_coords.get(block_number));\n }\n }\n }\n }\n\n }\n\n //Sort the array containing the blocks that contain the test names in an order of largest y coordinates\n Collections.sort(testnameBlocks_coords, new Comparator<Vertex>() {\n @Override\n public int compare(Vertex x1, Vertex x2) {\n int result= Integer.compare(x1.getY(), x2.getY());\n if(result==0){\n //both ys are equal so we compare the x\n result=Integer.compare(x1.getX(), x2.getX());\n }\n return result;\n }\n });\n\n //Save the names of the testnames in order in test_name array\n int blocknum = 0;\n for (int j = 0; j < testnameBlocks_coords.size(); j++) {\n for (int i = 0; i < allBlocks.size(); i++) {\n if (allBlocks.get(i).getBoundingBox().getVertices().get(0) == testnameBlocks_coords.get(j)) {\n blocknum = i; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n for (Paragraph paragraph : allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for (Word word : paragraph.getWords()) {\n String name = \"\";\n for (Symbol symbol : word.getSymbols()) {\n name += symbol.getText();\n //save the testnames in testnames array\n }\n if (name.equals(\"%\") || name.equals(\"#\") || name.equals(\"Count\") || name.equals(\",\")\n || name.equals(\"Level\")) {\n StringBuilder stringBuilder = new StringBuilder(testnames.get(testnames.size() - 1));\n stringBuilder.append(name);\n testnames.add(testnames.size() - 1, stringBuilder.toString());\n testnames.remove(testnames.size() - 1);\n }\n else if (name.equals(\"WBC\") || name.equals(\"RBC\") ||\n name.equals(\"HB\") || name.equals(\"Hb\") || name.contains(\"Hemoglobin\") || name.equals(\"Haemoglobin\")\n || name.equals(\"Hematocrit\") || name.equals(\"HCT\") || name.equals(\"MCV\") || name.equals(\"MCH\")\n || name.equals(\"MCHC\") || name.contains(\"Platelet\") || name.equals(\"PLT\") || name.equals(\"ESR\")\n || name.equals(\"LYM\") || name.equals(\"LYM#\") || name.equals(\"LYM%\") || name.contains(\"Lym\")\n || name.equals(\"NEUT#\") || name.contains(\"NUET%\") || name.equals(\"NEUT\") || name.contains(\"Neut\")\n || name.contains(\"Monocytes\") || name.contains(\"Eosinophils\")\n || name.equals(\"Mixed Cells\") ||name.equals(\"Basophils\") ||name.equals(\"Bands\") ||\n name.contains(\"Bilirubin\") || name.equals(\"ALT\") || name.equals(\"SGPT\") || name.equals(\"ALK-Phos\") || name.contains(\"Alk.\")\n || name.equals(\"ALK\"))\n testnames.add(name);\n\n }\n }\n\n }\n\n //Below is the procedure to find the values of testvalues\n int result_block_index = 0;\n int num_of_values=0;\n int diff=0;\n ArrayList<Integer> ignoreIndex=new ArrayList<Integer>();\n Boolean isFloat=true;\n float value=0;\n\n while(num_of_values<testnames.size()){\n //next block of values\n if(!testvaluesBlocks_coords.isEmpty()){\n int previous_result_block_index = result_block_index; //Index at which the value block lies\n diff = Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX())<diff && previous_result_block_index!=i){\n if(!ignoreIndex.contains(i)){\n diff= Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX());\n result_block_index=i;\n }\n\n }\n }\n }\n //first block of values\n else{\n //Getting values from te first block\n diff=Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY())<diff && block_coords.indexOf(testnameBlocks_coords.get(0))!=i){\n if(!ignoreIndex.contains(i)){\n diff= testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY();\n result_block_index=i;\n }\n\n }\n }\n }\n isFloat=false;\n for(Paragraph paragraph: allBlocks.get(result_block_index).getParagraphs()){\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n\n }\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n if(value_string.contains(\"-\")){\n isFloat=false;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n break;\n }\n try{\n value= Float.parseFloat(value_string);\n num_of_values++;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n isFloat=true;\n\n }\n catch (NumberFormatException e){\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n }\n\n\n\n\n }\n }\n\n if(isFloat){\n //Save y coordinates of value block\n testvaluesBlocks_coords.add(block_coords.get(result_block_index).getY());\n }\n }\n //sort test values coordinates array\n Collections.sort(testvaluesBlocks_coords);\n\n //save the values in an array\n for(int i=0; i<testvaluesBlocks_coords.size();i++){\n for(int j=0; j<allBlocks.size();j++){\n if(allBlocks.get(j).getBoundingBox().getVertices().get(0).getY()==testvaluesBlocks_coords.get(i)){\n blocknum=j; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n //save values in array\n for (Paragraph paragraph: allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n }\n\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n try{\n value= Float.parseFloat(value_string);\n //save the testnames in testnames array\n testValues.add(Float.parseFloat(value_string));\n }\n catch(NumberFormatException n){\n\n }\n }\n\n }\n }\n\n for (int a = 0; a < testnames.size(); a++) {\n Log.e(testnames.get(a), Float.toString(testValues.get(a)));\n }\n\n //Convert the testname and testvalues array to string so they can be passed on\n StringBuilder sb = new StringBuilder();\n StringBuilder sb2 = new StringBuilder();\n for (int i = 0; i < testnames.size(); i++) {\n sb.append(testnames.get(i)).append(\",\");\n sb2.append(testValues.get(i)).append(\",\");\n\n }\n\n //Save the values and testnames so they can be passed on to next activity\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(reportAnalysisActivity.this);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"testnames\", sb.toString());\n editor.putString(\"testvalues\", sb2.toString());\n editor.putString(\"gender\", gender);\n editor.apply();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Intent reportresultScreen = new Intent(view.getContext(), reportResult_Activity.class);\n startActivity(reportresultScreen);\n }\n });\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n done=true;\n }",
"@Override\n public String recognizeImage(final Bitmap bitmap) {\n Trace.beginSection(\"recognizeImage\");\n\n Trace.beginSection(\"preprocessBitmap\");\n // Preprocess the image data from 0-255 int to normalized float based\n // on the provided parameters.\n bitmapToInputData(bitmap);\n Trace.endSection(); // preprocessBitmap\n\n // Run the inference call.\n Trace.beginSection(\"run\");\n\n tfLite.run(imgData, tfoutput_recognize);\n\n Trace.endSection();\n postPro = new Postprocessing(tfoutput_recognize);\n predictClass = postPro.postRecognize();\n Trace.endSection(); // \"recognizeImage\"\n\n //LOGGER.w(\"\"+(System.currentTimeMillis()-startTime));\n return labels.get(predictClass);\n }",
"boolean hasLanguage();",
"List<Label> findAllByLanguage(String language);",
"public String getDescription(String lang) {\n/* 188 */ return getLangAlt(lang, \"description\");\n/* */ }",
"public String getLanguage() throws DynamicCallException, ExecutionException {\n return (String)call(\"getLanguage\").get();\n }",
"public String getPredefinedTextMessage( String language, int preDefindeMsgId );",
"public void englishlanguage() {\nSystem.out.println(\"englishlanguage\");\n\t}",
"public interface LanguageProvider {\n\tLanguageService study();\n}",
"DetectionResult getObjInImage(Mat image);",
"private void runTextRecognition(Bitmap bitmap) {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionTextDetector detector = FirebaseVision.getInstance().getVisionTextDetector();\n\n detector.detectInImage(image).addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n processTextRecognitionResult(texts);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n e.printStackTrace();\n }\n });\n }",
"private void performOCR(){\n }",
"private static String italianAnalyzer(String label) throws IOException\r\n\t{\r\n\t\t// recupero le stopWords dell'ItalianAnalyzer\r\n\t\tCharArraySet stopWords = ItalianAnalyzer.getDefaultStopSet();\r\n\t\t// andiamo a tokenizzare la label\r\n\t\tTokenStream tokenStream = new StandardTokenizer(Version.LUCENE_48, new StringReader(label));\r\n\t\t// richiamo l'Elision Filter che si occupa di elidere le lettere apostrofate\r\n\t\ttokenStream = new ElisionFilter(tokenStream, stopWords);\r\n\t\t// richiamo il LowerCaseFilter\r\n\t\ttokenStream = new LowerCaseFilter(Version.LUCENE_48, tokenStream);\r\n\t\t// richiamo lo StopFilter per togliere le stop word\r\n\t\ttokenStream = new StopFilter(Version.LUCENE_48, tokenStream, stopWords);\r\n\t\t// eseguo il processo di stemming italiano per ogni token\r\n\t\ttokenStream = new ItalianLightStemFilter(tokenStream);\r\n\t\t\r\n\t\t/*\r\n\t\t * ricostruisco la stringa in precedenza tokenizzata\r\n\t\t */\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t CharTermAttribute charTermAttribute = tokenStream.addAttribute(CharTermAttribute.class);\r\n\t tokenStream.reset();\r\n\r\n\t while (tokenStream.incrementToken()) \r\n\t {\r\n\t String term = charTermAttribute.toString();\r\n\t sb.append(term + \" \");\r\n\t }\r\n \r\n\t tokenStream.close();\r\n\t // elimino l'ultimo carattere (spazio vuoto)\r\n\t String l = sb.toString().substring(0,sb.toString().length()-1);\r\n\t \r\n\t// ritorno la label stemmata\r\n return l;\r\n\t\r\n\t}",
"private void runCloudTextRecognition(Bitmap bitmap) {\n FirebaseVisionCloudDetectorOptions options =\n new FirebaseVisionCloudDetectorOptions.Builder()\n .setModelType(FirebaseVisionCloudDetectorOptions.LATEST_MODEL)\n .setMaxResults(15)\n .build();\n mCameraButtonCloud.setEnabled(false);\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionCloudDocumentTextDetector detector = FirebaseVision.getInstance()\n .getVisionCloudDocumentTextDetector(options);\n detector.detectInImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionCloudText>() {\n @Override\n public void onSuccess(FirebaseVisionCloudText texts) {\n mCameraButtonCloud.setEnabled(true);\n processCloudTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n mCameraButtonCloud.setEnabled(true);\n e.printStackTrace();\n }\n });\n }",
"PsiFile[] findFilesWithPlainTextWords( String word);",
"public void detectLanguage(final View view)\n {\n Toast.makeText(getApplicationContext(), \"Under Construction\", Toast.LENGTH_SHORT).show();\n }",
"public BufferedImage add_text(BufferedImage image, String text) {\n // convert all items to byte arrays: image, message, message length\n byte img[] = get_byte_data(image);\n byte msg[] = text.getBytes();\n byte len[] = bit_conversion(msg.length);\n try {\n encode_text(img, len, 0); // 0 first positiong\n encode_text(img, msg, 32); // 4 bytes of space for length:\n // 4bytes*8bit = 32 bits\n }\n catch (Exception e) {\n JOptionPane.showMessageDialog(\n null,\n \"Target File cannot hold message!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n return image;\n }",
"String translate(String text, String fromLanguage, String toLanguage) throws TranslationException;",
"java.lang.String getTargetLanguageCode();",
"private void verifyTextAndLabels(){\n common.explicitWaitVisibilityElement(\"//*[@id=\\\"content\\\"]/article/h2\");\n\n //Swedish labels\n common.timeoutMilliSeconds(500);\n textAndLabelsSwedish();\n\n //Change to English\n common.selectEnglish();\n\n //English labels\n textAndLabelsEnglish();\n }",
"private ArrayList<OWLLiteral> getLabels(OWLEntity entity, OWLOntology ontology, String lang) {\n\t\tOWLDataFactory df = OWLManager.createOWLOntologyManager().getOWLDataFactory();\n\t\tOWLAnnotationProperty label = df.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI());\t\n\n\t\tArrayList<OWLLiteral> labels = new ArrayList<OWLLiteral>();\n\t\tfor (OWLAnnotation annotation : entity.getAnnotations(ontology, label)) {\n\t\t\tif (annotation.getValue() instanceof OWLLiteral) {\n\t\t\t\tOWLLiteral val = (OWLLiteral) annotation.getValue();\n\t\t\t\tif (val.hasLang(\"en\")) {\n\t\t\t\t\tlabels.add(val);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn labels;\n\t}",
"public static BufferedImage getTextImage (String text, String fontName, float fontSize) {\n\t\tBufferedImage img = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);\n\t\tGraphics2D g2d = img.createGraphics();\n\t\tFont font = ExternalResourceManager.getFont(fontName).deriveFont(fontSize);\n\t\tg2d.setFont(font);\n//\t\tnew Font\n\t\tFontMetrics fm = g2d.getFontMetrics();\n\t\tint w = fm.stringWidth(text), h = fm.getHeight();\n\t\tg2d.dispose();\n\t\t// draw image\n\t\timg = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);\n\t\tg2d = img.createGraphics();\n\t\tg2d.setFont(font);\n fm = g2d.getFontMetrics();\n g2d.setColor(Color.BLACK);\n g2d.setBackground(new Color(0, 0, 0, 0));\n g2d.drawString(text, 0, fm.getAscent());\n g2d.dispose();\n\t\treturn img;\n\t}",
"String translateEnglishToDothraki(String englishText) throws Exception\n\t{\n\t\tString urlHalf1 = \"https://api.funtranslations.com/translate/dothraki.json?text=\";\n\t\tString url = urlHalf1 + englishText;\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString jsonData = getJsonData(url);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tString translation = \"\";\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject treeObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement contents = treeObject.get(\"contents\");\n\n\t\t\tif (contents.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject contentsObject = contents.getAsJsonObject();\n\n\t\t\t\tJsonElement translateElement = contentsObject.get(\"translated\");\n\n\t\t\t\ttranslation = translateElement.getAsString();\n\t\t\t}\n\t\t}\n\n\t\treturn translation;\n\t}",
"Builder addInLanguage(Text value);",
"int getLocalizedText();",
"public static String getTranslation(String original, String originLanguage, String targetLanguage) {\n\t\tif (Options.getDebuglevel() > 1)\n\t\t\tSystem.out.println(\"Translating: \" + original);\n\t\ttry {\n\t\t\tDocument doc = Jsoup\n\t\t\t\t\t.connect(\"http://translate.reference.com/\" + originLanguage + \"/\" + targetLanguage + \"/\" + original)\n\t\t\t\t\t.userAgent(\"PlagTest\").get();\n\t\t\tElement e = doc.select(\"textarea[Placeholder=Translation]\").first();\n\t\t\tString text = e.text().trim();\n\t\t\tif (text.equalsIgnoreCase(original.trim()))\n\t\t\t\treturn null;\n\t\t\treturn text;\n\t\t} catch (Exception e1) {\n\t\t}\n\t\treturn null;\n\t}",
"default String getOriginalText() {\n return meta(\"nlpcraft:nlp:origtext\");\n }",
"public String extractText(String urlString) {\n String text = \"\";\n try {\n URL url = new URL(urlString);\n text = ArticleExtractor.INSTANCE.getText(url); \n } catch (Exception ex) {\n Logger.getLogger(TextExtractor.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return text;\n }",
"public void selectLanguage(String language) {\n\n String xpath = String.format(EST_LANGUAGE, language);\n List<WebElement> elements = languages.findElements(By.xpath(xpath));\n for (WebElement element : elements) {\n if (element.isDisplayed()) {\n element.click();\n break;\n }\n }\n }",
"com.google.ads.googleads.v6.resources.LanguageConstant getLanguageConstant();",
"@Override\n public String getText() {\n return analyzedWord;\n }",
"public String getThaiWordFromEngWord(String englishWord) {\n Cursor cursor = mDatabase.query(\n TABLE_NAME,\n new String[]{COL_THAI_WORD},\n COL_ENG_WORD + \"=?\",\n new String[]{englishWord},\n null,\n null,\n null\n );\n if (cursor.getCount() > 0) {\n cursor.moveToFirst();\n return cursor.getString(cursor.getColumnIndex(COL_THAI_WORD));\n } else {\n return englishWord;\n }\n }",
"public String classify(String text){\n\t\treturn mClassifier.classify(text).bestCategory();\n\t}",
"@Source(\"gr/grnet/pithos/resources/translate.png\")\n ImageResource selectAll();",
"public void Croppedimage(CropImage.ActivityResult result, ImageView iv, EditText et )\n {\n Uri resultUri = null; // get image uri\n if (result != null) {\n resultUri = result.getUri();\n }\n\n\n //set image to image view\n iv.setImageURI(resultUri);\n\n\n //get drawable bitmap for text recognition\n BitmapDrawable bitmapDrawable = (BitmapDrawable) iv.getDrawable();\n\n Bitmap bitmap = bitmapDrawable.getBitmap();\n\n TextRecognizer recognizer = new TextRecognizer.Builder(getApplicationContext()).build();\n\n if(!recognizer.isOperational())\n {\n Toast.makeText(this, \"Error No Text To Recognize\", Toast.LENGTH_LONG).show();\n }\n else\n {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n SparseArray<TextBlock> items = recognizer.detect(frame);\n StringBuilder ab = new StringBuilder();\n\n //get text from ab until there is no text\n for(int i = 0 ; i < items.size(); i++)\n {\n TextBlock myItem = items.valueAt(i);\n ab.append(myItem.getValue());\n\n }\n\n //set text to edit text\n et.setText(ab.toString());\n }\n\n }",
"@DISPID(-2147413103)\n @PropGet\n java.lang.String lang();",
"public String getLocale () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"private String getPhrase(String key) {\r\n if (\"pl\".equals(System.getProperty(\"user.language\")) && phrasesPL.containsKey(key)) {\r\n return phrasesPL.get(key);\r\n } else if (phrasesEN.containsKey(key)) {\r\n return phrasesEN.get(key);\r\n }\r\n return \"Translation not found!\";\r\n }",
"public void setLanguage(String language);",
"public String detectObject(Bitmap bitmap) {\n results = classifierObject.recognizeImage(bitmap);\n\n // Toast.makeText(context, results.toString(), Toast.LENGTH_LONG).show();\n return String.valueOf(results.toString());\n }",
"@Override\n protected int onIsLanguageAvailable(String lang, String country, String variant) {\n if (\"eng\".equals(lang)) {\n // We support two specific robot languages, the british robot language\n // and the american robot language.\n if (\"USA\".equals(country) || \"GBR\".equals(country)) {\n // If the engine supported a specific variant, we would have\n // something like.\n //\n // if (\"android\".equals(variant)) {\n // return TextToSpeech.LANG_COUNTRY_VAR_AVAILABLE;\n // }\n return TextToSpeech.LANG_COUNTRY_AVAILABLE;\n }\n\n // We support the language, but not the country.\n return TextToSpeech.LANG_AVAILABLE;\n }\n\n return TextToSpeech.LANG_NOT_SUPPORTED;\n }",
"String text();",
"public WordInfo searchWord(String word) {\n\t\tSystem.out.println(\"Dic:SearchWord: \"+word);\n\n\t\tDocument doc;\n\t\ttry {\n\t\t\tdoc = Jsoup.connect(\"https://dictionary.cambridge.org/dictionary/english-vietnamese/\" + word).get();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\tElements elements = doc.select(\".dpos-h.di-head.normal-entry\");\n\t\tif (elements.isEmpty()) {\n\t\t\tSystem.out.println(\" not found\");\n\t\t\treturn null;\n\t\t}\n\n\t\tWordInfo wordInfo = new WordInfo(word);\n\n\t\t// Word\n\t\telements = doc.select(\".tw-bw.dhw.dpos-h_hw.di-title\");\n\n\t\tif (elements.size() == 0) {\n\t\t\tSystem.out.println(\" word not found in doc!\");\n\t\t\treturn null;\n\t\t}\n\n\t\twordInfo.setWordDictionary(elements.get(0).html());\n\n\t\t// Type\n\t\telements = doc.select(\".pos.dpos\");\n\n\t\tif(elements.size() > 0) {\n\t\t\twordInfo.setType(WordInfo.getTypeShort(elements.get(0).html()));\n//\t\t\tif (wordInfo.getTypeShort().equals(\"\"))\n//\t\t\t\tSystem.out.println(\" typemis: \"+wordInfo.getType());\n\t\t}\n\n\t\t// Pronoun\n\t\telements = doc.select(\".ipa.dipa\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setAPI(\"/\"+elements.get(0).html()+\"/\");\n\n\t\t// Trans\n\t\telements = doc.select(\".trans.dtrans\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setTrans(elements.get(0).html());\n\n\t\tSystem.out.println(\" found\");\n\t\treturn wordInfo;\n\t}"
]
| [
"0.6340444",
"0.5907014",
"0.5881825",
"0.5613604",
"0.5501345",
"0.5476807",
"0.54720134",
"0.5439289",
"0.5439289",
"0.5422724",
"0.5412727",
"0.5398816",
"0.53872037",
"0.53670835",
"0.5357576",
"0.5357576",
"0.5357576",
"0.5356866",
"0.53034747",
"0.5297329",
"0.5260379",
"0.5254473",
"0.5246585",
"0.5228318",
"0.52282864",
"0.51628226",
"0.51364416",
"0.5131521",
"0.5125658",
"0.5094378",
"0.5072984",
"0.50591296",
"0.5053911",
"0.5033745",
"0.5029701",
"0.5023699",
"0.49775946",
"0.49752378",
"0.49746957",
"0.49692988",
"0.49669984",
"0.49603295",
"0.494737",
"0.49402708",
"0.4936638",
"0.49160838",
"0.49070477",
"0.490414",
"0.4901063",
"0.48966298",
"0.48771858",
"0.4871494",
"0.48709062",
"0.48640007",
"0.4860736",
"0.48604217",
"0.48568577",
"0.48375824",
"0.4816498",
"0.4812896",
"0.47998497",
"0.476058",
"0.47586524",
"0.47517806",
"0.4735092",
"0.47282943",
"0.47255528",
"0.46790475",
"0.46785977",
"0.46641326",
"0.46611255",
"0.46398386",
"0.46395934",
"0.46347702",
"0.46280068",
"0.46261424",
"0.46224535",
"0.46215943",
"0.46206397",
"0.46187946",
"0.46137336",
"0.4603326",
"0.46020162",
"0.45985487",
"0.4598176",
"0.459762",
"0.45945558",
"0.45927325",
"0.45888606",
"0.4577679",
"0.4577485",
"0.45715407",
"0.45659322",
"0.45604816",
"0.45601782",
"0.4558132",
"0.45481235",
"0.4547136",
"0.4546162",
"0.45450872",
"0.4538884"
]
| 0.0 | -1 |
Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. | public Observable<OCRInner> oCRFileInputAsync(String language, byte[] imageStream) {
return oCRFileInputWithServiceResponseAsync(language, imageStream).map(new Func1<ServiceResponse<OCRInner>, OCRInner>() {
@Override
public OCRInner call(ServiceResponse<OCRInner> response) {
return response.body();
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String detectLanguage(String text) {\n\t\treturn dictionary.detectLanguage(text);\n\t}",
"public boolean translateImageToText();",
"@SuppressWarnings(\"static-access\")\n\tpublic void detection(Request text) {\n\t\t//Fichiertxt fichier;\n\t\ttry {\t\t\t\t\t\n\t\t\t//enregistrement et affichage de la langue dans une variable lang\n\t\t\ttext.setLang(identifyLanguage(text.getCorpText()));\n\t\t\t//Ajoute le fichier traité dans la Base\n\t\t\tajouterTexte(text);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"fichier texte non trouvé\");\n\t e.printStackTrace();\n\t\t}\n\t}",
"public MashapeResponse<JSONObject> classifytext(String lang, String text) {\n return classifytext(lang, text, \"\");\n }",
"static WordList get(Language language) {\n return switch (language) {\n case ENGLISH -> readResource(\"bip39_english.txt\");\n };\n }",
"void readText(final Bitmap imageBitmap){\n\t\tif(imageBitmap != null) {\n\t\t\t\n\t\t\tTextRecognizer textRecognizer = new TextRecognizer.Builder(this).build();\n\t\t\t\n\t\t\tif(!textRecognizer.isOperational()) {\n\t\t\t\t// Note: The first time that an app using a Vision API is installed on a\n\t\t\t\t// device, GMS will download a native libraries to the device in order to do detection.\n\t\t\t\t// Usually this completes before the app is run for the first time. But if that\n\t\t\t\t// download has not yet completed, then the above call will not detect any text,\n\t\t\t\t// barcodes, or faces.\n\t\t\t\t// isOperational() can be used to check if the required native libraries are currently\n\t\t\t\t// available. The detectors will automatically become operational once the library\n\t\t\t\t// downloads complete on device.\n\t\t\t\tLog.w(TAG, \"Detector dependencies are not yet available.\");\n\t\t\t\t\n\t\t\t\t// Check for low storage. If there is low storage, the native library will not be\n\t\t\t\t// downloaded, so detection will not become operational.\n\t\t\t\tIntentFilter lowstorageFilter = new IntentFilter(Intent.ACTION_DEVICE_STORAGE_LOW);\n\t\t\t\tboolean hasLowStorage = registerReceiver(null, lowstorageFilter) != null;\n\t\t\t\t\n\t\t\t\tif (hasLowStorage) {\n\t\t\t\t\tToast.makeText(this,\"Low Storage\", Toast.LENGTH_LONG).show();\n\t\t\t\t\tLog.w(TAG, \"Low Storage\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tFrame imageFrame = new Frame.Builder()\n\t\t\t\t\t.setBitmap(imageBitmap)\n\t\t\t\t\t.build();\n\t\t\t\n\t\t\tSparseArray<TextBlock> textBlocks = textRecognizer.detect(imageFrame);\n\t\t\tdata.setText(\"\");\n\t\t\tfor (int i = 0; i < textBlocks.size(); i++) {\n\t\t\t\tTextBlock textBlock = textBlocks.get(textBlocks.keyAt(i));\n\t\t\t\tPoint[] points = textBlock.getCornerPoints();\n\t\t\t\tLog.i(TAG, textBlock.getValue());\n\t\t\t\tString corner = \"\";\n\t\t\t\tfor(Point point : points){\n\t\t\t\t\tcorner += point.toString();\n\t\t\t\t}\n\t\t\t\t//data.setText(data.getText() + \"\\n\" + corner);\n\t\t\t\tdata.setText(data.getText()+ \"\\n \"+ textBlock.getValue() + \" \\n\" );\n\t\t\t\t// Do something with value\n /*List<? extends Text> textComponents = textBlock.getComponents();\n for(Text currentText : textComponents) {\n // Do your thing here }\n mImageDetails.setText(mImageDetails.getText() + \"\\n\" + currentText);\n }*/\n\t\t\t}\n\t\t}\n\t}",
"public String getEnglish()\n {\n if (spanishWord.substring(0,3).equals(\"el \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n else if (spanishWord.substring(0, 3).equals(\"la \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n if (spanishWord.equals(\"estudiante\"))\n {\n return \"student\"; \n }\n else if (spanishWord.equals(\"aprender\"))\n {\n return \"to learn\";\n }\n else if (spanishWord.equals(\"entender\"))\n {\n return\"to understand\";\n }\n else if (spanishWord.equals(\"verde\"))\n {\n return \"green\";\n }\n else\n {\n return null;\n }\n }",
"java.lang.String getLanguage();",
"java.lang.String getLanguage();",
"private void detextTextFromImage(Bitmap imageBitmap) {\n\n\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(imageBitmap);\n\n FirebaseVisionTextRecognizer firebaseVisionTextRecognizer = FirebaseVision.getInstance().getCloudTextRecognizer();\n\n firebaseVisionTextRecognizer.processImage(image)\n .addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText firebaseVisionText) {\n String text = firebaseVisionText.getText();\n\n if (text.isEmpty() || text == null)\n Toast.makeText(ctx, \"Can not identify. Try again!\", Toast.LENGTH_SHORT).show();\n\n else {\n\n startTranslateIntent(text);\n }\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n e.printStackTrace();\n }\n });\n\n\n }",
"public synchronized Result process(String text, String lang) {\n // Check that service has been initialized.\n if (!this.initialized) {\n logInitializationError();\n return null;\n }\n this.cas.reset();\n this.cas.setDocumentText(text);\n if (lang != null) {\n this.cas.setDocumentLanguage(lang);\n }\n try {\n this.ae.process(this.cas);\n } catch (AnalysisEngineProcessException e) {\n getLogger().log(Level.SEVERE, \"\", e);\n return null;\n }\n return this.resultExtractor.getResult(this.cas, this.serviceSpec);\n }",
"private static AnalysisResults.Builder retrieveText(ByteString imageBytes) throws IOException {\n AnalysisResults.Builder analysisBuilder = new AnalysisResults.Builder();\n\n Image image = Image.newBuilder().setContent(imageBytes).build();\n ImmutableList<Feature> features =\n ImmutableList.of(Feature.newBuilder().setType(Feature.Type.TEXT_DETECTION).build(),\n Feature.newBuilder().setType(Feature.Type.LOGO_DETECTION).build());\n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addAllFeatures(features).setImage(image).build();\n ImmutableList<AnnotateImageRequest> requests = ImmutableList.of(request);\n\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n BatchAnnotateImagesResponse batchResponse = client.batchAnnotateImages(requests);\n\n if (batchResponse.getResponsesList().isEmpty()) {\n return analysisBuilder;\n }\n\n AnnotateImageResponse response = Iterables.getOnlyElement(batchResponse.getResponsesList());\n\n if (response.hasError()) {\n return analysisBuilder;\n }\n\n // Add extracted raw text to builder.\n if (!response.getTextAnnotationsList().isEmpty()) {\n // First element has the entire raw text from the image.\n EntityAnnotation textAnnotation = response.getTextAnnotationsList().get(0);\n\n String rawText = textAnnotation.getDescription();\n analysisBuilder.setRawText(rawText);\n }\n\n // If a logo was detected with a confidence above the threshold, use it to set the store.\n if (!response.getLogoAnnotationsList().isEmpty()\n && response.getLogoAnnotationsList().get(0).getScore()\n > LOGO_DETECTION_CONFIDENCE_THRESHOLD) {\n String store = response.getLogoAnnotationsList().get(0).getDescription();\n analysisBuilder.setStore(store);\n }\n } catch (ApiException e) {\n // Return default builder if image annotation request failed.\n return analysisBuilder;\n }\n\n return analysisBuilder;\n }",
"public java.lang.String getLanguage() {\n return _courseImage.getLanguage();\n }",
"public void ocrExtraction(BufferedImage image) {\n\t\tFile outputfile = new File(\"temp.png\");\n\t\toutputfile.deleteOnExit();\n\t\tString ocrText = \"\", currLine = \"\";\n\t\ttry {\n\t\t\tImageIO.write(image, \"png\", outputfile);\n\n\t\t\t// System call to Tesseract OCR\n\t\t\tRuntime r = Runtime.getRuntime();\n\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText -psm 6\");\n//\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText\");\n\t\t\tp.waitFor();\n\n\t\t\t// Read text file generated by tesseract\n\t\t\tFile f = new File(\"ocrText.txt\");\n\t\t\tf.deleteOnExit();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\t\t\n\t\t\twhile ((currLine = br.readLine()) != null) {\n\t\t\t\tocrText += (currLine + \" \");\n\t\t\t}\n\t\t\tif(ocrText.trim().isEmpty()) {\n\t\t\t\tocrText = \"OCR_FAIL\";\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttextField.setText(ocrText.trim());\n\t\ttextField.requestFocus();\n\t\ttextField.selectAll();\n\t}",
"String getLanguage();",
"String getLanguage();",
"String getLanguage();",
"public String getTitile(String language) {\n if (language.startsWith(\"e\")) {\n return enTitle;\n } else {\n return localTitle;\n }\n }",
"public String scanText(BufferedImage image) throws IOException {\n File tmpImgFile = File.createTempFile(\"tmpImg\", \".jpg\");\n ImageIO.write(image, \"jpg\", tmpImgFile);\n String rawData = TesseractWrapper.runTesseract(tmpImgFile.getAbsolutePath());\n tmpImgFile.delete();\n return rawData;\n }",
"public MashapeResponse<JSONObject> classifytext(String lang, String text, String exclude) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n if (lang != null && !lang.equals(\"\")) {\n\tparameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n\tparameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n\tparameters.put(\"exclude\", exclude);\n }\n \n \n return (MashapeResponse<JSONObject>) HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers);\n }",
"protected VideoText[] analyze(File imageFile, String id) throws TextAnalyzerException {\n boolean languagesInstalled;\n if (dictionaryService.getLanguages().length == 0) {\n languagesInstalled = false;\n logger.warn(\"There are no language packs installed. All text extracted from video will be considered valid.\");\n } else {\n languagesInstalled = true;\n }\n\n List<VideoText> videoTexts = new ArrayList<VideoText>();\n TextFrame textFrame = null;\n try {\n textFrame = textExtractor.extract(imageFile);\n } catch (IOException e) {\n logger.warn(\"Error reading image file {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n } catch (TextExtractorException e) {\n logger.warn(\"Error extracting text from {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n }\n\n int i = 1;\n for (TextLine line : textFrame.getLines()) {\n VideoText videoText = new VideoTextImpl(id + \"-\" + i++);\n videoText.setBoundary(line.getBoundaries());\n Textual text = null;\n if (languagesInstalled) {\n String[] potentialWords = line.getText() == null ? new String[0] : line.getText().split(\"\\\\W\");\n String[] languages = dictionaryService.detectLanguage(potentialWords);\n if (languages.length == 0) {\n // There are languages installed, but these words are part of one of those languages\n logger.debug(\"No languages found for '{}'.\", line.getText());\n continue;\n } else {\n String language = languages[0];\n DICT_TOKEN[] tokens = dictionaryService.cleanText(potentialWords, language);\n StringBuilder cleanLine = new StringBuilder();\n for (int j = 0; j < potentialWords.length; j++) {\n if (tokens[j] == DICT_TOKEN.WORD) {\n if (cleanLine.length() > 0) {\n cleanLine.append(\" \");\n }\n cleanLine.append(potentialWords[j]);\n }\n }\n // TODO: Ensure that the language returned by the dictionary is compatible with the MPEG-7 schema\n text = new TextualImpl(cleanLine.toString(), language);\n }\n } else {\n logger.debug(\"No languages installed. For better results, please install at least one language pack\");\n text = new TextualImpl(line.getText());\n }\n videoText.setText(text);\n videoTexts.add(videoText);\n }\n return videoTexts.toArray(new VideoText[videoTexts.size()]);\n }",
"public List<Result> recognize(IplImage image);",
"public static String getImgText(final String imageLocation) {\n\n return getImgText(new File(imageLocation));\n }",
"private String getLanguage(Prediction prediction, String content)\n throws IOException {\n Preconditions.checkNotNull(prediction);\n Preconditions.checkNotNull(content);\n\n Input input = new Input();\n Input.InputInput inputInput = new Input.InputInput();\n inputInput.set(\"csvInstance\", Lists.newArrayList(content));\n input.setInput(inputInput);\n Output result = prediction.trainedmodels().predict(Utils.getProjectId(),\n Constants.MODEL_ID, input).execute();\n return result.getOutputLabel();\n }",
"public Thread classifytext(String lang, String text, String exclude, MashapeCallback<JSONObject> callback) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n \n if (lang != null && !lang.equals(\"\")) {\n \n parameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n \n parameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n \n parameters.put(\"exclude\", exclude);\n }\n \n return HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers,\n callback);\n }",
"public Thread classifytext(String lang, String text, MashapeCallback<JSONObject> callback) {\n return classifytext(lang, text, \"\", callback);\n }",
"public static String getImgText(final File file) {\n\n final ITesseract instance = new Tesseract();\n try {\n\n return instance.doOCR(file);\n } catch (TesseractException e) {\n\n e.getMessage();\n return \"Error while reading image\";\n }\n }",
"private String autoDetectLanguage(ArrayList<File> progFiles) {\n for (File f : progFiles) {\n String f_extension = getFileExtension(f).toLowerCase();\n if (Arrays.asList(IAGConstant.PYTHON_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_PYTHON3;\n }\n if (Arrays.asList(IAGConstant.CPP_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_CPP;\n }\n }\n return IAGConstant.LANGUAGE_UNKNOWN;\n }",
"private String html2safetynet(String text, String language) {\n\n // Convert from html to plain text\n text = TextUtils.html2txt(text, true);\n\n // Remove separator between positions\n text = PositionUtils.replaceSeparator(text, \" \");\n\n // Replace positions with NAVTEX versions\n PositionAssembler navtexPosAssembler = PositionAssembler.newNavtexPositionAssembler();\n text = PositionUtils.updatePositionFormat(text, navtexPosAssembler);\n\n // Remove verbose words, such as \"the\", from the text\n text = TextUtils.removeWords(text, SUPERFLUOUS_WORDS);\n\n // NB: unlike NAVTEX, we do not split into 40-character lines\n\n return text.toUpperCase();\n }",
"private String tesseract(Bitmap bitmap) {\n return \"NOT IMPLEMENTED\";\n }",
"public static String customTextFilter(BufferedImage img, String txt) {\n\n int newHeight = img.getHeight() / 200;\n int newWidth = img.getWidth() / 200;\n String html = \"\";\n int aux = 0;\n\n for (int i = 0; i < 200; i++) {\n if (i > 0) {\n html += \"\\n<br>\\n\";\n }\n for (int j = 0; j < 200; j++) {\n if (aux == txt.length()) {\n html += \"<b> </b>\";\n aux = 0;\n } else {\n Color c = regionAvgColor(j * newWidth, (j * newWidth) + newWidth,\n i * newHeight, (i * newHeight) + newHeight, newHeight,\n newWidth, img);\n html += \"<b style='color:rgb(\" + c.getRed() + \",\"\n + c.getGreen() + \",\" + c.getBlue() + \");'>\"\n + txt.substring(aux, aux + 1) + \"</b>\";\n aux++;\n }\n }\n }\n String style = \"body{\\nfont-size: 15px\\n}\";\n String title = \"Imagen Texto\";\n int styleIndex = HTML.indexOf(\"?S\"), titleIndex = HTML.indexOf(\"?T\"),\n bodyIndex = HTML.indexOf(\"?B\");\n String htmlFile = HTML.substring(0, styleIndex) + style;\n htmlFile += HTML.substring(styleIndex + 2, titleIndex) + title;\n htmlFile += HTML.substring(titleIndex + 2, bodyIndex) + html;\n htmlFile += HTML.substring(bodyIndex + 2);\n return htmlFile;\n }",
"private String getTranslation(String language, String id)\n {\n Iterator<Translation> translations = mTranslationState.iterator();\n \n while (translations.hasNext()) {\n Translation translation = translations.next();\n \n if (translation.getLang().equals(language)) {\n Iterator<TranslationText> texts = translation.texts.iterator();\n \n while (texts.hasNext()) {\n TranslationText text = texts.next();\n \n if (text.getId().equals(id)) {\n text.setUsed(true);\n return text.getValue();\n }\n }\n }\n }\n \n return \"[Translation Not Available]\";\n }",
"private String getLanguage(String fileName)\n {\n if (fileName.endsWith(\".C\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".Java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".CPP\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".Class\"))\n {\n return \"Java\";\n }\n if (fileName.endsWith(\".c\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".cpp\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".class\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".h\"))\n {\n return \"C\";\n }\n else\n {\n return \"??\";\n }\n }",
"@DISPID(-2147413012)\n @PropGet\n java.lang.String language();",
"public String getLanguage();",
"public String detectAndDecode(Mat img) {\n return detectAndDecode_2(nativeObj, img.nativeObj);\n }",
"String getLang();",
"@Override\n public DetectDominantLanguageResult detectDominantLanguage(DetectDominantLanguageRequest request) {\n request = beforeClientExecution(request);\n return executeDetectDominantLanguage(request);\n }",
"private void processTextRecognitionResult(FirebaseVisionText texts) {\n List<FirebaseVisionText.Block> blocks = texts.getBlocks();\n if (blocks.size() == 0) {\n Toast.makeText(getApplicationContext(), \"onDevice: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n for (int i = 0; i < blocks.size(); i++) {\n List<FirebaseVisionText.Line> lines = blocks.get(i).getLines();\n for (int j = 0; j < lines.size(); j++) {\n List<FirebaseVisionText.Element> elements = lines.get(j).getElements();\n for (int k = 0; k < elements.size(); k++) {\n GraphicOverlay.Graphic textGraphic = new TextGraphic(mGraphicOverlay, elements.get(k));\n mGraphicOverlay.add(textGraphic);\n\n }\n }\n }\n }",
"@Override\n public void onSuccess(Text visionText) {\n\n Log.d(TAG, \"onSuccess: \");\n extractText(visionText);\n }",
"public String getText() {\n if (Language.isEnglish()) {\n return textEn;\n } else {\n return textFr;\n }\n }",
"public Elements getTextFromWeb(String lang, String word) {\n\t\tToast t = Toast.makeText(this, \"Buscando...\", Toast.LENGTH_SHORT);\n\t\tt.setGravity(Gravity.TOP, 0, 0); // el show lo meto en el try\n\t\tseleccionado.setText(\"\");\n\t\tresultados.clear();\n\t\tlv.setAdapter(new ArrayAdapter<String>(this, R.layout.my_item_list,\n\t\t\t\tresultados));\n\n\t\tElements res = null;\n\t\tif (!networkAvailable(getApplicationContext())) {\n\t\t\tToast.makeText(this, \"¡Necesitas acceso a internet!\",\n\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t} else {\n\t\t\tString url = \"http://www.wordreference.com/es/translation.asp?tranword=\";\n\t\t\tif (lang == \"aEspa\") {\n\t\t\t\turl += word;\n\t\t\t\tt.show();\n\t\t\t\t/* De ingles a español */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarWR(doc);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\turl = \"http://www.wordreference.com/es/en/translation.asp?spen=\"\n\t\t\t\t\t\t+ word;\n\t\t\t\tt.show();\n\t\t\t\t/* De español a ingles */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\t// no hay\n\t\t\t\t\t// else if (doc.toString().contains(\n\t\t\t\t\t// \"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t// res = procesarWR2(doc);\n\t\t\t\t\t// }\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}",
"CLanguage getClanguage();",
"private Spannable applyWordMarkup(String text) {\n SpannableStringBuilder ssb = new SpannableStringBuilder();\n int languageCodeStart = 0;\n int untranslatedStart = 0;\n\n int textLength = text.length();\n for (int i = 0; i < textLength; i++) {\n char c = text.charAt(i);\n if (c == '.') {\n if (++i < textLength) {\n c = text.charAt(i);\n if (c == '.') {\n ssb.append(c);\n } else if (c == 'c') {\n languageCodeStart = ssb.length();\n } else if (c == 'C') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.language_code_tag),\n languageCodeStart, ssb.length(), 0);\n languageCodeStart = ssb.length();\n } else if (c == 'u') {\n untranslatedStart = ssb.length();\n } else if (c == 'U') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.untranslated_word),\n untranslatedStart, ssb.length(), 0);\n untranslatedStart = ssb.length();\n } else if (c == '0') {\n Resources res = getResources();\n ssb.append(res.getString(R.string.no_translations));\n }\n }\n } else\n ssb.append(c);\n }\n\n return ssb;\n }",
"public Future<String> getLanguage() throws DynamicCallException, ExecutionException {\n return call(\"getLanguage\");\n }",
"private void processCloudTextRecognitionResult(FirebaseVisionCloudText text) {\n // Task completed successfully\n if (text == null) {\n Toast.makeText(getApplicationContext(), \"onCloud: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n List<FirebaseVisionCloudText.Page> pages = text.getPages();\n for (int i = 0; i < pages.size(); i++) {\n FirebaseVisionCloudText.Page page = pages.get(i);\n List<FirebaseVisionCloudText.Block> blocks = page.getBlocks();\n for (int j = 0; j < blocks.size(); j++) {\n List<FirebaseVisionCloudText.Paragraph> paragraphs = blocks.get(j).getParagraphs();\n for (int k = 0; k < paragraphs.size(); k++) {\n FirebaseVisionCloudText.Paragraph paragraph = paragraphs.get(k);\n List<FirebaseVisionCloudText.Word> words = paragraph.getWords();\n for (int l = 0; l < words.size(); l++) {\n GraphicOverlay.Graphic cloudTextGraphic = new CloudTextGraphic(mGraphicOverlay, words.get(l));\n mGraphicOverlay.add(cloudTextGraphic);\n }\n }\n }\n }\n }",
"public interface WordAnalyser {\n\n /**\n * Gets the bounds of all words it encounters in the image\n * \n */\n List<Rectangle> getWordBoundaries();\n\n /**\n * Gets the partial binary pixel matrix of the given word.\n * \n * @param wordBoundary\n * The bounds of the word\n */\n BinaryImage getWordMatrix(Rectangle wordBoundary);\n\n}",
"public void setLanguage(java.lang.String language) {\n _courseImage.setLanguage(language);\n }",
"private void runTextRecognition() {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(mSelectedImage);\n FirebaseVisionTextRecognizer recognizer = FirebaseVision.getInstance()\n .getOnDeviceTextRecognizer();\n //mTextButton.setEnabled(false);\n recognizer.processImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n //mTextButton.setEnabled(true);\n processTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n //mTextButton.setEnabled(true);\n e.printStackTrace();\n }\n });\n }",
"Language findByName(String name);",
"private Word askForWord(Language lastLanguage) throws LanguageException {\n Language language = askForLanguage();\r\n if(language == null || language.equals(lastLanguage)) {\r\n throw new LanguageException();\r\n }\r\n // Step 2 : Name of the word\r\n String name = askForLine(\"Name of the word : \");\r\n Word searchedWord = czech.searchWord(language, name);\r\n if(searchedWord != null) {\r\n System.out.println(\"Word \" + name + \" found !\");\r\n return searchedWord;\r\n }\r\n System.out.println(\"Word \" + name + \" not found.\");\r\n // Step 3 : Gender/Phonetic of the word\r\n String gender = askForLine(\"\\tGender of the word : \");\r\n String phonetic = askForLine(\"\\tPhonetic of the word : \");\r\n // Last step : Creation of the word\r\n Word word = new Word(language, name, gender, phonetic);\r\n int id = czech.getListWords(language).get(-1).getId() + 1;\r\n word.setId(id);\r\n czech.getListWords(language).put(-1, word);\r\n return word;\r\n }",
"public static String RunOCR(Bitmap bitview, Context context, String activityName) {\n TextRecognizer textRecognizer = new TextRecognizer.Builder(context).build();\n if(!textRecognizer.isOperational()){\n // Note: The first time that an app using a Vision API is installed on a\n // device, GMS will download a native libraries to the device in order to do detection.\n // Usually this completes before the app is run for the first time. But if that\n // download has not yet completed, then the above call will not detect any text,\n // barcodes, or faces.\n //\n // isOperational() can be used to check if the required native libraries are currently\n // available. The detectors will automatically become operational once the library\n // downloads complete on device.\n Log.w(activityName, \"Detector dependencies are not yet available\");\n return \"FAILED -Text Recognizer ERROR-\";\n } else {\n Frame frame = new Frame.Builder().setBitmap(bitview).build();\n SparseArray<TextBlock> items = textRecognizer.detect(frame);\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i< items.size(); ++i){\n TextBlock item = items.valueAt(i);\n stringBuilder.append(item.getValue());\n stringBuilder.append(\"\\n\");\n }\n String ocr = stringBuilder.toString();\n Log.i(activityName, \"List of OCRs:\\n\" +ocr+\"\\n\");\n return ocr;\n }\n }",
"public String findExtension(String lang) {\n if (lang == null)\n return \".txt\";\n else if (lang.equals(\"C++\"))\n return \".cpp\";\n else if (lang.equals(\"C\"))\n return \".c\";\n else if (lang.equals(\"PYT\"))\n return \".py\";\n else if (lang.equals(\"JAV\"))\n return \".java\";\n else\n return \".txt\";\n }",
"public AbstractLetterFactory decideLanguage(String lang){\n if(lang==\"ENG\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'m', 'a', 'y', 'n', 'o', 'o', 't', 'h'};\n return new EnglishLetterFactory();\n\n }\n else if(lang==\"RUS\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'м','а', 'ы', 'н', 'о', 'о', 'т', 'х'};\n return new RussianLetterFactory();\n }\n\n return new EnglishLetterFactory();\n\n }",
"private List<String> getLabels(Image image) {\n\t\ttry (ImageAnnotatorClient vision = ImageAnnotatorClient.create()) {\n\n\t\t\t// Creates the request for label detection. The API requires a list, but since the storage\n\t\t\t// bucket doesn't support batch uploads, the list will have only one request per function call\n\t\t\tList<AnnotateImageRequest> requests = new ArrayList<>();\n\t\t\tFeature feat = Feature.newBuilder().setType(Type.LABEL_DETECTION).build();\n\t\t\tAnnotateImageRequest request = AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(image).build();\n\t\t\trequests.add(request);\n\n\t\t\t// Performs label detection on the image file\n\t\t\tList<AnnotateImageResponse> responses = vision.batchAnnotateImages(requests).getResponsesList();\n\n\t\t\t// Iterates through the responses, though in reality there will only be one response\n\t\t\tfor (AnnotateImageResponse res : responses) {\n\t\t\t\tif (res.hasError()) {\n\t\t\t\t\tlogger.log(Level.SEVERE, \"Error getting annotations: \" + res.getError().getMessage());\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Return the first 3 generated labels\n\t\t\t\treturn res.getLabelAnnotationsList().stream().limit(3L).map(e -> e.getDescription())\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"private void pirateRecipe(String text) {\n if (\"excitedze\".equals(text)) {\n LanguageManager languagemanager = this.mc.getLanguageManager();\n Language language = languagemanager.getLanguage(\"en_pt\");\n if (languagemanager.getCurrentLanguage().compareTo(language) == 0) {\n return;\n }\n\n languagemanager.setCurrentLanguage(language);\n this.mc.gameSettings.language = language.getCode();\n net.minecraftforge.client.ForgeHooksClient.refreshResources(this.mc, net.minecraftforge.resource.VanillaResourceType.LANGUAGES);\n this.mc.gameSettings.saveOptions();\n }\n\n }",
"public byte[] decode_text(byte[] image) {\n int length = 0;\n int offset = 32;\n // loop through 32 bytes of data to determine text length\n for (int i = 0; i < 32; ++i) // i=24 will also work, as only the 4th\n // byte contains real data\n {\n length = (length << 1) | (image[i] & 1);\n }\n\n byte[] result = new byte[length];\n\n // loop through each byte of text\n for (int b = 0; b < result.length; ++b) {\n // loop through each bit within a byte of text\n for (int i = 0; i < 8; ++i, ++offset) {\n // assign bit: [(new byte value) << 1] OR [(text byte) AND 1]\n result[b] = (byte) ((result[b] << 1) | (image[offset] & 1));\n }\n }\n return result;\n }",
"public abstract void startVoiceRecognition(String language);",
"@Override\n public void run() {\n try {\n byte[] photoData = IOUtils.toByteArray(inputStream);\n inputStream.close();\n //Mat src = Imgcodecs.imdecode(new MatOfByte(photoData), Imgcodecs.CV_LOAD_IMAGE_UNCHANGED);\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n\n\n\n// //OCR PREPROCESSING FOR FAREHA'S MODULE\n// try{\n//// Mat src = Utils.loadResource(reportAnalysisActivity.this, R.drawable.bloodf, Imgcodecs.CV_LOAD_IMAGE_GRAYSCALE);\n// //boolean ans = src.isContinuous();\n// //1. Resizing\n// double ratio = (double)src.width()/src.height();\n// if(src.width()>768){\n// int newHeight = (int)(768/ratio);\n// Imgproc.resize(src,src,new Size(768,newHeight ));\n// }\n// else if(src.height()>1024){\n// int newWidth = (int)(1024*ratio);\n// Imgproc.resize(src,src,new Size(newWidth,1024));\n// }\n//\n// //2. denoising\n// Photo.fastNlMeansDenoising(src,src,10,7,21);\n// }\n// catch(Exception e){}\n//\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n//\n Image inputImage = new Image();\n inputImage.encodeContent(photoData);\n\n Feature desiredFeature = new Feature();\n desiredFeature.setType(\"TEXT_DETECTION\");\n\n BatchAnnotateImagesRequest batchRequest =\n new BatchAnnotateImagesRequest();\n final AnnotateImageRequest request = new AnnotateImageRequest();\n request.setImage(inputImage);\n request.setFeatures(Arrays.asList(desiredFeature));\n batchRequest.setRequests(Arrays.asList(request));\n BatchAnnotateImagesResponse batchResponse = vision.images().annotate(batchRequest).execute();\n text = batchResponse.getResponses().get(0).getFullTextAnnotation();\n\n int block_number = -1;\n int current_block = 0;\n ArrayList<Vertex> block_coords = new ArrayList<Vertex>();\n\n for (Page page : text.getPages()) {\n for (Block block : page.getBlocks()) {\n\n block_number++;\n //Save vertices of all the blocks\n block_coords.add(block.getBoundingBox().getVertices().get(0));\n allBlocks.add(block);\n\n for (Paragraph paragraph : block.getParagraphs()) {\n for (Word word : paragraph.getWords()) {\n String c_word = \"\";\n for (Symbol symbol : word.getSymbols()) {\n c_word += symbol.getText();\n }\n if (c_word.equals(\"WBC\") || c_word.equals(\"RBC\") ||\n c_word.equals(\"HB\") || c_word.equals(\"Hb\") || c_word.contains(\"Hemoglobin\") || c_word.equals(\"Haemoglobin\")\n || c_word.equals(\"Hematocrit\") || c_word.equals(\"HCT\") || c_word.equals(\"MCV\") || c_word.equals(\"MCH\")\n || c_word.equals(\"MCHC\") || c_word.contains(\"Platelet\") || c_word.equals(\"PLT\") || c_word.equals(\"ESR\")\n || c_word.equals(\"LYM\") || c_word.equals(\"LYM#\") || c_word.equals(\"LYM%\") || c_word.contains(\"Lym\")\n || c_word.equals(\"NEUT#\") || c_word.contains(\"NUET%\") || c_word.equals(\"NEUT\") || c_word.contains(\"Neut\")\n || c_word.contains(\"Monocytes\") || c_word.contains(\"Eosinophils\")\n || c_word.equals(\"Mixed Cells\") ||c_word.equals(\"Basophils\") ||c_word.equals(\"Bands\") ||\n c_word.contains(\"Bilirubin\") || c_word.equals(\"ALT\") || c_word.equals(\"SGPT\") || c_word.equals(\"ALK-Phos\") || c_word.contains(\"Alk\")\n || c_word.equals(\"ALK\")) {\n\n //Store the y coords of blocks containing testnames in array if not already saved\n if (testnameBlocks_coords.isEmpty() || !testnameBlocks_coords.contains(block_coords.get(block_number)))\n testnameBlocks_coords.add(block_coords.get(block_number));\n }\n }\n }\n }\n\n }\n\n //Sort the array containing the blocks that contain the test names in an order of largest y coordinates\n Collections.sort(testnameBlocks_coords, new Comparator<Vertex>() {\n @Override\n public int compare(Vertex x1, Vertex x2) {\n int result= Integer.compare(x1.getY(), x2.getY());\n if(result==0){\n //both ys are equal so we compare the x\n result=Integer.compare(x1.getX(), x2.getX());\n }\n return result;\n }\n });\n\n //Save the names of the testnames in order in test_name array\n int blocknum = 0;\n for (int j = 0; j < testnameBlocks_coords.size(); j++) {\n for (int i = 0; i < allBlocks.size(); i++) {\n if (allBlocks.get(i).getBoundingBox().getVertices().get(0) == testnameBlocks_coords.get(j)) {\n blocknum = i; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n for (Paragraph paragraph : allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for (Word word : paragraph.getWords()) {\n String name = \"\";\n for (Symbol symbol : word.getSymbols()) {\n name += symbol.getText();\n //save the testnames in testnames array\n }\n if (name.equals(\"%\") || name.equals(\"#\") || name.equals(\"Count\") || name.equals(\",\")\n || name.equals(\"Level\")) {\n StringBuilder stringBuilder = new StringBuilder(testnames.get(testnames.size() - 1));\n stringBuilder.append(name);\n testnames.add(testnames.size() - 1, stringBuilder.toString());\n testnames.remove(testnames.size() - 1);\n }\n else if (name.equals(\"WBC\") || name.equals(\"RBC\") ||\n name.equals(\"HB\") || name.equals(\"Hb\") || name.contains(\"Hemoglobin\") || name.equals(\"Haemoglobin\")\n || name.equals(\"Hematocrit\") || name.equals(\"HCT\") || name.equals(\"MCV\") || name.equals(\"MCH\")\n || name.equals(\"MCHC\") || name.contains(\"Platelet\") || name.equals(\"PLT\") || name.equals(\"ESR\")\n || name.equals(\"LYM\") || name.equals(\"LYM#\") || name.equals(\"LYM%\") || name.contains(\"Lym\")\n || name.equals(\"NEUT#\") || name.contains(\"NUET%\") || name.equals(\"NEUT\") || name.contains(\"Neut\")\n || name.contains(\"Monocytes\") || name.contains(\"Eosinophils\")\n || name.equals(\"Mixed Cells\") ||name.equals(\"Basophils\") ||name.equals(\"Bands\") ||\n name.contains(\"Bilirubin\") || name.equals(\"ALT\") || name.equals(\"SGPT\") || name.equals(\"ALK-Phos\") || name.contains(\"Alk.\")\n || name.equals(\"ALK\"))\n testnames.add(name);\n\n }\n }\n\n }\n\n //Below is the procedure to find the values of testvalues\n int result_block_index = 0;\n int num_of_values=0;\n int diff=0;\n ArrayList<Integer> ignoreIndex=new ArrayList<Integer>();\n Boolean isFloat=true;\n float value=0;\n\n while(num_of_values<testnames.size()){\n //next block of values\n if(!testvaluesBlocks_coords.isEmpty()){\n int previous_result_block_index = result_block_index; //Index at which the value block lies\n diff = Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX())<diff && previous_result_block_index!=i){\n if(!ignoreIndex.contains(i)){\n diff= Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX());\n result_block_index=i;\n }\n\n }\n }\n }\n //first block of values\n else{\n //Getting values from te first block\n diff=Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY())<diff && block_coords.indexOf(testnameBlocks_coords.get(0))!=i){\n if(!ignoreIndex.contains(i)){\n diff= testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY();\n result_block_index=i;\n }\n\n }\n }\n }\n isFloat=false;\n for(Paragraph paragraph: allBlocks.get(result_block_index).getParagraphs()){\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n\n }\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n if(value_string.contains(\"-\")){\n isFloat=false;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n break;\n }\n try{\n value= Float.parseFloat(value_string);\n num_of_values++;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n isFloat=true;\n\n }\n catch (NumberFormatException e){\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n }\n\n\n\n\n }\n }\n\n if(isFloat){\n //Save y coordinates of value block\n testvaluesBlocks_coords.add(block_coords.get(result_block_index).getY());\n }\n }\n //sort test values coordinates array\n Collections.sort(testvaluesBlocks_coords);\n\n //save the values in an array\n for(int i=0; i<testvaluesBlocks_coords.size();i++){\n for(int j=0; j<allBlocks.size();j++){\n if(allBlocks.get(j).getBoundingBox().getVertices().get(0).getY()==testvaluesBlocks_coords.get(i)){\n blocknum=j; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n //save values in array\n for (Paragraph paragraph: allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n }\n\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n try{\n value= Float.parseFloat(value_string);\n //save the testnames in testnames array\n testValues.add(Float.parseFloat(value_string));\n }\n catch(NumberFormatException n){\n\n }\n }\n\n }\n }\n\n for (int a = 0; a < testnames.size(); a++) {\n Log.e(testnames.get(a), Float.toString(testValues.get(a)));\n }\n\n //Convert the testname and testvalues array to string so they can be passed on\n StringBuilder sb = new StringBuilder();\n StringBuilder sb2 = new StringBuilder();\n for (int i = 0; i < testnames.size(); i++) {\n sb.append(testnames.get(i)).append(\",\");\n sb2.append(testValues.get(i)).append(\",\");\n\n }\n\n //Save the values and testnames so they can be passed on to next activity\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(reportAnalysisActivity.this);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"testnames\", sb.toString());\n editor.putString(\"testvalues\", sb2.toString());\n editor.putString(\"gender\", gender);\n editor.apply();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Intent reportresultScreen = new Intent(view.getContext(), reportResult_Activity.class);\n startActivity(reportresultScreen);\n }\n });\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n done=true;\n }",
"@Override\n public String recognizeImage(final Bitmap bitmap) {\n Trace.beginSection(\"recognizeImage\");\n\n Trace.beginSection(\"preprocessBitmap\");\n // Preprocess the image data from 0-255 int to normalized float based\n // on the provided parameters.\n bitmapToInputData(bitmap);\n Trace.endSection(); // preprocessBitmap\n\n // Run the inference call.\n Trace.beginSection(\"run\");\n\n tfLite.run(imgData, tfoutput_recognize);\n\n Trace.endSection();\n postPro = new Postprocessing(tfoutput_recognize);\n predictClass = postPro.postRecognize();\n Trace.endSection(); // \"recognizeImage\"\n\n //LOGGER.w(\"\"+(System.currentTimeMillis()-startTime));\n return labels.get(predictClass);\n }",
"boolean hasLanguage();",
"List<Label> findAllByLanguage(String language);",
"public String getDescription(String lang) {\n/* 188 */ return getLangAlt(lang, \"description\");\n/* */ }",
"public String getLanguage() throws DynamicCallException, ExecutionException {\n return (String)call(\"getLanguage\").get();\n }",
"public String getPredefinedTextMessage( String language, int preDefindeMsgId );",
"public void englishlanguage() {\nSystem.out.println(\"englishlanguage\");\n\t}",
"public interface LanguageProvider {\n\tLanguageService study();\n}",
"DetectionResult getObjInImage(Mat image);",
"private void runTextRecognition(Bitmap bitmap) {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionTextDetector detector = FirebaseVision.getInstance().getVisionTextDetector();\n\n detector.detectInImage(image).addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n processTextRecognitionResult(texts);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n e.printStackTrace();\n }\n });\n }",
"private void performOCR(){\n }",
"private static String italianAnalyzer(String label) throws IOException\r\n\t{\r\n\t\t// recupero le stopWords dell'ItalianAnalyzer\r\n\t\tCharArraySet stopWords = ItalianAnalyzer.getDefaultStopSet();\r\n\t\t// andiamo a tokenizzare la label\r\n\t\tTokenStream tokenStream = new StandardTokenizer(Version.LUCENE_48, new StringReader(label));\r\n\t\t// richiamo l'Elision Filter che si occupa di elidere le lettere apostrofate\r\n\t\ttokenStream = new ElisionFilter(tokenStream, stopWords);\r\n\t\t// richiamo il LowerCaseFilter\r\n\t\ttokenStream = new LowerCaseFilter(Version.LUCENE_48, tokenStream);\r\n\t\t// richiamo lo StopFilter per togliere le stop word\r\n\t\ttokenStream = new StopFilter(Version.LUCENE_48, tokenStream, stopWords);\r\n\t\t// eseguo il processo di stemming italiano per ogni token\r\n\t\ttokenStream = new ItalianLightStemFilter(tokenStream);\r\n\t\t\r\n\t\t/*\r\n\t\t * ricostruisco la stringa in precedenza tokenizzata\r\n\t\t */\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t CharTermAttribute charTermAttribute = tokenStream.addAttribute(CharTermAttribute.class);\r\n\t tokenStream.reset();\r\n\r\n\t while (tokenStream.incrementToken()) \r\n\t {\r\n\t String term = charTermAttribute.toString();\r\n\t sb.append(term + \" \");\r\n\t }\r\n \r\n\t tokenStream.close();\r\n\t // elimino l'ultimo carattere (spazio vuoto)\r\n\t String l = sb.toString().substring(0,sb.toString().length()-1);\r\n\t \r\n\t// ritorno la label stemmata\r\n return l;\r\n\t\r\n\t}",
"private void runCloudTextRecognition(Bitmap bitmap) {\n FirebaseVisionCloudDetectorOptions options =\n new FirebaseVisionCloudDetectorOptions.Builder()\n .setModelType(FirebaseVisionCloudDetectorOptions.LATEST_MODEL)\n .setMaxResults(15)\n .build();\n mCameraButtonCloud.setEnabled(false);\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionCloudDocumentTextDetector detector = FirebaseVision.getInstance()\n .getVisionCloudDocumentTextDetector(options);\n detector.detectInImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionCloudText>() {\n @Override\n public void onSuccess(FirebaseVisionCloudText texts) {\n mCameraButtonCloud.setEnabled(true);\n processCloudTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n mCameraButtonCloud.setEnabled(true);\n e.printStackTrace();\n }\n });\n }",
"PsiFile[] findFilesWithPlainTextWords( String word);",
"public void detectLanguage(final View view)\n {\n Toast.makeText(getApplicationContext(), \"Under Construction\", Toast.LENGTH_SHORT).show();\n }",
"public BufferedImage add_text(BufferedImage image, String text) {\n // convert all items to byte arrays: image, message, message length\n byte img[] = get_byte_data(image);\n byte msg[] = text.getBytes();\n byte len[] = bit_conversion(msg.length);\n try {\n encode_text(img, len, 0); // 0 first positiong\n encode_text(img, msg, 32); // 4 bytes of space for length:\n // 4bytes*8bit = 32 bits\n }\n catch (Exception e) {\n JOptionPane.showMessageDialog(\n null,\n \"Target File cannot hold message!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n return image;\n }",
"String translate(String text, String fromLanguage, String toLanguage) throws TranslationException;",
"java.lang.String getTargetLanguageCode();",
"private ArrayList<OWLLiteral> getLabels(OWLEntity entity, OWLOntology ontology, String lang) {\n\t\tOWLDataFactory df = OWLManager.createOWLOntologyManager().getOWLDataFactory();\n\t\tOWLAnnotationProperty label = df.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI());\t\n\n\t\tArrayList<OWLLiteral> labels = new ArrayList<OWLLiteral>();\n\t\tfor (OWLAnnotation annotation : entity.getAnnotations(ontology, label)) {\n\t\t\tif (annotation.getValue() instanceof OWLLiteral) {\n\t\t\t\tOWLLiteral val = (OWLLiteral) annotation.getValue();\n\t\t\t\tif (val.hasLang(\"en\")) {\n\t\t\t\t\tlabels.add(val);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn labels;\n\t}",
"private void verifyTextAndLabels(){\n common.explicitWaitVisibilityElement(\"//*[@id=\\\"content\\\"]/article/h2\");\n\n //Swedish labels\n common.timeoutMilliSeconds(500);\n textAndLabelsSwedish();\n\n //Change to English\n common.selectEnglish();\n\n //English labels\n textAndLabelsEnglish();\n }",
"public static BufferedImage getTextImage (String text, String fontName, float fontSize) {\n\t\tBufferedImage img = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);\n\t\tGraphics2D g2d = img.createGraphics();\n\t\tFont font = ExternalResourceManager.getFont(fontName).deriveFont(fontSize);\n\t\tg2d.setFont(font);\n//\t\tnew Font\n\t\tFontMetrics fm = g2d.getFontMetrics();\n\t\tint w = fm.stringWidth(text), h = fm.getHeight();\n\t\tg2d.dispose();\n\t\t// draw image\n\t\timg = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);\n\t\tg2d = img.createGraphics();\n\t\tg2d.setFont(font);\n fm = g2d.getFontMetrics();\n g2d.setColor(Color.BLACK);\n g2d.setBackground(new Color(0, 0, 0, 0));\n g2d.drawString(text, 0, fm.getAscent());\n g2d.dispose();\n\t\treturn img;\n\t}",
"String translateEnglishToDothraki(String englishText) throws Exception\n\t{\n\t\tString urlHalf1 = \"https://api.funtranslations.com/translate/dothraki.json?text=\";\n\t\tString url = urlHalf1 + englishText;\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString jsonData = getJsonData(url);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tString translation = \"\";\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject treeObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement contents = treeObject.get(\"contents\");\n\n\t\t\tif (contents.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject contentsObject = contents.getAsJsonObject();\n\n\t\t\t\tJsonElement translateElement = contentsObject.get(\"translated\");\n\n\t\t\t\ttranslation = translateElement.getAsString();\n\t\t\t}\n\t\t}\n\n\t\treturn translation;\n\t}",
"int getLocalizedText();",
"Builder addInLanguage(Text value);",
"default String getOriginalText() {\n return meta(\"nlpcraft:nlp:origtext\");\n }",
"public String extractText(String urlString) {\n String text = \"\";\n try {\n URL url = new URL(urlString);\n text = ArticleExtractor.INSTANCE.getText(url); \n } catch (Exception ex) {\n Logger.getLogger(TextExtractor.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return text;\n }",
"public static String getTranslation(String original, String originLanguage, String targetLanguage) {\n\t\tif (Options.getDebuglevel() > 1)\n\t\t\tSystem.out.println(\"Translating: \" + original);\n\t\ttry {\n\t\t\tDocument doc = Jsoup\n\t\t\t\t\t.connect(\"http://translate.reference.com/\" + originLanguage + \"/\" + targetLanguage + \"/\" + original)\n\t\t\t\t\t.userAgent(\"PlagTest\").get();\n\t\t\tElement e = doc.select(\"textarea[Placeholder=Translation]\").first();\n\t\t\tString text = e.text().trim();\n\t\t\tif (text.equalsIgnoreCase(original.trim()))\n\t\t\t\treturn null;\n\t\t\treturn text;\n\t\t} catch (Exception e1) {\n\t\t}\n\t\treturn null;\n\t}",
"public void selectLanguage(String language) {\n\n String xpath = String.format(EST_LANGUAGE, language);\n List<WebElement> elements = languages.findElements(By.xpath(xpath));\n for (WebElement element : elements) {\n if (element.isDisplayed()) {\n element.click();\n break;\n }\n }\n }",
"com.google.ads.googleads.v6.resources.LanguageConstant getLanguageConstant();",
"@Override\n public String getText() {\n return analyzedWord;\n }",
"public String classify(String text){\n\t\treturn mClassifier.classify(text).bestCategory();\n\t}",
"public String getThaiWordFromEngWord(String englishWord) {\n Cursor cursor = mDatabase.query(\n TABLE_NAME,\n new String[]{COL_THAI_WORD},\n COL_ENG_WORD + \"=?\",\n new String[]{englishWord},\n null,\n null,\n null\n );\n if (cursor.getCount() > 0) {\n cursor.moveToFirst();\n return cursor.getString(cursor.getColumnIndex(COL_THAI_WORD));\n } else {\n return englishWord;\n }\n }",
"@Source(\"gr/grnet/pithos/resources/translate.png\")\n ImageResource selectAll();",
"public void Croppedimage(CropImage.ActivityResult result, ImageView iv, EditText et )\n {\n Uri resultUri = null; // get image uri\n if (result != null) {\n resultUri = result.getUri();\n }\n\n\n //set image to image view\n iv.setImageURI(resultUri);\n\n\n //get drawable bitmap for text recognition\n BitmapDrawable bitmapDrawable = (BitmapDrawable) iv.getDrawable();\n\n Bitmap bitmap = bitmapDrawable.getBitmap();\n\n TextRecognizer recognizer = new TextRecognizer.Builder(getApplicationContext()).build();\n\n if(!recognizer.isOperational())\n {\n Toast.makeText(this, \"Error No Text To Recognize\", Toast.LENGTH_LONG).show();\n }\n else\n {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n SparseArray<TextBlock> items = recognizer.detect(frame);\n StringBuilder ab = new StringBuilder();\n\n //get text from ab until there is no text\n for(int i = 0 ; i < items.size(); i++)\n {\n TextBlock myItem = items.valueAt(i);\n ab.append(myItem.getValue());\n\n }\n\n //set text to edit text\n et.setText(ab.toString());\n }\n\n }",
"public String getLocale () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"@DISPID(-2147413103)\n @PropGet\n java.lang.String lang();",
"private String getPhrase(String key) {\r\n if (\"pl\".equals(System.getProperty(\"user.language\")) && phrasesPL.containsKey(key)) {\r\n return phrasesPL.get(key);\r\n } else if (phrasesEN.containsKey(key)) {\r\n return phrasesEN.get(key);\r\n }\r\n return \"Translation not found!\";\r\n }",
"public String detectObject(Bitmap bitmap) {\n results = classifierObject.recognizeImage(bitmap);\n\n // Toast.makeText(context, results.toString(), Toast.LENGTH_LONG).show();\n return String.valueOf(results.toString());\n }",
"String text();",
"@Override\n protected int onIsLanguageAvailable(String lang, String country, String variant) {\n if (\"eng\".equals(lang)) {\n // We support two specific robot languages, the british robot language\n // and the american robot language.\n if (\"USA\".equals(country) || \"GBR\".equals(country)) {\n // If the engine supported a specific variant, we would have\n // something like.\n //\n // if (\"android\".equals(variant)) {\n // return TextToSpeech.LANG_COUNTRY_VAR_AVAILABLE;\n // }\n return TextToSpeech.LANG_COUNTRY_AVAILABLE;\n }\n\n // We support the language, but not the country.\n return TextToSpeech.LANG_AVAILABLE;\n }\n\n return TextToSpeech.LANG_NOT_SUPPORTED;\n }",
"public void setLanguage(String language);",
"public WordInfo searchWord(String word) {\n\t\tSystem.out.println(\"Dic:SearchWord: \"+word);\n\n\t\tDocument doc;\n\t\ttry {\n\t\t\tdoc = Jsoup.connect(\"https://dictionary.cambridge.org/dictionary/english-vietnamese/\" + word).get();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\tElements elements = doc.select(\".dpos-h.di-head.normal-entry\");\n\t\tif (elements.isEmpty()) {\n\t\t\tSystem.out.println(\" not found\");\n\t\t\treturn null;\n\t\t}\n\n\t\tWordInfo wordInfo = new WordInfo(word);\n\n\t\t// Word\n\t\telements = doc.select(\".tw-bw.dhw.dpos-h_hw.di-title\");\n\n\t\tif (elements.size() == 0) {\n\t\t\tSystem.out.println(\" word not found in doc!\");\n\t\t\treturn null;\n\t\t}\n\n\t\twordInfo.setWordDictionary(elements.get(0).html());\n\n\t\t// Type\n\t\telements = doc.select(\".pos.dpos\");\n\n\t\tif(elements.size() > 0) {\n\t\t\twordInfo.setType(WordInfo.getTypeShort(elements.get(0).html()));\n//\t\t\tif (wordInfo.getTypeShort().equals(\"\"))\n//\t\t\t\tSystem.out.println(\" typemis: \"+wordInfo.getType());\n\t\t}\n\n\t\t// Pronoun\n\t\telements = doc.select(\".ipa.dipa\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setAPI(\"/\"+elements.get(0).html()+\"/\");\n\n\t\t// Trans\n\t\telements = doc.select(\".trans.dtrans\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setTrans(elements.get(0).html());\n\n\t\tSystem.out.println(\" found\");\n\t\treturn wordInfo;\n\t}"
]
| [
"0.6339322",
"0.5907689",
"0.5881454",
"0.5613236",
"0.5499387",
"0.5476547",
"0.54720753",
"0.54378355",
"0.54378355",
"0.54230297",
"0.54117554",
"0.5398961",
"0.5386767",
"0.5368199",
"0.5356364",
"0.5356364",
"0.5356364",
"0.5355748",
"0.53044903",
"0.52970636",
"0.5259717",
"0.5255546",
"0.52474463",
"0.5227633",
"0.5227519",
"0.51617426",
"0.51373875",
"0.5130657",
"0.5124618",
"0.5095856",
"0.50732946",
"0.5057377",
"0.50524217",
"0.5032287",
"0.5028192",
"0.5025107",
"0.4976818",
"0.49758172",
"0.49750227",
"0.4969493",
"0.4966516",
"0.49598026",
"0.49463004",
"0.4939654",
"0.49355274",
"0.49158987",
"0.4907803",
"0.4901162",
"0.490093",
"0.48949048",
"0.48760468",
"0.4872384",
"0.48701173",
"0.48626333",
"0.48619446",
"0.4859077",
"0.48565146",
"0.4836201",
"0.48171046",
"0.4813205",
"0.4798623",
"0.47593915",
"0.47577217",
"0.47507718",
"0.4734132",
"0.47277054",
"0.4723872",
"0.4680271",
"0.4678034",
"0.4665077",
"0.4661084",
"0.46390656",
"0.46388733",
"0.46339175",
"0.46273252",
"0.4624046",
"0.46217933",
"0.4621366",
"0.46212766",
"0.46193036",
"0.46121076",
"0.4601368",
"0.46006227",
"0.4598951",
"0.4597816",
"0.4596961",
"0.45915458",
"0.45913818",
"0.45895725",
"0.45786554",
"0.4577141",
"0.4571682",
"0.45664972",
"0.45600644",
"0.45594302",
"0.4558069",
"0.45484012",
"0.45455223",
"0.45450306",
"0.45446116",
"0.45400605"
]
| 0.0 | -1 |
Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. | public Observable<ServiceResponse<OCRInner>> oCRFileInputWithServiceResponseAsync(String language, byte[] imageStream) {
if (this.client.baseUrl() == null) {
throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null.");
}
if (language == null) {
throw new IllegalArgumentException("Parameter language is required and cannot be null.");
}
if (imageStream == null) {
throw new IllegalArgumentException("Parameter imageStream is required and cannot be null.");
}
final Boolean cacheImage = null;
final Boolean enhanced = null;
String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl());
RequestBody imageStreamConverted = RequestBody.create(MediaType.parse("image/gif"), imageStream);
return service.oCRFileInput(language, cacheImage, enhanced, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<OCRInner>>>() {
@Override
public Observable<ServiceResponse<OCRInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<OCRInner> clientResponse = oCRFileInputDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String detectLanguage(String text) {\n\t\treturn dictionary.detectLanguage(text);\n\t}",
"public boolean translateImageToText();",
"@SuppressWarnings(\"static-access\")\n\tpublic void detection(Request text) {\n\t\t//Fichiertxt fichier;\n\t\ttry {\t\t\t\t\t\n\t\t\t//enregistrement et affichage de la langue dans une variable lang\n\t\t\ttext.setLang(identifyLanguage(text.getCorpText()));\n\t\t\t//Ajoute le fichier traité dans la Base\n\t\t\tajouterTexte(text);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"fichier texte non trouvé\");\n\t e.printStackTrace();\n\t\t}\n\t}",
"public MashapeResponse<JSONObject> classifytext(String lang, String text) {\n return classifytext(lang, text, \"\");\n }",
"static WordList get(Language language) {\n return switch (language) {\n case ENGLISH -> readResource(\"bip39_english.txt\");\n };\n }",
"void readText(final Bitmap imageBitmap){\n\t\tif(imageBitmap != null) {\n\t\t\t\n\t\t\tTextRecognizer textRecognizer = new TextRecognizer.Builder(this).build();\n\t\t\t\n\t\t\tif(!textRecognizer.isOperational()) {\n\t\t\t\t// Note: The first time that an app using a Vision API is installed on a\n\t\t\t\t// device, GMS will download a native libraries to the device in order to do detection.\n\t\t\t\t// Usually this completes before the app is run for the first time. But if that\n\t\t\t\t// download has not yet completed, then the above call will not detect any text,\n\t\t\t\t// barcodes, or faces.\n\t\t\t\t// isOperational() can be used to check if the required native libraries are currently\n\t\t\t\t// available. The detectors will automatically become operational once the library\n\t\t\t\t// downloads complete on device.\n\t\t\t\tLog.w(TAG, \"Detector dependencies are not yet available.\");\n\t\t\t\t\n\t\t\t\t// Check for low storage. If there is low storage, the native library will not be\n\t\t\t\t// downloaded, so detection will not become operational.\n\t\t\t\tIntentFilter lowstorageFilter = new IntentFilter(Intent.ACTION_DEVICE_STORAGE_LOW);\n\t\t\t\tboolean hasLowStorage = registerReceiver(null, lowstorageFilter) != null;\n\t\t\t\t\n\t\t\t\tif (hasLowStorage) {\n\t\t\t\t\tToast.makeText(this,\"Low Storage\", Toast.LENGTH_LONG).show();\n\t\t\t\t\tLog.w(TAG, \"Low Storage\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tFrame imageFrame = new Frame.Builder()\n\t\t\t\t\t.setBitmap(imageBitmap)\n\t\t\t\t\t.build();\n\t\t\t\n\t\t\tSparseArray<TextBlock> textBlocks = textRecognizer.detect(imageFrame);\n\t\t\tdata.setText(\"\");\n\t\t\tfor (int i = 0; i < textBlocks.size(); i++) {\n\t\t\t\tTextBlock textBlock = textBlocks.get(textBlocks.keyAt(i));\n\t\t\t\tPoint[] points = textBlock.getCornerPoints();\n\t\t\t\tLog.i(TAG, textBlock.getValue());\n\t\t\t\tString corner = \"\";\n\t\t\t\tfor(Point point : points){\n\t\t\t\t\tcorner += point.toString();\n\t\t\t\t}\n\t\t\t\t//data.setText(data.getText() + \"\\n\" + corner);\n\t\t\t\tdata.setText(data.getText()+ \"\\n \"+ textBlock.getValue() + \" \\n\" );\n\t\t\t\t// Do something with value\n /*List<? extends Text> textComponents = textBlock.getComponents();\n for(Text currentText : textComponents) {\n // Do your thing here }\n mImageDetails.setText(mImageDetails.getText() + \"\\n\" + currentText);\n }*/\n\t\t\t}\n\t\t}\n\t}",
"public String getEnglish()\n {\n if (spanishWord.substring(0,3).equals(\"el \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n else if (spanishWord.substring(0, 3).equals(\"la \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n if (spanishWord.equals(\"estudiante\"))\n {\n return \"student\"; \n }\n else if (spanishWord.equals(\"aprender\"))\n {\n return \"to learn\";\n }\n else if (spanishWord.equals(\"entender\"))\n {\n return\"to understand\";\n }\n else if (spanishWord.equals(\"verde\"))\n {\n return \"green\";\n }\n else\n {\n return null;\n }\n }",
"java.lang.String getLanguage();",
"java.lang.String getLanguage();",
"private void detextTextFromImage(Bitmap imageBitmap) {\n\n\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(imageBitmap);\n\n FirebaseVisionTextRecognizer firebaseVisionTextRecognizer = FirebaseVision.getInstance().getCloudTextRecognizer();\n\n firebaseVisionTextRecognizer.processImage(image)\n .addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText firebaseVisionText) {\n String text = firebaseVisionText.getText();\n\n if (text.isEmpty() || text == null)\n Toast.makeText(ctx, \"Can not identify. Try again!\", Toast.LENGTH_SHORT).show();\n\n else {\n\n startTranslateIntent(text);\n }\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n e.printStackTrace();\n }\n });\n\n\n }",
"public synchronized Result process(String text, String lang) {\n // Check that service has been initialized.\n if (!this.initialized) {\n logInitializationError();\n return null;\n }\n this.cas.reset();\n this.cas.setDocumentText(text);\n if (lang != null) {\n this.cas.setDocumentLanguage(lang);\n }\n try {\n this.ae.process(this.cas);\n } catch (AnalysisEngineProcessException e) {\n getLogger().log(Level.SEVERE, \"\", e);\n return null;\n }\n return this.resultExtractor.getResult(this.cas, this.serviceSpec);\n }",
"private static AnalysisResults.Builder retrieveText(ByteString imageBytes) throws IOException {\n AnalysisResults.Builder analysisBuilder = new AnalysisResults.Builder();\n\n Image image = Image.newBuilder().setContent(imageBytes).build();\n ImmutableList<Feature> features =\n ImmutableList.of(Feature.newBuilder().setType(Feature.Type.TEXT_DETECTION).build(),\n Feature.newBuilder().setType(Feature.Type.LOGO_DETECTION).build());\n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addAllFeatures(features).setImage(image).build();\n ImmutableList<AnnotateImageRequest> requests = ImmutableList.of(request);\n\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n BatchAnnotateImagesResponse batchResponse = client.batchAnnotateImages(requests);\n\n if (batchResponse.getResponsesList().isEmpty()) {\n return analysisBuilder;\n }\n\n AnnotateImageResponse response = Iterables.getOnlyElement(batchResponse.getResponsesList());\n\n if (response.hasError()) {\n return analysisBuilder;\n }\n\n // Add extracted raw text to builder.\n if (!response.getTextAnnotationsList().isEmpty()) {\n // First element has the entire raw text from the image.\n EntityAnnotation textAnnotation = response.getTextAnnotationsList().get(0);\n\n String rawText = textAnnotation.getDescription();\n analysisBuilder.setRawText(rawText);\n }\n\n // If a logo was detected with a confidence above the threshold, use it to set the store.\n if (!response.getLogoAnnotationsList().isEmpty()\n && response.getLogoAnnotationsList().get(0).getScore()\n > LOGO_DETECTION_CONFIDENCE_THRESHOLD) {\n String store = response.getLogoAnnotationsList().get(0).getDescription();\n analysisBuilder.setStore(store);\n }\n } catch (ApiException e) {\n // Return default builder if image annotation request failed.\n return analysisBuilder;\n }\n\n return analysisBuilder;\n }",
"public java.lang.String getLanguage() {\n return _courseImage.getLanguage();\n }",
"public void ocrExtraction(BufferedImage image) {\n\t\tFile outputfile = new File(\"temp.png\");\n\t\toutputfile.deleteOnExit();\n\t\tString ocrText = \"\", currLine = \"\";\n\t\ttry {\n\t\t\tImageIO.write(image, \"png\", outputfile);\n\n\t\t\t// System call to Tesseract OCR\n\t\t\tRuntime r = Runtime.getRuntime();\n\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText -psm 6\");\n//\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText\");\n\t\t\tp.waitFor();\n\n\t\t\t// Read text file generated by tesseract\n\t\t\tFile f = new File(\"ocrText.txt\");\n\t\t\tf.deleteOnExit();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\t\t\n\t\t\twhile ((currLine = br.readLine()) != null) {\n\t\t\t\tocrText += (currLine + \" \");\n\t\t\t}\n\t\t\tif(ocrText.trim().isEmpty()) {\n\t\t\t\tocrText = \"OCR_FAIL\";\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttextField.setText(ocrText.trim());\n\t\ttextField.requestFocus();\n\t\ttextField.selectAll();\n\t}",
"String getLanguage();",
"String getLanguage();",
"String getLanguage();",
"public String getTitile(String language) {\n if (language.startsWith(\"e\")) {\n return enTitle;\n } else {\n return localTitle;\n }\n }",
"public String scanText(BufferedImage image) throws IOException {\n File tmpImgFile = File.createTempFile(\"tmpImg\", \".jpg\");\n ImageIO.write(image, \"jpg\", tmpImgFile);\n String rawData = TesseractWrapper.runTesseract(tmpImgFile.getAbsolutePath());\n tmpImgFile.delete();\n return rawData;\n }",
"public MashapeResponse<JSONObject> classifytext(String lang, String text, String exclude) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n if (lang != null && !lang.equals(\"\")) {\n\tparameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n\tparameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n\tparameters.put(\"exclude\", exclude);\n }\n \n \n return (MashapeResponse<JSONObject>) HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers);\n }",
"protected VideoText[] analyze(File imageFile, String id) throws TextAnalyzerException {\n boolean languagesInstalled;\n if (dictionaryService.getLanguages().length == 0) {\n languagesInstalled = false;\n logger.warn(\"There are no language packs installed. All text extracted from video will be considered valid.\");\n } else {\n languagesInstalled = true;\n }\n\n List<VideoText> videoTexts = new ArrayList<VideoText>();\n TextFrame textFrame = null;\n try {\n textFrame = textExtractor.extract(imageFile);\n } catch (IOException e) {\n logger.warn(\"Error reading image file {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n } catch (TextExtractorException e) {\n logger.warn(\"Error extracting text from {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n }\n\n int i = 1;\n for (TextLine line : textFrame.getLines()) {\n VideoText videoText = new VideoTextImpl(id + \"-\" + i++);\n videoText.setBoundary(line.getBoundaries());\n Textual text = null;\n if (languagesInstalled) {\n String[] potentialWords = line.getText() == null ? new String[0] : line.getText().split(\"\\\\W\");\n String[] languages = dictionaryService.detectLanguage(potentialWords);\n if (languages.length == 0) {\n // There are languages installed, but these words are part of one of those languages\n logger.debug(\"No languages found for '{}'.\", line.getText());\n continue;\n } else {\n String language = languages[0];\n DICT_TOKEN[] tokens = dictionaryService.cleanText(potentialWords, language);\n StringBuilder cleanLine = new StringBuilder();\n for (int j = 0; j < potentialWords.length; j++) {\n if (tokens[j] == DICT_TOKEN.WORD) {\n if (cleanLine.length() > 0) {\n cleanLine.append(\" \");\n }\n cleanLine.append(potentialWords[j]);\n }\n }\n // TODO: Ensure that the language returned by the dictionary is compatible with the MPEG-7 schema\n text = new TextualImpl(cleanLine.toString(), language);\n }\n } else {\n logger.debug(\"No languages installed. For better results, please install at least one language pack\");\n text = new TextualImpl(line.getText());\n }\n videoText.setText(text);\n videoTexts.add(videoText);\n }\n return videoTexts.toArray(new VideoText[videoTexts.size()]);\n }",
"public List<Result> recognize(IplImage image);",
"public static String getImgText(final String imageLocation) {\n\n return getImgText(new File(imageLocation));\n }",
"private String getLanguage(Prediction prediction, String content)\n throws IOException {\n Preconditions.checkNotNull(prediction);\n Preconditions.checkNotNull(content);\n\n Input input = new Input();\n Input.InputInput inputInput = new Input.InputInput();\n inputInput.set(\"csvInstance\", Lists.newArrayList(content));\n input.setInput(inputInput);\n Output result = prediction.trainedmodels().predict(Utils.getProjectId(),\n Constants.MODEL_ID, input).execute();\n return result.getOutputLabel();\n }",
"public Thread classifytext(String lang, String text, String exclude, MashapeCallback<JSONObject> callback) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n \n if (lang != null && !lang.equals(\"\")) {\n \n parameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n \n parameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n \n parameters.put(\"exclude\", exclude);\n }\n \n return HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers,\n callback);\n }",
"public Thread classifytext(String lang, String text, MashapeCallback<JSONObject> callback) {\n return classifytext(lang, text, \"\", callback);\n }",
"public static String getImgText(final File file) {\n\n final ITesseract instance = new Tesseract();\n try {\n\n return instance.doOCR(file);\n } catch (TesseractException e) {\n\n e.getMessage();\n return \"Error while reading image\";\n }\n }",
"private String autoDetectLanguage(ArrayList<File> progFiles) {\n for (File f : progFiles) {\n String f_extension = getFileExtension(f).toLowerCase();\n if (Arrays.asList(IAGConstant.PYTHON_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_PYTHON3;\n }\n if (Arrays.asList(IAGConstant.CPP_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_CPP;\n }\n }\n return IAGConstant.LANGUAGE_UNKNOWN;\n }",
"private String html2safetynet(String text, String language) {\n\n // Convert from html to plain text\n text = TextUtils.html2txt(text, true);\n\n // Remove separator between positions\n text = PositionUtils.replaceSeparator(text, \" \");\n\n // Replace positions with NAVTEX versions\n PositionAssembler navtexPosAssembler = PositionAssembler.newNavtexPositionAssembler();\n text = PositionUtils.updatePositionFormat(text, navtexPosAssembler);\n\n // Remove verbose words, such as \"the\", from the text\n text = TextUtils.removeWords(text, SUPERFLUOUS_WORDS);\n\n // NB: unlike NAVTEX, we do not split into 40-character lines\n\n return text.toUpperCase();\n }",
"private String tesseract(Bitmap bitmap) {\n return \"NOT IMPLEMENTED\";\n }",
"public static String customTextFilter(BufferedImage img, String txt) {\n\n int newHeight = img.getHeight() / 200;\n int newWidth = img.getWidth() / 200;\n String html = \"\";\n int aux = 0;\n\n for (int i = 0; i < 200; i++) {\n if (i > 0) {\n html += \"\\n<br>\\n\";\n }\n for (int j = 0; j < 200; j++) {\n if (aux == txt.length()) {\n html += \"<b> </b>\";\n aux = 0;\n } else {\n Color c = regionAvgColor(j * newWidth, (j * newWidth) + newWidth,\n i * newHeight, (i * newHeight) + newHeight, newHeight,\n newWidth, img);\n html += \"<b style='color:rgb(\" + c.getRed() + \",\"\n + c.getGreen() + \",\" + c.getBlue() + \");'>\"\n + txt.substring(aux, aux + 1) + \"</b>\";\n aux++;\n }\n }\n }\n String style = \"body{\\nfont-size: 15px\\n}\";\n String title = \"Imagen Texto\";\n int styleIndex = HTML.indexOf(\"?S\"), titleIndex = HTML.indexOf(\"?T\"),\n bodyIndex = HTML.indexOf(\"?B\");\n String htmlFile = HTML.substring(0, styleIndex) + style;\n htmlFile += HTML.substring(styleIndex + 2, titleIndex) + title;\n htmlFile += HTML.substring(titleIndex + 2, bodyIndex) + html;\n htmlFile += HTML.substring(bodyIndex + 2);\n return htmlFile;\n }",
"private String getTranslation(String language, String id)\n {\n Iterator<Translation> translations = mTranslationState.iterator();\n \n while (translations.hasNext()) {\n Translation translation = translations.next();\n \n if (translation.getLang().equals(language)) {\n Iterator<TranslationText> texts = translation.texts.iterator();\n \n while (texts.hasNext()) {\n TranslationText text = texts.next();\n \n if (text.getId().equals(id)) {\n text.setUsed(true);\n return text.getValue();\n }\n }\n }\n }\n \n return \"[Translation Not Available]\";\n }",
"private String getLanguage(String fileName)\n {\n if (fileName.endsWith(\".C\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".Java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".CPP\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".Class\"))\n {\n return \"Java\";\n }\n if (fileName.endsWith(\".c\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".cpp\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".class\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".h\"))\n {\n return \"C\";\n }\n else\n {\n return \"??\";\n }\n }",
"@DISPID(-2147413012)\n @PropGet\n java.lang.String language();",
"public String getLanguage();",
"public String detectAndDecode(Mat img) {\n return detectAndDecode_2(nativeObj, img.nativeObj);\n }",
"String getLang();",
"@Override\n public DetectDominantLanguageResult detectDominantLanguage(DetectDominantLanguageRequest request) {\n request = beforeClientExecution(request);\n return executeDetectDominantLanguage(request);\n }",
"private void processTextRecognitionResult(FirebaseVisionText texts) {\n List<FirebaseVisionText.Block> blocks = texts.getBlocks();\n if (blocks.size() == 0) {\n Toast.makeText(getApplicationContext(), \"onDevice: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n for (int i = 0; i < blocks.size(); i++) {\n List<FirebaseVisionText.Line> lines = blocks.get(i).getLines();\n for (int j = 0; j < lines.size(); j++) {\n List<FirebaseVisionText.Element> elements = lines.get(j).getElements();\n for (int k = 0; k < elements.size(); k++) {\n GraphicOverlay.Graphic textGraphic = new TextGraphic(mGraphicOverlay, elements.get(k));\n mGraphicOverlay.add(textGraphic);\n\n }\n }\n }\n }",
"@Override\n public void onSuccess(Text visionText) {\n\n Log.d(TAG, \"onSuccess: \");\n extractText(visionText);\n }",
"public String getText() {\n if (Language.isEnglish()) {\n return textEn;\n } else {\n return textFr;\n }\n }",
"public Elements getTextFromWeb(String lang, String word) {\n\t\tToast t = Toast.makeText(this, \"Buscando...\", Toast.LENGTH_SHORT);\n\t\tt.setGravity(Gravity.TOP, 0, 0); // el show lo meto en el try\n\t\tseleccionado.setText(\"\");\n\t\tresultados.clear();\n\t\tlv.setAdapter(new ArrayAdapter<String>(this, R.layout.my_item_list,\n\t\t\t\tresultados));\n\n\t\tElements res = null;\n\t\tif (!networkAvailable(getApplicationContext())) {\n\t\t\tToast.makeText(this, \"¡Necesitas acceso a internet!\",\n\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t} else {\n\t\t\tString url = \"http://www.wordreference.com/es/translation.asp?tranword=\";\n\t\t\tif (lang == \"aEspa\") {\n\t\t\t\turl += word;\n\t\t\t\tt.show();\n\t\t\t\t/* De ingles a español */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarWR(doc);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\turl = \"http://www.wordreference.com/es/en/translation.asp?spen=\"\n\t\t\t\t\t\t+ word;\n\t\t\t\tt.show();\n\t\t\t\t/* De español a ingles */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\t// no hay\n\t\t\t\t\t// else if (doc.toString().contains(\n\t\t\t\t\t// \"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t// res = procesarWR2(doc);\n\t\t\t\t\t// }\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}",
"CLanguage getClanguage();",
"private Spannable applyWordMarkup(String text) {\n SpannableStringBuilder ssb = new SpannableStringBuilder();\n int languageCodeStart = 0;\n int untranslatedStart = 0;\n\n int textLength = text.length();\n for (int i = 0; i < textLength; i++) {\n char c = text.charAt(i);\n if (c == '.') {\n if (++i < textLength) {\n c = text.charAt(i);\n if (c == '.') {\n ssb.append(c);\n } else if (c == 'c') {\n languageCodeStart = ssb.length();\n } else if (c == 'C') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.language_code_tag),\n languageCodeStart, ssb.length(), 0);\n languageCodeStart = ssb.length();\n } else if (c == 'u') {\n untranslatedStart = ssb.length();\n } else if (c == 'U') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.untranslated_word),\n untranslatedStart, ssb.length(), 0);\n untranslatedStart = ssb.length();\n } else if (c == '0') {\n Resources res = getResources();\n ssb.append(res.getString(R.string.no_translations));\n }\n }\n } else\n ssb.append(c);\n }\n\n return ssb;\n }",
"public Future<String> getLanguage() throws DynamicCallException, ExecutionException {\n return call(\"getLanguage\");\n }",
"private void processCloudTextRecognitionResult(FirebaseVisionCloudText text) {\n // Task completed successfully\n if (text == null) {\n Toast.makeText(getApplicationContext(), \"onCloud: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n List<FirebaseVisionCloudText.Page> pages = text.getPages();\n for (int i = 0; i < pages.size(); i++) {\n FirebaseVisionCloudText.Page page = pages.get(i);\n List<FirebaseVisionCloudText.Block> blocks = page.getBlocks();\n for (int j = 0; j < blocks.size(); j++) {\n List<FirebaseVisionCloudText.Paragraph> paragraphs = blocks.get(j).getParagraphs();\n for (int k = 0; k < paragraphs.size(); k++) {\n FirebaseVisionCloudText.Paragraph paragraph = paragraphs.get(k);\n List<FirebaseVisionCloudText.Word> words = paragraph.getWords();\n for (int l = 0; l < words.size(); l++) {\n GraphicOverlay.Graphic cloudTextGraphic = new CloudTextGraphic(mGraphicOverlay, words.get(l));\n mGraphicOverlay.add(cloudTextGraphic);\n }\n }\n }\n }\n }",
"public interface WordAnalyser {\n\n /**\n * Gets the bounds of all words it encounters in the image\n * \n */\n List<Rectangle> getWordBoundaries();\n\n /**\n * Gets the partial binary pixel matrix of the given word.\n * \n * @param wordBoundary\n * The bounds of the word\n */\n BinaryImage getWordMatrix(Rectangle wordBoundary);\n\n}",
"public void setLanguage(java.lang.String language) {\n _courseImage.setLanguage(language);\n }",
"private void runTextRecognition() {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(mSelectedImage);\n FirebaseVisionTextRecognizer recognizer = FirebaseVision.getInstance()\n .getOnDeviceTextRecognizer();\n //mTextButton.setEnabled(false);\n recognizer.processImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n //mTextButton.setEnabled(true);\n processTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n //mTextButton.setEnabled(true);\n e.printStackTrace();\n }\n });\n }",
"Language findByName(String name);",
"private Word askForWord(Language lastLanguage) throws LanguageException {\n Language language = askForLanguage();\r\n if(language == null || language.equals(lastLanguage)) {\r\n throw new LanguageException();\r\n }\r\n // Step 2 : Name of the word\r\n String name = askForLine(\"Name of the word : \");\r\n Word searchedWord = czech.searchWord(language, name);\r\n if(searchedWord != null) {\r\n System.out.println(\"Word \" + name + \" found !\");\r\n return searchedWord;\r\n }\r\n System.out.println(\"Word \" + name + \" not found.\");\r\n // Step 3 : Gender/Phonetic of the word\r\n String gender = askForLine(\"\\tGender of the word : \");\r\n String phonetic = askForLine(\"\\tPhonetic of the word : \");\r\n // Last step : Creation of the word\r\n Word word = new Word(language, name, gender, phonetic);\r\n int id = czech.getListWords(language).get(-1).getId() + 1;\r\n word.setId(id);\r\n czech.getListWords(language).put(-1, word);\r\n return word;\r\n }",
"public static String RunOCR(Bitmap bitview, Context context, String activityName) {\n TextRecognizer textRecognizer = new TextRecognizer.Builder(context).build();\n if(!textRecognizer.isOperational()){\n // Note: The first time that an app using a Vision API is installed on a\n // device, GMS will download a native libraries to the device in order to do detection.\n // Usually this completes before the app is run for the first time. But if that\n // download has not yet completed, then the above call will not detect any text,\n // barcodes, or faces.\n //\n // isOperational() can be used to check if the required native libraries are currently\n // available. The detectors will automatically become operational once the library\n // downloads complete on device.\n Log.w(activityName, \"Detector dependencies are not yet available\");\n return \"FAILED -Text Recognizer ERROR-\";\n } else {\n Frame frame = new Frame.Builder().setBitmap(bitview).build();\n SparseArray<TextBlock> items = textRecognizer.detect(frame);\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i< items.size(); ++i){\n TextBlock item = items.valueAt(i);\n stringBuilder.append(item.getValue());\n stringBuilder.append(\"\\n\");\n }\n String ocr = stringBuilder.toString();\n Log.i(activityName, \"List of OCRs:\\n\" +ocr+\"\\n\");\n return ocr;\n }\n }",
"public String findExtension(String lang) {\n if (lang == null)\n return \".txt\";\n else if (lang.equals(\"C++\"))\n return \".cpp\";\n else if (lang.equals(\"C\"))\n return \".c\";\n else if (lang.equals(\"PYT\"))\n return \".py\";\n else if (lang.equals(\"JAV\"))\n return \".java\";\n else\n return \".txt\";\n }",
"public AbstractLetterFactory decideLanguage(String lang){\n if(lang==\"ENG\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'m', 'a', 'y', 'n', 'o', 'o', 't', 'h'};\n return new EnglishLetterFactory();\n\n }\n else if(lang==\"RUS\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'м','а', 'ы', 'н', 'о', 'о', 'т', 'х'};\n return new RussianLetterFactory();\n }\n\n return new EnglishLetterFactory();\n\n }",
"private List<String> getLabels(Image image) {\n\t\ttry (ImageAnnotatorClient vision = ImageAnnotatorClient.create()) {\n\n\t\t\t// Creates the request for label detection. The API requires a list, but since the storage\n\t\t\t// bucket doesn't support batch uploads, the list will have only one request per function call\n\t\t\tList<AnnotateImageRequest> requests = new ArrayList<>();\n\t\t\tFeature feat = Feature.newBuilder().setType(Type.LABEL_DETECTION).build();\n\t\t\tAnnotateImageRequest request = AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(image).build();\n\t\t\trequests.add(request);\n\n\t\t\t// Performs label detection on the image file\n\t\t\tList<AnnotateImageResponse> responses = vision.batchAnnotateImages(requests).getResponsesList();\n\n\t\t\t// Iterates through the responses, though in reality there will only be one response\n\t\t\tfor (AnnotateImageResponse res : responses) {\n\t\t\t\tif (res.hasError()) {\n\t\t\t\t\tlogger.log(Level.SEVERE, \"Error getting annotations: \" + res.getError().getMessage());\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Return the first 3 generated labels\n\t\t\t\treturn res.getLabelAnnotationsList().stream().limit(3L).map(e -> e.getDescription())\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"private void pirateRecipe(String text) {\n if (\"excitedze\".equals(text)) {\n LanguageManager languagemanager = this.mc.getLanguageManager();\n Language language = languagemanager.getLanguage(\"en_pt\");\n if (languagemanager.getCurrentLanguage().compareTo(language) == 0) {\n return;\n }\n\n languagemanager.setCurrentLanguage(language);\n this.mc.gameSettings.language = language.getCode();\n net.minecraftforge.client.ForgeHooksClient.refreshResources(this.mc, net.minecraftforge.resource.VanillaResourceType.LANGUAGES);\n this.mc.gameSettings.saveOptions();\n }\n\n }",
"public byte[] decode_text(byte[] image) {\n int length = 0;\n int offset = 32;\n // loop through 32 bytes of data to determine text length\n for (int i = 0; i < 32; ++i) // i=24 will also work, as only the 4th\n // byte contains real data\n {\n length = (length << 1) | (image[i] & 1);\n }\n\n byte[] result = new byte[length];\n\n // loop through each byte of text\n for (int b = 0; b < result.length; ++b) {\n // loop through each bit within a byte of text\n for (int i = 0; i < 8; ++i, ++offset) {\n // assign bit: [(new byte value) << 1] OR [(text byte) AND 1]\n result[b] = (byte) ((result[b] << 1) | (image[offset] & 1));\n }\n }\n return result;\n }",
"public abstract void startVoiceRecognition(String language);",
"@Override\n public void run() {\n try {\n byte[] photoData = IOUtils.toByteArray(inputStream);\n inputStream.close();\n //Mat src = Imgcodecs.imdecode(new MatOfByte(photoData), Imgcodecs.CV_LOAD_IMAGE_UNCHANGED);\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n\n\n\n// //OCR PREPROCESSING FOR FAREHA'S MODULE\n// try{\n//// Mat src = Utils.loadResource(reportAnalysisActivity.this, R.drawable.bloodf, Imgcodecs.CV_LOAD_IMAGE_GRAYSCALE);\n// //boolean ans = src.isContinuous();\n// //1. Resizing\n// double ratio = (double)src.width()/src.height();\n// if(src.width()>768){\n// int newHeight = (int)(768/ratio);\n// Imgproc.resize(src,src,new Size(768,newHeight ));\n// }\n// else if(src.height()>1024){\n// int newWidth = (int)(1024*ratio);\n// Imgproc.resize(src,src,new Size(newWidth,1024));\n// }\n//\n// //2. denoising\n// Photo.fastNlMeansDenoising(src,src,10,7,21);\n// }\n// catch(Exception e){}\n//\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n//\n Image inputImage = new Image();\n inputImage.encodeContent(photoData);\n\n Feature desiredFeature = new Feature();\n desiredFeature.setType(\"TEXT_DETECTION\");\n\n BatchAnnotateImagesRequest batchRequest =\n new BatchAnnotateImagesRequest();\n final AnnotateImageRequest request = new AnnotateImageRequest();\n request.setImage(inputImage);\n request.setFeatures(Arrays.asList(desiredFeature));\n batchRequest.setRequests(Arrays.asList(request));\n BatchAnnotateImagesResponse batchResponse = vision.images().annotate(batchRequest).execute();\n text = batchResponse.getResponses().get(0).getFullTextAnnotation();\n\n int block_number = -1;\n int current_block = 0;\n ArrayList<Vertex> block_coords = new ArrayList<Vertex>();\n\n for (Page page : text.getPages()) {\n for (Block block : page.getBlocks()) {\n\n block_number++;\n //Save vertices of all the blocks\n block_coords.add(block.getBoundingBox().getVertices().get(0));\n allBlocks.add(block);\n\n for (Paragraph paragraph : block.getParagraphs()) {\n for (Word word : paragraph.getWords()) {\n String c_word = \"\";\n for (Symbol symbol : word.getSymbols()) {\n c_word += symbol.getText();\n }\n if (c_word.equals(\"WBC\") || c_word.equals(\"RBC\") ||\n c_word.equals(\"HB\") || c_word.equals(\"Hb\") || c_word.contains(\"Hemoglobin\") || c_word.equals(\"Haemoglobin\")\n || c_word.equals(\"Hematocrit\") || c_word.equals(\"HCT\") || c_word.equals(\"MCV\") || c_word.equals(\"MCH\")\n || c_word.equals(\"MCHC\") || c_word.contains(\"Platelet\") || c_word.equals(\"PLT\") || c_word.equals(\"ESR\")\n || c_word.equals(\"LYM\") || c_word.equals(\"LYM#\") || c_word.equals(\"LYM%\") || c_word.contains(\"Lym\")\n || c_word.equals(\"NEUT#\") || c_word.contains(\"NUET%\") || c_word.equals(\"NEUT\") || c_word.contains(\"Neut\")\n || c_word.contains(\"Monocytes\") || c_word.contains(\"Eosinophils\")\n || c_word.equals(\"Mixed Cells\") ||c_word.equals(\"Basophils\") ||c_word.equals(\"Bands\") ||\n c_word.contains(\"Bilirubin\") || c_word.equals(\"ALT\") || c_word.equals(\"SGPT\") || c_word.equals(\"ALK-Phos\") || c_word.contains(\"Alk\")\n || c_word.equals(\"ALK\")) {\n\n //Store the y coords of blocks containing testnames in array if not already saved\n if (testnameBlocks_coords.isEmpty() || !testnameBlocks_coords.contains(block_coords.get(block_number)))\n testnameBlocks_coords.add(block_coords.get(block_number));\n }\n }\n }\n }\n\n }\n\n //Sort the array containing the blocks that contain the test names in an order of largest y coordinates\n Collections.sort(testnameBlocks_coords, new Comparator<Vertex>() {\n @Override\n public int compare(Vertex x1, Vertex x2) {\n int result= Integer.compare(x1.getY(), x2.getY());\n if(result==0){\n //both ys are equal so we compare the x\n result=Integer.compare(x1.getX(), x2.getX());\n }\n return result;\n }\n });\n\n //Save the names of the testnames in order in test_name array\n int blocknum = 0;\n for (int j = 0; j < testnameBlocks_coords.size(); j++) {\n for (int i = 0; i < allBlocks.size(); i++) {\n if (allBlocks.get(i).getBoundingBox().getVertices().get(0) == testnameBlocks_coords.get(j)) {\n blocknum = i; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n for (Paragraph paragraph : allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for (Word word : paragraph.getWords()) {\n String name = \"\";\n for (Symbol symbol : word.getSymbols()) {\n name += symbol.getText();\n //save the testnames in testnames array\n }\n if (name.equals(\"%\") || name.equals(\"#\") || name.equals(\"Count\") || name.equals(\",\")\n || name.equals(\"Level\")) {\n StringBuilder stringBuilder = new StringBuilder(testnames.get(testnames.size() - 1));\n stringBuilder.append(name);\n testnames.add(testnames.size() - 1, stringBuilder.toString());\n testnames.remove(testnames.size() - 1);\n }\n else if (name.equals(\"WBC\") || name.equals(\"RBC\") ||\n name.equals(\"HB\") || name.equals(\"Hb\") || name.contains(\"Hemoglobin\") || name.equals(\"Haemoglobin\")\n || name.equals(\"Hematocrit\") || name.equals(\"HCT\") || name.equals(\"MCV\") || name.equals(\"MCH\")\n || name.equals(\"MCHC\") || name.contains(\"Platelet\") || name.equals(\"PLT\") || name.equals(\"ESR\")\n || name.equals(\"LYM\") || name.equals(\"LYM#\") || name.equals(\"LYM%\") || name.contains(\"Lym\")\n || name.equals(\"NEUT#\") || name.contains(\"NUET%\") || name.equals(\"NEUT\") || name.contains(\"Neut\")\n || name.contains(\"Monocytes\") || name.contains(\"Eosinophils\")\n || name.equals(\"Mixed Cells\") ||name.equals(\"Basophils\") ||name.equals(\"Bands\") ||\n name.contains(\"Bilirubin\") || name.equals(\"ALT\") || name.equals(\"SGPT\") || name.equals(\"ALK-Phos\") || name.contains(\"Alk.\")\n || name.equals(\"ALK\"))\n testnames.add(name);\n\n }\n }\n\n }\n\n //Below is the procedure to find the values of testvalues\n int result_block_index = 0;\n int num_of_values=0;\n int diff=0;\n ArrayList<Integer> ignoreIndex=new ArrayList<Integer>();\n Boolean isFloat=true;\n float value=0;\n\n while(num_of_values<testnames.size()){\n //next block of values\n if(!testvaluesBlocks_coords.isEmpty()){\n int previous_result_block_index = result_block_index; //Index at which the value block lies\n diff = Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX())<diff && previous_result_block_index!=i){\n if(!ignoreIndex.contains(i)){\n diff= Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX());\n result_block_index=i;\n }\n\n }\n }\n }\n //first block of values\n else{\n //Getting values from te first block\n diff=Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY())<diff && block_coords.indexOf(testnameBlocks_coords.get(0))!=i){\n if(!ignoreIndex.contains(i)){\n diff= testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY();\n result_block_index=i;\n }\n\n }\n }\n }\n isFloat=false;\n for(Paragraph paragraph: allBlocks.get(result_block_index).getParagraphs()){\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n\n }\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n if(value_string.contains(\"-\")){\n isFloat=false;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n break;\n }\n try{\n value= Float.parseFloat(value_string);\n num_of_values++;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n isFloat=true;\n\n }\n catch (NumberFormatException e){\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n }\n\n\n\n\n }\n }\n\n if(isFloat){\n //Save y coordinates of value block\n testvaluesBlocks_coords.add(block_coords.get(result_block_index).getY());\n }\n }\n //sort test values coordinates array\n Collections.sort(testvaluesBlocks_coords);\n\n //save the values in an array\n for(int i=0; i<testvaluesBlocks_coords.size();i++){\n for(int j=0; j<allBlocks.size();j++){\n if(allBlocks.get(j).getBoundingBox().getVertices().get(0).getY()==testvaluesBlocks_coords.get(i)){\n blocknum=j; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n //save values in array\n for (Paragraph paragraph: allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n }\n\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n try{\n value= Float.parseFloat(value_string);\n //save the testnames in testnames array\n testValues.add(Float.parseFloat(value_string));\n }\n catch(NumberFormatException n){\n\n }\n }\n\n }\n }\n\n for (int a = 0; a < testnames.size(); a++) {\n Log.e(testnames.get(a), Float.toString(testValues.get(a)));\n }\n\n //Convert the testname and testvalues array to string so they can be passed on\n StringBuilder sb = new StringBuilder();\n StringBuilder sb2 = new StringBuilder();\n for (int i = 0; i < testnames.size(); i++) {\n sb.append(testnames.get(i)).append(\",\");\n sb2.append(testValues.get(i)).append(\",\");\n\n }\n\n //Save the values and testnames so they can be passed on to next activity\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(reportAnalysisActivity.this);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"testnames\", sb.toString());\n editor.putString(\"testvalues\", sb2.toString());\n editor.putString(\"gender\", gender);\n editor.apply();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Intent reportresultScreen = new Intent(view.getContext(), reportResult_Activity.class);\n startActivity(reportresultScreen);\n }\n });\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n done=true;\n }",
"@Override\n public String recognizeImage(final Bitmap bitmap) {\n Trace.beginSection(\"recognizeImage\");\n\n Trace.beginSection(\"preprocessBitmap\");\n // Preprocess the image data from 0-255 int to normalized float based\n // on the provided parameters.\n bitmapToInputData(bitmap);\n Trace.endSection(); // preprocessBitmap\n\n // Run the inference call.\n Trace.beginSection(\"run\");\n\n tfLite.run(imgData, tfoutput_recognize);\n\n Trace.endSection();\n postPro = new Postprocessing(tfoutput_recognize);\n predictClass = postPro.postRecognize();\n Trace.endSection(); // \"recognizeImage\"\n\n //LOGGER.w(\"\"+(System.currentTimeMillis()-startTime));\n return labels.get(predictClass);\n }",
"boolean hasLanguage();",
"List<Label> findAllByLanguage(String language);",
"public String getDescription(String lang) {\n/* 188 */ return getLangAlt(lang, \"description\");\n/* */ }",
"public String getLanguage() throws DynamicCallException, ExecutionException {\n return (String)call(\"getLanguage\").get();\n }",
"public String getPredefinedTextMessage( String language, int preDefindeMsgId );",
"public void englishlanguage() {\nSystem.out.println(\"englishlanguage\");\n\t}",
"public interface LanguageProvider {\n\tLanguageService study();\n}",
"DetectionResult getObjInImage(Mat image);",
"private void runTextRecognition(Bitmap bitmap) {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionTextDetector detector = FirebaseVision.getInstance().getVisionTextDetector();\n\n detector.detectInImage(image).addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n processTextRecognitionResult(texts);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n e.printStackTrace();\n }\n });\n }",
"private void performOCR(){\n }",
"private static String italianAnalyzer(String label) throws IOException\r\n\t{\r\n\t\t// recupero le stopWords dell'ItalianAnalyzer\r\n\t\tCharArraySet stopWords = ItalianAnalyzer.getDefaultStopSet();\r\n\t\t// andiamo a tokenizzare la label\r\n\t\tTokenStream tokenStream = new StandardTokenizer(Version.LUCENE_48, new StringReader(label));\r\n\t\t// richiamo l'Elision Filter che si occupa di elidere le lettere apostrofate\r\n\t\ttokenStream = new ElisionFilter(tokenStream, stopWords);\r\n\t\t// richiamo il LowerCaseFilter\r\n\t\ttokenStream = new LowerCaseFilter(Version.LUCENE_48, tokenStream);\r\n\t\t// richiamo lo StopFilter per togliere le stop word\r\n\t\ttokenStream = new StopFilter(Version.LUCENE_48, tokenStream, stopWords);\r\n\t\t// eseguo il processo di stemming italiano per ogni token\r\n\t\ttokenStream = new ItalianLightStemFilter(tokenStream);\r\n\t\t\r\n\t\t/*\r\n\t\t * ricostruisco la stringa in precedenza tokenizzata\r\n\t\t */\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t CharTermAttribute charTermAttribute = tokenStream.addAttribute(CharTermAttribute.class);\r\n\t tokenStream.reset();\r\n\r\n\t while (tokenStream.incrementToken()) \r\n\t {\r\n\t String term = charTermAttribute.toString();\r\n\t sb.append(term + \" \");\r\n\t }\r\n \r\n\t tokenStream.close();\r\n\t // elimino l'ultimo carattere (spazio vuoto)\r\n\t String l = sb.toString().substring(0,sb.toString().length()-1);\r\n\t \r\n\t// ritorno la label stemmata\r\n return l;\r\n\t\r\n\t}",
"private void runCloudTextRecognition(Bitmap bitmap) {\n FirebaseVisionCloudDetectorOptions options =\n new FirebaseVisionCloudDetectorOptions.Builder()\n .setModelType(FirebaseVisionCloudDetectorOptions.LATEST_MODEL)\n .setMaxResults(15)\n .build();\n mCameraButtonCloud.setEnabled(false);\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionCloudDocumentTextDetector detector = FirebaseVision.getInstance()\n .getVisionCloudDocumentTextDetector(options);\n detector.detectInImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionCloudText>() {\n @Override\n public void onSuccess(FirebaseVisionCloudText texts) {\n mCameraButtonCloud.setEnabled(true);\n processCloudTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n mCameraButtonCloud.setEnabled(true);\n e.printStackTrace();\n }\n });\n }",
"PsiFile[] findFilesWithPlainTextWords( String word);",
"public void detectLanguage(final View view)\n {\n Toast.makeText(getApplicationContext(), \"Under Construction\", Toast.LENGTH_SHORT).show();\n }",
"public BufferedImage add_text(BufferedImage image, String text) {\n // convert all items to byte arrays: image, message, message length\n byte img[] = get_byte_data(image);\n byte msg[] = text.getBytes();\n byte len[] = bit_conversion(msg.length);\n try {\n encode_text(img, len, 0); // 0 first positiong\n encode_text(img, msg, 32); // 4 bytes of space for length:\n // 4bytes*8bit = 32 bits\n }\n catch (Exception e) {\n JOptionPane.showMessageDialog(\n null,\n \"Target File cannot hold message!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n return image;\n }",
"String translate(String text, String fromLanguage, String toLanguage) throws TranslationException;",
"java.lang.String getTargetLanguageCode();",
"private void verifyTextAndLabels(){\n common.explicitWaitVisibilityElement(\"//*[@id=\\\"content\\\"]/article/h2\");\n\n //Swedish labels\n common.timeoutMilliSeconds(500);\n textAndLabelsSwedish();\n\n //Change to English\n common.selectEnglish();\n\n //English labels\n textAndLabelsEnglish();\n }",
"private ArrayList<OWLLiteral> getLabels(OWLEntity entity, OWLOntology ontology, String lang) {\n\t\tOWLDataFactory df = OWLManager.createOWLOntologyManager().getOWLDataFactory();\n\t\tOWLAnnotationProperty label = df.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI());\t\n\n\t\tArrayList<OWLLiteral> labels = new ArrayList<OWLLiteral>();\n\t\tfor (OWLAnnotation annotation : entity.getAnnotations(ontology, label)) {\n\t\t\tif (annotation.getValue() instanceof OWLLiteral) {\n\t\t\t\tOWLLiteral val = (OWLLiteral) annotation.getValue();\n\t\t\t\tif (val.hasLang(\"en\")) {\n\t\t\t\t\tlabels.add(val);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn labels;\n\t}",
"public static BufferedImage getTextImage (String text, String fontName, float fontSize) {\n\t\tBufferedImage img = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);\n\t\tGraphics2D g2d = img.createGraphics();\n\t\tFont font = ExternalResourceManager.getFont(fontName).deriveFont(fontSize);\n\t\tg2d.setFont(font);\n//\t\tnew Font\n\t\tFontMetrics fm = g2d.getFontMetrics();\n\t\tint w = fm.stringWidth(text), h = fm.getHeight();\n\t\tg2d.dispose();\n\t\t// draw image\n\t\timg = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);\n\t\tg2d = img.createGraphics();\n\t\tg2d.setFont(font);\n fm = g2d.getFontMetrics();\n g2d.setColor(Color.BLACK);\n g2d.setBackground(new Color(0, 0, 0, 0));\n g2d.drawString(text, 0, fm.getAscent());\n g2d.dispose();\n\t\treturn img;\n\t}",
"String translateEnglishToDothraki(String englishText) throws Exception\n\t{\n\t\tString urlHalf1 = \"https://api.funtranslations.com/translate/dothraki.json?text=\";\n\t\tString url = urlHalf1 + englishText;\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString jsonData = getJsonData(url);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tString translation = \"\";\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject treeObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement contents = treeObject.get(\"contents\");\n\n\t\t\tif (contents.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject contentsObject = contents.getAsJsonObject();\n\n\t\t\t\tJsonElement translateElement = contentsObject.get(\"translated\");\n\n\t\t\t\ttranslation = translateElement.getAsString();\n\t\t\t}\n\t\t}\n\n\t\treturn translation;\n\t}",
"int getLocalizedText();",
"Builder addInLanguage(Text value);",
"default String getOriginalText() {\n return meta(\"nlpcraft:nlp:origtext\");\n }",
"public static String getTranslation(String original, String originLanguage, String targetLanguage) {\n\t\tif (Options.getDebuglevel() > 1)\n\t\t\tSystem.out.println(\"Translating: \" + original);\n\t\ttry {\n\t\t\tDocument doc = Jsoup\n\t\t\t\t\t.connect(\"http://translate.reference.com/\" + originLanguage + \"/\" + targetLanguage + \"/\" + original)\n\t\t\t\t\t.userAgent(\"PlagTest\").get();\n\t\t\tElement e = doc.select(\"textarea[Placeholder=Translation]\").first();\n\t\t\tString text = e.text().trim();\n\t\t\tif (text.equalsIgnoreCase(original.trim()))\n\t\t\t\treturn null;\n\t\t\treturn text;\n\t\t} catch (Exception e1) {\n\t\t}\n\t\treturn null;\n\t}",
"public String extractText(String urlString) {\n String text = \"\";\n try {\n URL url = new URL(urlString);\n text = ArticleExtractor.INSTANCE.getText(url); \n } catch (Exception ex) {\n Logger.getLogger(TextExtractor.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return text;\n }",
"com.google.ads.googleads.v6.resources.LanguageConstant getLanguageConstant();",
"public void selectLanguage(String language) {\n\n String xpath = String.format(EST_LANGUAGE, language);\n List<WebElement> elements = languages.findElements(By.xpath(xpath));\n for (WebElement element : elements) {\n if (element.isDisplayed()) {\n element.click();\n break;\n }\n }\n }",
"@Override\n public String getText() {\n return analyzedWord;\n }",
"public String classify(String text){\n\t\treturn mClassifier.classify(text).bestCategory();\n\t}",
"public String getThaiWordFromEngWord(String englishWord) {\n Cursor cursor = mDatabase.query(\n TABLE_NAME,\n new String[]{COL_THAI_WORD},\n COL_ENG_WORD + \"=?\",\n new String[]{englishWord},\n null,\n null,\n null\n );\n if (cursor.getCount() > 0) {\n cursor.moveToFirst();\n return cursor.getString(cursor.getColumnIndex(COL_THAI_WORD));\n } else {\n return englishWord;\n }\n }",
"@Source(\"gr/grnet/pithos/resources/translate.png\")\n ImageResource selectAll();",
"public void Croppedimage(CropImage.ActivityResult result, ImageView iv, EditText et )\n {\n Uri resultUri = null; // get image uri\n if (result != null) {\n resultUri = result.getUri();\n }\n\n\n //set image to image view\n iv.setImageURI(resultUri);\n\n\n //get drawable bitmap for text recognition\n BitmapDrawable bitmapDrawable = (BitmapDrawable) iv.getDrawable();\n\n Bitmap bitmap = bitmapDrawable.getBitmap();\n\n TextRecognizer recognizer = new TextRecognizer.Builder(getApplicationContext()).build();\n\n if(!recognizer.isOperational())\n {\n Toast.makeText(this, \"Error No Text To Recognize\", Toast.LENGTH_LONG).show();\n }\n else\n {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n SparseArray<TextBlock> items = recognizer.detect(frame);\n StringBuilder ab = new StringBuilder();\n\n //get text from ab until there is no text\n for(int i = 0 ; i < items.size(); i++)\n {\n TextBlock myItem = items.valueAt(i);\n ab.append(myItem.getValue());\n\n }\n\n //set text to edit text\n et.setText(ab.toString());\n }\n\n }",
"@DISPID(-2147413103)\n @PropGet\n java.lang.String lang();",
"public String getLocale () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"private String getPhrase(String key) {\r\n if (\"pl\".equals(System.getProperty(\"user.language\")) && phrasesPL.containsKey(key)) {\r\n return phrasesPL.get(key);\r\n } else if (phrasesEN.containsKey(key)) {\r\n return phrasesEN.get(key);\r\n }\r\n return \"Translation not found!\";\r\n }",
"public String detectObject(Bitmap bitmap) {\n results = classifierObject.recognizeImage(bitmap);\n\n // Toast.makeText(context, results.toString(), Toast.LENGTH_LONG).show();\n return String.valueOf(results.toString());\n }",
"@Override\n protected int onIsLanguageAvailable(String lang, String country, String variant) {\n if (\"eng\".equals(lang)) {\n // We support two specific robot languages, the british robot language\n // and the american robot language.\n if (\"USA\".equals(country) || \"GBR\".equals(country)) {\n // If the engine supported a specific variant, we would have\n // something like.\n //\n // if (\"android\".equals(variant)) {\n // return TextToSpeech.LANG_COUNTRY_VAR_AVAILABLE;\n // }\n return TextToSpeech.LANG_COUNTRY_AVAILABLE;\n }\n\n // We support the language, but not the country.\n return TextToSpeech.LANG_AVAILABLE;\n }\n\n return TextToSpeech.LANG_NOT_SUPPORTED;\n }",
"public void setLanguage(String language);",
"String text();",
"public WordInfo searchWord(String word) {\n\t\tSystem.out.println(\"Dic:SearchWord: \"+word);\n\n\t\tDocument doc;\n\t\ttry {\n\t\t\tdoc = Jsoup.connect(\"https://dictionary.cambridge.org/dictionary/english-vietnamese/\" + word).get();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\tElements elements = doc.select(\".dpos-h.di-head.normal-entry\");\n\t\tif (elements.isEmpty()) {\n\t\t\tSystem.out.println(\" not found\");\n\t\t\treturn null;\n\t\t}\n\n\t\tWordInfo wordInfo = new WordInfo(word);\n\n\t\t// Word\n\t\telements = doc.select(\".tw-bw.dhw.dpos-h_hw.di-title\");\n\n\t\tif (elements.size() == 0) {\n\t\t\tSystem.out.println(\" word not found in doc!\");\n\t\t\treturn null;\n\t\t}\n\n\t\twordInfo.setWordDictionary(elements.get(0).html());\n\n\t\t// Type\n\t\telements = doc.select(\".pos.dpos\");\n\n\t\tif(elements.size() > 0) {\n\t\t\twordInfo.setType(WordInfo.getTypeShort(elements.get(0).html()));\n//\t\t\tif (wordInfo.getTypeShort().equals(\"\"))\n//\t\t\t\tSystem.out.println(\" typemis: \"+wordInfo.getType());\n\t\t}\n\n\t\t// Pronoun\n\t\telements = doc.select(\".ipa.dipa\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setAPI(\"/\"+elements.get(0).html()+\"/\");\n\n\t\t// Trans\n\t\telements = doc.select(\".trans.dtrans\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setTrans(elements.get(0).html());\n\n\t\tSystem.out.println(\" found\");\n\t\treturn wordInfo;\n\t}"
]
| [
"0.6340801",
"0.5908911",
"0.58815557",
"0.56125695",
"0.54998386",
"0.5477398",
"0.5472436",
"0.54383487",
"0.54383487",
"0.54241633",
"0.5411288",
"0.5399041",
"0.53873235",
"0.5367456",
"0.53567713",
"0.53567713",
"0.53567713",
"0.5354653",
"0.5304111",
"0.5296139",
"0.52609426",
"0.5256295",
"0.52469003",
"0.5227871",
"0.5227503",
"0.51627934",
"0.51366884",
"0.5132681",
"0.5124243",
"0.50965005",
"0.5073502",
"0.50573194",
"0.5053984",
"0.50325114",
"0.50287145",
"0.5026039",
"0.49775523",
"0.49756226",
"0.49754003",
"0.49698895",
"0.4965898",
"0.49589223",
"0.4947393",
"0.49402016",
"0.4936062",
"0.491651",
"0.49079528",
"0.4901984",
"0.4901873",
"0.48954538",
"0.48754418",
"0.48720878",
"0.48705855",
"0.48639196",
"0.4862045",
"0.4859524",
"0.4857446",
"0.483705",
"0.48177797",
"0.48138455",
"0.4799299",
"0.4758428",
"0.475805",
"0.4751387",
"0.47349215",
"0.47277245",
"0.4724874",
"0.46811676",
"0.4679775",
"0.46651345",
"0.46608913",
"0.46405634",
"0.46393868",
"0.46346596",
"0.46283433",
"0.46246725",
"0.4622929",
"0.46218535",
"0.46208444",
"0.4619674",
"0.46116024",
"0.4601757",
"0.4601488",
"0.45977402",
"0.4596848",
"0.4596606",
"0.45920032",
"0.4591659",
"0.45892608",
"0.45795617",
"0.45766595",
"0.4571272",
"0.45672256",
"0.45600197",
"0.45597628",
"0.4557801",
"0.45491737",
"0.45459962",
"0.4545532",
"0.4545111",
"0.45398226"
]
| 0.0 | -1 |
Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. | public Observable<OCRInner> oCRFileInputAsync(String language, byte[] imageStream, Boolean cacheImage, Boolean enhanced) {
return oCRFileInputWithServiceResponseAsync(language, imageStream, cacheImage, enhanced).map(new Func1<ServiceResponse<OCRInner>, OCRInner>() {
@Override
public OCRInner call(ServiceResponse<OCRInner> response) {
return response.body();
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String detectLanguage(String text) {\n\t\treturn dictionary.detectLanguage(text);\n\t}",
"public boolean translateImageToText();",
"@SuppressWarnings(\"static-access\")\n\tpublic void detection(Request text) {\n\t\t//Fichiertxt fichier;\n\t\ttry {\t\t\t\t\t\n\t\t\t//enregistrement et affichage de la langue dans une variable lang\n\t\t\ttext.setLang(identifyLanguage(text.getCorpText()));\n\t\t\t//Ajoute le fichier traité dans la Base\n\t\t\tajouterTexte(text);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"fichier texte non trouvé\");\n\t e.printStackTrace();\n\t\t}\n\t}",
"public MashapeResponse<JSONObject> classifytext(String lang, String text) {\n return classifytext(lang, text, \"\");\n }",
"static WordList get(Language language) {\n return switch (language) {\n case ENGLISH -> readResource(\"bip39_english.txt\");\n };\n }",
"void readText(final Bitmap imageBitmap){\n\t\tif(imageBitmap != null) {\n\t\t\t\n\t\t\tTextRecognizer textRecognizer = new TextRecognizer.Builder(this).build();\n\t\t\t\n\t\t\tif(!textRecognizer.isOperational()) {\n\t\t\t\t// Note: The first time that an app using a Vision API is installed on a\n\t\t\t\t// device, GMS will download a native libraries to the device in order to do detection.\n\t\t\t\t// Usually this completes before the app is run for the first time. But if that\n\t\t\t\t// download has not yet completed, then the above call will not detect any text,\n\t\t\t\t// barcodes, or faces.\n\t\t\t\t// isOperational() can be used to check if the required native libraries are currently\n\t\t\t\t// available. The detectors will automatically become operational once the library\n\t\t\t\t// downloads complete on device.\n\t\t\t\tLog.w(TAG, \"Detector dependencies are not yet available.\");\n\t\t\t\t\n\t\t\t\t// Check for low storage. If there is low storage, the native library will not be\n\t\t\t\t// downloaded, so detection will not become operational.\n\t\t\t\tIntentFilter lowstorageFilter = new IntentFilter(Intent.ACTION_DEVICE_STORAGE_LOW);\n\t\t\t\tboolean hasLowStorage = registerReceiver(null, lowstorageFilter) != null;\n\t\t\t\t\n\t\t\t\tif (hasLowStorage) {\n\t\t\t\t\tToast.makeText(this,\"Low Storage\", Toast.LENGTH_LONG).show();\n\t\t\t\t\tLog.w(TAG, \"Low Storage\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tFrame imageFrame = new Frame.Builder()\n\t\t\t\t\t.setBitmap(imageBitmap)\n\t\t\t\t\t.build();\n\t\t\t\n\t\t\tSparseArray<TextBlock> textBlocks = textRecognizer.detect(imageFrame);\n\t\t\tdata.setText(\"\");\n\t\t\tfor (int i = 0; i < textBlocks.size(); i++) {\n\t\t\t\tTextBlock textBlock = textBlocks.get(textBlocks.keyAt(i));\n\t\t\t\tPoint[] points = textBlock.getCornerPoints();\n\t\t\t\tLog.i(TAG, textBlock.getValue());\n\t\t\t\tString corner = \"\";\n\t\t\t\tfor(Point point : points){\n\t\t\t\t\tcorner += point.toString();\n\t\t\t\t}\n\t\t\t\t//data.setText(data.getText() + \"\\n\" + corner);\n\t\t\t\tdata.setText(data.getText()+ \"\\n \"+ textBlock.getValue() + \" \\n\" );\n\t\t\t\t// Do something with value\n /*List<? extends Text> textComponents = textBlock.getComponents();\n for(Text currentText : textComponents) {\n // Do your thing here }\n mImageDetails.setText(mImageDetails.getText() + \"\\n\" + currentText);\n }*/\n\t\t\t}\n\t\t}\n\t}",
"public String getEnglish()\n {\n if (spanishWord.substring(0,3).equals(\"el \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n else if (spanishWord.substring(0, 3).equals(\"la \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n if (spanishWord.equals(\"estudiante\"))\n {\n return \"student\"; \n }\n else if (spanishWord.equals(\"aprender\"))\n {\n return \"to learn\";\n }\n else if (spanishWord.equals(\"entender\"))\n {\n return\"to understand\";\n }\n else if (spanishWord.equals(\"verde\"))\n {\n return \"green\";\n }\n else\n {\n return null;\n }\n }",
"java.lang.String getLanguage();",
"java.lang.String getLanguage();",
"private void detextTextFromImage(Bitmap imageBitmap) {\n\n\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(imageBitmap);\n\n FirebaseVisionTextRecognizer firebaseVisionTextRecognizer = FirebaseVision.getInstance().getCloudTextRecognizer();\n\n firebaseVisionTextRecognizer.processImage(image)\n .addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText firebaseVisionText) {\n String text = firebaseVisionText.getText();\n\n if (text.isEmpty() || text == null)\n Toast.makeText(ctx, \"Can not identify. Try again!\", Toast.LENGTH_SHORT).show();\n\n else {\n\n startTranslateIntent(text);\n }\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n e.printStackTrace();\n }\n });\n\n\n }",
"public synchronized Result process(String text, String lang) {\n // Check that service has been initialized.\n if (!this.initialized) {\n logInitializationError();\n return null;\n }\n this.cas.reset();\n this.cas.setDocumentText(text);\n if (lang != null) {\n this.cas.setDocumentLanguage(lang);\n }\n try {\n this.ae.process(this.cas);\n } catch (AnalysisEngineProcessException e) {\n getLogger().log(Level.SEVERE, \"\", e);\n return null;\n }\n return this.resultExtractor.getResult(this.cas, this.serviceSpec);\n }",
"private static AnalysisResults.Builder retrieveText(ByteString imageBytes) throws IOException {\n AnalysisResults.Builder analysisBuilder = new AnalysisResults.Builder();\n\n Image image = Image.newBuilder().setContent(imageBytes).build();\n ImmutableList<Feature> features =\n ImmutableList.of(Feature.newBuilder().setType(Feature.Type.TEXT_DETECTION).build(),\n Feature.newBuilder().setType(Feature.Type.LOGO_DETECTION).build());\n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addAllFeatures(features).setImage(image).build();\n ImmutableList<AnnotateImageRequest> requests = ImmutableList.of(request);\n\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n BatchAnnotateImagesResponse batchResponse = client.batchAnnotateImages(requests);\n\n if (batchResponse.getResponsesList().isEmpty()) {\n return analysisBuilder;\n }\n\n AnnotateImageResponse response = Iterables.getOnlyElement(batchResponse.getResponsesList());\n\n if (response.hasError()) {\n return analysisBuilder;\n }\n\n // Add extracted raw text to builder.\n if (!response.getTextAnnotationsList().isEmpty()) {\n // First element has the entire raw text from the image.\n EntityAnnotation textAnnotation = response.getTextAnnotationsList().get(0);\n\n String rawText = textAnnotation.getDescription();\n analysisBuilder.setRawText(rawText);\n }\n\n // If a logo was detected with a confidence above the threshold, use it to set the store.\n if (!response.getLogoAnnotationsList().isEmpty()\n && response.getLogoAnnotationsList().get(0).getScore()\n > LOGO_DETECTION_CONFIDENCE_THRESHOLD) {\n String store = response.getLogoAnnotationsList().get(0).getDescription();\n analysisBuilder.setStore(store);\n }\n } catch (ApiException e) {\n // Return default builder if image annotation request failed.\n return analysisBuilder;\n }\n\n return analysisBuilder;\n }",
"public java.lang.String getLanguage() {\n return _courseImage.getLanguage();\n }",
"public void ocrExtraction(BufferedImage image) {\n\t\tFile outputfile = new File(\"temp.png\");\n\t\toutputfile.deleteOnExit();\n\t\tString ocrText = \"\", currLine = \"\";\n\t\ttry {\n\t\t\tImageIO.write(image, \"png\", outputfile);\n\n\t\t\t// System call to Tesseract OCR\n\t\t\tRuntime r = Runtime.getRuntime();\n\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText -psm 6\");\n//\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText\");\n\t\t\tp.waitFor();\n\n\t\t\t// Read text file generated by tesseract\n\t\t\tFile f = new File(\"ocrText.txt\");\n\t\t\tf.deleteOnExit();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\t\t\n\t\t\twhile ((currLine = br.readLine()) != null) {\n\t\t\t\tocrText += (currLine + \" \");\n\t\t\t}\n\t\t\tif(ocrText.trim().isEmpty()) {\n\t\t\t\tocrText = \"OCR_FAIL\";\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttextField.setText(ocrText.trim());\n\t\ttextField.requestFocus();\n\t\ttextField.selectAll();\n\t}",
"String getLanguage();",
"String getLanguage();",
"String getLanguage();",
"public String getTitile(String language) {\n if (language.startsWith(\"e\")) {\n return enTitle;\n } else {\n return localTitle;\n }\n }",
"public String scanText(BufferedImage image) throws IOException {\n File tmpImgFile = File.createTempFile(\"tmpImg\", \".jpg\");\n ImageIO.write(image, \"jpg\", tmpImgFile);\n String rawData = TesseractWrapper.runTesseract(tmpImgFile.getAbsolutePath());\n tmpImgFile.delete();\n return rawData;\n }",
"public MashapeResponse<JSONObject> classifytext(String lang, String text, String exclude) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n if (lang != null && !lang.equals(\"\")) {\n\tparameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n\tparameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n\tparameters.put(\"exclude\", exclude);\n }\n \n \n return (MashapeResponse<JSONObject>) HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers);\n }",
"protected VideoText[] analyze(File imageFile, String id) throws TextAnalyzerException {\n boolean languagesInstalled;\n if (dictionaryService.getLanguages().length == 0) {\n languagesInstalled = false;\n logger.warn(\"There are no language packs installed. All text extracted from video will be considered valid.\");\n } else {\n languagesInstalled = true;\n }\n\n List<VideoText> videoTexts = new ArrayList<VideoText>();\n TextFrame textFrame = null;\n try {\n textFrame = textExtractor.extract(imageFile);\n } catch (IOException e) {\n logger.warn(\"Error reading image file {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n } catch (TextExtractorException e) {\n logger.warn(\"Error extracting text from {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n }\n\n int i = 1;\n for (TextLine line : textFrame.getLines()) {\n VideoText videoText = new VideoTextImpl(id + \"-\" + i++);\n videoText.setBoundary(line.getBoundaries());\n Textual text = null;\n if (languagesInstalled) {\n String[] potentialWords = line.getText() == null ? new String[0] : line.getText().split(\"\\\\W\");\n String[] languages = dictionaryService.detectLanguage(potentialWords);\n if (languages.length == 0) {\n // There are languages installed, but these words are part of one of those languages\n logger.debug(\"No languages found for '{}'.\", line.getText());\n continue;\n } else {\n String language = languages[0];\n DICT_TOKEN[] tokens = dictionaryService.cleanText(potentialWords, language);\n StringBuilder cleanLine = new StringBuilder();\n for (int j = 0; j < potentialWords.length; j++) {\n if (tokens[j] == DICT_TOKEN.WORD) {\n if (cleanLine.length() > 0) {\n cleanLine.append(\" \");\n }\n cleanLine.append(potentialWords[j]);\n }\n }\n // TODO: Ensure that the language returned by the dictionary is compatible with the MPEG-7 schema\n text = new TextualImpl(cleanLine.toString(), language);\n }\n } else {\n logger.debug(\"No languages installed. For better results, please install at least one language pack\");\n text = new TextualImpl(line.getText());\n }\n videoText.setText(text);\n videoTexts.add(videoText);\n }\n return videoTexts.toArray(new VideoText[videoTexts.size()]);\n }",
"public List<Result> recognize(IplImage image);",
"public static String getImgText(final String imageLocation) {\n\n return getImgText(new File(imageLocation));\n }",
"public Thread classifytext(String lang, String text, String exclude, MashapeCallback<JSONObject> callback) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n \n if (lang != null && !lang.equals(\"\")) {\n \n parameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n \n parameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n \n parameters.put(\"exclude\", exclude);\n }\n \n return HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers,\n callback);\n }",
"private String getLanguage(Prediction prediction, String content)\n throws IOException {\n Preconditions.checkNotNull(prediction);\n Preconditions.checkNotNull(content);\n\n Input input = new Input();\n Input.InputInput inputInput = new Input.InputInput();\n inputInput.set(\"csvInstance\", Lists.newArrayList(content));\n input.setInput(inputInput);\n Output result = prediction.trainedmodels().predict(Utils.getProjectId(),\n Constants.MODEL_ID, input).execute();\n return result.getOutputLabel();\n }",
"public Thread classifytext(String lang, String text, MashapeCallback<JSONObject> callback) {\n return classifytext(lang, text, \"\", callback);\n }",
"public static String getImgText(final File file) {\n\n final ITesseract instance = new Tesseract();\n try {\n\n return instance.doOCR(file);\n } catch (TesseractException e) {\n\n e.getMessage();\n return \"Error while reading image\";\n }\n }",
"private String autoDetectLanguage(ArrayList<File> progFiles) {\n for (File f : progFiles) {\n String f_extension = getFileExtension(f).toLowerCase();\n if (Arrays.asList(IAGConstant.PYTHON_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_PYTHON3;\n }\n if (Arrays.asList(IAGConstant.CPP_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_CPP;\n }\n }\n return IAGConstant.LANGUAGE_UNKNOWN;\n }",
"private String html2safetynet(String text, String language) {\n\n // Convert from html to plain text\n text = TextUtils.html2txt(text, true);\n\n // Remove separator between positions\n text = PositionUtils.replaceSeparator(text, \" \");\n\n // Replace positions with NAVTEX versions\n PositionAssembler navtexPosAssembler = PositionAssembler.newNavtexPositionAssembler();\n text = PositionUtils.updatePositionFormat(text, navtexPosAssembler);\n\n // Remove verbose words, such as \"the\", from the text\n text = TextUtils.removeWords(text, SUPERFLUOUS_WORDS);\n\n // NB: unlike NAVTEX, we do not split into 40-character lines\n\n return text.toUpperCase();\n }",
"private String tesseract(Bitmap bitmap) {\n return \"NOT IMPLEMENTED\";\n }",
"public static String customTextFilter(BufferedImage img, String txt) {\n\n int newHeight = img.getHeight() / 200;\n int newWidth = img.getWidth() / 200;\n String html = \"\";\n int aux = 0;\n\n for (int i = 0; i < 200; i++) {\n if (i > 0) {\n html += \"\\n<br>\\n\";\n }\n for (int j = 0; j < 200; j++) {\n if (aux == txt.length()) {\n html += \"<b> </b>\";\n aux = 0;\n } else {\n Color c = regionAvgColor(j * newWidth, (j * newWidth) + newWidth,\n i * newHeight, (i * newHeight) + newHeight, newHeight,\n newWidth, img);\n html += \"<b style='color:rgb(\" + c.getRed() + \",\"\n + c.getGreen() + \",\" + c.getBlue() + \");'>\"\n + txt.substring(aux, aux + 1) + \"</b>\";\n aux++;\n }\n }\n }\n String style = \"body{\\nfont-size: 15px\\n}\";\n String title = \"Imagen Texto\";\n int styleIndex = HTML.indexOf(\"?S\"), titleIndex = HTML.indexOf(\"?T\"),\n bodyIndex = HTML.indexOf(\"?B\");\n String htmlFile = HTML.substring(0, styleIndex) + style;\n htmlFile += HTML.substring(styleIndex + 2, titleIndex) + title;\n htmlFile += HTML.substring(titleIndex + 2, bodyIndex) + html;\n htmlFile += HTML.substring(bodyIndex + 2);\n return htmlFile;\n }",
"private String getTranslation(String language, String id)\n {\n Iterator<Translation> translations = mTranslationState.iterator();\n \n while (translations.hasNext()) {\n Translation translation = translations.next();\n \n if (translation.getLang().equals(language)) {\n Iterator<TranslationText> texts = translation.texts.iterator();\n \n while (texts.hasNext()) {\n TranslationText text = texts.next();\n \n if (text.getId().equals(id)) {\n text.setUsed(true);\n return text.getValue();\n }\n }\n }\n }\n \n return \"[Translation Not Available]\";\n }",
"private String getLanguage(String fileName)\n {\n if (fileName.endsWith(\".C\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".Java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".CPP\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".Class\"))\n {\n return \"Java\";\n }\n if (fileName.endsWith(\".c\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".cpp\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".class\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".h\"))\n {\n return \"C\";\n }\n else\n {\n return \"??\";\n }\n }",
"@DISPID(-2147413012)\n @PropGet\n java.lang.String language();",
"public String getLanguage();",
"public String detectAndDecode(Mat img) {\n return detectAndDecode_2(nativeObj, img.nativeObj);\n }",
"String getLang();",
"private void processTextRecognitionResult(FirebaseVisionText texts) {\n List<FirebaseVisionText.Block> blocks = texts.getBlocks();\n if (blocks.size() == 0) {\n Toast.makeText(getApplicationContext(), \"onDevice: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n for (int i = 0; i < blocks.size(); i++) {\n List<FirebaseVisionText.Line> lines = blocks.get(i).getLines();\n for (int j = 0; j < lines.size(); j++) {\n List<FirebaseVisionText.Element> elements = lines.get(j).getElements();\n for (int k = 0; k < elements.size(); k++) {\n GraphicOverlay.Graphic textGraphic = new TextGraphic(mGraphicOverlay, elements.get(k));\n mGraphicOverlay.add(textGraphic);\n\n }\n }\n }\n }",
"@Override\n public DetectDominantLanguageResult detectDominantLanguage(DetectDominantLanguageRequest request) {\n request = beforeClientExecution(request);\n return executeDetectDominantLanguage(request);\n }",
"@Override\n public void onSuccess(Text visionText) {\n\n Log.d(TAG, \"onSuccess: \");\n extractText(visionText);\n }",
"public String getText() {\n if (Language.isEnglish()) {\n return textEn;\n } else {\n return textFr;\n }\n }",
"public Elements getTextFromWeb(String lang, String word) {\n\t\tToast t = Toast.makeText(this, \"Buscando...\", Toast.LENGTH_SHORT);\n\t\tt.setGravity(Gravity.TOP, 0, 0); // el show lo meto en el try\n\t\tseleccionado.setText(\"\");\n\t\tresultados.clear();\n\t\tlv.setAdapter(new ArrayAdapter<String>(this, R.layout.my_item_list,\n\t\t\t\tresultados));\n\n\t\tElements res = null;\n\t\tif (!networkAvailable(getApplicationContext())) {\n\t\t\tToast.makeText(this, \"¡Necesitas acceso a internet!\",\n\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t} else {\n\t\t\tString url = \"http://www.wordreference.com/es/translation.asp?tranword=\";\n\t\t\tif (lang == \"aEspa\") {\n\t\t\t\turl += word;\n\t\t\t\tt.show();\n\t\t\t\t/* De ingles a español */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarWR(doc);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\turl = \"http://www.wordreference.com/es/en/translation.asp?spen=\"\n\t\t\t\t\t\t+ word;\n\t\t\t\tt.show();\n\t\t\t\t/* De español a ingles */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\t// no hay\n\t\t\t\t\t// else if (doc.toString().contains(\n\t\t\t\t\t// \"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t// res = procesarWR2(doc);\n\t\t\t\t\t// }\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}",
"CLanguage getClanguage();",
"private Spannable applyWordMarkup(String text) {\n SpannableStringBuilder ssb = new SpannableStringBuilder();\n int languageCodeStart = 0;\n int untranslatedStart = 0;\n\n int textLength = text.length();\n for (int i = 0; i < textLength; i++) {\n char c = text.charAt(i);\n if (c == '.') {\n if (++i < textLength) {\n c = text.charAt(i);\n if (c == '.') {\n ssb.append(c);\n } else if (c == 'c') {\n languageCodeStart = ssb.length();\n } else if (c == 'C') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.language_code_tag),\n languageCodeStart, ssb.length(), 0);\n languageCodeStart = ssb.length();\n } else if (c == 'u') {\n untranslatedStart = ssb.length();\n } else if (c == 'U') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.untranslated_word),\n untranslatedStart, ssb.length(), 0);\n untranslatedStart = ssb.length();\n } else if (c == '0') {\n Resources res = getResources();\n ssb.append(res.getString(R.string.no_translations));\n }\n }\n } else\n ssb.append(c);\n }\n\n return ssb;\n }",
"public Future<String> getLanguage() throws DynamicCallException, ExecutionException {\n return call(\"getLanguage\");\n }",
"private void processCloudTextRecognitionResult(FirebaseVisionCloudText text) {\n // Task completed successfully\n if (text == null) {\n Toast.makeText(getApplicationContext(), \"onCloud: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n List<FirebaseVisionCloudText.Page> pages = text.getPages();\n for (int i = 0; i < pages.size(); i++) {\n FirebaseVisionCloudText.Page page = pages.get(i);\n List<FirebaseVisionCloudText.Block> blocks = page.getBlocks();\n for (int j = 0; j < blocks.size(); j++) {\n List<FirebaseVisionCloudText.Paragraph> paragraphs = blocks.get(j).getParagraphs();\n for (int k = 0; k < paragraphs.size(); k++) {\n FirebaseVisionCloudText.Paragraph paragraph = paragraphs.get(k);\n List<FirebaseVisionCloudText.Word> words = paragraph.getWords();\n for (int l = 0; l < words.size(); l++) {\n GraphicOverlay.Graphic cloudTextGraphic = new CloudTextGraphic(mGraphicOverlay, words.get(l));\n mGraphicOverlay.add(cloudTextGraphic);\n }\n }\n }\n }\n }",
"public interface WordAnalyser {\n\n /**\n * Gets the bounds of all words it encounters in the image\n * \n */\n List<Rectangle> getWordBoundaries();\n\n /**\n * Gets the partial binary pixel matrix of the given word.\n * \n * @param wordBoundary\n * The bounds of the word\n */\n BinaryImage getWordMatrix(Rectangle wordBoundary);\n\n}",
"public void setLanguage(java.lang.String language) {\n _courseImage.setLanguage(language);\n }",
"private void runTextRecognition() {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(mSelectedImage);\n FirebaseVisionTextRecognizer recognizer = FirebaseVision.getInstance()\n .getOnDeviceTextRecognizer();\n //mTextButton.setEnabled(false);\n recognizer.processImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n //mTextButton.setEnabled(true);\n processTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n //mTextButton.setEnabled(true);\n e.printStackTrace();\n }\n });\n }",
"Language findByName(String name);",
"private Word askForWord(Language lastLanguage) throws LanguageException {\n Language language = askForLanguage();\r\n if(language == null || language.equals(lastLanguage)) {\r\n throw new LanguageException();\r\n }\r\n // Step 2 : Name of the word\r\n String name = askForLine(\"Name of the word : \");\r\n Word searchedWord = czech.searchWord(language, name);\r\n if(searchedWord != null) {\r\n System.out.println(\"Word \" + name + \" found !\");\r\n return searchedWord;\r\n }\r\n System.out.println(\"Word \" + name + \" not found.\");\r\n // Step 3 : Gender/Phonetic of the word\r\n String gender = askForLine(\"\\tGender of the word : \");\r\n String phonetic = askForLine(\"\\tPhonetic of the word : \");\r\n // Last step : Creation of the word\r\n Word word = new Word(language, name, gender, phonetic);\r\n int id = czech.getListWords(language).get(-1).getId() + 1;\r\n word.setId(id);\r\n czech.getListWords(language).put(-1, word);\r\n return word;\r\n }",
"public String findExtension(String lang) {\n if (lang == null)\n return \".txt\";\n else if (lang.equals(\"C++\"))\n return \".cpp\";\n else if (lang.equals(\"C\"))\n return \".c\";\n else if (lang.equals(\"PYT\"))\n return \".py\";\n else if (lang.equals(\"JAV\"))\n return \".java\";\n else\n return \".txt\";\n }",
"public static String RunOCR(Bitmap bitview, Context context, String activityName) {\n TextRecognizer textRecognizer = new TextRecognizer.Builder(context).build();\n if(!textRecognizer.isOperational()){\n // Note: The first time that an app using a Vision API is installed on a\n // device, GMS will download a native libraries to the device in order to do detection.\n // Usually this completes before the app is run for the first time. But if that\n // download has not yet completed, then the above call will not detect any text,\n // barcodes, or faces.\n //\n // isOperational() can be used to check if the required native libraries are currently\n // available. The detectors will automatically become operational once the library\n // downloads complete on device.\n Log.w(activityName, \"Detector dependencies are not yet available\");\n return \"FAILED -Text Recognizer ERROR-\";\n } else {\n Frame frame = new Frame.Builder().setBitmap(bitview).build();\n SparseArray<TextBlock> items = textRecognizer.detect(frame);\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i< items.size(); ++i){\n TextBlock item = items.valueAt(i);\n stringBuilder.append(item.getValue());\n stringBuilder.append(\"\\n\");\n }\n String ocr = stringBuilder.toString();\n Log.i(activityName, \"List of OCRs:\\n\" +ocr+\"\\n\");\n return ocr;\n }\n }",
"public AbstractLetterFactory decideLanguage(String lang){\n if(lang==\"ENG\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'m', 'a', 'y', 'n', 'o', 'o', 't', 'h'};\n return new EnglishLetterFactory();\n\n }\n else if(lang==\"RUS\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'м','а', 'ы', 'н', 'о', 'о', 'т', 'х'};\n return new RussianLetterFactory();\n }\n\n return new EnglishLetterFactory();\n\n }",
"private List<String> getLabels(Image image) {\n\t\ttry (ImageAnnotatorClient vision = ImageAnnotatorClient.create()) {\n\n\t\t\t// Creates the request for label detection. The API requires a list, but since the storage\n\t\t\t// bucket doesn't support batch uploads, the list will have only one request per function call\n\t\t\tList<AnnotateImageRequest> requests = new ArrayList<>();\n\t\t\tFeature feat = Feature.newBuilder().setType(Type.LABEL_DETECTION).build();\n\t\t\tAnnotateImageRequest request = AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(image).build();\n\t\t\trequests.add(request);\n\n\t\t\t// Performs label detection on the image file\n\t\t\tList<AnnotateImageResponse> responses = vision.batchAnnotateImages(requests).getResponsesList();\n\n\t\t\t// Iterates through the responses, though in reality there will only be one response\n\t\t\tfor (AnnotateImageResponse res : responses) {\n\t\t\t\tif (res.hasError()) {\n\t\t\t\t\tlogger.log(Level.SEVERE, \"Error getting annotations: \" + res.getError().getMessage());\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Return the first 3 generated labels\n\t\t\t\treturn res.getLabelAnnotationsList().stream().limit(3L).map(e -> e.getDescription())\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"private void pirateRecipe(String text) {\n if (\"excitedze\".equals(text)) {\n LanguageManager languagemanager = this.mc.getLanguageManager();\n Language language = languagemanager.getLanguage(\"en_pt\");\n if (languagemanager.getCurrentLanguage().compareTo(language) == 0) {\n return;\n }\n\n languagemanager.setCurrentLanguage(language);\n this.mc.gameSettings.language = language.getCode();\n net.minecraftforge.client.ForgeHooksClient.refreshResources(this.mc, net.minecraftforge.resource.VanillaResourceType.LANGUAGES);\n this.mc.gameSettings.saveOptions();\n }\n\n }",
"public byte[] decode_text(byte[] image) {\n int length = 0;\n int offset = 32;\n // loop through 32 bytes of data to determine text length\n for (int i = 0; i < 32; ++i) // i=24 will also work, as only the 4th\n // byte contains real data\n {\n length = (length << 1) | (image[i] & 1);\n }\n\n byte[] result = new byte[length];\n\n // loop through each byte of text\n for (int b = 0; b < result.length; ++b) {\n // loop through each bit within a byte of text\n for (int i = 0; i < 8; ++i, ++offset) {\n // assign bit: [(new byte value) << 1] OR [(text byte) AND 1]\n result[b] = (byte) ((result[b] << 1) | (image[offset] & 1));\n }\n }\n return result;\n }",
"public abstract void startVoiceRecognition(String language);",
"@Override\n public void run() {\n try {\n byte[] photoData = IOUtils.toByteArray(inputStream);\n inputStream.close();\n //Mat src = Imgcodecs.imdecode(new MatOfByte(photoData), Imgcodecs.CV_LOAD_IMAGE_UNCHANGED);\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n\n\n\n// //OCR PREPROCESSING FOR FAREHA'S MODULE\n// try{\n//// Mat src = Utils.loadResource(reportAnalysisActivity.this, R.drawable.bloodf, Imgcodecs.CV_LOAD_IMAGE_GRAYSCALE);\n// //boolean ans = src.isContinuous();\n// //1. Resizing\n// double ratio = (double)src.width()/src.height();\n// if(src.width()>768){\n// int newHeight = (int)(768/ratio);\n// Imgproc.resize(src,src,new Size(768,newHeight ));\n// }\n// else if(src.height()>1024){\n// int newWidth = (int)(1024*ratio);\n// Imgproc.resize(src,src,new Size(newWidth,1024));\n// }\n//\n// //2. denoising\n// Photo.fastNlMeansDenoising(src,src,10,7,21);\n// }\n// catch(Exception e){}\n//\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n//\n Image inputImage = new Image();\n inputImage.encodeContent(photoData);\n\n Feature desiredFeature = new Feature();\n desiredFeature.setType(\"TEXT_DETECTION\");\n\n BatchAnnotateImagesRequest batchRequest =\n new BatchAnnotateImagesRequest();\n final AnnotateImageRequest request = new AnnotateImageRequest();\n request.setImage(inputImage);\n request.setFeatures(Arrays.asList(desiredFeature));\n batchRequest.setRequests(Arrays.asList(request));\n BatchAnnotateImagesResponse batchResponse = vision.images().annotate(batchRequest).execute();\n text = batchResponse.getResponses().get(0).getFullTextAnnotation();\n\n int block_number = -1;\n int current_block = 0;\n ArrayList<Vertex> block_coords = new ArrayList<Vertex>();\n\n for (Page page : text.getPages()) {\n for (Block block : page.getBlocks()) {\n\n block_number++;\n //Save vertices of all the blocks\n block_coords.add(block.getBoundingBox().getVertices().get(0));\n allBlocks.add(block);\n\n for (Paragraph paragraph : block.getParagraphs()) {\n for (Word word : paragraph.getWords()) {\n String c_word = \"\";\n for (Symbol symbol : word.getSymbols()) {\n c_word += symbol.getText();\n }\n if (c_word.equals(\"WBC\") || c_word.equals(\"RBC\") ||\n c_word.equals(\"HB\") || c_word.equals(\"Hb\") || c_word.contains(\"Hemoglobin\") || c_word.equals(\"Haemoglobin\")\n || c_word.equals(\"Hematocrit\") || c_word.equals(\"HCT\") || c_word.equals(\"MCV\") || c_word.equals(\"MCH\")\n || c_word.equals(\"MCHC\") || c_word.contains(\"Platelet\") || c_word.equals(\"PLT\") || c_word.equals(\"ESR\")\n || c_word.equals(\"LYM\") || c_word.equals(\"LYM#\") || c_word.equals(\"LYM%\") || c_word.contains(\"Lym\")\n || c_word.equals(\"NEUT#\") || c_word.contains(\"NUET%\") || c_word.equals(\"NEUT\") || c_word.contains(\"Neut\")\n || c_word.contains(\"Monocytes\") || c_word.contains(\"Eosinophils\")\n || c_word.equals(\"Mixed Cells\") ||c_word.equals(\"Basophils\") ||c_word.equals(\"Bands\") ||\n c_word.contains(\"Bilirubin\") || c_word.equals(\"ALT\") || c_word.equals(\"SGPT\") || c_word.equals(\"ALK-Phos\") || c_word.contains(\"Alk\")\n || c_word.equals(\"ALK\")) {\n\n //Store the y coords of blocks containing testnames in array if not already saved\n if (testnameBlocks_coords.isEmpty() || !testnameBlocks_coords.contains(block_coords.get(block_number)))\n testnameBlocks_coords.add(block_coords.get(block_number));\n }\n }\n }\n }\n\n }\n\n //Sort the array containing the blocks that contain the test names in an order of largest y coordinates\n Collections.sort(testnameBlocks_coords, new Comparator<Vertex>() {\n @Override\n public int compare(Vertex x1, Vertex x2) {\n int result= Integer.compare(x1.getY(), x2.getY());\n if(result==0){\n //both ys are equal so we compare the x\n result=Integer.compare(x1.getX(), x2.getX());\n }\n return result;\n }\n });\n\n //Save the names of the testnames in order in test_name array\n int blocknum = 0;\n for (int j = 0; j < testnameBlocks_coords.size(); j++) {\n for (int i = 0; i < allBlocks.size(); i++) {\n if (allBlocks.get(i).getBoundingBox().getVertices().get(0) == testnameBlocks_coords.get(j)) {\n blocknum = i; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n for (Paragraph paragraph : allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for (Word word : paragraph.getWords()) {\n String name = \"\";\n for (Symbol symbol : word.getSymbols()) {\n name += symbol.getText();\n //save the testnames in testnames array\n }\n if (name.equals(\"%\") || name.equals(\"#\") || name.equals(\"Count\") || name.equals(\",\")\n || name.equals(\"Level\")) {\n StringBuilder stringBuilder = new StringBuilder(testnames.get(testnames.size() - 1));\n stringBuilder.append(name);\n testnames.add(testnames.size() - 1, stringBuilder.toString());\n testnames.remove(testnames.size() - 1);\n }\n else if (name.equals(\"WBC\") || name.equals(\"RBC\") ||\n name.equals(\"HB\") || name.equals(\"Hb\") || name.contains(\"Hemoglobin\") || name.equals(\"Haemoglobin\")\n || name.equals(\"Hematocrit\") || name.equals(\"HCT\") || name.equals(\"MCV\") || name.equals(\"MCH\")\n || name.equals(\"MCHC\") || name.contains(\"Platelet\") || name.equals(\"PLT\") || name.equals(\"ESR\")\n || name.equals(\"LYM\") || name.equals(\"LYM#\") || name.equals(\"LYM%\") || name.contains(\"Lym\")\n || name.equals(\"NEUT#\") || name.contains(\"NUET%\") || name.equals(\"NEUT\") || name.contains(\"Neut\")\n || name.contains(\"Monocytes\") || name.contains(\"Eosinophils\")\n || name.equals(\"Mixed Cells\") ||name.equals(\"Basophils\") ||name.equals(\"Bands\") ||\n name.contains(\"Bilirubin\") || name.equals(\"ALT\") || name.equals(\"SGPT\") || name.equals(\"ALK-Phos\") || name.contains(\"Alk.\")\n || name.equals(\"ALK\"))\n testnames.add(name);\n\n }\n }\n\n }\n\n //Below is the procedure to find the values of testvalues\n int result_block_index = 0;\n int num_of_values=0;\n int diff=0;\n ArrayList<Integer> ignoreIndex=new ArrayList<Integer>();\n Boolean isFloat=true;\n float value=0;\n\n while(num_of_values<testnames.size()){\n //next block of values\n if(!testvaluesBlocks_coords.isEmpty()){\n int previous_result_block_index = result_block_index; //Index at which the value block lies\n diff = Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX())<diff && previous_result_block_index!=i){\n if(!ignoreIndex.contains(i)){\n diff= Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX());\n result_block_index=i;\n }\n\n }\n }\n }\n //first block of values\n else{\n //Getting values from te first block\n diff=Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY())<diff && block_coords.indexOf(testnameBlocks_coords.get(0))!=i){\n if(!ignoreIndex.contains(i)){\n diff= testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY();\n result_block_index=i;\n }\n\n }\n }\n }\n isFloat=false;\n for(Paragraph paragraph: allBlocks.get(result_block_index).getParagraphs()){\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n\n }\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n if(value_string.contains(\"-\")){\n isFloat=false;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n break;\n }\n try{\n value= Float.parseFloat(value_string);\n num_of_values++;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n isFloat=true;\n\n }\n catch (NumberFormatException e){\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n }\n\n\n\n\n }\n }\n\n if(isFloat){\n //Save y coordinates of value block\n testvaluesBlocks_coords.add(block_coords.get(result_block_index).getY());\n }\n }\n //sort test values coordinates array\n Collections.sort(testvaluesBlocks_coords);\n\n //save the values in an array\n for(int i=0; i<testvaluesBlocks_coords.size();i++){\n for(int j=0; j<allBlocks.size();j++){\n if(allBlocks.get(j).getBoundingBox().getVertices().get(0).getY()==testvaluesBlocks_coords.get(i)){\n blocknum=j; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n //save values in array\n for (Paragraph paragraph: allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n }\n\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n try{\n value= Float.parseFloat(value_string);\n //save the testnames in testnames array\n testValues.add(Float.parseFloat(value_string));\n }\n catch(NumberFormatException n){\n\n }\n }\n\n }\n }\n\n for (int a = 0; a < testnames.size(); a++) {\n Log.e(testnames.get(a), Float.toString(testValues.get(a)));\n }\n\n //Convert the testname and testvalues array to string so they can be passed on\n StringBuilder sb = new StringBuilder();\n StringBuilder sb2 = new StringBuilder();\n for (int i = 0; i < testnames.size(); i++) {\n sb.append(testnames.get(i)).append(\",\");\n sb2.append(testValues.get(i)).append(\",\");\n\n }\n\n //Save the values and testnames so they can be passed on to next activity\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(reportAnalysisActivity.this);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"testnames\", sb.toString());\n editor.putString(\"testvalues\", sb2.toString());\n editor.putString(\"gender\", gender);\n editor.apply();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Intent reportresultScreen = new Intent(view.getContext(), reportResult_Activity.class);\n startActivity(reportresultScreen);\n }\n });\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n done=true;\n }",
"@Override\n public String recognizeImage(final Bitmap bitmap) {\n Trace.beginSection(\"recognizeImage\");\n\n Trace.beginSection(\"preprocessBitmap\");\n // Preprocess the image data from 0-255 int to normalized float based\n // on the provided parameters.\n bitmapToInputData(bitmap);\n Trace.endSection(); // preprocessBitmap\n\n // Run the inference call.\n Trace.beginSection(\"run\");\n\n tfLite.run(imgData, tfoutput_recognize);\n\n Trace.endSection();\n postPro = new Postprocessing(tfoutput_recognize);\n predictClass = postPro.postRecognize();\n Trace.endSection(); // \"recognizeImage\"\n\n //LOGGER.w(\"\"+(System.currentTimeMillis()-startTime));\n return labels.get(predictClass);\n }",
"boolean hasLanguage();",
"List<Label> findAllByLanguage(String language);",
"public String getDescription(String lang) {\n/* 188 */ return getLangAlt(lang, \"description\");\n/* */ }",
"public String getLanguage() throws DynamicCallException, ExecutionException {\n return (String)call(\"getLanguage\").get();\n }",
"public String getPredefinedTextMessage( String language, int preDefindeMsgId );",
"public void englishlanguage() {\nSystem.out.println(\"englishlanguage\");\n\t}",
"public interface LanguageProvider {\n\tLanguageService study();\n}",
"DetectionResult getObjInImage(Mat image);",
"private void runTextRecognition(Bitmap bitmap) {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionTextDetector detector = FirebaseVision.getInstance().getVisionTextDetector();\n\n detector.detectInImage(image).addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n processTextRecognitionResult(texts);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n e.printStackTrace();\n }\n });\n }",
"private void performOCR(){\n }",
"private static String italianAnalyzer(String label) throws IOException\r\n\t{\r\n\t\t// recupero le stopWords dell'ItalianAnalyzer\r\n\t\tCharArraySet stopWords = ItalianAnalyzer.getDefaultStopSet();\r\n\t\t// andiamo a tokenizzare la label\r\n\t\tTokenStream tokenStream = new StandardTokenizer(Version.LUCENE_48, new StringReader(label));\r\n\t\t// richiamo l'Elision Filter che si occupa di elidere le lettere apostrofate\r\n\t\ttokenStream = new ElisionFilter(tokenStream, stopWords);\r\n\t\t// richiamo il LowerCaseFilter\r\n\t\ttokenStream = new LowerCaseFilter(Version.LUCENE_48, tokenStream);\r\n\t\t// richiamo lo StopFilter per togliere le stop word\r\n\t\ttokenStream = new StopFilter(Version.LUCENE_48, tokenStream, stopWords);\r\n\t\t// eseguo il processo di stemming italiano per ogni token\r\n\t\ttokenStream = new ItalianLightStemFilter(tokenStream);\r\n\t\t\r\n\t\t/*\r\n\t\t * ricostruisco la stringa in precedenza tokenizzata\r\n\t\t */\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t CharTermAttribute charTermAttribute = tokenStream.addAttribute(CharTermAttribute.class);\r\n\t tokenStream.reset();\r\n\r\n\t while (tokenStream.incrementToken()) \r\n\t {\r\n\t String term = charTermAttribute.toString();\r\n\t sb.append(term + \" \");\r\n\t }\r\n \r\n\t tokenStream.close();\r\n\t // elimino l'ultimo carattere (spazio vuoto)\r\n\t String l = sb.toString().substring(0,sb.toString().length()-1);\r\n\t \r\n\t// ritorno la label stemmata\r\n return l;\r\n\t\r\n\t}",
"private void runCloudTextRecognition(Bitmap bitmap) {\n FirebaseVisionCloudDetectorOptions options =\n new FirebaseVisionCloudDetectorOptions.Builder()\n .setModelType(FirebaseVisionCloudDetectorOptions.LATEST_MODEL)\n .setMaxResults(15)\n .build();\n mCameraButtonCloud.setEnabled(false);\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionCloudDocumentTextDetector detector = FirebaseVision.getInstance()\n .getVisionCloudDocumentTextDetector(options);\n detector.detectInImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionCloudText>() {\n @Override\n public void onSuccess(FirebaseVisionCloudText texts) {\n mCameraButtonCloud.setEnabled(true);\n processCloudTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n mCameraButtonCloud.setEnabled(true);\n e.printStackTrace();\n }\n });\n }",
"PsiFile[] findFilesWithPlainTextWords( String word);",
"public void detectLanguage(final View view)\n {\n Toast.makeText(getApplicationContext(), \"Under Construction\", Toast.LENGTH_SHORT).show();\n }",
"public BufferedImage add_text(BufferedImage image, String text) {\n // convert all items to byte arrays: image, message, message length\n byte img[] = get_byte_data(image);\n byte msg[] = text.getBytes();\n byte len[] = bit_conversion(msg.length);\n try {\n encode_text(img, len, 0); // 0 first positiong\n encode_text(img, msg, 32); // 4 bytes of space for length:\n // 4bytes*8bit = 32 bits\n }\n catch (Exception e) {\n JOptionPane.showMessageDialog(\n null,\n \"Target File cannot hold message!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n return image;\n }",
"String translate(String text, String fromLanguage, String toLanguage) throws TranslationException;",
"java.lang.String getTargetLanguageCode();",
"private void verifyTextAndLabels(){\n common.explicitWaitVisibilityElement(\"//*[@id=\\\"content\\\"]/article/h2\");\n\n //Swedish labels\n common.timeoutMilliSeconds(500);\n textAndLabelsSwedish();\n\n //Change to English\n common.selectEnglish();\n\n //English labels\n textAndLabelsEnglish();\n }",
"private ArrayList<OWLLiteral> getLabels(OWLEntity entity, OWLOntology ontology, String lang) {\n\t\tOWLDataFactory df = OWLManager.createOWLOntologyManager().getOWLDataFactory();\n\t\tOWLAnnotationProperty label = df.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI());\t\n\n\t\tArrayList<OWLLiteral> labels = new ArrayList<OWLLiteral>();\n\t\tfor (OWLAnnotation annotation : entity.getAnnotations(ontology, label)) {\n\t\t\tif (annotation.getValue() instanceof OWLLiteral) {\n\t\t\t\tOWLLiteral val = (OWLLiteral) annotation.getValue();\n\t\t\t\tif (val.hasLang(\"en\")) {\n\t\t\t\t\tlabels.add(val);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn labels;\n\t}",
"public static BufferedImage getTextImage (String text, String fontName, float fontSize) {\n\t\tBufferedImage img = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);\n\t\tGraphics2D g2d = img.createGraphics();\n\t\tFont font = ExternalResourceManager.getFont(fontName).deriveFont(fontSize);\n\t\tg2d.setFont(font);\n//\t\tnew Font\n\t\tFontMetrics fm = g2d.getFontMetrics();\n\t\tint w = fm.stringWidth(text), h = fm.getHeight();\n\t\tg2d.dispose();\n\t\t// draw image\n\t\timg = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);\n\t\tg2d = img.createGraphics();\n\t\tg2d.setFont(font);\n fm = g2d.getFontMetrics();\n g2d.setColor(Color.BLACK);\n g2d.setBackground(new Color(0, 0, 0, 0));\n g2d.drawString(text, 0, fm.getAscent());\n g2d.dispose();\n\t\treturn img;\n\t}",
"String translateEnglishToDothraki(String englishText) throws Exception\n\t{\n\t\tString urlHalf1 = \"https://api.funtranslations.com/translate/dothraki.json?text=\";\n\t\tString url = urlHalf1 + englishText;\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString jsonData = getJsonData(url);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tString translation = \"\";\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject treeObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement contents = treeObject.get(\"contents\");\n\n\t\t\tif (contents.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject contentsObject = contents.getAsJsonObject();\n\n\t\t\t\tJsonElement translateElement = contentsObject.get(\"translated\");\n\n\t\t\t\ttranslation = translateElement.getAsString();\n\t\t\t}\n\t\t}\n\n\t\treturn translation;\n\t}",
"Builder addInLanguage(Text value);",
"int getLocalizedText();",
"public static String getTranslation(String original, String originLanguage, String targetLanguage) {\n\t\tif (Options.getDebuglevel() > 1)\n\t\t\tSystem.out.println(\"Translating: \" + original);\n\t\ttry {\n\t\t\tDocument doc = Jsoup\n\t\t\t\t\t.connect(\"http://translate.reference.com/\" + originLanguage + \"/\" + targetLanguage + \"/\" + original)\n\t\t\t\t\t.userAgent(\"PlagTest\").get();\n\t\t\tElement e = doc.select(\"textarea[Placeholder=Translation]\").first();\n\t\t\tString text = e.text().trim();\n\t\t\tif (text.equalsIgnoreCase(original.trim()))\n\t\t\t\treturn null;\n\t\t\treturn text;\n\t\t} catch (Exception e1) {\n\t\t}\n\t\treturn null;\n\t}",
"default String getOriginalText() {\n return meta(\"nlpcraft:nlp:origtext\");\n }",
"public String extractText(String urlString) {\n String text = \"\";\n try {\n URL url = new URL(urlString);\n text = ArticleExtractor.INSTANCE.getText(url); \n } catch (Exception ex) {\n Logger.getLogger(TextExtractor.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return text;\n }",
"public void selectLanguage(String language) {\n\n String xpath = String.format(EST_LANGUAGE, language);\n List<WebElement> elements = languages.findElements(By.xpath(xpath));\n for (WebElement element : elements) {\n if (element.isDisplayed()) {\n element.click();\n break;\n }\n }\n }",
"com.google.ads.googleads.v6.resources.LanguageConstant getLanguageConstant();",
"@Override\n public String getText() {\n return analyzedWord;\n }",
"public String getThaiWordFromEngWord(String englishWord) {\n Cursor cursor = mDatabase.query(\n TABLE_NAME,\n new String[]{COL_THAI_WORD},\n COL_ENG_WORD + \"=?\",\n new String[]{englishWord},\n null,\n null,\n null\n );\n if (cursor.getCount() > 0) {\n cursor.moveToFirst();\n return cursor.getString(cursor.getColumnIndex(COL_THAI_WORD));\n } else {\n return englishWord;\n }\n }",
"public String classify(String text){\n\t\treturn mClassifier.classify(text).bestCategory();\n\t}",
"@Source(\"gr/grnet/pithos/resources/translate.png\")\n ImageResource selectAll();",
"public void Croppedimage(CropImage.ActivityResult result, ImageView iv, EditText et )\n {\n Uri resultUri = null; // get image uri\n if (result != null) {\n resultUri = result.getUri();\n }\n\n\n //set image to image view\n iv.setImageURI(resultUri);\n\n\n //get drawable bitmap for text recognition\n BitmapDrawable bitmapDrawable = (BitmapDrawable) iv.getDrawable();\n\n Bitmap bitmap = bitmapDrawable.getBitmap();\n\n TextRecognizer recognizer = new TextRecognizer.Builder(getApplicationContext()).build();\n\n if(!recognizer.isOperational())\n {\n Toast.makeText(this, \"Error No Text To Recognize\", Toast.LENGTH_LONG).show();\n }\n else\n {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n SparseArray<TextBlock> items = recognizer.detect(frame);\n StringBuilder ab = new StringBuilder();\n\n //get text from ab until there is no text\n for(int i = 0 ; i < items.size(); i++)\n {\n TextBlock myItem = items.valueAt(i);\n ab.append(myItem.getValue());\n\n }\n\n //set text to edit text\n et.setText(ab.toString());\n }\n\n }",
"@DISPID(-2147413103)\n @PropGet\n java.lang.String lang();",
"public String getLocale () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"private String getPhrase(String key) {\r\n if (\"pl\".equals(System.getProperty(\"user.language\")) && phrasesPL.containsKey(key)) {\r\n return phrasesPL.get(key);\r\n } else if (phrasesEN.containsKey(key)) {\r\n return phrasesEN.get(key);\r\n }\r\n return \"Translation not found!\";\r\n }",
"public void setLanguage(String language);",
"public String detectObject(Bitmap bitmap) {\n results = classifierObject.recognizeImage(bitmap);\n\n // Toast.makeText(context, results.toString(), Toast.LENGTH_LONG).show();\n return String.valueOf(results.toString());\n }",
"@Override\n protected int onIsLanguageAvailable(String lang, String country, String variant) {\n if (\"eng\".equals(lang)) {\n // We support two specific robot languages, the british robot language\n // and the american robot language.\n if (\"USA\".equals(country) || \"GBR\".equals(country)) {\n // If the engine supported a specific variant, we would have\n // something like.\n //\n // if (\"android\".equals(variant)) {\n // return TextToSpeech.LANG_COUNTRY_VAR_AVAILABLE;\n // }\n return TextToSpeech.LANG_COUNTRY_AVAILABLE;\n }\n\n // We support the language, but not the country.\n return TextToSpeech.LANG_AVAILABLE;\n }\n\n return TextToSpeech.LANG_NOT_SUPPORTED;\n }",
"String text();",
"public WordInfo searchWord(String word) {\n\t\tSystem.out.println(\"Dic:SearchWord: \"+word);\n\n\t\tDocument doc;\n\t\ttry {\n\t\t\tdoc = Jsoup.connect(\"https://dictionary.cambridge.org/dictionary/english-vietnamese/\" + word).get();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\tElements elements = doc.select(\".dpos-h.di-head.normal-entry\");\n\t\tif (elements.isEmpty()) {\n\t\t\tSystem.out.println(\" not found\");\n\t\t\treturn null;\n\t\t}\n\n\t\tWordInfo wordInfo = new WordInfo(word);\n\n\t\t// Word\n\t\telements = doc.select(\".tw-bw.dhw.dpos-h_hw.di-title\");\n\n\t\tif (elements.size() == 0) {\n\t\t\tSystem.out.println(\" word not found in doc!\");\n\t\t\treturn null;\n\t\t}\n\n\t\twordInfo.setWordDictionary(elements.get(0).html());\n\n\t\t// Type\n\t\telements = doc.select(\".pos.dpos\");\n\n\t\tif(elements.size() > 0) {\n\t\t\twordInfo.setType(WordInfo.getTypeShort(elements.get(0).html()));\n//\t\t\tif (wordInfo.getTypeShort().equals(\"\"))\n//\t\t\t\tSystem.out.println(\" typemis: \"+wordInfo.getType());\n\t\t}\n\n\t\t// Pronoun\n\t\telements = doc.select(\".ipa.dipa\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setAPI(\"/\"+elements.get(0).html()+\"/\");\n\n\t\t// Trans\n\t\telements = doc.select(\".trans.dtrans\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setTrans(elements.get(0).html());\n\n\t\tSystem.out.println(\" found\");\n\t\treturn wordInfo;\n\t}"
]
| [
"0.6340444",
"0.5907014",
"0.5881825",
"0.5613604",
"0.5501345",
"0.5476807",
"0.54720134",
"0.5439289",
"0.5439289",
"0.5422724",
"0.5412727",
"0.5398816",
"0.53872037",
"0.53670835",
"0.5357576",
"0.5357576",
"0.5357576",
"0.5356866",
"0.53034747",
"0.5297329",
"0.5260379",
"0.5254473",
"0.5246585",
"0.5228318",
"0.52282864",
"0.51628226",
"0.51364416",
"0.5131521",
"0.5125658",
"0.5094378",
"0.5072984",
"0.50591296",
"0.5053911",
"0.5033745",
"0.5029701",
"0.5023699",
"0.49775946",
"0.49752378",
"0.49746957",
"0.49692988",
"0.49669984",
"0.49603295",
"0.494737",
"0.49402708",
"0.4936638",
"0.49160838",
"0.49070477",
"0.490414",
"0.4901063",
"0.48966298",
"0.48771858",
"0.4871494",
"0.48709062",
"0.48640007",
"0.4860736",
"0.48604217",
"0.48568577",
"0.48375824",
"0.4816498",
"0.4812896",
"0.47998497",
"0.476058",
"0.47586524",
"0.47517806",
"0.4735092",
"0.47282943",
"0.47255528",
"0.46790475",
"0.46785977",
"0.46641326",
"0.46611255",
"0.46398386",
"0.46395934",
"0.46347702",
"0.46280068",
"0.46261424",
"0.46224535",
"0.46215943",
"0.46206397",
"0.46187946",
"0.46137336",
"0.4603326",
"0.46020162",
"0.45985487",
"0.4598176",
"0.459762",
"0.45945558",
"0.45927325",
"0.45888606",
"0.4577679",
"0.4577485",
"0.45715407",
"0.45659322",
"0.45604816",
"0.45601782",
"0.4558132",
"0.45481235",
"0.4547136",
"0.4546162",
"0.45450872",
"0.4538884"
]
| 0.0 | -1 |
Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. | public Observable<ServiceResponse<OCRInner>> oCRFileInputWithServiceResponseAsync(String language, byte[] imageStream, Boolean cacheImage, Boolean enhanced) {
if (this.client.baseUrl() == null) {
throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null.");
}
if (language == null) {
throw new IllegalArgumentException("Parameter language is required and cannot be null.");
}
if (imageStream == null) {
throw new IllegalArgumentException("Parameter imageStream is required and cannot be null.");
}
String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl());
RequestBody imageStreamConverted = RequestBody.create(MediaType.parse("image/gif"), imageStream);
return service.oCRFileInput(language, cacheImage, enhanced, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<OCRInner>>>() {
@Override
public Observable<ServiceResponse<OCRInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<OCRInner> clientResponse = oCRFileInputDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String detectLanguage(String text) {\n\t\treturn dictionary.detectLanguage(text);\n\t}",
"public boolean translateImageToText();",
"@SuppressWarnings(\"static-access\")\n\tpublic void detection(Request text) {\n\t\t//Fichiertxt fichier;\n\t\ttry {\t\t\t\t\t\n\t\t\t//enregistrement et affichage de la langue dans une variable lang\n\t\t\ttext.setLang(identifyLanguage(text.getCorpText()));\n\t\t\t//Ajoute le fichier traité dans la Base\n\t\t\tajouterTexte(text);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"fichier texte non trouvé\");\n\t e.printStackTrace();\n\t\t}\n\t}",
"public MashapeResponse<JSONObject> classifytext(String lang, String text) {\n return classifytext(lang, text, \"\");\n }",
"static WordList get(Language language) {\n return switch (language) {\n case ENGLISH -> readResource(\"bip39_english.txt\");\n };\n }",
"void readText(final Bitmap imageBitmap){\n\t\tif(imageBitmap != null) {\n\t\t\t\n\t\t\tTextRecognizer textRecognizer = new TextRecognizer.Builder(this).build();\n\t\t\t\n\t\t\tif(!textRecognizer.isOperational()) {\n\t\t\t\t// Note: The first time that an app using a Vision API is installed on a\n\t\t\t\t// device, GMS will download a native libraries to the device in order to do detection.\n\t\t\t\t// Usually this completes before the app is run for the first time. But if that\n\t\t\t\t// download has not yet completed, then the above call will not detect any text,\n\t\t\t\t// barcodes, or faces.\n\t\t\t\t// isOperational() can be used to check if the required native libraries are currently\n\t\t\t\t// available. The detectors will automatically become operational once the library\n\t\t\t\t// downloads complete on device.\n\t\t\t\tLog.w(TAG, \"Detector dependencies are not yet available.\");\n\t\t\t\t\n\t\t\t\t// Check for low storage. If there is low storage, the native library will not be\n\t\t\t\t// downloaded, so detection will not become operational.\n\t\t\t\tIntentFilter lowstorageFilter = new IntentFilter(Intent.ACTION_DEVICE_STORAGE_LOW);\n\t\t\t\tboolean hasLowStorage = registerReceiver(null, lowstorageFilter) != null;\n\t\t\t\t\n\t\t\t\tif (hasLowStorage) {\n\t\t\t\t\tToast.makeText(this,\"Low Storage\", Toast.LENGTH_LONG).show();\n\t\t\t\t\tLog.w(TAG, \"Low Storage\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tFrame imageFrame = new Frame.Builder()\n\t\t\t\t\t.setBitmap(imageBitmap)\n\t\t\t\t\t.build();\n\t\t\t\n\t\t\tSparseArray<TextBlock> textBlocks = textRecognizer.detect(imageFrame);\n\t\t\tdata.setText(\"\");\n\t\t\tfor (int i = 0; i < textBlocks.size(); i++) {\n\t\t\t\tTextBlock textBlock = textBlocks.get(textBlocks.keyAt(i));\n\t\t\t\tPoint[] points = textBlock.getCornerPoints();\n\t\t\t\tLog.i(TAG, textBlock.getValue());\n\t\t\t\tString corner = \"\";\n\t\t\t\tfor(Point point : points){\n\t\t\t\t\tcorner += point.toString();\n\t\t\t\t}\n\t\t\t\t//data.setText(data.getText() + \"\\n\" + corner);\n\t\t\t\tdata.setText(data.getText()+ \"\\n \"+ textBlock.getValue() + \" \\n\" );\n\t\t\t\t// Do something with value\n /*List<? extends Text> textComponents = textBlock.getComponents();\n for(Text currentText : textComponents) {\n // Do your thing here }\n mImageDetails.setText(mImageDetails.getText() + \"\\n\" + currentText);\n }*/\n\t\t\t}\n\t\t}\n\t}",
"public String getEnglish()\n {\n if (spanishWord.substring(0,3).equals(\"el \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n else if (spanishWord.substring(0, 3).equals(\"la \"))\n {\n spanishWord = spanishWord.substring(3, spanishWord.length());\n }\n if (spanishWord.equals(\"estudiante\"))\n {\n return \"student\"; \n }\n else if (spanishWord.equals(\"aprender\"))\n {\n return \"to learn\";\n }\n else if (spanishWord.equals(\"entender\"))\n {\n return\"to understand\";\n }\n else if (spanishWord.equals(\"verde\"))\n {\n return \"green\";\n }\n else\n {\n return null;\n }\n }",
"java.lang.String getLanguage();",
"java.lang.String getLanguage();",
"private void detextTextFromImage(Bitmap imageBitmap) {\n\n\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(imageBitmap);\n\n FirebaseVisionTextRecognizer firebaseVisionTextRecognizer = FirebaseVision.getInstance().getCloudTextRecognizer();\n\n firebaseVisionTextRecognizer.processImage(image)\n .addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText firebaseVisionText) {\n String text = firebaseVisionText.getText();\n\n if (text.isEmpty() || text == null)\n Toast.makeText(ctx, \"Can not identify. Try again!\", Toast.LENGTH_SHORT).show();\n\n else {\n\n startTranslateIntent(text);\n }\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n e.printStackTrace();\n }\n });\n\n\n }",
"public synchronized Result process(String text, String lang) {\n // Check that service has been initialized.\n if (!this.initialized) {\n logInitializationError();\n return null;\n }\n this.cas.reset();\n this.cas.setDocumentText(text);\n if (lang != null) {\n this.cas.setDocumentLanguage(lang);\n }\n try {\n this.ae.process(this.cas);\n } catch (AnalysisEngineProcessException e) {\n getLogger().log(Level.SEVERE, \"\", e);\n return null;\n }\n return this.resultExtractor.getResult(this.cas, this.serviceSpec);\n }",
"private static AnalysisResults.Builder retrieveText(ByteString imageBytes) throws IOException {\n AnalysisResults.Builder analysisBuilder = new AnalysisResults.Builder();\n\n Image image = Image.newBuilder().setContent(imageBytes).build();\n ImmutableList<Feature> features =\n ImmutableList.of(Feature.newBuilder().setType(Feature.Type.TEXT_DETECTION).build(),\n Feature.newBuilder().setType(Feature.Type.LOGO_DETECTION).build());\n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addAllFeatures(features).setImage(image).build();\n ImmutableList<AnnotateImageRequest> requests = ImmutableList.of(request);\n\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n BatchAnnotateImagesResponse batchResponse = client.batchAnnotateImages(requests);\n\n if (batchResponse.getResponsesList().isEmpty()) {\n return analysisBuilder;\n }\n\n AnnotateImageResponse response = Iterables.getOnlyElement(batchResponse.getResponsesList());\n\n if (response.hasError()) {\n return analysisBuilder;\n }\n\n // Add extracted raw text to builder.\n if (!response.getTextAnnotationsList().isEmpty()) {\n // First element has the entire raw text from the image.\n EntityAnnotation textAnnotation = response.getTextAnnotationsList().get(0);\n\n String rawText = textAnnotation.getDescription();\n analysisBuilder.setRawText(rawText);\n }\n\n // If a logo was detected with a confidence above the threshold, use it to set the store.\n if (!response.getLogoAnnotationsList().isEmpty()\n && response.getLogoAnnotationsList().get(0).getScore()\n > LOGO_DETECTION_CONFIDENCE_THRESHOLD) {\n String store = response.getLogoAnnotationsList().get(0).getDescription();\n analysisBuilder.setStore(store);\n }\n } catch (ApiException e) {\n // Return default builder if image annotation request failed.\n return analysisBuilder;\n }\n\n return analysisBuilder;\n }",
"public java.lang.String getLanguage() {\n return _courseImage.getLanguage();\n }",
"public void ocrExtraction(BufferedImage image) {\n\t\tFile outputfile = new File(\"temp.png\");\n\t\toutputfile.deleteOnExit();\n\t\tString ocrText = \"\", currLine = \"\";\n\t\ttry {\n\t\t\tImageIO.write(image, \"png\", outputfile);\n\n\t\t\t// System call to Tesseract OCR\n\t\t\tRuntime r = Runtime.getRuntime();\n\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText -psm 6\");\n//\t\t\tProcess p = r.exec(\"tesseract temp.png ocrText\");\n\t\t\tp.waitFor();\n\n\t\t\t// Read text file generated by tesseract\n\t\t\tFile f = new File(\"ocrText.txt\");\n\t\t\tf.deleteOnExit();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\t\t\n\t\t\twhile ((currLine = br.readLine()) != null) {\n\t\t\t\tocrText += (currLine + \" \");\n\t\t\t}\n\t\t\tif(ocrText.trim().isEmpty()) {\n\t\t\t\tocrText = \"OCR_FAIL\";\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttextField.setText(ocrText.trim());\n\t\ttextField.requestFocus();\n\t\ttextField.selectAll();\n\t}",
"String getLanguage();",
"String getLanguage();",
"String getLanguage();",
"public String getTitile(String language) {\n if (language.startsWith(\"e\")) {\n return enTitle;\n } else {\n return localTitle;\n }\n }",
"public String scanText(BufferedImage image) throws IOException {\n File tmpImgFile = File.createTempFile(\"tmpImg\", \".jpg\");\n ImageIO.write(image, \"jpg\", tmpImgFile);\n String rawData = TesseractWrapper.runTesseract(tmpImgFile.getAbsolutePath());\n tmpImgFile.delete();\n return rawData;\n }",
"public MashapeResponse<JSONObject> classifytext(String lang, String text, String exclude) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n if (lang != null && !lang.equals(\"\")) {\n\tparameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n\tparameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n\tparameters.put(\"exclude\", exclude);\n }\n \n \n return (MashapeResponse<JSONObject>) HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers);\n }",
"protected VideoText[] analyze(File imageFile, String id) throws TextAnalyzerException {\n boolean languagesInstalled;\n if (dictionaryService.getLanguages().length == 0) {\n languagesInstalled = false;\n logger.warn(\"There are no language packs installed. All text extracted from video will be considered valid.\");\n } else {\n languagesInstalled = true;\n }\n\n List<VideoText> videoTexts = new ArrayList<VideoText>();\n TextFrame textFrame = null;\n try {\n textFrame = textExtractor.extract(imageFile);\n } catch (IOException e) {\n logger.warn(\"Error reading image file {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n } catch (TextExtractorException e) {\n logger.warn(\"Error extracting text from {}: {}\", imageFile, e.getMessage());\n throw new TextAnalyzerException(e);\n }\n\n int i = 1;\n for (TextLine line : textFrame.getLines()) {\n VideoText videoText = new VideoTextImpl(id + \"-\" + i++);\n videoText.setBoundary(line.getBoundaries());\n Textual text = null;\n if (languagesInstalled) {\n String[] potentialWords = line.getText() == null ? new String[0] : line.getText().split(\"\\\\W\");\n String[] languages = dictionaryService.detectLanguage(potentialWords);\n if (languages.length == 0) {\n // There are languages installed, but these words are part of one of those languages\n logger.debug(\"No languages found for '{}'.\", line.getText());\n continue;\n } else {\n String language = languages[0];\n DICT_TOKEN[] tokens = dictionaryService.cleanText(potentialWords, language);\n StringBuilder cleanLine = new StringBuilder();\n for (int j = 0; j < potentialWords.length; j++) {\n if (tokens[j] == DICT_TOKEN.WORD) {\n if (cleanLine.length() > 0) {\n cleanLine.append(\" \");\n }\n cleanLine.append(potentialWords[j]);\n }\n }\n // TODO: Ensure that the language returned by the dictionary is compatible with the MPEG-7 schema\n text = new TextualImpl(cleanLine.toString(), language);\n }\n } else {\n logger.debug(\"No languages installed. For better results, please install at least one language pack\");\n text = new TextualImpl(line.getText());\n }\n videoText.setText(text);\n videoTexts.add(videoText);\n }\n return videoTexts.toArray(new VideoText[videoTexts.size()]);\n }",
"public List<Result> recognize(IplImage image);",
"public static String getImgText(final String imageLocation) {\n\n return getImgText(new File(imageLocation));\n }",
"public Thread classifytext(String lang, String text, String exclude, MashapeCallback<JSONObject> callback) {\n Map<String, Object> parameters = new HashMap<String, Object>();\n \n if (lang != null && !lang.equals(\"\")) {\n \n parameters.put(\"lang\", lang);\n }\n \n \n if (text != null && !text.equals(\"\")) {\n \n parameters.put(\"text\", text);\n }\n \n \n if (exclude != null && !exclude.equals(\"\")) {\n \n parameters.put(\"exclude\", exclude);\n }\n \n return HttpClient.doRequest(JSONObject.class,\n HttpMethod.POST,\n \"https://\" + PUBLIC_DNS + \"/sentiment/current/classify_text/\",\n parameters,\n ContentType.FORM,\n ResponseType.JSON,\n authenticationHandlers,\n callback);\n }",
"private String getLanguage(Prediction prediction, String content)\n throws IOException {\n Preconditions.checkNotNull(prediction);\n Preconditions.checkNotNull(content);\n\n Input input = new Input();\n Input.InputInput inputInput = new Input.InputInput();\n inputInput.set(\"csvInstance\", Lists.newArrayList(content));\n input.setInput(inputInput);\n Output result = prediction.trainedmodels().predict(Utils.getProjectId(),\n Constants.MODEL_ID, input).execute();\n return result.getOutputLabel();\n }",
"public Thread classifytext(String lang, String text, MashapeCallback<JSONObject> callback) {\n return classifytext(lang, text, \"\", callback);\n }",
"public static String getImgText(final File file) {\n\n final ITesseract instance = new Tesseract();\n try {\n\n return instance.doOCR(file);\n } catch (TesseractException e) {\n\n e.getMessage();\n return \"Error while reading image\";\n }\n }",
"private String autoDetectLanguage(ArrayList<File> progFiles) {\n for (File f : progFiles) {\n String f_extension = getFileExtension(f).toLowerCase();\n if (Arrays.asList(IAGConstant.PYTHON_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_PYTHON3;\n }\n if (Arrays.asList(IAGConstant.CPP_EXTENSIONS).contains(f_extension)) {\n return IAGConstant.LANGUAGE_CPP;\n }\n }\n return IAGConstant.LANGUAGE_UNKNOWN;\n }",
"private String html2safetynet(String text, String language) {\n\n // Convert from html to plain text\n text = TextUtils.html2txt(text, true);\n\n // Remove separator between positions\n text = PositionUtils.replaceSeparator(text, \" \");\n\n // Replace positions with NAVTEX versions\n PositionAssembler navtexPosAssembler = PositionAssembler.newNavtexPositionAssembler();\n text = PositionUtils.updatePositionFormat(text, navtexPosAssembler);\n\n // Remove verbose words, such as \"the\", from the text\n text = TextUtils.removeWords(text, SUPERFLUOUS_WORDS);\n\n // NB: unlike NAVTEX, we do not split into 40-character lines\n\n return text.toUpperCase();\n }",
"private String tesseract(Bitmap bitmap) {\n return \"NOT IMPLEMENTED\";\n }",
"public static String customTextFilter(BufferedImage img, String txt) {\n\n int newHeight = img.getHeight() / 200;\n int newWidth = img.getWidth() / 200;\n String html = \"\";\n int aux = 0;\n\n for (int i = 0; i < 200; i++) {\n if (i > 0) {\n html += \"\\n<br>\\n\";\n }\n for (int j = 0; j < 200; j++) {\n if (aux == txt.length()) {\n html += \"<b> </b>\";\n aux = 0;\n } else {\n Color c = regionAvgColor(j * newWidth, (j * newWidth) + newWidth,\n i * newHeight, (i * newHeight) + newHeight, newHeight,\n newWidth, img);\n html += \"<b style='color:rgb(\" + c.getRed() + \",\"\n + c.getGreen() + \",\" + c.getBlue() + \");'>\"\n + txt.substring(aux, aux + 1) + \"</b>\";\n aux++;\n }\n }\n }\n String style = \"body{\\nfont-size: 15px\\n}\";\n String title = \"Imagen Texto\";\n int styleIndex = HTML.indexOf(\"?S\"), titleIndex = HTML.indexOf(\"?T\"),\n bodyIndex = HTML.indexOf(\"?B\");\n String htmlFile = HTML.substring(0, styleIndex) + style;\n htmlFile += HTML.substring(styleIndex + 2, titleIndex) + title;\n htmlFile += HTML.substring(titleIndex + 2, bodyIndex) + html;\n htmlFile += HTML.substring(bodyIndex + 2);\n return htmlFile;\n }",
"private String getTranslation(String language, String id)\n {\n Iterator<Translation> translations = mTranslationState.iterator();\n \n while (translations.hasNext()) {\n Translation translation = translations.next();\n \n if (translation.getLang().equals(language)) {\n Iterator<TranslationText> texts = translation.texts.iterator();\n \n while (texts.hasNext()) {\n TranslationText text = texts.next();\n \n if (text.getId().equals(id)) {\n text.setUsed(true);\n return text.getValue();\n }\n }\n }\n }\n \n return \"[Translation Not Available]\";\n }",
"private String getLanguage(String fileName)\n {\n if (fileName.endsWith(\".C\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".Java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".CPP\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".Class\"))\n {\n return \"Java\";\n }\n if (fileName.endsWith(\".c\"))\n {\n return \"C\";\n }\n else if (fileName.endsWith(\".java\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".cpp\"))\n {\n return \"C++\";\n }\n else if (fileName.endsWith(\".class\"))\n {\n return \"Java\";\n }\n else if (fileName.endsWith(\".h\"))\n {\n return \"C\";\n }\n else\n {\n return \"??\";\n }\n }",
"@DISPID(-2147413012)\n @PropGet\n java.lang.String language();",
"public String getLanguage();",
"public String detectAndDecode(Mat img) {\n return detectAndDecode_2(nativeObj, img.nativeObj);\n }",
"String getLang();",
"private void processTextRecognitionResult(FirebaseVisionText texts) {\n List<FirebaseVisionText.Block> blocks = texts.getBlocks();\n if (blocks.size() == 0) {\n Toast.makeText(getApplicationContext(), \"onDevice: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n for (int i = 0; i < blocks.size(); i++) {\n List<FirebaseVisionText.Line> lines = blocks.get(i).getLines();\n for (int j = 0; j < lines.size(); j++) {\n List<FirebaseVisionText.Element> elements = lines.get(j).getElements();\n for (int k = 0; k < elements.size(); k++) {\n GraphicOverlay.Graphic textGraphic = new TextGraphic(mGraphicOverlay, elements.get(k));\n mGraphicOverlay.add(textGraphic);\n\n }\n }\n }\n }",
"@Override\n public DetectDominantLanguageResult detectDominantLanguage(DetectDominantLanguageRequest request) {\n request = beforeClientExecution(request);\n return executeDetectDominantLanguage(request);\n }",
"@Override\n public void onSuccess(Text visionText) {\n\n Log.d(TAG, \"onSuccess: \");\n extractText(visionText);\n }",
"public String getText() {\n if (Language.isEnglish()) {\n return textEn;\n } else {\n return textFr;\n }\n }",
"public Elements getTextFromWeb(String lang, String word) {\n\t\tToast t = Toast.makeText(this, \"Buscando...\", Toast.LENGTH_SHORT);\n\t\tt.setGravity(Gravity.TOP, 0, 0); // el show lo meto en el try\n\t\tseleccionado.setText(\"\");\n\t\tresultados.clear();\n\t\tlv.setAdapter(new ArrayAdapter<String>(this, R.layout.my_item_list,\n\t\t\t\tresultados));\n\n\t\tElements res = null;\n\t\tif (!networkAvailable(getApplicationContext())) {\n\t\t\tToast.makeText(this, \"¡Necesitas acceso a internet!\",\n\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t} else {\n\t\t\tString url = \"http://www.wordreference.com/es/translation.asp?tranword=\";\n\t\t\tif (lang == \"aEspa\") {\n\t\t\t\turl += word;\n\t\t\t\tt.show();\n\t\t\t\t/* De ingles a español */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarWR(doc);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\turl = \"http://www.wordreference.com/es/en/translation.asp?spen=\"\n\t\t\t\t\t\t+ word;\n\t\t\t\tt.show();\n\t\t\t\t/* De español a ingles */\n\t\t\t\ttry {\n\t\t\t\t\tDocument doc = Jsoup.connect(url).get();\n\t\t\t\t\t/* Concise Oxford Spanish Dictionary © 2009 Oxford */\n\t\t\t\t\tif (doc.toString().contains(\n\t\t\t\t\t\t\t\"Concise Oxford Spanish Dictionary\")) {\n\t\t\t\t\t\tres = procesarOxford2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* Diccionario Espasa Concise © 2000 Espasa Calpe */\n\t\t\t\t\telse if (doc.toString().contains(\n\t\t\t\t\t\t\t\"Diccionario Espasa Concise\")) {\n\t\t\t\t\t\tres = procesarEspasa2(doc);\n\t\t\t\t\t}\n\t\t\t\t\t/* WordReference English-Spanish Dictionary © 2012 */\n\t\t\t\t\t// no hay\n\t\t\t\t\t// else if (doc.toString().contains(\n\t\t\t\t\t// \"WordReference English-Spanish Dictionary\")) {\n\t\t\t\t\t// res = procesarWR2(doc);\n\t\t\t\t\t// }\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tToast.makeText(this, \"Error getting text from web\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}",
"CLanguage getClanguage();",
"private Spannable applyWordMarkup(String text) {\n SpannableStringBuilder ssb = new SpannableStringBuilder();\n int languageCodeStart = 0;\n int untranslatedStart = 0;\n\n int textLength = text.length();\n for (int i = 0; i < textLength; i++) {\n char c = text.charAt(i);\n if (c == '.') {\n if (++i < textLength) {\n c = text.charAt(i);\n if (c == '.') {\n ssb.append(c);\n } else if (c == 'c') {\n languageCodeStart = ssb.length();\n } else if (c == 'C') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.language_code_tag),\n languageCodeStart, ssb.length(), 0);\n languageCodeStart = ssb.length();\n } else if (c == 'u') {\n untranslatedStart = ssb.length();\n } else if (c == 'U') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.untranslated_word),\n untranslatedStart, ssb.length(), 0);\n untranslatedStart = ssb.length();\n } else if (c == '0') {\n Resources res = getResources();\n ssb.append(res.getString(R.string.no_translations));\n }\n }\n } else\n ssb.append(c);\n }\n\n return ssb;\n }",
"public Future<String> getLanguage() throws DynamicCallException, ExecutionException {\n return call(\"getLanguage\");\n }",
"private void processCloudTextRecognitionResult(FirebaseVisionCloudText text) {\n // Task completed successfully\n if (text == null) {\n Toast.makeText(getApplicationContext(), \"onCloud: No text found\", Toast.LENGTH_SHORT).show();\n return;\n }\n mGraphicOverlay.clear();\n List<FirebaseVisionCloudText.Page> pages = text.getPages();\n for (int i = 0; i < pages.size(); i++) {\n FirebaseVisionCloudText.Page page = pages.get(i);\n List<FirebaseVisionCloudText.Block> blocks = page.getBlocks();\n for (int j = 0; j < blocks.size(); j++) {\n List<FirebaseVisionCloudText.Paragraph> paragraphs = blocks.get(j).getParagraphs();\n for (int k = 0; k < paragraphs.size(); k++) {\n FirebaseVisionCloudText.Paragraph paragraph = paragraphs.get(k);\n List<FirebaseVisionCloudText.Word> words = paragraph.getWords();\n for (int l = 0; l < words.size(); l++) {\n GraphicOverlay.Graphic cloudTextGraphic = new CloudTextGraphic(mGraphicOverlay, words.get(l));\n mGraphicOverlay.add(cloudTextGraphic);\n }\n }\n }\n }\n }",
"public interface WordAnalyser {\n\n /**\n * Gets the bounds of all words it encounters in the image\n * \n */\n List<Rectangle> getWordBoundaries();\n\n /**\n * Gets the partial binary pixel matrix of the given word.\n * \n * @param wordBoundary\n * The bounds of the word\n */\n BinaryImage getWordMatrix(Rectangle wordBoundary);\n\n}",
"public void setLanguage(java.lang.String language) {\n _courseImage.setLanguage(language);\n }",
"private void runTextRecognition() {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(mSelectedImage);\n FirebaseVisionTextRecognizer recognizer = FirebaseVision.getInstance()\n .getOnDeviceTextRecognizer();\n //mTextButton.setEnabled(false);\n recognizer.processImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n //mTextButton.setEnabled(true);\n processTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n //mTextButton.setEnabled(true);\n e.printStackTrace();\n }\n });\n }",
"Language findByName(String name);",
"private Word askForWord(Language lastLanguage) throws LanguageException {\n Language language = askForLanguage();\r\n if(language == null || language.equals(lastLanguage)) {\r\n throw new LanguageException();\r\n }\r\n // Step 2 : Name of the word\r\n String name = askForLine(\"Name of the word : \");\r\n Word searchedWord = czech.searchWord(language, name);\r\n if(searchedWord != null) {\r\n System.out.println(\"Word \" + name + \" found !\");\r\n return searchedWord;\r\n }\r\n System.out.println(\"Word \" + name + \" not found.\");\r\n // Step 3 : Gender/Phonetic of the word\r\n String gender = askForLine(\"\\tGender of the word : \");\r\n String phonetic = askForLine(\"\\tPhonetic of the word : \");\r\n // Last step : Creation of the word\r\n Word word = new Word(language, name, gender, phonetic);\r\n int id = czech.getListWords(language).get(-1).getId() + 1;\r\n word.setId(id);\r\n czech.getListWords(language).put(-1, word);\r\n return word;\r\n }",
"public String findExtension(String lang) {\n if (lang == null)\n return \".txt\";\n else if (lang.equals(\"C++\"))\n return \".cpp\";\n else if (lang.equals(\"C\"))\n return \".c\";\n else if (lang.equals(\"PYT\"))\n return \".py\";\n else if (lang.equals(\"JAV\"))\n return \".java\";\n else\n return \".txt\";\n }",
"public static String RunOCR(Bitmap bitview, Context context, String activityName) {\n TextRecognizer textRecognizer = new TextRecognizer.Builder(context).build();\n if(!textRecognizer.isOperational()){\n // Note: The first time that an app using a Vision API is installed on a\n // device, GMS will download a native libraries to the device in order to do detection.\n // Usually this completes before the app is run for the first time. But if that\n // download has not yet completed, then the above call will not detect any text,\n // barcodes, or faces.\n //\n // isOperational() can be used to check if the required native libraries are currently\n // available. The detectors will automatically become operational once the library\n // downloads complete on device.\n Log.w(activityName, \"Detector dependencies are not yet available\");\n return \"FAILED -Text Recognizer ERROR-\";\n } else {\n Frame frame = new Frame.Builder().setBitmap(bitview).build();\n SparseArray<TextBlock> items = textRecognizer.detect(frame);\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i< items.size(); ++i){\n TextBlock item = items.valueAt(i);\n stringBuilder.append(item.getValue());\n stringBuilder.append(\"\\n\");\n }\n String ocr = stringBuilder.toString();\n Log.i(activityName, \"List of OCRs:\\n\" +ocr+\"\\n\");\n return ocr;\n }\n }",
"public AbstractLetterFactory decideLanguage(String lang){\n if(lang==\"ENG\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'m', 'a', 'y', 'n', 'o', 'o', 't', 'h'};\n return new EnglishLetterFactory();\n\n }\n else if(lang==\"RUS\"){\n Parameters.TARGET_CHROMOSOME = new char[]{'м','а', 'ы', 'н', 'о', 'о', 'т', 'х'};\n return new RussianLetterFactory();\n }\n\n return new EnglishLetterFactory();\n\n }",
"private List<String> getLabels(Image image) {\n\t\ttry (ImageAnnotatorClient vision = ImageAnnotatorClient.create()) {\n\n\t\t\t// Creates the request for label detection. The API requires a list, but since the storage\n\t\t\t// bucket doesn't support batch uploads, the list will have only one request per function call\n\t\t\tList<AnnotateImageRequest> requests = new ArrayList<>();\n\t\t\tFeature feat = Feature.newBuilder().setType(Type.LABEL_DETECTION).build();\n\t\t\tAnnotateImageRequest request = AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(image).build();\n\t\t\trequests.add(request);\n\n\t\t\t// Performs label detection on the image file\n\t\t\tList<AnnotateImageResponse> responses = vision.batchAnnotateImages(requests).getResponsesList();\n\n\t\t\t// Iterates through the responses, though in reality there will only be one response\n\t\t\tfor (AnnotateImageResponse res : responses) {\n\t\t\t\tif (res.hasError()) {\n\t\t\t\t\tlogger.log(Level.SEVERE, \"Error getting annotations: \" + res.getError().getMessage());\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Return the first 3 generated labels\n\t\t\t\treturn res.getLabelAnnotationsList().stream().limit(3L).map(e -> e.getDescription())\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"private void pirateRecipe(String text) {\n if (\"excitedze\".equals(text)) {\n LanguageManager languagemanager = this.mc.getLanguageManager();\n Language language = languagemanager.getLanguage(\"en_pt\");\n if (languagemanager.getCurrentLanguage().compareTo(language) == 0) {\n return;\n }\n\n languagemanager.setCurrentLanguage(language);\n this.mc.gameSettings.language = language.getCode();\n net.minecraftforge.client.ForgeHooksClient.refreshResources(this.mc, net.minecraftforge.resource.VanillaResourceType.LANGUAGES);\n this.mc.gameSettings.saveOptions();\n }\n\n }",
"public byte[] decode_text(byte[] image) {\n int length = 0;\n int offset = 32;\n // loop through 32 bytes of data to determine text length\n for (int i = 0; i < 32; ++i) // i=24 will also work, as only the 4th\n // byte contains real data\n {\n length = (length << 1) | (image[i] & 1);\n }\n\n byte[] result = new byte[length];\n\n // loop through each byte of text\n for (int b = 0; b < result.length; ++b) {\n // loop through each bit within a byte of text\n for (int i = 0; i < 8; ++i, ++offset) {\n // assign bit: [(new byte value) << 1] OR [(text byte) AND 1]\n result[b] = (byte) ((result[b] << 1) | (image[offset] & 1));\n }\n }\n return result;\n }",
"public abstract void startVoiceRecognition(String language);",
"@Override\n public void run() {\n try {\n byte[] photoData = IOUtils.toByteArray(inputStream);\n inputStream.close();\n //Mat src = Imgcodecs.imdecode(new MatOfByte(photoData), Imgcodecs.CV_LOAD_IMAGE_UNCHANGED);\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n\n\n\n// //OCR PREPROCESSING FOR FAREHA'S MODULE\n// try{\n//// Mat src = Utils.loadResource(reportAnalysisActivity.this, R.drawable.bloodf, Imgcodecs.CV_LOAD_IMAGE_GRAYSCALE);\n// //boolean ans = src.isContinuous();\n// //1. Resizing\n// double ratio = (double)src.width()/src.height();\n// if(src.width()>768){\n// int newHeight = (int)(768/ratio);\n// Imgproc.resize(src,src,new Size(768,newHeight ));\n// }\n// else if(src.height()>1024){\n// int newWidth = (int)(1024*ratio);\n// Imgproc.resize(src,src,new Size(newWidth,1024));\n// }\n//\n// //2. denoising\n// Photo.fastNlMeansDenoising(src,src,10,7,21);\n// }\n// catch(Exception e){}\n//\n// photoData = new byte[(int) (src.total() * src.channels())];\n// src.get(0, 0, photoData);\n//\n Image inputImage = new Image();\n inputImage.encodeContent(photoData);\n\n Feature desiredFeature = new Feature();\n desiredFeature.setType(\"TEXT_DETECTION\");\n\n BatchAnnotateImagesRequest batchRequest =\n new BatchAnnotateImagesRequest();\n final AnnotateImageRequest request = new AnnotateImageRequest();\n request.setImage(inputImage);\n request.setFeatures(Arrays.asList(desiredFeature));\n batchRequest.setRequests(Arrays.asList(request));\n BatchAnnotateImagesResponse batchResponse = vision.images().annotate(batchRequest).execute();\n text = batchResponse.getResponses().get(0).getFullTextAnnotation();\n\n int block_number = -1;\n int current_block = 0;\n ArrayList<Vertex> block_coords = new ArrayList<Vertex>();\n\n for (Page page : text.getPages()) {\n for (Block block : page.getBlocks()) {\n\n block_number++;\n //Save vertices of all the blocks\n block_coords.add(block.getBoundingBox().getVertices().get(0));\n allBlocks.add(block);\n\n for (Paragraph paragraph : block.getParagraphs()) {\n for (Word word : paragraph.getWords()) {\n String c_word = \"\";\n for (Symbol symbol : word.getSymbols()) {\n c_word += symbol.getText();\n }\n if (c_word.equals(\"WBC\") || c_word.equals(\"RBC\") ||\n c_word.equals(\"HB\") || c_word.equals(\"Hb\") || c_word.contains(\"Hemoglobin\") || c_word.equals(\"Haemoglobin\")\n || c_word.equals(\"Hematocrit\") || c_word.equals(\"HCT\") || c_word.equals(\"MCV\") || c_word.equals(\"MCH\")\n || c_word.equals(\"MCHC\") || c_word.contains(\"Platelet\") || c_word.equals(\"PLT\") || c_word.equals(\"ESR\")\n || c_word.equals(\"LYM\") || c_word.equals(\"LYM#\") || c_word.equals(\"LYM%\") || c_word.contains(\"Lym\")\n || c_word.equals(\"NEUT#\") || c_word.contains(\"NUET%\") || c_word.equals(\"NEUT\") || c_word.contains(\"Neut\")\n || c_word.contains(\"Monocytes\") || c_word.contains(\"Eosinophils\")\n || c_word.equals(\"Mixed Cells\") ||c_word.equals(\"Basophils\") ||c_word.equals(\"Bands\") ||\n c_word.contains(\"Bilirubin\") || c_word.equals(\"ALT\") || c_word.equals(\"SGPT\") || c_word.equals(\"ALK-Phos\") || c_word.contains(\"Alk\")\n || c_word.equals(\"ALK\")) {\n\n //Store the y coords of blocks containing testnames in array if not already saved\n if (testnameBlocks_coords.isEmpty() || !testnameBlocks_coords.contains(block_coords.get(block_number)))\n testnameBlocks_coords.add(block_coords.get(block_number));\n }\n }\n }\n }\n\n }\n\n //Sort the array containing the blocks that contain the test names in an order of largest y coordinates\n Collections.sort(testnameBlocks_coords, new Comparator<Vertex>() {\n @Override\n public int compare(Vertex x1, Vertex x2) {\n int result= Integer.compare(x1.getY(), x2.getY());\n if(result==0){\n //both ys are equal so we compare the x\n result=Integer.compare(x1.getX(), x2.getX());\n }\n return result;\n }\n });\n\n //Save the names of the testnames in order in test_name array\n int blocknum = 0;\n for (int j = 0; j < testnameBlocks_coords.size(); j++) {\n for (int i = 0; i < allBlocks.size(); i++) {\n if (allBlocks.get(i).getBoundingBox().getVertices().get(0) == testnameBlocks_coords.get(j)) {\n blocknum = i; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n for (Paragraph paragraph : allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for (Word word : paragraph.getWords()) {\n String name = \"\";\n for (Symbol symbol : word.getSymbols()) {\n name += symbol.getText();\n //save the testnames in testnames array\n }\n if (name.equals(\"%\") || name.equals(\"#\") || name.equals(\"Count\") || name.equals(\",\")\n || name.equals(\"Level\")) {\n StringBuilder stringBuilder = new StringBuilder(testnames.get(testnames.size() - 1));\n stringBuilder.append(name);\n testnames.add(testnames.size() - 1, stringBuilder.toString());\n testnames.remove(testnames.size() - 1);\n }\n else if (name.equals(\"WBC\") || name.equals(\"RBC\") ||\n name.equals(\"HB\") || name.equals(\"Hb\") || name.contains(\"Hemoglobin\") || name.equals(\"Haemoglobin\")\n || name.equals(\"Hematocrit\") || name.equals(\"HCT\") || name.equals(\"MCV\") || name.equals(\"MCH\")\n || name.equals(\"MCHC\") || name.contains(\"Platelet\") || name.equals(\"PLT\") || name.equals(\"ESR\")\n || name.equals(\"LYM\") || name.equals(\"LYM#\") || name.equals(\"LYM%\") || name.contains(\"Lym\")\n || name.equals(\"NEUT#\") || name.contains(\"NUET%\") || name.equals(\"NEUT\") || name.contains(\"Neut\")\n || name.contains(\"Monocytes\") || name.contains(\"Eosinophils\")\n || name.equals(\"Mixed Cells\") ||name.equals(\"Basophils\") ||name.equals(\"Bands\") ||\n name.contains(\"Bilirubin\") || name.equals(\"ALT\") || name.equals(\"SGPT\") || name.equals(\"ALK-Phos\") || name.contains(\"Alk.\")\n || name.equals(\"ALK\"))\n testnames.add(name);\n\n }\n }\n\n }\n\n //Below is the procedure to find the values of testvalues\n int result_block_index = 0;\n int num_of_values=0;\n int diff=0;\n ArrayList<Integer> ignoreIndex=new ArrayList<Integer>();\n Boolean isFloat=true;\n float value=0;\n\n while(num_of_values<testnames.size()){\n //next block of values\n if(!testvaluesBlocks_coords.isEmpty()){\n int previous_result_block_index = result_block_index; //Index at which the value block lies\n diff = Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX())<diff && previous_result_block_index!=i){\n if(!ignoreIndex.contains(i)){\n diff= Math.abs(block_coords.get(previous_result_block_index).getX()-block_coords.get(i).getX());\n result_block_index=i;\n }\n\n }\n }\n }\n //first block of values\n else{\n //Getting values from te first block\n diff=Integer.MAX_VALUE;\n\n for(int i=0; i<block_coords.size(); i++){\n if(Math.abs(testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY())<diff && block_coords.indexOf(testnameBlocks_coords.get(0))!=i){\n if(!ignoreIndex.contains(i)){\n diff= testnameBlocks_coords.get(0).getY()-block_coords.get(i).getY();\n result_block_index=i;\n }\n\n }\n }\n }\n isFloat=false;\n for(Paragraph paragraph: allBlocks.get(result_block_index).getParagraphs()){\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n\n }\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n if(value_string.contains(\"-\")){\n isFloat=false;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n break;\n }\n try{\n value= Float.parseFloat(value_string);\n num_of_values++;\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n isFloat=true;\n\n }\n catch (NumberFormatException e){\n //ignore indices that have been selected no matter if they had the values or not\n if(!ignoreIndex.contains(result_block_index))\n ignoreIndex.add(result_block_index);\n }\n\n\n\n\n }\n }\n\n if(isFloat){\n //Save y coordinates of value block\n testvaluesBlocks_coords.add(block_coords.get(result_block_index).getY());\n }\n }\n //sort test values coordinates array\n Collections.sort(testvaluesBlocks_coords);\n\n //save the values in an array\n for(int i=0; i<testvaluesBlocks_coords.size();i++){\n for(int j=0; j<allBlocks.size();j++){\n if(allBlocks.get(j).getBoundingBox().getVertices().get(0).getY()==testvaluesBlocks_coords.get(i)){\n blocknum=j; //The index at which the block coordinate is present in the block_cooords array\n break;\n }\n }\n\n //save values in array\n for (Paragraph paragraph: allBlocks.get(blocknum).getParagraphs()) { //Loop on its paragraphs\n for(Word word: paragraph.getWords()){\n String value_string=\"\";\n for(Symbol symbol: word.getSymbols()){\n value_string+=symbol.getText();\n }\n\n while(value_string.contains(\",\")){\n int z = value_string.indexOf(\",\");\n value_string = value_string.substring(0, z) + value_string.substring(z + 1);\n }\n try{\n value= Float.parseFloat(value_string);\n //save the testnames in testnames array\n testValues.add(Float.parseFloat(value_string));\n }\n catch(NumberFormatException n){\n\n }\n }\n\n }\n }\n\n for (int a = 0; a < testnames.size(); a++) {\n Log.e(testnames.get(a), Float.toString(testValues.get(a)));\n }\n\n //Convert the testname and testvalues array to string so they can be passed on\n StringBuilder sb = new StringBuilder();\n StringBuilder sb2 = new StringBuilder();\n for (int i = 0; i < testnames.size(); i++) {\n sb.append(testnames.get(i)).append(\",\");\n sb2.append(testValues.get(i)).append(\",\");\n\n }\n\n //Save the values and testnames so they can be passed on to next activity\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(reportAnalysisActivity.this);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"testnames\", sb.toString());\n editor.putString(\"testvalues\", sb2.toString());\n editor.putString(\"gender\", gender);\n editor.apply();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Intent reportresultScreen = new Intent(view.getContext(), reportResult_Activity.class);\n startActivity(reportresultScreen);\n }\n });\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n done=true;\n }",
"@Override\n public String recognizeImage(final Bitmap bitmap) {\n Trace.beginSection(\"recognizeImage\");\n\n Trace.beginSection(\"preprocessBitmap\");\n // Preprocess the image data from 0-255 int to normalized float based\n // on the provided parameters.\n bitmapToInputData(bitmap);\n Trace.endSection(); // preprocessBitmap\n\n // Run the inference call.\n Trace.beginSection(\"run\");\n\n tfLite.run(imgData, tfoutput_recognize);\n\n Trace.endSection();\n postPro = new Postprocessing(tfoutput_recognize);\n predictClass = postPro.postRecognize();\n Trace.endSection(); // \"recognizeImage\"\n\n //LOGGER.w(\"\"+(System.currentTimeMillis()-startTime));\n return labels.get(predictClass);\n }",
"boolean hasLanguage();",
"List<Label> findAllByLanguage(String language);",
"public String getDescription(String lang) {\n/* 188 */ return getLangAlt(lang, \"description\");\n/* */ }",
"public String getLanguage() throws DynamicCallException, ExecutionException {\n return (String)call(\"getLanguage\").get();\n }",
"public String getPredefinedTextMessage( String language, int preDefindeMsgId );",
"public void englishlanguage() {\nSystem.out.println(\"englishlanguage\");\n\t}",
"public interface LanguageProvider {\n\tLanguageService study();\n}",
"DetectionResult getObjInImage(Mat image);",
"private void runTextRecognition(Bitmap bitmap) {\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionTextDetector detector = FirebaseVision.getInstance().getVisionTextDetector();\n\n detector.detectInImage(image).addOnSuccessListener(new OnSuccessListener<FirebaseVisionText>() {\n @Override\n public void onSuccess(FirebaseVisionText texts) {\n processTextRecognitionResult(texts);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n e.printStackTrace();\n }\n });\n }",
"private void performOCR(){\n }",
"private static String italianAnalyzer(String label) throws IOException\r\n\t{\r\n\t\t// recupero le stopWords dell'ItalianAnalyzer\r\n\t\tCharArraySet stopWords = ItalianAnalyzer.getDefaultStopSet();\r\n\t\t// andiamo a tokenizzare la label\r\n\t\tTokenStream tokenStream = new StandardTokenizer(Version.LUCENE_48, new StringReader(label));\r\n\t\t// richiamo l'Elision Filter che si occupa di elidere le lettere apostrofate\r\n\t\ttokenStream = new ElisionFilter(tokenStream, stopWords);\r\n\t\t// richiamo il LowerCaseFilter\r\n\t\ttokenStream = new LowerCaseFilter(Version.LUCENE_48, tokenStream);\r\n\t\t// richiamo lo StopFilter per togliere le stop word\r\n\t\ttokenStream = new StopFilter(Version.LUCENE_48, tokenStream, stopWords);\r\n\t\t// eseguo il processo di stemming italiano per ogni token\r\n\t\ttokenStream = new ItalianLightStemFilter(tokenStream);\r\n\t\t\r\n\t\t/*\r\n\t\t * ricostruisco la stringa in precedenza tokenizzata\r\n\t\t */\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t CharTermAttribute charTermAttribute = tokenStream.addAttribute(CharTermAttribute.class);\r\n\t tokenStream.reset();\r\n\r\n\t while (tokenStream.incrementToken()) \r\n\t {\r\n\t String term = charTermAttribute.toString();\r\n\t sb.append(term + \" \");\r\n\t }\r\n \r\n\t tokenStream.close();\r\n\t // elimino l'ultimo carattere (spazio vuoto)\r\n\t String l = sb.toString().substring(0,sb.toString().length()-1);\r\n\t \r\n\t// ritorno la label stemmata\r\n return l;\r\n\t\r\n\t}",
"private void runCloudTextRecognition(Bitmap bitmap) {\n FirebaseVisionCloudDetectorOptions options =\n new FirebaseVisionCloudDetectorOptions.Builder()\n .setModelType(FirebaseVisionCloudDetectorOptions.LATEST_MODEL)\n .setMaxResults(15)\n .build();\n mCameraButtonCloud.setEnabled(false);\n FirebaseVisionImage image = FirebaseVisionImage.fromBitmap(bitmap);\n FirebaseVisionCloudDocumentTextDetector detector = FirebaseVision.getInstance()\n .getVisionCloudDocumentTextDetector(options);\n detector.detectInImage(image)\n .addOnSuccessListener(\n new OnSuccessListener<FirebaseVisionCloudText>() {\n @Override\n public void onSuccess(FirebaseVisionCloudText texts) {\n mCameraButtonCloud.setEnabled(true);\n processCloudTextRecognitionResult(texts);\n }\n })\n .addOnFailureListener(\n new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // Task failed with an exception\n mCameraButtonCloud.setEnabled(true);\n e.printStackTrace();\n }\n });\n }",
"PsiFile[] findFilesWithPlainTextWords( String word);",
"public void detectLanguage(final View view)\n {\n Toast.makeText(getApplicationContext(), \"Under Construction\", Toast.LENGTH_SHORT).show();\n }",
"public BufferedImage add_text(BufferedImage image, String text) {\n // convert all items to byte arrays: image, message, message length\n byte img[] = get_byte_data(image);\n byte msg[] = text.getBytes();\n byte len[] = bit_conversion(msg.length);\n try {\n encode_text(img, len, 0); // 0 first positiong\n encode_text(img, msg, 32); // 4 bytes of space for length:\n // 4bytes*8bit = 32 bits\n }\n catch (Exception e) {\n JOptionPane.showMessageDialog(\n null,\n \"Target File cannot hold message!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n return image;\n }",
"String translate(String text, String fromLanguage, String toLanguage) throws TranslationException;",
"java.lang.String getTargetLanguageCode();",
"private void verifyTextAndLabels(){\n common.explicitWaitVisibilityElement(\"//*[@id=\\\"content\\\"]/article/h2\");\n\n //Swedish labels\n common.timeoutMilliSeconds(500);\n textAndLabelsSwedish();\n\n //Change to English\n common.selectEnglish();\n\n //English labels\n textAndLabelsEnglish();\n }",
"private ArrayList<OWLLiteral> getLabels(OWLEntity entity, OWLOntology ontology, String lang) {\n\t\tOWLDataFactory df = OWLManager.createOWLOntologyManager().getOWLDataFactory();\n\t\tOWLAnnotationProperty label = df.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI());\t\n\n\t\tArrayList<OWLLiteral> labels = new ArrayList<OWLLiteral>();\n\t\tfor (OWLAnnotation annotation : entity.getAnnotations(ontology, label)) {\n\t\t\tif (annotation.getValue() instanceof OWLLiteral) {\n\t\t\t\tOWLLiteral val = (OWLLiteral) annotation.getValue();\n\t\t\t\tif (val.hasLang(\"en\")) {\n\t\t\t\t\tlabels.add(val);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn labels;\n\t}",
"public static BufferedImage getTextImage (String text, String fontName, float fontSize) {\n\t\tBufferedImage img = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);\n\t\tGraphics2D g2d = img.createGraphics();\n\t\tFont font = ExternalResourceManager.getFont(fontName).deriveFont(fontSize);\n\t\tg2d.setFont(font);\n//\t\tnew Font\n\t\tFontMetrics fm = g2d.getFontMetrics();\n\t\tint w = fm.stringWidth(text), h = fm.getHeight();\n\t\tg2d.dispose();\n\t\t// draw image\n\t\timg = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);\n\t\tg2d = img.createGraphics();\n\t\tg2d.setFont(font);\n fm = g2d.getFontMetrics();\n g2d.setColor(Color.BLACK);\n g2d.setBackground(new Color(0, 0, 0, 0));\n g2d.drawString(text, 0, fm.getAscent());\n g2d.dispose();\n\t\treturn img;\n\t}",
"String translateEnglishToDothraki(String englishText) throws Exception\n\t{\n\t\tString urlHalf1 = \"https://api.funtranslations.com/translate/dothraki.json?text=\";\n\t\tString url = urlHalf1 + englishText;\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString jsonData = getJsonData(url);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tString translation = \"\";\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject treeObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement contents = treeObject.get(\"contents\");\n\n\t\t\tif (contents.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject contentsObject = contents.getAsJsonObject();\n\n\t\t\t\tJsonElement translateElement = contentsObject.get(\"translated\");\n\n\t\t\t\ttranslation = translateElement.getAsString();\n\t\t\t}\n\t\t}\n\n\t\treturn translation;\n\t}",
"Builder addInLanguage(Text value);",
"int getLocalizedText();",
"public static String getTranslation(String original, String originLanguage, String targetLanguage) {\n\t\tif (Options.getDebuglevel() > 1)\n\t\t\tSystem.out.println(\"Translating: \" + original);\n\t\ttry {\n\t\t\tDocument doc = Jsoup\n\t\t\t\t\t.connect(\"http://translate.reference.com/\" + originLanguage + \"/\" + targetLanguage + \"/\" + original)\n\t\t\t\t\t.userAgent(\"PlagTest\").get();\n\t\t\tElement e = doc.select(\"textarea[Placeholder=Translation]\").first();\n\t\t\tString text = e.text().trim();\n\t\t\tif (text.equalsIgnoreCase(original.trim()))\n\t\t\t\treturn null;\n\t\t\treturn text;\n\t\t} catch (Exception e1) {\n\t\t}\n\t\treturn null;\n\t}",
"default String getOriginalText() {\n return meta(\"nlpcraft:nlp:origtext\");\n }",
"public String extractText(String urlString) {\n String text = \"\";\n try {\n URL url = new URL(urlString);\n text = ArticleExtractor.INSTANCE.getText(url); \n } catch (Exception ex) {\n Logger.getLogger(TextExtractor.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return text;\n }",
"public void selectLanguage(String language) {\n\n String xpath = String.format(EST_LANGUAGE, language);\n List<WebElement> elements = languages.findElements(By.xpath(xpath));\n for (WebElement element : elements) {\n if (element.isDisplayed()) {\n element.click();\n break;\n }\n }\n }",
"com.google.ads.googleads.v6.resources.LanguageConstant getLanguageConstant();",
"@Override\n public String getText() {\n return analyzedWord;\n }",
"public String getThaiWordFromEngWord(String englishWord) {\n Cursor cursor = mDatabase.query(\n TABLE_NAME,\n new String[]{COL_THAI_WORD},\n COL_ENG_WORD + \"=?\",\n new String[]{englishWord},\n null,\n null,\n null\n );\n if (cursor.getCount() > 0) {\n cursor.moveToFirst();\n return cursor.getString(cursor.getColumnIndex(COL_THAI_WORD));\n } else {\n return englishWord;\n }\n }",
"public String classify(String text){\n\t\treturn mClassifier.classify(text).bestCategory();\n\t}",
"@Source(\"gr/grnet/pithos/resources/translate.png\")\n ImageResource selectAll();",
"public void Croppedimage(CropImage.ActivityResult result, ImageView iv, EditText et )\n {\n Uri resultUri = null; // get image uri\n if (result != null) {\n resultUri = result.getUri();\n }\n\n\n //set image to image view\n iv.setImageURI(resultUri);\n\n\n //get drawable bitmap for text recognition\n BitmapDrawable bitmapDrawable = (BitmapDrawable) iv.getDrawable();\n\n Bitmap bitmap = bitmapDrawable.getBitmap();\n\n TextRecognizer recognizer = new TextRecognizer.Builder(getApplicationContext()).build();\n\n if(!recognizer.isOperational())\n {\n Toast.makeText(this, \"Error No Text To Recognize\", Toast.LENGTH_LONG).show();\n }\n else\n {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n SparseArray<TextBlock> items = recognizer.detect(frame);\n StringBuilder ab = new StringBuilder();\n\n //get text from ab until there is no text\n for(int i = 0 ; i < items.size(); i++)\n {\n TextBlock myItem = items.valueAt(i);\n ab.append(myItem.getValue());\n\n }\n\n //set text to edit text\n et.setText(ab.toString());\n }\n\n }",
"@DISPID(-2147413103)\n @PropGet\n java.lang.String lang();",
"public String getLocale () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"private String getPhrase(String key) {\r\n if (\"pl\".equals(System.getProperty(\"user.language\")) && phrasesPL.containsKey(key)) {\r\n return phrasesPL.get(key);\r\n } else if (phrasesEN.containsKey(key)) {\r\n return phrasesEN.get(key);\r\n }\r\n return \"Translation not found!\";\r\n }",
"public void setLanguage(String language);",
"public String detectObject(Bitmap bitmap) {\n results = classifierObject.recognizeImage(bitmap);\n\n // Toast.makeText(context, results.toString(), Toast.LENGTH_LONG).show();\n return String.valueOf(results.toString());\n }",
"@Override\n protected int onIsLanguageAvailable(String lang, String country, String variant) {\n if (\"eng\".equals(lang)) {\n // We support two specific robot languages, the british robot language\n // and the american robot language.\n if (\"USA\".equals(country) || \"GBR\".equals(country)) {\n // If the engine supported a specific variant, we would have\n // something like.\n //\n // if (\"android\".equals(variant)) {\n // return TextToSpeech.LANG_COUNTRY_VAR_AVAILABLE;\n // }\n return TextToSpeech.LANG_COUNTRY_AVAILABLE;\n }\n\n // We support the language, but not the country.\n return TextToSpeech.LANG_AVAILABLE;\n }\n\n return TextToSpeech.LANG_NOT_SUPPORTED;\n }",
"String text();",
"public WordInfo searchWord(String word) {\n\t\tSystem.out.println(\"Dic:SearchWord: \"+word);\n\n\t\tDocument doc;\n\t\ttry {\n\t\t\tdoc = Jsoup.connect(\"https://dictionary.cambridge.org/dictionary/english-vietnamese/\" + word).get();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\tElements elements = doc.select(\".dpos-h.di-head.normal-entry\");\n\t\tif (elements.isEmpty()) {\n\t\t\tSystem.out.println(\" not found\");\n\t\t\treturn null;\n\t\t}\n\n\t\tWordInfo wordInfo = new WordInfo(word);\n\n\t\t// Word\n\t\telements = doc.select(\".tw-bw.dhw.dpos-h_hw.di-title\");\n\n\t\tif (elements.size() == 0) {\n\t\t\tSystem.out.println(\" word not found in doc!\");\n\t\t\treturn null;\n\t\t}\n\n\t\twordInfo.setWordDictionary(elements.get(0).html());\n\n\t\t// Type\n\t\telements = doc.select(\".pos.dpos\");\n\n\t\tif(elements.size() > 0) {\n\t\t\twordInfo.setType(WordInfo.getTypeShort(elements.get(0).html()));\n//\t\t\tif (wordInfo.getTypeShort().equals(\"\"))\n//\t\t\t\tSystem.out.println(\" typemis: \"+wordInfo.getType());\n\t\t}\n\n\t\t// Pronoun\n\t\telements = doc.select(\".ipa.dipa\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setAPI(\"/\"+elements.get(0).html()+\"/\");\n\n\t\t// Trans\n\t\telements = doc.select(\".trans.dtrans\");\n\n\t\tif (elements.size() > 0)\n\t\t\twordInfo.setTrans(elements.get(0).html());\n\n\t\tSystem.out.println(\" found\");\n\t\treturn wordInfo;\n\t}"
]
| [
"0.6340444",
"0.5907014",
"0.5881825",
"0.5613604",
"0.5501345",
"0.5476807",
"0.54720134",
"0.5439289",
"0.5439289",
"0.5422724",
"0.5412727",
"0.5398816",
"0.53872037",
"0.53670835",
"0.5357576",
"0.5357576",
"0.5357576",
"0.5356866",
"0.53034747",
"0.5297329",
"0.5260379",
"0.5254473",
"0.5246585",
"0.5228318",
"0.52282864",
"0.51628226",
"0.51364416",
"0.5131521",
"0.5125658",
"0.5094378",
"0.5072984",
"0.50591296",
"0.5053911",
"0.5033745",
"0.5029701",
"0.5023699",
"0.49775946",
"0.49752378",
"0.49746957",
"0.49692988",
"0.49669984",
"0.49603295",
"0.494737",
"0.49402708",
"0.4936638",
"0.49160838",
"0.49070477",
"0.490414",
"0.4901063",
"0.48966298",
"0.48771858",
"0.4871494",
"0.48709062",
"0.48640007",
"0.4860736",
"0.48604217",
"0.48568577",
"0.48375824",
"0.4816498",
"0.4812896",
"0.47998497",
"0.476058",
"0.47586524",
"0.47517806",
"0.4735092",
"0.47282943",
"0.47255528",
"0.46790475",
"0.46785977",
"0.46641326",
"0.46611255",
"0.46398386",
"0.46395934",
"0.46347702",
"0.46280068",
"0.46261424",
"0.46224535",
"0.46215943",
"0.46206397",
"0.46187946",
"0.46137336",
"0.4603326",
"0.46020162",
"0.45985487",
"0.4598176",
"0.459762",
"0.45945558",
"0.45927325",
"0.45888606",
"0.4577679",
"0.4577485",
"0.45715407",
"0.45659322",
"0.45604816",
"0.45601782",
"0.4558132",
"0.45481235",
"0.4547136",
"0.4546162",
"0.45450872",
"0.4538884"
]
| 0.0 | -1 |
Returns probabilities of the image containing racy or adult content. | public Observable<EvaluateInner> evaluateFileInputAsync(byte[] imageStream) {
return evaluateFileInputWithServiceResponseAsync(imageStream).map(new Func1<ServiceResponse<EvaluateInner>, EvaluateInner>() {
@Override
public EvaluateInner call(ServiceResponse<EvaluateInner> response) {
return response.body();
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void calculateProbabilities(){\n\t}",
"private void evaluateProbabilities()\n\t{\n\t}",
"public double[] getProbabilities() { return getProbabilities((int[])null); }",
"public double getProbability() {\n return probability;\n }",
"POGOProtos.Rpc.CaptureProbabilityProto getCaptureProbabilities();",
"float getSpecialProb();",
"double[] calculateProbabilities(LACInstance testInstance) throws Exception\n\t{\n\t\tdouble[] probs;\n\t\tdouble[] scores = calculateScores(testInstance);\n\t\t\n\t\tif(scores != null)\n\t\t{\n\t\t\tprobs = new double[scores.length];\n\t\t\tdouble scoreSum = 0.0;\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tscoreSum += scores[i];\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tprobs[i] = scores[i] / scoreSum;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSet<Integer> allClasses = trainingSet.getAllClasses();\n\t\t\tprobs = new double[allClasses.size()];\n\t\t\tfor (Integer clazz : allClasses) \n\t\t\t{\n\t\t\t\tdouble count = trainingSet.getInstancesOfClass(clazz).size();\n\t\t\t\tprobs[clazz] = (count / ((double) trainingSet.length()));\n\t\t\t}\n\t\t}\n\n\t\treturn probs ;\n\t}",
"public double getProbability() {\r\n\t\treturn Probability;\r\n\t}",
"@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}",
"private double[] evaluateProbability(double[] data) {\n\t\tdouble[] prob = new double[m_NumClasses], v = new double[m_NumClasses];\n\n\t\t// Log-posterior before normalizing\n\t\tfor (int j = 0; j < m_NumClasses - 1; j++) {\n\t\t\tfor (int k = 0; k <= m_NumPredictors; k++) {\n\t\t\t\tv[j] += m_Par[k][j] * data[k];\n\t\t\t}\n\t\t}\n\t\tv[m_NumClasses - 1] = 0;\n\n\t\t// Do so to avoid scaling problems\n\t\tfor (int m = 0; m < m_NumClasses; m++) {\n\t\t\tdouble sum = 0;\n\t\t\tfor (int n = 0; n < m_NumClasses - 1; n++)\n\t\t\t\tsum += Math.exp(v[n] - v[m]);\n\t\t\tprob[m] = 1 / (sum + Math.exp(-v[m]));\n\t\t\tif (prob[m] == 0)\n\t\t\t\tprob[m] = 1.0e-20;\n\t\t}\n\n\t\treturn prob;\n\t}",
"protected double get_breeding_probability()\n {\n return breeding_probability;\n }",
"abstract double rightProbability();",
"void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}",
"public double[] proportionPercentage(){\n if(!this.pcaDone)this.pca();\n return this.proportionPercentage;\n }",
"public Map<String, WordImage> calculateWordsAndImagePropability(\r\n\t\t\tMap<String, WordImage> wordImageRel, int totalUniqueUserCount) {\r\n\r\n\t\tint totalOcurrance = 0;\r\n\r\n\t\t// Calculate the total number of word occurrences in the set of similar\r\n\t\t// and dissimilar images\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getSimlarImages().size();\r\n\r\n\t\t\tif (this.wordNotSimilarImages.get(word) != null)\r\n\t\t\t\twordOccur += this.wordNotSimilarImages.get(word);\r\n\r\n\t\t\twordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\ttotalOcurrance += wordOccur;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// wordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\tint uniqueUsers = wordImageRel.get(word)\r\n\t\t\t\t\t.getWordUniqueUsers(this.photoList).size();\r\n\r\n\t\t\twordImageRel.get(word).setTotalOcurances(totalOcurrance);\r\n\r\n\t\t\t// .......... Voting-similar word probability\r\n\t\t\t// .......................\r\n\r\n\t\t\t// 1. Word probability without user assumptions\r\n\t\t\tdouble PwOnlyWords = ((double) wordOccur / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyWords(PwOnlyWords);\r\n\r\n\t\t\t// 2. Word probability with user proportion to the total number of\r\n\t\t\t// users\r\n\t\t\tdouble PwAllUsers = PwOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwAllUsers(PwAllUsers);\r\n\r\n\t\t\t// 3. Word probability. Word freq is represented by the number of\r\n\t\t\t// unique users only\r\n\t\t\tdouble PwOnlyUniqueUsers = ((double) uniqueUsers / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyUniqueUsers(PwOnlyUniqueUsers);\r\n\r\n\t\t\t// ..........TF-IDF Word Probability Calculation\r\n\t\t\t// .......................\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// 1. Word probability TF.IDF approach without user assumptions\r\n\t\t\tdouble PwTFIDFlOnlyWords = ((double) Rw / R)\r\n\t\t\t\t\t* (Math.log((double) C / Lw) / Math.log(2))\r\n\t\t\t\t\t/ (Math.log((double) C) / Math.log(2));\r\n\t\t\twordImageRel.get(word).setPwTFIDFlOnlyWords(PwTFIDFlOnlyWords);\r\n\r\n\t\t\t// 2. Word probability TF.IDF approach with user proportion to the\r\n\t\t\t// totall number of users\r\n\t\t\tdouble PwTFIDFlAllUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwTFIDFlAllUsers(PwTFIDFlAllUsers);\r\n\r\n\t\t\t// 3. Word probability TF.IDF approach. Word freq is represented by\r\n\t\t\t// the number of unique users only\r\n\t\t\tdouble PwTFIDFOnlyUniqueUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* (uniqueUsers / (double) wordOccur);\r\n\t\t\twordImageRel.get(word).setPwTFIDFOnlyUniqueUsers(\r\n\t\t\t\t\tPwTFIDFOnlyUniqueUsers);\r\n\r\n\t\t\twordImageRel.get(word)\r\n\t\t\t\t\t.setImageProbability(1.0 / (double) wordOccur); // P(c_j|w)\r\n\r\n\t\t}\r\n\t\treturn wordImageRel;\r\n\r\n\t}",
"@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}",
"private double getProbOfClass(int catIndex) {\r\n\t\treturn (classInstanceCount[catIndex] + mCategoryPrior)\r\n\t\t\t\t/ (classInstanceCount[0] + classInstanceCount[1] + mCategories.length\r\n\t\t\t\t\t\t* mCategoryPrior);\r\n\t}",
"POGOProtos.Rpc.CaptureProbabilityProtoOrBuilder getCaptureProbabilitiesOrBuilder();",
"@Override\n\tpublic void computeFinalProbabilities() {\n\t\tsuper.computeFinalProbabilities();\n\t}",
"public double getObservationProbability(){\r\n double ret=0;\r\n int time=o.length;\r\n int N=hmm.stateCount;\r\n for (int t=0;t<=time;++t){\r\n for (int i=0;i<N;++i){\r\n ret+=fbManipulator.alpha[t][i]*fbManipulator.beta[t][i];\r\n }\r\n }\r\n ret/=time;\r\n return ret;\r\n }",
"public double contagionProbability(Person p)\n\t{\n\t\tif(p.getAge()<=18)\n\t\t{\n\t\t\treturn con_18*p.contagionProbability();\n\t\t}\n\t\tif(p.getAge()>18 && p.getAge()<=55)\n\t\t{\n\t\t\treturn con_18_55*p.contagionProbability();\n\t\t}\n\t\treturn con_up55*p.contagionProbability();\n\t}",
"public static int getObstacleProbability() {\n\t\tif(SHOW_OBSTACLES){\n\t\t\treturn RANDOM_OBSTACLE_COUNT;\n\t\t}\n\t\treturn 0;\n\t}",
"public abstract Map getProbabilities(String[] path);",
"public double getProbabilityP() {\n return this.mProbabilityP;\n }",
"abstract double leftProbability();",
"public double getAbandonmentProbability() {\n return Math.random();\n }",
"public double outcomeProb(char[] outcome) {\r\n\t\t// get all forward probabilities\r\n\t\tdouble[][] probs = getForwards(outcome);\r\n\t\t\r\n\t\t// initialize the probability of this outcome to 0\r\n\t\tdouble outcomeProb = 0;\r\n\t\t// loop over all nodes in the last column\r\n\t\tfor (int i = 0; i < states.length; ++i)\r\n\t\t\t// add this node's probability to the overall probability\r\n\t\t\toutcomeProb += probs[i][outcome.length - 1];\r\n\t\t\r\n\t\treturn outcomeProb;\r\n\t}",
"public float getSpecialProb() {\n return specialProb_;\n }",
"private double infobits(double[] probs) {\r\n\t\tdouble sum = 0;\r\n\t\tfor (int i = 0; i < probs.length; i++) {\r\n\t\t\tsum += entropy(probs[i]);\r\n\t\t}\r\n\t\treturn sum;\r\n\t}",
"double getCritChance();",
"public void calculateProbabilities(Ant ant) {\n int i = ant.trail[currentIndex];\n double pheromone = 0.0;\n for (int l = 0; l < numberOfCities; l++) {\n if (!ant.visited(l)) {\n pheromone += (Math.pow(trails[i][l], alpha) + 1) * (Math.pow(graph[i][l], beta) + 1) *\n (Math.pow(emcMatrix[i][l], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][l], ddd) + 1);\n }\n }\n for (int j = 0; j < numberOfCities; j++) {\n if (ant.visited(j)) {\n probabilities[j] = 0.0;\n } else {\n double numerator = (Math.pow(trails[i][j], alpha) + 1) * (Math.pow(graph[i][j], beta) + 1) *\n (Math.pow(emcMatrix[i][j], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][j], ddd) + 1);\n probabilities[j] = numerator / pheromone;\n }\n }\n }",
"private void classifyTestImages() throws FileNotFoundException, UnsupportedEncodingException {\n PrintWriter writer = new PrintWriter(\"result.txt\", \"UTF-8\");\n writer.println(\"#Authors: Thomas Sarlin & Petter Poucette\");\n\n ArrayList<Image> images = testReader.getImages();\n double activationResult[]=new double[4];\n int bestGuess;\n for (Image image : images) {\n for (int j = 0; j < 4; j++)\n activationResult[j] = activationFunction\n .apply(sumWeights(j, image));\n\n bestGuess = getBestGuess(activationResult);\n writer.println(image.getName() + \" \" + bestGuess);\n }\n writer.close();\n }",
"public float getSpecialProb() {\n return specialProb_;\n }",
"private List<Integer> generateProb() {\n Integer[] randArr = new Integer[numCols*numRows];\n\n int start = 0;\n int end;\n for(int i = 0; i < myStateMap.size(); i++) {\n double prob = myStateMap.get(i).getProb();\n end = (int) (prob * numCols * numRows + start);\n for(int j = start; j < end; j++) {\n if(end > randArr.length) {\n break;\n }\n randArr[j] = myStateMap.get(i).getType();\n }\n start = end;\n }\n\n List<Integer> arr = new ArrayList<>(Arrays.asList(randArr));\n Collections.shuffle(arr);\n return arr;\n }",
"public Bounds getProbabilityBounds();",
"private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}",
"boolean getProbables();",
"public Map<String, WordImageRelevaces> calculateImageWordRelevance(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tPrintWriter tempOut;\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\t\ttry {\r\n\r\n\t\t\ttempOut = new PrintWriter(word_prop_output);\r\n\r\n\t\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\t\tint index = 0;\r\n\r\n\t\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\t\ttempOut.println(\"Word , total Occur , #NotSimImgs, #SimImgs , WordOccur , #Unique Users \"\r\n\t\t\t\t\t+ \", Pw1, Pw2,Pw3 , Pw4 , Pw5,Pw6 , C, R, Rw, Lw\");\r\n\r\n\t\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\t\tint C = totalNumberOfImages;\r\n\t\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t\ttempOut.println(word\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getTotalOcurences()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordNotSimilarImages.get(word)\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getSimilarImageIDs().size()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getOcurrances()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word)\r\n\t\t\t\t\t\t\t\t.getWordUniqueUsers(this.photoList).size()\r\n\t\t\t\t\t\t+ \",\" + +Pw1 + \",\" + Pw2 + \",\" + Pw3 + \",\" + Pw4 + \",\"\r\n\t\t\t\t\t\t+ Pw5 + \",\" + Pw6 + \",\" + C + \",\" + R + \",\" + Rw + \",\"\r\n\t\t\t\t\t\t+ Lw);\r\n\r\n\t\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Normalise\r\n\t\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t\t\ttempOut.close();\r\n\t\t\t}\r\n\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\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}",
"public abstract float getProbability(String[] tokens);",
"@Test\n void adjectivesScoring() {\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day; glad @JeremyKappell is standing up against #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB (Via NEWS 8 WROC)\");\n HashMap<String, Double> as = np.adjectivesScoring(sentences);\n for (String key : as.keySet()) {\n Double value = as.get(key);\n assertTrue(value >= 0 && value <= 4);\n }\n }",
"private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}",
"public double getProbability(Object rootState) { return getProbability(rootState, (Object[])null); }",
"private int getPetImages() {\n int nUserPets = user.getPets().size();\n Drawable defaultDrawable = getResources().getDrawable(R.drawable.single_paw, null);\n Bitmap defaultBitmap = ((BitmapDrawable) defaultDrawable).getBitmap();\n countImagesNotFound = new int[nUserPets];\n Arrays.fill(countImagesNotFound, 0);\n\n ExecutorService executorService = Executors.newCachedThreadPool();\n startRunnable(nUserPets, executorService);\n executorService.shutdown();\n\n try {\n executorService.awaitTermination(3, TimeUnit.MINUTES);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return calculateImagesNotFound();\n }",
"private List<ProbabilityOfDefault> getPDs(Scenario s) {\n\t\t\r\n\t\tCountry ctry = getCountry();\r\n\t\t\r\n\t\tDouble probGrowth = ctry.getProbabilityOfGrowth();\r\n\t\tDouble probRecession = ctry.getProbabilityOfRecession();\r\n\t\t\r\n\t\tList<ProbabilityOfDefault> adjustedPDs = new ArrayList<>();\r\n\t\t\r\n\t\tfor (ProbabilityOfDefault pd : rating.getPDs()) {\r\n\t\t\tProbabilityOfDefault newPd = pd;\r\n\t\t\tnewPd.setPD((probGrowth * pd.getGrowthPD()) + (probRecession * pd.getRecessionPD()));\r\n\t\t\tadjustedPDs.add(newPd);\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(adjustedPDs);\r\n\t\treturn adjustedPDs;\r\n\t}",
"private double getProbabilityScore(Cell c,int bitmask)\n {\n\t return Math.pow(\n\t\t\t Math.pow(m_probs1[c.getCol()-1],(1&bitmask) ) * \n\t\t\t Math.pow(m_probs2[c.getRow()-1],(2&bitmask)/2) //geo-mean\n\t\t\t , Math.min(1,3.5-bitmask));\n }",
"private double[] computePredictionValues() {\n double[] predResponses = new double[D];\n for (int d = 0; d < D; d++) {\n double expDotProd = Math.exp(docLabelDotProds[d]);\n double docPred = expDotProd / (expDotProd + 1);\n predResponses[d] = docPred;\n }\n return predResponses;\n }",
"private static void findBigramProbTuring() {\n\t\t\t\t\n\t\tbigramProbT= new HashMap<String, Double>();\n\t\tdouble prob;\n\t\t\n\t\tfor(String s: corpusBigramCount.keySet()){\n\t\t\tint count=corpusBigramCount.get(s);\n\t\t\tif(count==0){\n\t\t\t\tprob= bucketCountT.getOrDefault(1,0.0)/corpusNumOfBigrams;\n\t\t\t}\n\t\t\telse\n\t\t\t\tprob= bigramCountTI.get(count)/corpusNumOfBigrams;\n\t\t\tbigramProbT.put(s, prob);\n\t\t}\n\t\t\t\n\t}",
"public double outcomeGivenPathProb(char[] outcome, S[] path) {\r\n\t\t// initialize probability to 1\r\n\t\tdouble prob = 1;\r\n\t\t// loop over all emitted chars\r\n\t\tfor (int i = 0; i < outcome.length; ++i)\r\n\t\t\t// multiple probability by the emission probability of this char\r\n\t\t\tprob *= emissProb(indexOf(states, path[i]), outcome[i]);\r\n\t\t\r\n\t\treturn prob;\r\n\t}",
"public List<Result> recognize(IplImage image);",
"public Double getProb(T element) {\n\t\treturn itemProbs_.get(element);\n\t}",
"public double getProbability() {\n\t\treturn getD_errorProbability();\n\t}",
"public Image getNatural();",
"public double getCandProbability(String candidate){\n\t\tString[] candTerms = candidate.split(\"\\\\s+\");\n\t\t\n\t\t// Total Tokens\n\t\tdouble totTokens = (double)unigramDict.termCount();\n\t\t//P(w1) in log\n\t\tString w1 = candTerms[0];\n\t\tdouble probW1 = Math.log10((double)unigramDict.count(w1, wordToId)/totTokens);\n\t\t\n\t\t//P (w1, w2, ..., wn)\n\t\tdouble probCandidate = probW1;\n\t\t\n\t\t\n\t\tfor( int i =0; i < candTerms.length-1; i++){\n\t\t\t//Pint(w2|w1) = Pmle(w2) + (1 )Pmle(w2|w1)\n\t\t\tString currentTerm = candTerms[i];\n\t\t\tString nextTerm = candTerms[i+1];\n\t\t\tString bigram = currentTerm + \" \" + nextTerm;\n\t\t\tint freqBigram = bigramDict.count(bigram, wordToId);\n\t\t\t\n\t\t\t//this term should be in dictionary\n\t\t\tint freqFirstTerm = unigramDict.count(currentTerm, wordToId);\n\t\t\t\n\t\t\tdouble PmleW2W1 = (double)freqBigram/(double)freqFirstTerm;\n\t\t\t\n\t\t\t//System.out.println(\"candidate=[\" + candidate + \"]\\tbigram=[\" + bigram + \"]\\tterms=\" + Arrays.toString(terms));\n\t\t\tdouble PmleW2 = (double)unigramDict.count(nextTerm, wordToId) / totTokens;\n\t\t\t//double lamda= 0.1;\n\t\t\tdouble PintW2W1 = lamda*PmleW2 + (1-lamda)*PmleW2W1;\n\t\t\tprobCandidate = probCandidate + Math.log10(PintW2W1);\n\t\t}\n\t\treturn probCandidate;\n\t}",
"public scala.collection.immutable.IndexedSeq<java.lang.Object> getQuantiles (scala.collection.Iterable<java.lang.Object> probabilities) { throw new RuntimeException(); }",
"public void createProbsMap() {\n\t\tif(this.counts == null) {\n\t\t\tcreateCountMap();\n\t\t}\n\t\t\n\t\tMap<String, Double> result = new HashMap<String, Double>();\n\t\t\n\t\t// Make the counts and get the highest probability found \n\t\tdouble highestProb = 0.00;\n\t\tdouble size = (double) this.getData().size();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\tresult.put(entry.getKey(), value / size);\n\t\t\t\n\t\t\tif(value/size > highestProb) {\n\t\t\t\thighestProb = value/size;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fill the highest probilities \n\t\tList<String> highestProbs = new ArrayList<String>();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\t\n\t\t\tif(value/size == highestProb) {\n\t\t\t\thighestProbs.add(entry.getKey());\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.highestProbs = highestProbs;\n\t\tthis.highestProb = highestProb;\n\t\tthis.probs \t\t = result;\n\t}",
"public int[] podium(){\n int[] pod = new int[3];\n for (int i=0; i<3; i++) {\n pod[i]=0;\n }\n \n int n = this.scores.length;\n for (int i=0; i<n; i++) {\n if (scores[i]>pod[2]) {\n pod[0]=pod[1];\n pod[1]=pod[2];\n pod[2]=scores[i];\n } else if ((scores[i]>pod[1])) {\n pod[0]=pod[1];\n pod[1]=scores[i];\n } else if ((scores[i]>pod[0])) {\n pod[0]=scores[i];\n }\n \n }\n return pod;\n \n }",
"public int getContaminantPPM() {\n return contaminantPPM;\n }",
"public Action getActionBasedOnProbability(final State state) {\r\n final double decision = Math.random();\r\n double decisionCount = 0;\r\n\r\n for (final Map.Entry<Action, Double> actionProb : getProperties(state).getActionProbabilities().entrySet()) {\r\n decisionCount += actionProb.getValue();\r\n if (decisionCount >= decision) {\r\n return actionProb.getKey();\r\n }\r\n }\r\n\r\n System.err.println(\"Error: cannot choose action!\");\r\n System.err.println(getProperties(state).getActionProbabilities());\r\n return null;\r\n }",
"double getBranchProbability();",
"float genChance();",
"protected Double successProbability(){\n\t\tnodeKValues = collectKValues();\n\t\tList<Integer[]> placements = getDistinctPlacements(getMinKPath());\n\t\tlong maxNumberOfColorings = 0;\n\t\tfor (Integer[] placement : placements){\n\t\t\tlong colorings = numberOfColorings(placement);\n\t\t\tif (colorings > maxNumberOfColorings)\n\t\t\t\tmaxNumberOfColorings = colorings;\n\t\t}\n\t\tDouble probability = 1.0/maxNumberOfColorings;\n\t\tfor (int i=1; i<=pathLength; i++){ // factorial of pathlength\n\t\t\tprobability = probability * i;\n\t\t}\n\t\treturn probability;\n\t}",
"public double getProb(String word) {\n double numWords = wordMap.get(\"TOTAL_WORDS\");\n return wordMap.getOrDefault(word, 0.0)/numWords;\n }",
"public abstract double getLinkProbability(int linkId);",
"Float getFedAnimalsPercentage();",
"public double getProbRecombinacion() {\n return getDouble(params.probRecombinacion, PROP_PROB_RECOMB, 0.5);\n }",
"private void checkProbability(String mapName, WildEncounterInfo[] wildEncounters) {\n int totalProbability = 0;\n for (WildEncounterInfo wildEncounter : wildEncounters) {\n totalProbability += wildEncounter.getProbability();\n }\n\n Assert.assertEquals(mapName, 100, totalProbability);\n }",
"@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }",
"public double getProbabilityOf(T aData) {\n\t\tdouble freq = this.getFrequencyOf(aData);\n\t\tdouble dblSize = numEntries;\n\t\treturn freq/dblSize;\n\t}",
"public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}",
"protected int getPostiveOnes() {\n Rating[] ratingArray = this.ratings;\n int posOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) {\n if(ratingArray[i].getScore() == 1) posOneCount++; \n }\n }\n return posOneCount;\n }",
"public double people(double precis,double plagiarism,double poster,double video,double presentation,double portfolio,double reflection,double examination,double killerRobot)\n {\n double a = ((4%100)*precis)/100;\n double b = ((8%100)*plagiarism)/100;\n double c = ((12%100)*poster)/100;\n double d = ((16%100)*video)/100;\n double e = ((12%100)*presentation)/100;\n double f = ((10%100)*portfolio)/100;\n double g = ((10%100)*reflection)/100;\n double h = ((16%100)*examination)/100;\n double i = ((12%100)*killerRobot)/100;\n double grade = ((a+b+c+d+e+f+g+h+i)/8);//*100;\n return grade;\n }",
"public abstract float getProbability(String singleToken);",
"@Override\r\n\tpublic Double getPropensity_pension_score() {\n\t\treturn super.getPropensity_pension_score();\r\n\t}",
"public static double[]getBackgroundStatsFromProcessor(ImageProcessor imgP) {\n\t\tint dimX=imgP.getWidth();\n\t\tint dimY=imgP.getHeight();\n\t\tint samplSize=Math.min(10+20,dimX/10);\n\t\tif(dimX<100)samplSize=12;\n\t\tif(dimX>500)samplSize=40;\n\n\t\tint x0=(3*samplSize)/2;\n\t\tint y0=(3*samplSize)/2;\n\t\tint x1=dimX/2;\n\t\tint y1=dimY/2;\n\t\tint x2=dimX-(3*samplSize)/2;\n\t\tint y2=dimY-(3*samplSize)/2;\n\t\tdouble[][] vals=new double[8][];\n\t\tvals[0]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y0,samplSize/2);\n\t\tvals[1]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y2,samplSize/2);\n\t\tvals[2]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y0,samplSize/2);\n\t\tvals[3]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/2);\t\t\n\t\tvals[4]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y1,samplSize/4);\n\t\tvals[5]=VitimageUtils.valuesOfImageProcessor(imgP,x1,y0,samplSize/4);\n\t\tvals[6]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y1,samplSize/4);\n\t\tvals[7]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/4);\n\n\t\t//Compute the global mean over all these squares\n\t\tdouble[]tempStatsMeanVar=null;\n\t\tdouble[]tempStats=new double[vals.length];\n\t\t\n\t\t//Measure local stats, and guess that three of them can host the object\n\t\tfor(int i=0;i<vals.length;i++) {\n\t\t\ttempStatsMeanVar=VitimageUtils.statistics1D(vals[i]);\n\t\t\ttempStats[i]=tempStatsMeanVar[0];\n\t\t}\n\n\t\tdouble[]tempStatsCorrected=null;\n\t\tint incr=0;\n\t\tdouble[][]valsBis=null;\n\t\ttempStatsCorrected=new double[5];//Suppress the 3 maximum, that should be the border or corner where the object lies\n\n\t\tdouble[]tempStats2=doubleArraySort(tempStats);\n\t\tfor(int i=0;i<5;i++)tempStatsCorrected[i]=tempStats2[i];\n\t\tvalsBis=new double[5][];\t\t\t\n\t\tfor(int i=0;i<8 && incr<5;i++) {if(tempStats[i]<=tempStatsCorrected[4]) {valsBis[incr++]=vals[i];}}\n\t\t\t\n\t\tdouble []valsRetBis=VitimageUtils.statistics2D(valsBis);\t\t\n\t\treturn valsRetBis;\n\t}",
"public double getPerimiter(){return (2*height +2*width);}",
"public double[] rotatedProportionPercentage(){\n if(!this.rotationDone)throw new IllegalArgumentException(\"No rotation has been performed\");\n return this.rotatedProportionPercentage;\n }",
"@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }",
"@Override\n\tpublic double getProbability(Robot robot) {\n\t\treturn 0;\n\t}",
"public float getChance() {\n return chance;\n }",
"public float getChance()\n {\n return 1.0f;\n }",
"@Override\r\n\tpublic double getProb(double price, double[] realized) {\r\n\t\treturn getPMF(realized)[ bin(price, precision) ];\r\n\t}",
"double getTransProb();",
"public void computeUtility(Tile[] tile, double[] probability, double r, double g) {\n }",
"public double[] ratioPublicVsPrivateNewspaper() {\n\t\tcheckAuthority();\n\t\tdouble ratio[] = new double[2];\n\t\tdouble res[] = new double[2];\n\t\tres[0] = 0.;\n\t\tres[1] = 0.;\n\n\t\ttry {\n\t\t\tratio[0] = this.administratorRepository.ratioPublicNewspaper();\n\t\t\tratio[1] = this.administratorRepository.ratioPrivateNewspaper();\n\t\t\treturn ratio;\n\t\t} catch (Exception e) {\n\t\t\treturn res;\n\t\t}\n\n\t}",
"public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}",
"private double getClassProbability(ClassificationClass classificationClass) {\n if (classificationClass == null) {\n return 0;\n }\n\n double documentsInClass = 0;\n\n for (Document document : documents) {\n if (document.getClassificationClasses().contains(classificationClass)) {\n documentsInClass++;\n }\n }\n\n return documentsInClass / documents.size();\n }",
"@Override\r\n\tpublic Double getPropensity_trust_score() {\n\t\treturn super.getPropensity_trust_score();\r\n\t}",
"@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }",
"private double [] uniformDiscreteProbs(int numStates) \n {\n double [] uniformProbs = new double[2 * numStates];\n for(int i = 0; i < 2 * numStates; i++)\n uniformProbs[i] = (1.0 / (2 * numStates));\n return uniformProbs;\n }",
"public Map<String, WordImageRelevaces> calculateImageWordRelevanceCompact(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\r\n\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\tint index = 0;\r\n\r\n\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Normalise\r\n\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\tindex++;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t}\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}",
"public double calculateSpecificity() {\n final long divisor = trueNegative + falsePositive;\n if(divisor == 0) {\n return 0.0;\n } else {\n return trueNegative / (double)divisor;\n }\n }",
"public double getActionProbability(final State state, final Action action) {\r\n return getProperties(state).getActionProbability(action);\r\n }",
"public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }",
"public double expectedFalsePositiveProbability() {\n\t\treturn Math.pow((1 - Math.exp(-k * (double) expectedElements\n\t\t\t\t/ (double) bitArraySize)), k);\n\t}",
"public void buildPriors() {\n\t\t// grab the list of all class labels for this fold\n\t\tList<List<String>> classListHolder = dc.getClassificationFold();\n\t\tint totalClasses = 0; // track ALL class occurrences for this fold\n\t\tint[] totalClassOccurrence = new int[classes.size()]; // track respective class occurrence\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue; // skip testing fold\n\t\t\t} else {\n\t\t\t\tcurrentFold = i;\n\t\t\t} // end if\n\n\t\t\t// grab the list of all classes for this current fold\n\t\t\tList<String> classList = classListHolder.get(currentFold);\n\t\t\t// track the total number of classes in this fold and their occurrences\n\t\t\ttotalClasses += classList.size();\n\t\t\t// for each class occurrence, match it to a class and track its occurrence\n\t\t\tfor (String className : classList) {\n\t\t\t\tfor (int j = 0; j < classes.size(); j++) {\n\t\t\t\t\tif (className.equals(classes.get(j))) {\n\t\t\t\t\t\ttotalClassOccurrence[j]++;\n\t\t\t\t\t} // end if\n\t\t\t\t} // end for\n\t\t\t} // end for\n\t\t} // end for\n\n\t\t// divide a particular class occurrence by total number of classes across training set\n\t\tfor (int i = 0; i < classPriors.length; i++) {\n\t\t\tclassPriors[i] = totalClassOccurrence[i] / totalClasses;\n\t\t} // end for\n\t}",
"double getMissChance();",
"public static double[] getProbs(List<Derivation> derivations, double temperature) {\n double[] probs = new double[derivations.size()];\n for (int i = 0; i < derivations.size(); i++)\n probs[i] = derivations.get(i).getScore() / temperature;\n if (probs.length > 0)\n NumUtils.expNormalize(probs);\n return probs;\n }",
"public boolean reproducirse() {\n r = new Random();\r\n return Float.compare(r.nextFloat(), probReproducirse) <= 0;\r\n }",
"public double getScore() {\n int as = this.attributes.size(); // # of attributes that were matched\n\n // we use thresholding ranking approach for numInstances to influence the matching score\n int instances = this.train.numInstances();\n int inst_rank = 0;\n if (instances > 100) {\n inst_rank = 1;\n }\n if (instances > 500) {\n inst_rank = 2;\n }\n\n return this.p_sum + as + inst_rank;\n }",
"double getRatio();",
"private double getAttributeProbability(String attribute, int attributeIndex) {\n\t\tDouble value; // store value of raw data\n\t\tif (attribute.chars().allMatch(Character::isDigit) || attribute.contains(\".\")) {\n\t\t\tvalue = Double.valueOf(attribute);\n\t\t} else {\n\t\t\tvalue = (double) attribute.hashCode();\n\t\t} // end if-else\n\n\n\t\tdouble totalSelectedAttribute = 0;\n\t\tfor (Bin bin : attribBins.get(attributeIndex)) {\n\t\t\tif (bin.binContains(value)) {\n\t\t\t\ttotalSelectedAttribute = bin.getFreq();\n\t\t\t\tbreak;\n\t\t\t} // end if\n\t\t} // end for\n\n\t\tint totalAttributes = 0;\n\t\tfor (int i = 0; i < dc.getDataFold().size(); i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\ttotalAttributes += dc.getDataFold().get(i).size();\n\t\t\t} // end if-else\n\t\t} // end for\n\t\treturn totalSelectedAttribute / totalAttributes;\n\t}"
]
| [
"0.5792197",
"0.57066816",
"0.5635645",
"0.5572759",
"0.5562452",
"0.55257493",
"0.53212327",
"0.5280099",
"0.5259797",
"0.5242405",
"0.5241776",
"0.52029526",
"0.5099709",
"0.50816107",
"0.5081152",
"0.50460213",
"0.5026333",
"0.50131893",
"0.49973923",
"0.49362656",
"0.49274006",
"0.49014637",
"0.48904005",
"0.48893443",
"0.48883486",
"0.48626068",
"0.48553148",
"0.48407963",
"0.48381814",
"0.4823488",
"0.48085284",
"0.48003718",
"0.47874287",
"0.4778859",
"0.47704858",
"0.47612575",
"0.4759973",
"0.47543684",
"0.47448784",
"0.47440794",
"0.47309622",
"0.47279537",
"0.47232834",
"0.47222587",
"0.4720755",
"0.47107315",
"0.46709624",
"0.46687084",
"0.4661704",
"0.46471503",
"0.46448085",
"0.4641382",
"0.46333593",
"0.4630833",
"0.46189335",
"0.46061262",
"0.46044046",
"0.46036986",
"0.46035802",
"0.46022725",
"0.45985234",
"0.4595487",
"0.45929152",
"0.4568836",
"0.4558225",
"0.4557072",
"0.45525363",
"0.45493653",
"0.45481145",
"0.45372245",
"0.45344004",
"0.45292062",
"0.45216995",
"0.45159578",
"0.45023647",
"0.44994995",
"0.44896108",
"0.44894743",
"0.44869757",
"0.44675604",
"0.44656563",
"0.44603154",
"0.4449972",
"0.4446754",
"0.44359973",
"0.44357845",
"0.44308314",
"0.4427383",
"0.44122484",
"0.43956998",
"0.4392812",
"0.4380375",
"0.4375294",
"0.4375232",
"0.43606308",
"0.43596306",
"0.4355109",
"0.43473732",
"0.43359566",
"0.43326777",
"0.43306032"
]
| 0.0 | -1 |
Returns probabilities of the image containing racy or adult content. | public Observable<ServiceResponse<EvaluateInner>> evaluateFileInputWithServiceResponseAsync(byte[] imageStream) {
if (this.client.baseUrl() == null) {
throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null.");
}
if (imageStream == null) {
throw new IllegalArgumentException("Parameter imageStream is required and cannot be null.");
}
final Boolean cacheImage = null;
String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl());
RequestBody imageStreamConverted = RequestBody.create(MediaType.parse("image/gif"), imageStream);
return service.evaluateFileInput(cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<EvaluateInner>>>() {
@Override
public Observable<ServiceResponse<EvaluateInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<EvaluateInner> clientResponse = evaluateFileInputDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void calculateProbabilities(){\n\t}",
"private void evaluateProbabilities()\n\t{\n\t}",
"public double[] getProbabilities() { return getProbabilities((int[])null); }",
"public double getProbability() {\n return probability;\n }",
"POGOProtos.Rpc.CaptureProbabilityProto getCaptureProbabilities();",
"float getSpecialProb();",
"double[] calculateProbabilities(LACInstance testInstance) throws Exception\n\t{\n\t\tdouble[] probs;\n\t\tdouble[] scores = calculateScores(testInstance);\n\t\t\n\t\tif(scores != null)\n\t\t{\n\t\t\tprobs = new double[scores.length];\n\t\t\tdouble scoreSum = 0.0;\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tscoreSum += scores[i];\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tprobs[i] = scores[i] / scoreSum;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSet<Integer> allClasses = trainingSet.getAllClasses();\n\t\t\tprobs = new double[allClasses.size()];\n\t\t\tfor (Integer clazz : allClasses) \n\t\t\t{\n\t\t\t\tdouble count = trainingSet.getInstancesOfClass(clazz).size();\n\t\t\t\tprobs[clazz] = (count / ((double) trainingSet.length()));\n\t\t\t}\n\t\t}\n\n\t\treturn probs ;\n\t}",
"public double getProbability() {\r\n\t\treturn Probability;\r\n\t}",
"@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}",
"protected double get_breeding_probability()\n {\n return breeding_probability;\n }",
"private double[] evaluateProbability(double[] data) {\n\t\tdouble[] prob = new double[m_NumClasses], v = new double[m_NumClasses];\n\n\t\t// Log-posterior before normalizing\n\t\tfor (int j = 0; j < m_NumClasses - 1; j++) {\n\t\t\tfor (int k = 0; k <= m_NumPredictors; k++) {\n\t\t\t\tv[j] += m_Par[k][j] * data[k];\n\t\t\t}\n\t\t}\n\t\tv[m_NumClasses - 1] = 0;\n\n\t\t// Do so to avoid scaling problems\n\t\tfor (int m = 0; m < m_NumClasses; m++) {\n\t\t\tdouble sum = 0;\n\t\t\tfor (int n = 0; n < m_NumClasses - 1; n++)\n\t\t\t\tsum += Math.exp(v[n] - v[m]);\n\t\t\tprob[m] = 1 / (sum + Math.exp(-v[m]));\n\t\t\tif (prob[m] == 0)\n\t\t\t\tprob[m] = 1.0e-20;\n\t\t}\n\n\t\treturn prob;\n\t}",
"abstract double rightProbability();",
"void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}",
"public Map<String, WordImage> calculateWordsAndImagePropability(\r\n\t\t\tMap<String, WordImage> wordImageRel, int totalUniqueUserCount) {\r\n\r\n\t\tint totalOcurrance = 0;\r\n\r\n\t\t// Calculate the total number of word occurrences in the set of similar\r\n\t\t// and dissimilar images\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getSimlarImages().size();\r\n\r\n\t\t\tif (this.wordNotSimilarImages.get(word) != null)\r\n\t\t\t\twordOccur += this.wordNotSimilarImages.get(word);\r\n\r\n\t\t\twordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\ttotalOcurrance += wordOccur;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// wordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\tint uniqueUsers = wordImageRel.get(word)\r\n\t\t\t\t\t.getWordUniqueUsers(this.photoList).size();\r\n\r\n\t\t\twordImageRel.get(word).setTotalOcurances(totalOcurrance);\r\n\r\n\t\t\t// .......... Voting-similar word probability\r\n\t\t\t// .......................\r\n\r\n\t\t\t// 1. Word probability without user assumptions\r\n\t\t\tdouble PwOnlyWords = ((double) wordOccur / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyWords(PwOnlyWords);\r\n\r\n\t\t\t// 2. Word probability with user proportion to the total number of\r\n\t\t\t// users\r\n\t\t\tdouble PwAllUsers = PwOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwAllUsers(PwAllUsers);\r\n\r\n\t\t\t// 3. Word probability. Word freq is represented by the number of\r\n\t\t\t// unique users only\r\n\t\t\tdouble PwOnlyUniqueUsers = ((double) uniqueUsers / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyUniqueUsers(PwOnlyUniqueUsers);\r\n\r\n\t\t\t// ..........TF-IDF Word Probability Calculation\r\n\t\t\t// .......................\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// 1. Word probability TF.IDF approach without user assumptions\r\n\t\t\tdouble PwTFIDFlOnlyWords = ((double) Rw / R)\r\n\t\t\t\t\t* (Math.log((double) C / Lw) / Math.log(2))\r\n\t\t\t\t\t/ (Math.log((double) C) / Math.log(2));\r\n\t\t\twordImageRel.get(word).setPwTFIDFlOnlyWords(PwTFIDFlOnlyWords);\r\n\r\n\t\t\t// 2. Word probability TF.IDF approach with user proportion to the\r\n\t\t\t// totall number of users\r\n\t\t\tdouble PwTFIDFlAllUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwTFIDFlAllUsers(PwTFIDFlAllUsers);\r\n\r\n\t\t\t// 3. Word probability TF.IDF approach. Word freq is represented by\r\n\t\t\t// the number of unique users only\r\n\t\t\tdouble PwTFIDFOnlyUniqueUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* (uniqueUsers / (double) wordOccur);\r\n\t\t\twordImageRel.get(word).setPwTFIDFOnlyUniqueUsers(\r\n\t\t\t\t\tPwTFIDFOnlyUniqueUsers);\r\n\r\n\t\t\twordImageRel.get(word)\r\n\t\t\t\t\t.setImageProbability(1.0 / (double) wordOccur); // P(c_j|w)\r\n\r\n\t\t}\r\n\t\treturn wordImageRel;\r\n\r\n\t}",
"public double[] proportionPercentage(){\n if(!this.pcaDone)this.pca();\n return this.proportionPercentage;\n }",
"@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}",
"private double getProbOfClass(int catIndex) {\r\n\t\treturn (classInstanceCount[catIndex] + mCategoryPrior)\r\n\t\t\t\t/ (classInstanceCount[0] + classInstanceCount[1] + mCategories.length\r\n\t\t\t\t\t\t* mCategoryPrior);\r\n\t}",
"POGOProtos.Rpc.CaptureProbabilityProtoOrBuilder getCaptureProbabilitiesOrBuilder();",
"@Override\n\tpublic void computeFinalProbabilities() {\n\t\tsuper.computeFinalProbabilities();\n\t}",
"public double getObservationProbability(){\r\n double ret=0;\r\n int time=o.length;\r\n int N=hmm.stateCount;\r\n for (int t=0;t<=time;++t){\r\n for (int i=0;i<N;++i){\r\n ret+=fbManipulator.alpha[t][i]*fbManipulator.beta[t][i];\r\n }\r\n }\r\n ret/=time;\r\n return ret;\r\n }",
"public double contagionProbability(Person p)\n\t{\n\t\tif(p.getAge()<=18)\n\t\t{\n\t\t\treturn con_18*p.contagionProbability();\n\t\t}\n\t\tif(p.getAge()>18 && p.getAge()<=55)\n\t\t{\n\t\t\treturn con_18_55*p.contagionProbability();\n\t\t}\n\t\treturn con_up55*p.contagionProbability();\n\t}",
"public static int getObstacleProbability() {\n\t\tif(SHOW_OBSTACLES){\n\t\t\treturn RANDOM_OBSTACLE_COUNT;\n\t\t}\n\t\treturn 0;\n\t}",
"public abstract Map getProbabilities(String[] path);",
"abstract double leftProbability();",
"public double getProbabilityP() {\n return this.mProbabilityP;\n }",
"public double getAbandonmentProbability() {\n return Math.random();\n }",
"public double outcomeProb(char[] outcome) {\r\n\t\t// get all forward probabilities\r\n\t\tdouble[][] probs = getForwards(outcome);\r\n\t\t\r\n\t\t// initialize the probability of this outcome to 0\r\n\t\tdouble outcomeProb = 0;\r\n\t\t// loop over all nodes in the last column\r\n\t\tfor (int i = 0; i < states.length; ++i)\r\n\t\t\t// add this node's probability to the overall probability\r\n\t\t\toutcomeProb += probs[i][outcome.length - 1];\r\n\t\t\r\n\t\treturn outcomeProb;\r\n\t}",
"private double infobits(double[] probs) {\r\n\t\tdouble sum = 0;\r\n\t\tfor (int i = 0; i < probs.length; i++) {\r\n\t\t\tsum += entropy(probs[i]);\r\n\t\t}\r\n\t\treturn sum;\r\n\t}",
"public float getSpecialProb() {\n return specialProb_;\n }",
"double getCritChance();",
"public void calculateProbabilities(Ant ant) {\n int i = ant.trail[currentIndex];\n double pheromone = 0.0;\n for (int l = 0; l < numberOfCities; l++) {\n if (!ant.visited(l)) {\n pheromone += (Math.pow(trails[i][l], alpha) + 1) * (Math.pow(graph[i][l], beta) + 1) *\n (Math.pow(emcMatrix[i][l], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][l], ddd) + 1);\n }\n }\n for (int j = 0; j < numberOfCities; j++) {\n if (ant.visited(j)) {\n probabilities[j] = 0.0;\n } else {\n double numerator = (Math.pow(trails[i][j], alpha) + 1) * (Math.pow(graph[i][j], beta) + 1) *\n (Math.pow(emcMatrix[i][j], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][j], ddd) + 1);\n probabilities[j] = numerator / pheromone;\n }\n }\n }",
"private void classifyTestImages() throws FileNotFoundException, UnsupportedEncodingException {\n PrintWriter writer = new PrintWriter(\"result.txt\", \"UTF-8\");\n writer.println(\"#Authors: Thomas Sarlin & Petter Poucette\");\n\n ArrayList<Image> images = testReader.getImages();\n double activationResult[]=new double[4];\n int bestGuess;\n for (Image image : images) {\n for (int j = 0; j < 4; j++)\n activationResult[j] = activationFunction\n .apply(sumWeights(j, image));\n\n bestGuess = getBestGuess(activationResult);\n writer.println(image.getName() + \" \" + bestGuess);\n }\n writer.close();\n }",
"public float getSpecialProb() {\n return specialProb_;\n }",
"private List<Integer> generateProb() {\n Integer[] randArr = new Integer[numCols*numRows];\n\n int start = 0;\n int end;\n for(int i = 0; i < myStateMap.size(); i++) {\n double prob = myStateMap.get(i).getProb();\n end = (int) (prob * numCols * numRows + start);\n for(int j = start; j < end; j++) {\n if(end > randArr.length) {\n break;\n }\n randArr[j] = myStateMap.get(i).getType();\n }\n start = end;\n }\n\n List<Integer> arr = new ArrayList<>(Arrays.asList(randArr));\n Collections.shuffle(arr);\n return arr;\n }",
"public Bounds getProbabilityBounds();",
"private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}",
"public Map<String, WordImageRelevaces> calculateImageWordRelevance(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tPrintWriter tempOut;\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\t\ttry {\r\n\r\n\t\t\ttempOut = new PrintWriter(word_prop_output);\r\n\r\n\t\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\t\tint index = 0;\r\n\r\n\t\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\t\ttempOut.println(\"Word , total Occur , #NotSimImgs, #SimImgs , WordOccur , #Unique Users \"\r\n\t\t\t\t\t+ \", Pw1, Pw2,Pw3 , Pw4 , Pw5,Pw6 , C, R, Rw, Lw\");\r\n\r\n\t\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\t\tint C = totalNumberOfImages;\r\n\t\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t\ttempOut.println(word\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getTotalOcurences()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordNotSimilarImages.get(word)\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getSimilarImageIDs().size()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getOcurrances()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word)\r\n\t\t\t\t\t\t\t\t.getWordUniqueUsers(this.photoList).size()\r\n\t\t\t\t\t\t+ \",\" + +Pw1 + \",\" + Pw2 + \",\" + Pw3 + \",\" + Pw4 + \",\"\r\n\t\t\t\t\t\t+ Pw5 + \",\" + Pw6 + \",\" + C + \",\" + R + \",\" + Rw + \",\"\r\n\t\t\t\t\t\t+ Lw);\r\n\r\n\t\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Normalise\r\n\t\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t\t\ttempOut.close();\r\n\t\t\t}\r\n\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\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}",
"boolean getProbables();",
"@Test\n void adjectivesScoring() {\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day; glad @JeremyKappell is standing up against #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB (Via NEWS 8 WROC)\");\n HashMap<String, Double> as = np.adjectivesScoring(sentences);\n for (String key : as.keySet()) {\n Double value = as.get(key);\n assertTrue(value >= 0 && value <= 4);\n }\n }",
"public abstract float getProbability(String[] tokens);",
"private int getPetImages() {\n int nUserPets = user.getPets().size();\n Drawable defaultDrawable = getResources().getDrawable(R.drawable.single_paw, null);\n Bitmap defaultBitmap = ((BitmapDrawable) defaultDrawable).getBitmap();\n countImagesNotFound = new int[nUserPets];\n Arrays.fill(countImagesNotFound, 0);\n\n ExecutorService executorService = Executors.newCachedThreadPool();\n startRunnable(nUserPets, executorService);\n executorService.shutdown();\n\n try {\n executorService.awaitTermination(3, TimeUnit.MINUTES);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return calculateImagesNotFound();\n }",
"private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}",
"public double getProbability(Object rootState) { return getProbability(rootState, (Object[])null); }",
"private double getProbabilityScore(Cell c,int bitmask)\n {\n\t return Math.pow(\n\t\t\t Math.pow(m_probs1[c.getCol()-1],(1&bitmask) ) * \n\t\t\t Math.pow(m_probs2[c.getRow()-1],(2&bitmask)/2) //geo-mean\n\t\t\t , Math.min(1,3.5-bitmask));\n }",
"private List<ProbabilityOfDefault> getPDs(Scenario s) {\n\t\t\r\n\t\tCountry ctry = getCountry();\r\n\t\t\r\n\t\tDouble probGrowth = ctry.getProbabilityOfGrowth();\r\n\t\tDouble probRecession = ctry.getProbabilityOfRecession();\r\n\t\t\r\n\t\tList<ProbabilityOfDefault> adjustedPDs = new ArrayList<>();\r\n\t\t\r\n\t\tfor (ProbabilityOfDefault pd : rating.getPDs()) {\r\n\t\t\tProbabilityOfDefault newPd = pd;\r\n\t\t\tnewPd.setPD((probGrowth * pd.getGrowthPD()) + (probRecession * pd.getRecessionPD()));\r\n\t\t\tadjustedPDs.add(newPd);\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(adjustedPDs);\r\n\t\treturn adjustedPDs;\r\n\t}",
"private double[] computePredictionValues() {\n double[] predResponses = new double[D];\n for (int d = 0; d < D; d++) {\n double expDotProd = Math.exp(docLabelDotProds[d]);\n double docPred = expDotProd / (expDotProd + 1);\n predResponses[d] = docPred;\n }\n return predResponses;\n }",
"private static void findBigramProbTuring() {\n\t\t\t\t\n\t\tbigramProbT= new HashMap<String, Double>();\n\t\tdouble prob;\n\t\t\n\t\tfor(String s: corpusBigramCount.keySet()){\n\t\t\tint count=corpusBigramCount.get(s);\n\t\t\tif(count==0){\n\t\t\t\tprob= bucketCountT.getOrDefault(1,0.0)/corpusNumOfBigrams;\n\t\t\t}\n\t\t\telse\n\t\t\t\tprob= bigramCountTI.get(count)/corpusNumOfBigrams;\n\t\t\tbigramProbT.put(s, prob);\n\t\t}\n\t\t\t\n\t}",
"public List<Result> recognize(IplImage image);",
"public double outcomeGivenPathProb(char[] outcome, S[] path) {\r\n\t\t// initialize probability to 1\r\n\t\tdouble prob = 1;\r\n\t\t// loop over all emitted chars\r\n\t\tfor (int i = 0; i < outcome.length; ++i)\r\n\t\t\t// multiple probability by the emission probability of this char\r\n\t\t\tprob *= emissProb(indexOf(states, path[i]), outcome[i]);\r\n\t\t\r\n\t\treturn prob;\r\n\t}",
"public Image getNatural();",
"public double getProbability() {\n\t\treturn getD_errorProbability();\n\t}",
"public Double getProb(T element) {\n\t\treturn itemProbs_.get(element);\n\t}",
"public double getCandProbability(String candidate){\n\t\tString[] candTerms = candidate.split(\"\\\\s+\");\n\t\t\n\t\t// Total Tokens\n\t\tdouble totTokens = (double)unigramDict.termCount();\n\t\t//P(w1) in log\n\t\tString w1 = candTerms[0];\n\t\tdouble probW1 = Math.log10((double)unigramDict.count(w1, wordToId)/totTokens);\n\t\t\n\t\t//P (w1, w2, ..., wn)\n\t\tdouble probCandidate = probW1;\n\t\t\n\t\t\n\t\tfor( int i =0; i < candTerms.length-1; i++){\n\t\t\t//Pint(w2|w1) = Pmle(w2) + (1 )Pmle(w2|w1)\n\t\t\tString currentTerm = candTerms[i];\n\t\t\tString nextTerm = candTerms[i+1];\n\t\t\tString bigram = currentTerm + \" \" + nextTerm;\n\t\t\tint freqBigram = bigramDict.count(bigram, wordToId);\n\t\t\t\n\t\t\t//this term should be in dictionary\n\t\t\tint freqFirstTerm = unigramDict.count(currentTerm, wordToId);\n\t\t\t\n\t\t\tdouble PmleW2W1 = (double)freqBigram/(double)freqFirstTerm;\n\t\t\t\n\t\t\t//System.out.println(\"candidate=[\" + candidate + \"]\\tbigram=[\" + bigram + \"]\\tterms=\" + Arrays.toString(terms));\n\t\t\tdouble PmleW2 = (double)unigramDict.count(nextTerm, wordToId) / totTokens;\n\t\t\t//double lamda= 0.1;\n\t\t\tdouble PintW2W1 = lamda*PmleW2 + (1-lamda)*PmleW2W1;\n\t\t\tprobCandidate = probCandidate + Math.log10(PintW2W1);\n\t\t}\n\t\treturn probCandidate;\n\t}",
"public scala.collection.immutable.IndexedSeq<java.lang.Object> getQuantiles (scala.collection.Iterable<java.lang.Object> probabilities) { throw new RuntimeException(); }",
"public void createProbsMap() {\n\t\tif(this.counts == null) {\n\t\t\tcreateCountMap();\n\t\t}\n\t\t\n\t\tMap<String, Double> result = new HashMap<String, Double>();\n\t\t\n\t\t// Make the counts and get the highest probability found \n\t\tdouble highestProb = 0.00;\n\t\tdouble size = (double) this.getData().size();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\tresult.put(entry.getKey(), value / size);\n\t\t\t\n\t\t\tif(value/size > highestProb) {\n\t\t\t\thighestProb = value/size;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fill the highest probilities \n\t\tList<String> highestProbs = new ArrayList<String>();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\t\n\t\t\tif(value/size == highestProb) {\n\t\t\t\thighestProbs.add(entry.getKey());\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.highestProbs = highestProbs;\n\t\tthis.highestProb = highestProb;\n\t\tthis.probs \t\t = result;\n\t}",
"public int[] podium(){\n int[] pod = new int[3];\n for (int i=0; i<3; i++) {\n pod[i]=0;\n }\n \n int n = this.scores.length;\n for (int i=0; i<n; i++) {\n if (scores[i]>pod[2]) {\n pod[0]=pod[1];\n pod[1]=pod[2];\n pod[2]=scores[i];\n } else if ((scores[i]>pod[1])) {\n pod[0]=pod[1];\n pod[1]=scores[i];\n } else if ((scores[i]>pod[0])) {\n pod[0]=scores[i];\n }\n \n }\n return pod;\n \n }",
"double getBranchProbability();",
"public Action getActionBasedOnProbability(final State state) {\r\n final double decision = Math.random();\r\n double decisionCount = 0;\r\n\r\n for (final Map.Entry<Action, Double> actionProb : getProperties(state).getActionProbabilities().entrySet()) {\r\n decisionCount += actionProb.getValue();\r\n if (decisionCount >= decision) {\r\n return actionProb.getKey();\r\n }\r\n }\r\n\r\n System.err.println(\"Error: cannot choose action!\");\r\n System.err.println(getProperties(state).getActionProbabilities());\r\n return null;\r\n }",
"public int getContaminantPPM() {\n return contaminantPPM;\n }",
"float genChance();",
"protected Double successProbability(){\n\t\tnodeKValues = collectKValues();\n\t\tList<Integer[]> placements = getDistinctPlacements(getMinKPath());\n\t\tlong maxNumberOfColorings = 0;\n\t\tfor (Integer[] placement : placements){\n\t\t\tlong colorings = numberOfColorings(placement);\n\t\t\tif (colorings > maxNumberOfColorings)\n\t\t\t\tmaxNumberOfColorings = colorings;\n\t\t}\n\t\tDouble probability = 1.0/maxNumberOfColorings;\n\t\tfor (int i=1; i<=pathLength; i++){ // factorial of pathlength\n\t\t\tprobability = probability * i;\n\t\t}\n\t\treturn probability;\n\t}",
"public abstract double getLinkProbability(int linkId);",
"public double getProb(String word) {\n double numWords = wordMap.get(\"TOTAL_WORDS\");\n return wordMap.getOrDefault(word, 0.0)/numWords;\n }",
"Float getFedAnimalsPercentage();",
"private void checkProbability(String mapName, WildEncounterInfo[] wildEncounters) {\n int totalProbability = 0;\n for (WildEncounterInfo wildEncounter : wildEncounters) {\n totalProbability += wildEncounter.getProbability();\n }\n\n Assert.assertEquals(mapName, 100, totalProbability);\n }",
"public double getProbRecombinacion() {\n return getDouble(params.probRecombinacion, PROP_PROB_RECOMB, 0.5);\n }",
"@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }",
"public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}",
"public double getProbabilityOf(T aData) {\n\t\tdouble freq = this.getFrequencyOf(aData);\n\t\tdouble dblSize = numEntries;\n\t\treturn freq/dblSize;\n\t}",
"protected int getPostiveOnes() {\n Rating[] ratingArray = this.ratings;\n int posOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) {\n if(ratingArray[i].getScore() == 1) posOneCount++; \n }\n }\n return posOneCount;\n }",
"public double people(double precis,double plagiarism,double poster,double video,double presentation,double portfolio,double reflection,double examination,double killerRobot)\n {\n double a = ((4%100)*precis)/100;\n double b = ((8%100)*plagiarism)/100;\n double c = ((12%100)*poster)/100;\n double d = ((16%100)*video)/100;\n double e = ((12%100)*presentation)/100;\n double f = ((10%100)*portfolio)/100;\n double g = ((10%100)*reflection)/100;\n double h = ((16%100)*examination)/100;\n double i = ((12%100)*killerRobot)/100;\n double grade = ((a+b+c+d+e+f+g+h+i)/8);//*100;\n return grade;\n }",
"public abstract float getProbability(String singleToken);",
"@Override\r\n\tpublic Double getPropensity_pension_score() {\n\t\treturn super.getPropensity_pension_score();\r\n\t}",
"public static double[]getBackgroundStatsFromProcessor(ImageProcessor imgP) {\n\t\tint dimX=imgP.getWidth();\n\t\tint dimY=imgP.getHeight();\n\t\tint samplSize=Math.min(10+20,dimX/10);\n\t\tif(dimX<100)samplSize=12;\n\t\tif(dimX>500)samplSize=40;\n\n\t\tint x0=(3*samplSize)/2;\n\t\tint y0=(3*samplSize)/2;\n\t\tint x1=dimX/2;\n\t\tint y1=dimY/2;\n\t\tint x2=dimX-(3*samplSize)/2;\n\t\tint y2=dimY-(3*samplSize)/2;\n\t\tdouble[][] vals=new double[8][];\n\t\tvals[0]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y0,samplSize/2);\n\t\tvals[1]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y2,samplSize/2);\n\t\tvals[2]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y0,samplSize/2);\n\t\tvals[3]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/2);\t\t\n\t\tvals[4]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y1,samplSize/4);\n\t\tvals[5]=VitimageUtils.valuesOfImageProcessor(imgP,x1,y0,samplSize/4);\n\t\tvals[6]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y1,samplSize/4);\n\t\tvals[7]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/4);\n\n\t\t//Compute the global mean over all these squares\n\t\tdouble[]tempStatsMeanVar=null;\n\t\tdouble[]tempStats=new double[vals.length];\n\t\t\n\t\t//Measure local stats, and guess that three of them can host the object\n\t\tfor(int i=0;i<vals.length;i++) {\n\t\t\ttempStatsMeanVar=VitimageUtils.statistics1D(vals[i]);\n\t\t\ttempStats[i]=tempStatsMeanVar[0];\n\t\t}\n\n\t\tdouble[]tempStatsCorrected=null;\n\t\tint incr=0;\n\t\tdouble[][]valsBis=null;\n\t\ttempStatsCorrected=new double[5];//Suppress the 3 maximum, that should be the border or corner where the object lies\n\n\t\tdouble[]tempStats2=doubleArraySort(tempStats);\n\t\tfor(int i=0;i<5;i++)tempStatsCorrected[i]=tempStats2[i];\n\t\tvalsBis=new double[5][];\t\t\t\n\t\tfor(int i=0;i<8 && incr<5;i++) {if(tempStats[i]<=tempStatsCorrected[4]) {valsBis[incr++]=vals[i];}}\n\t\t\t\n\t\tdouble []valsRetBis=VitimageUtils.statistics2D(valsBis);\t\t\n\t\treturn valsRetBis;\n\t}",
"public double getPerimiter(){return (2*height +2*width);}",
"public double[] rotatedProportionPercentage(){\n if(!this.rotationDone)throw new IllegalArgumentException(\"No rotation has been performed\");\n return this.rotatedProportionPercentage;\n }",
"@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }",
"@Override\n\tpublic double getProbability(Robot robot) {\n\t\treturn 0;\n\t}",
"public float getChance() {\n return chance;\n }",
"public float getChance()\n {\n return 1.0f;\n }",
"@Override\r\n\tpublic double getProb(double price, double[] realized) {\r\n\t\treturn getPMF(realized)[ bin(price, precision) ];\r\n\t}",
"double getTransProb();",
"public void computeUtility(Tile[] tile, double[] probability, double r, double g) {\n }",
"public double[] ratioPublicVsPrivateNewspaper() {\n\t\tcheckAuthority();\n\t\tdouble ratio[] = new double[2];\n\t\tdouble res[] = new double[2];\n\t\tres[0] = 0.;\n\t\tres[1] = 0.;\n\n\t\ttry {\n\t\t\tratio[0] = this.administratorRepository.ratioPublicNewspaper();\n\t\t\tratio[1] = this.administratorRepository.ratioPrivateNewspaper();\n\t\t\treturn ratio;\n\t\t} catch (Exception e) {\n\t\t\treturn res;\n\t\t}\n\n\t}",
"private double getClassProbability(ClassificationClass classificationClass) {\n if (classificationClass == null) {\n return 0;\n }\n\n double documentsInClass = 0;\n\n for (Document document : documents) {\n if (document.getClassificationClasses().contains(classificationClass)) {\n documentsInClass++;\n }\n }\n\n return documentsInClass / documents.size();\n }",
"public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}",
"@Override\r\n\tpublic Double getPropensity_trust_score() {\n\t\treturn super.getPropensity_trust_score();\r\n\t}",
"@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }",
"private double [] uniformDiscreteProbs(int numStates) \n {\n double [] uniformProbs = new double[2 * numStates];\n for(int i = 0; i < 2 * numStates; i++)\n uniformProbs[i] = (1.0 / (2 * numStates));\n return uniformProbs;\n }",
"public Map<String, WordImageRelevaces> calculateImageWordRelevanceCompact(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\r\n\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\tint index = 0;\r\n\r\n\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Normalise\r\n\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\tindex++;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t}\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}",
"public double calculateSpecificity() {\n final long divisor = trueNegative + falsePositive;\n if(divisor == 0) {\n return 0.0;\n } else {\n return trueNegative / (double)divisor;\n }\n }",
"public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }",
"public double getActionProbability(final State state, final Action action) {\r\n return getProperties(state).getActionProbability(action);\r\n }",
"public double expectedFalsePositiveProbability() {\n\t\treturn Math.pow((1 - Math.exp(-k * (double) expectedElements\n\t\t\t\t/ (double) bitArraySize)), k);\n\t}",
"double getMissChance();",
"public void buildPriors() {\n\t\t// grab the list of all class labels for this fold\n\t\tList<List<String>> classListHolder = dc.getClassificationFold();\n\t\tint totalClasses = 0; // track ALL class occurrences for this fold\n\t\tint[] totalClassOccurrence = new int[classes.size()]; // track respective class occurrence\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue; // skip testing fold\n\t\t\t} else {\n\t\t\t\tcurrentFold = i;\n\t\t\t} // end if\n\n\t\t\t// grab the list of all classes for this current fold\n\t\t\tList<String> classList = classListHolder.get(currentFold);\n\t\t\t// track the total number of classes in this fold and their occurrences\n\t\t\ttotalClasses += classList.size();\n\t\t\t// for each class occurrence, match it to a class and track its occurrence\n\t\t\tfor (String className : classList) {\n\t\t\t\tfor (int j = 0; j < classes.size(); j++) {\n\t\t\t\t\tif (className.equals(classes.get(j))) {\n\t\t\t\t\t\ttotalClassOccurrence[j]++;\n\t\t\t\t\t} // end if\n\t\t\t\t} // end for\n\t\t\t} // end for\n\t\t} // end for\n\n\t\t// divide a particular class occurrence by total number of classes across training set\n\t\tfor (int i = 0; i < classPriors.length; i++) {\n\t\t\tclassPriors[i] = totalClassOccurrence[i] / totalClasses;\n\t\t} // end for\n\t}",
"public static double[] getProbs(List<Derivation> derivations, double temperature) {\n double[] probs = new double[derivations.size()];\n for (int i = 0; i < derivations.size(); i++)\n probs[i] = derivations.get(i).getScore() / temperature;\n if (probs.length > 0)\n NumUtils.expNormalize(probs);\n return probs;\n }",
"public boolean reproducirse() {\n r = new Random();\r\n return Float.compare(r.nextFloat(), probReproducirse) <= 0;\r\n }",
"public double getScore() {\n int as = this.attributes.size(); // # of attributes that were matched\n\n // we use thresholding ranking approach for numInstances to influence the matching score\n int instances = this.train.numInstances();\n int inst_rank = 0;\n if (instances > 100) {\n inst_rank = 1;\n }\n if (instances > 500) {\n inst_rank = 2;\n }\n\n return this.p_sum + as + inst_rank;\n }",
"double getRatio();",
"private double convert() {\n\t\t// modulus is private, but we have the getter\n\t\treturn riskNeutralProbabilityUp * (randomGenerator.getModulus() - 1);\n\t}"
]
| [
"0.5786381",
"0.57027304",
"0.5630279",
"0.5566898",
"0.55602795",
"0.5521205",
"0.53160524",
"0.527399",
"0.52547306",
"0.5238439",
"0.52371645",
"0.5200319",
"0.50942767",
"0.5080741",
"0.5075284",
"0.5040735",
"0.5020369",
"0.5010527",
"0.4992298",
"0.49309567",
"0.49230972",
"0.4899623",
"0.4887625",
"0.48843288",
"0.48821422",
"0.48607966",
"0.48496944",
"0.4836154",
"0.4835873",
"0.48235402",
"0.48042262",
"0.48031998",
"0.47824162",
"0.4775374",
"0.4766173",
"0.47577423",
"0.47575927",
"0.47563463",
"0.47446194",
"0.47406387",
"0.47259223",
"0.47253844",
"0.47236726",
"0.47176018",
"0.4717528",
"0.47095484",
"0.4667282",
"0.46652988",
"0.46641463",
"0.46451575",
"0.46410877",
"0.4640894",
"0.46286342",
"0.4627548",
"0.46115872",
"0.46045855",
"0.46012986",
"0.46012837",
"0.46012086",
"0.46003717",
"0.45955324",
"0.45902592",
"0.45890653",
"0.45657274",
"0.4554271",
"0.45542195",
"0.4550101",
"0.45439222",
"0.45435953",
"0.45366648",
"0.45324874",
"0.45259416",
"0.45175546",
"0.45165685",
"0.4500676",
"0.44949433",
"0.44894037",
"0.4486637",
"0.448473",
"0.4465555",
"0.44596",
"0.44567797",
"0.44500646",
"0.44468585",
"0.4432141",
"0.44306624",
"0.4429654",
"0.44237533",
"0.4406469",
"0.43994612",
"0.43938962",
"0.43787175",
"0.43769315",
"0.4372416",
"0.4359772",
"0.4357929",
"0.4349213",
"0.43470952",
"0.43335533",
"0.43318015",
"0.43277287"
]
| 0.0 | -1 |
Returns probabilities of the image containing racy or adult content. | public Observable<EvaluateInner> evaluateFileInputAsync(byte[] imageStream, Boolean cacheImage) {
return evaluateFileInputWithServiceResponseAsync(imageStream, cacheImage).map(new Func1<ServiceResponse<EvaluateInner>, EvaluateInner>() {
@Override
public EvaluateInner call(ServiceResponse<EvaluateInner> response) {
return response.body();
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void calculateProbabilities(){\n\t}",
"private void evaluateProbabilities()\n\t{\n\t}",
"public double[] getProbabilities() { return getProbabilities((int[])null); }",
"public double getProbability() {\n return probability;\n }",
"POGOProtos.Rpc.CaptureProbabilityProto getCaptureProbabilities();",
"float getSpecialProb();",
"double[] calculateProbabilities(LACInstance testInstance) throws Exception\n\t{\n\t\tdouble[] probs;\n\t\tdouble[] scores = calculateScores(testInstance);\n\t\t\n\t\tif(scores != null)\n\t\t{\n\t\t\tprobs = new double[scores.length];\n\t\t\tdouble scoreSum = 0.0;\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tscoreSum += scores[i];\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tprobs[i] = scores[i] / scoreSum;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSet<Integer> allClasses = trainingSet.getAllClasses();\n\t\t\tprobs = new double[allClasses.size()];\n\t\t\tfor (Integer clazz : allClasses) \n\t\t\t{\n\t\t\t\tdouble count = trainingSet.getInstancesOfClass(clazz).size();\n\t\t\t\tprobs[clazz] = (count / ((double) trainingSet.length()));\n\t\t\t}\n\t\t}\n\n\t\treturn probs ;\n\t}",
"public double getProbability() {\r\n\t\treturn Probability;\r\n\t}",
"@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}",
"protected double get_breeding_probability()\n {\n return breeding_probability;\n }",
"private double[] evaluateProbability(double[] data) {\n\t\tdouble[] prob = new double[m_NumClasses], v = new double[m_NumClasses];\n\n\t\t// Log-posterior before normalizing\n\t\tfor (int j = 0; j < m_NumClasses - 1; j++) {\n\t\t\tfor (int k = 0; k <= m_NumPredictors; k++) {\n\t\t\t\tv[j] += m_Par[k][j] * data[k];\n\t\t\t}\n\t\t}\n\t\tv[m_NumClasses - 1] = 0;\n\n\t\t// Do so to avoid scaling problems\n\t\tfor (int m = 0; m < m_NumClasses; m++) {\n\t\t\tdouble sum = 0;\n\t\t\tfor (int n = 0; n < m_NumClasses - 1; n++)\n\t\t\t\tsum += Math.exp(v[n] - v[m]);\n\t\t\tprob[m] = 1 / (sum + Math.exp(-v[m]));\n\t\t\tif (prob[m] == 0)\n\t\t\t\tprob[m] = 1.0e-20;\n\t\t}\n\n\t\treturn prob;\n\t}",
"abstract double rightProbability();",
"void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}",
"public Map<String, WordImage> calculateWordsAndImagePropability(\r\n\t\t\tMap<String, WordImage> wordImageRel, int totalUniqueUserCount) {\r\n\r\n\t\tint totalOcurrance = 0;\r\n\r\n\t\t// Calculate the total number of word occurrences in the set of similar\r\n\t\t// and dissimilar images\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getSimlarImages().size();\r\n\r\n\t\t\tif (this.wordNotSimilarImages.get(word) != null)\r\n\t\t\t\twordOccur += this.wordNotSimilarImages.get(word);\r\n\r\n\t\t\twordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\ttotalOcurrance += wordOccur;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// wordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\tint uniqueUsers = wordImageRel.get(word)\r\n\t\t\t\t\t.getWordUniqueUsers(this.photoList).size();\r\n\r\n\t\t\twordImageRel.get(word).setTotalOcurances(totalOcurrance);\r\n\r\n\t\t\t// .......... Voting-similar word probability\r\n\t\t\t// .......................\r\n\r\n\t\t\t// 1. Word probability without user assumptions\r\n\t\t\tdouble PwOnlyWords = ((double) wordOccur / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyWords(PwOnlyWords);\r\n\r\n\t\t\t// 2. Word probability with user proportion to the total number of\r\n\t\t\t// users\r\n\t\t\tdouble PwAllUsers = PwOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwAllUsers(PwAllUsers);\r\n\r\n\t\t\t// 3. Word probability. Word freq is represented by the number of\r\n\t\t\t// unique users only\r\n\t\t\tdouble PwOnlyUniqueUsers = ((double) uniqueUsers / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyUniqueUsers(PwOnlyUniqueUsers);\r\n\r\n\t\t\t// ..........TF-IDF Word Probability Calculation\r\n\t\t\t// .......................\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// 1. Word probability TF.IDF approach without user assumptions\r\n\t\t\tdouble PwTFIDFlOnlyWords = ((double) Rw / R)\r\n\t\t\t\t\t* (Math.log((double) C / Lw) / Math.log(2))\r\n\t\t\t\t\t/ (Math.log((double) C) / Math.log(2));\r\n\t\t\twordImageRel.get(word).setPwTFIDFlOnlyWords(PwTFIDFlOnlyWords);\r\n\r\n\t\t\t// 2. Word probability TF.IDF approach with user proportion to the\r\n\t\t\t// totall number of users\r\n\t\t\tdouble PwTFIDFlAllUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwTFIDFlAllUsers(PwTFIDFlAllUsers);\r\n\r\n\t\t\t// 3. Word probability TF.IDF approach. Word freq is represented by\r\n\t\t\t// the number of unique users only\r\n\t\t\tdouble PwTFIDFOnlyUniqueUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* (uniqueUsers / (double) wordOccur);\r\n\t\t\twordImageRel.get(word).setPwTFIDFOnlyUniqueUsers(\r\n\t\t\t\t\tPwTFIDFOnlyUniqueUsers);\r\n\r\n\t\t\twordImageRel.get(word)\r\n\t\t\t\t\t.setImageProbability(1.0 / (double) wordOccur); // P(c_j|w)\r\n\r\n\t\t}\r\n\t\treturn wordImageRel;\r\n\r\n\t}",
"public double[] proportionPercentage(){\n if(!this.pcaDone)this.pca();\n return this.proportionPercentage;\n }",
"@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}",
"private double getProbOfClass(int catIndex) {\r\n\t\treturn (classInstanceCount[catIndex] + mCategoryPrior)\r\n\t\t\t\t/ (classInstanceCount[0] + classInstanceCount[1] + mCategories.length\r\n\t\t\t\t\t\t* mCategoryPrior);\r\n\t}",
"POGOProtos.Rpc.CaptureProbabilityProtoOrBuilder getCaptureProbabilitiesOrBuilder();",
"@Override\n\tpublic void computeFinalProbabilities() {\n\t\tsuper.computeFinalProbabilities();\n\t}",
"public double getObservationProbability(){\r\n double ret=0;\r\n int time=o.length;\r\n int N=hmm.stateCount;\r\n for (int t=0;t<=time;++t){\r\n for (int i=0;i<N;++i){\r\n ret+=fbManipulator.alpha[t][i]*fbManipulator.beta[t][i];\r\n }\r\n }\r\n ret/=time;\r\n return ret;\r\n }",
"public double contagionProbability(Person p)\n\t{\n\t\tif(p.getAge()<=18)\n\t\t{\n\t\t\treturn con_18*p.contagionProbability();\n\t\t}\n\t\tif(p.getAge()>18 && p.getAge()<=55)\n\t\t{\n\t\t\treturn con_18_55*p.contagionProbability();\n\t\t}\n\t\treturn con_up55*p.contagionProbability();\n\t}",
"public static int getObstacleProbability() {\n\t\tif(SHOW_OBSTACLES){\n\t\t\treturn RANDOM_OBSTACLE_COUNT;\n\t\t}\n\t\treturn 0;\n\t}",
"public abstract Map getProbabilities(String[] path);",
"abstract double leftProbability();",
"public double getProbabilityP() {\n return this.mProbabilityP;\n }",
"public double getAbandonmentProbability() {\n return Math.random();\n }",
"public double outcomeProb(char[] outcome) {\r\n\t\t// get all forward probabilities\r\n\t\tdouble[][] probs = getForwards(outcome);\r\n\t\t\r\n\t\t// initialize the probability of this outcome to 0\r\n\t\tdouble outcomeProb = 0;\r\n\t\t// loop over all nodes in the last column\r\n\t\tfor (int i = 0; i < states.length; ++i)\r\n\t\t\t// add this node's probability to the overall probability\r\n\t\t\toutcomeProb += probs[i][outcome.length - 1];\r\n\t\t\r\n\t\treturn outcomeProb;\r\n\t}",
"private double infobits(double[] probs) {\r\n\t\tdouble sum = 0;\r\n\t\tfor (int i = 0; i < probs.length; i++) {\r\n\t\t\tsum += entropy(probs[i]);\r\n\t\t}\r\n\t\treturn sum;\r\n\t}",
"public float getSpecialProb() {\n return specialProb_;\n }",
"double getCritChance();",
"private void classifyTestImages() throws FileNotFoundException, UnsupportedEncodingException {\n PrintWriter writer = new PrintWriter(\"result.txt\", \"UTF-8\");\n writer.println(\"#Authors: Thomas Sarlin & Petter Poucette\");\n\n ArrayList<Image> images = testReader.getImages();\n double activationResult[]=new double[4];\n int bestGuess;\n for (Image image : images) {\n for (int j = 0; j < 4; j++)\n activationResult[j] = activationFunction\n .apply(sumWeights(j, image));\n\n bestGuess = getBestGuess(activationResult);\n writer.println(image.getName() + \" \" + bestGuess);\n }\n writer.close();\n }",
"public void calculateProbabilities(Ant ant) {\n int i = ant.trail[currentIndex];\n double pheromone = 0.0;\n for (int l = 0; l < numberOfCities; l++) {\n if (!ant.visited(l)) {\n pheromone += (Math.pow(trails[i][l], alpha) + 1) * (Math.pow(graph[i][l], beta) + 1) *\n (Math.pow(emcMatrix[i][l], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][l], ddd) + 1);\n }\n }\n for (int j = 0; j < numberOfCities; j++) {\n if (ant.visited(j)) {\n probabilities[j] = 0.0;\n } else {\n double numerator = (Math.pow(trails[i][j], alpha) + 1) * (Math.pow(graph[i][j], beta) + 1) *\n (Math.pow(emcMatrix[i][j], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][j], ddd) + 1);\n probabilities[j] = numerator / pheromone;\n }\n }\n }",
"public float getSpecialProb() {\n return specialProb_;\n }",
"private List<Integer> generateProb() {\n Integer[] randArr = new Integer[numCols*numRows];\n\n int start = 0;\n int end;\n for(int i = 0; i < myStateMap.size(); i++) {\n double prob = myStateMap.get(i).getProb();\n end = (int) (prob * numCols * numRows + start);\n for(int j = start; j < end; j++) {\n if(end > randArr.length) {\n break;\n }\n randArr[j] = myStateMap.get(i).getType();\n }\n start = end;\n }\n\n List<Integer> arr = new ArrayList<>(Arrays.asList(randArr));\n Collections.shuffle(arr);\n return arr;\n }",
"public Bounds getProbabilityBounds();",
"public Map<String, WordImageRelevaces> calculateImageWordRelevance(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tPrintWriter tempOut;\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\t\ttry {\r\n\r\n\t\t\ttempOut = new PrintWriter(word_prop_output);\r\n\r\n\t\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\t\tint index = 0;\r\n\r\n\t\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\t\ttempOut.println(\"Word , total Occur , #NotSimImgs, #SimImgs , WordOccur , #Unique Users \"\r\n\t\t\t\t\t+ \", Pw1, Pw2,Pw3 , Pw4 , Pw5,Pw6 , C, R, Rw, Lw\");\r\n\r\n\t\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\t\tint C = totalNumberOfImages;\r\n\t\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t\ttempOut.println(word\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getTotalOcurences()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordNotSimilarImages.get(word)\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getSimilarImageIDs().size()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getOcurrances()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word)\r\n\t\t\t\t\t\t\t\t.getWordUniqueUsers(this.photoList).size()\r\n\t\t\t\t\t\t+ \",\" + +Pw1 + \",\" + Pw2 + \",\" + Pw3 + \",\" + Pw4 + \",\"\r\n\t\t\t\t\t\t+ Pw5 + \",\" + Pw6 + \",\" + C + \",\" + R + \",\" + Rw + \",\"\r\n\t\t\t\t\t\t+ Lw);\r\n\r\n\t\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Normalise\r\n\t\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t\t\ttempOut.close();\r\n\t\t\t}\r\n\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\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}",
"private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}",
"boolean getProbables();",
"@Test\n void adjectivesScoring() {\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day; glad @JeremyKappell is standing up against #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB (Via NEWS 8 WROC)\");\n HashMap<String, Double> as = np.adjectivesScoring(sentences);\n for (String key : as.keySet()) {\n Double value = as.get(key);\n assertTrue(value >= 0 && value <= 4);\n }\n }",
"public abstract float getProbability(String[] tokens);",
"private int getPetImages() {\n int nUserPets = user.getPets().size();\n Drawable defaultDrawable = getResources().getDrawable(R.drawable.single_paw, null);\n Bitmap defaultBitmap = ((BitmapDrawable) defaultDrawable).getBitmap();\n countImagesNotFound = new int[nUserPets];\n Arrays.fill(countImagesNotFound, 0);\n\n ExecutorService executorService = Executors.newCachedThreadPool();\n startRunnable(nUserPets, executorService);\n executorService.shutdown();\n\n try {\n executorService.awaitTermination(3, TimeUnit.MINUTES);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return calculateImagesNotFound();\n }",
"private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}",
"public double getProbability(Object rootState) { return getProbability(rootState, (Object[])null); }",
"private double getProbabilityScore(Cell c,int bitmask)\n {\n\t return Math.pow(\n\t\t\t Math.pow(m_probs1[c.getCol()-1],(1&bitmask) ) * \n\t\t\t Math.pow(m_probs2[c.getRow()-1],(2&bitmask)/2) //geo-mean\n\t\t\t , Math.min(1,3.5-bitmask));\n }",
"private List<ProbabilityOfDefault> getPDs(Scenario s) {\n\t\t\r\n\t\tCountry ctry = getCountry();\r\n\t\t\r\n\t\tDouble probGrowth = ctry.getProbabilityOfGrowth();\r\n\t\tDouble probRecession = ctry.getProbabilityOfRecession();\r\n\t\t\r\n\t\tList<ProbabilityOfDefault> adjustedPDs = new ArrayList<>();\r\n\t\t\r\n\t\tfor (ProbabilityOfDefault pd : rating.getPDs()) {\r\n\t\t\tProbabilityOfDefault newPd = pd;\r\n\t\t\tnewPd.setPD((probGrowth * pd.getGrowthPD()) + (probRecession * pd.getRecessionPD()));\r\n\t\t\tadjustedPDs.add(newPd);\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(adjustedPDs);\r\n\t\treturn adjustedPDs;\r\n\t}",
"private double[] computePredictionValues() {\n double[] predResponses = new double[D];\n for (int d = 0; d < D; d++) {\n double expDotProd = Math.exp(docLabelDotProds[d]);\n double docPred = expDotProd / (expDotProd + 1);\n predResponses[d] = docPred;\n }\n return predResponses;\n }",
"public List<Result> recognize(IplImage image);",
"private static void findBigramProbTuring() {\n\t\t\t\t\n\t\tbigramProbT= new HashMap<String, Double>();\n\t\tdouble prob;\n\t\t\n\t\tfor(String s: corpusBigramCount.keySet()){\n\t\t\tint count=corpusBigramCount.get(s);\n\t\t\tif(count==0){\n\t\t\t\tprob= bucketCountT.getOrDefault(1,0.0)/corpusNumOfBigrams;\n\t\t\t}\n\t\t\telse\n\t\t\t\tprob= bigramCountTI.get(count)/corpusNumOfBigrams;\n\t\t\tbigramProbT.put(s, prob);\n\t\t}\n\t\t\t\n\t}",
"public double outcomeGivenPathProb(char[] outcome, S[] path) {\r\n\t\t// initialize probability to 1\r\n\t\tdouble prob = 1;\r\n\t\t// loop over all emitted chars\r\n\t\tfor (int i = 0; i < outcome.length; ++i)\r\n\t\t\t// multiple probability by the emission probability of this char\r\n\t\t\tprob *= emissProb(indexOf(states, path[i]), outcome[i]);\r\n\t\t\r\n\t\treturn prob;\r\n\t}",
"public Image getNatural();",
"public double getProbability() {\n\t\treturn getD_errorProbability();\n\t}",
"public Double getProb(T element) {\n\t\treturn itemProbs_.get(element);\n\t}",
"public double getCandProbability(String candidate){\n\t\tString[] candTerms = candidate.split(\"\\\\s+\");\n\t\t\n\t\t// Total Tokens\n\t\tdouble totTokens = (double)unigramDict.termCount();\n\t\t//P(w1) in log\n\t\tString w1 = candTerms[0];\n\t\tdouble probW1 = Math.log10((double)unigramDict.count(w1, wordToId)/totTokens);\n\t\t\n\t\t//P (w1, w2, ..., wn)\n\t\tdouble probCandidate = probW1;\n\t\t\n\t\t\n\t\tfor( int i =0; i < candTerms.length-1; i++){\n\t\t\t//Pint(w2|w1) = Pmle(w2) + (1 )Pmle(w2|w1)\n\t\t\tString currentTerm = candTerms[i];\n\t\t\tString nextTerm = candTerms[i+1];\n\t\t\tString bigram = currentTerm + \" \" + nextTerm;\n\t\t\tint freqBigram = bigramDict.count(bigram, wordToId);\n\t\t\t\n\t\t\t//this term should be in dictionary\n\t\t\tint freqFirstTerm = unigramDict.count(currentTerm, wordToId);\n\t\t\t\n\t\t\tdouble PmleW2W1 = (double)freqBigram/(double)freqFirstTerm;\n\t\t\t\n\t\t\t//System.out.println(\"candidate=[\" + candidate + \"]\\tbigram=[\" + bigram + \"]\\tterms=\" + Arrays.toString(terms));\n\t\t\tdouble PmleW2 = (double)unigramDict.count(nextTerm, wordToId) / totTokens;\n\t\t\t//double lamda= 0.1;\n\t\t\tdouble PintW2W1 = lamda*PmleW2 + (1-lamda)*PmleW2W1;\n\t\t\tprobCandidate = probCandidate + Math.log10(PintW2W1);\n\t\t}\n\t\treturn probCandidate;\n\t}",
"public scala.collection.immutable.IndexedSeq<java.lang.Object> getQuantiles (scala.collection.Iterable<java.lang.Object> probabilities) { throw new RuntimeException(); }",
"public void createProbsMap() {\n\t\tif(this.counts == null) {\n\t\t\tcreateCountMap();\n\t\t}\n\t\t\n\t\tMap<String, Double> result = new HashMap<String, Double>();\n\t\t\n\t\t// Make the counts and get the highest probability found \n\t\tdouble highestProb = 0.00;\n\t\tdouble size = (double) this.getData().size();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\tresult.put(entry.getKey(), value / size);\n\t\t\t\n\t\t\tif(value/size > highestProb) {\n\t\t\t\thighestProb = value/size;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fill the highest probilities \n\t\tList<String> highestProbs = new ArrayList<String>();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\t\n\t\t\tif(value/size == highestProb) {\n\t\t\t\thighestProbs.add(entry.getKey());\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.highestProbs = highestProbs;\n\t\tthis.highestProb = highestProb;\n\t\tthis.probs \t\t = result;\n\t}",
"public int[] podium(){\n int[] pod = new int[3];\n for (int i=0; i<3; i++) {\n pod[i]=0;\n }\n \n int n = this.scores.length;\n for (int i=0; i<n; i++) {\n if (scores[i]>pod[2]) {\n pod[0]=pod[1];\n pod[1]=pod[2];\n pod[2]=scores[i];\n } else if ((scores[i]>pod[1])) {\n pod[0]=pod[1];\n pod[1]=scores[i];\n } else if ((scores[i]>pod[0])) {\n pod[0]=scores[i];\n }\n \n }\n return pod;\n \n }",
"public Action getActionBasedOnProbability(final State state) {\r\n final double decision = Math.random();\r\n double decisionCount = 0;\r\n\r\n for (final Map.Entry<Action, Double> actionProb : getProperties(state).getActionProbabilities().entrySet()) {\r\n decisionCount += actionProb.getValue();\r\n if (decisionCount >= decision) {\r\n return actionProb.getKey();\r\n }\r\n }\r\n\r\n System.err.println(\"Error: cannot choose action!\");\r\n System.err.println(getProperties(state).getActionProbabilities());\r\n return null;\r\n }",
"double getBranchProbability();",
"public int getContaminantPPM() {\n return contaminantPPM;\n }",
"float genChance();",
"protected Double successProbability(){\n\t\tnodeKValues = collectKValues();\n\t\tList<Integer[]> placements = getDistinctPlacements(getMinKPath());\n\t\tlong maxNumberOfColorings = 0;\n\t\tfor (Integer[] placement : placements){\n\t\t\tlong colorings = numberOfColorings(placement);\n\t\t\tif (colorings > maxNumberOfColorings)\n\t\t\t\tmaxNumberOfColorings = colorings;\n\t\t}\n\t\tDouble probability = 1.0/maxNumberOfColorings;\n\t\tfor (int i=1; i<=pathLength; i++){ // factorial of pathlength\n\t\t\tprobability = probability * i;\n\t\t}\n\t\treturn probability;\n\t}",
"public abstract double getLinkProbability(int linkId);",
"public double getProb(String word) {\n double numWords = wordMap.get(\"TOTAL_WORDS\");\n return wordMap.getOrDefault(word, 0.0)/numWords;\n }",
"Float getFedAnimalsPercentage();",
"public double getProbRecombinacion() {\n return getDouble(params.probRecombinacion, PROP_PROB_RECOMB, 0.5);\n }",
"private void checkProbability(String mapName, WildEncounterInfo[] wildEncounters) {\n int totalProbability = 0;\n for (WildEncounterInfo wildEncounter : wildEncounters) {\n totalProbability += wildEncounter.getProbability();\n }\n\n Assert.assertEquals(mapName, 100, totalProbability);\n }",
"@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }",
"public double getProbabilityOf(T aData) {\n\t\tdouble freq = this.getFrequencyOf(aData);\n\t\tdouble dblSize = numEntries;\n\t\treturn freq/dblSize;\n\t}",
"public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}",
"protected int getPostiveOnes() {\n Rating[] ratingArray = this.ratings;\n int posOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) {\n if(ratingArray[i].getScore() == 1) posOneCount++; \n }\n }\n return posOneCount;\n }",
"public double people(double precis,double plagiarism,double poster,double video,double presentation,double portfolio,double reflection,double examination,double killerRobot)\n {\n double a = ((4%100)*precis)/100;\n double b = ((8%100)*plagiarism)/100;\n double c = ((12%100)*poster)/100;\n double d = ((16%100)*video)/100;\n double e = ((12%100)*presentation)/100;\n double f = ((10%100)*portfolio)/100;\n double g = ((10%100)*reflection)/100;\n double h = ((16%100)*examination)/100;\n double i = ((12%100)*killerRobot)/100;\n double grade = ((a+b+c+d+e+f+g+h+i)/8);//*100;\n return grade;\n }",
"public abstract float getProbability(String singleToken);",
"@Override\r\n\tpublic Double getPropensity_pension_score() {\n\t\treturn super.getPropensity_pension_score();\r\n\t}",
"public static double[]getBackgroundStatsFromProcessor(ImageProcessor imgP) {\n\t\tint dimX=imgP.getWidth();\n\t\tint dimY=imgP.getHeight();\n\t\tint samplSize=Math.min(10+20,dimX/10);\n\t\tif(dimX<100)samplSize=12;\n\t\tif(dimX>500)samplSize=40;\n\n\t\tint x0=(3*samplSize)/2;\n\t\tint y0=(3*samplSize)/2;\n\t\tint x1=dimX/2;\n\t\tint y1=dimY/2;\n\t\tint x2=dimX-(3*samplSize)/2;\n\t\tint y2=dimY-(3*samplSize)/2;\n\t\tdouble[][] vals=new double[8][];\n\t\tvals[0]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y0,samplSize/2);\n\t\tvals[1]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y2,samplSize/2);\n\t\tvals[2]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y0,samplSize/2);\n\t\tvals[3]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/2);\t\t\n\t\tvals[4]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y1,samplSize/4);\n\t\tvals[5]=VitimageUtils.valuesOfImageProcessor(imgP,x1,y0,samplSize/4);\n\t\tvals[6]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y1,samplSize/4);\n\t\tvals[7]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/4);\n\n\t\t//Compute the global mean over all these squares\n\t\tdouble[]tempStatsMeanVar=null;\n\t\tdouble[]tempStats=new double[vals.length];\n\t\t\n\t\t//Measure local stats, and guess that three of them can host the object\n\t\tfor(int i=0;i<vals.length;i++) {\n\t\t\ttempStatsMeanVar=VitimageUtils.statistics1D(vals[i]);\n\t\t\ttempStats[i]=tempStatsMeanVar[0];\n\t\t}\n\n\t\tdouble[]tempStatsCorrected=null;\n\t\tint incr=0;\n\t\tdouble[][]valsBis=null;\n\t\ttempStatsCorrected=new double[5];//Suppress the 3 maximum, that should be the border or corner where the object lies\n\n\t\tdouble[]tempStats2=doubleArraySort(tempStats);\n\t\tfor(int i=0;i<5;i++)tempStatsCorrected[i]=tempStats2[i];\n\t\tvalsBis=new double[5][];\t\t\t\n\t\tfor(int i=0;i<8 && incr<5;i++) {if(tempStats[i]<=tempStatsCorrected[4]) {valsBis[incr++]=vals[i];}}\n\t\t\t\n\t\tdouble []valsRetBis=VitimageUtils.statistics2D(valsBis);\t\t\n\t\treturn valsRetBis;\n\t}",
"public double getPerimiter(){return (2*height +2*width);}",
"public double[] rotatedProportionPercentage(){\n if(!this.rotationDone)throw new IllegalArgumentException(\"No rotation has been performed\");\n return this.rotatedProportionPercentage;\n }",
"@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }",
"@Override\n\tpublic double getProbability(Robot robot) {\n\t\treturn 0;\n\t}",
"public float getChance() {\n return chance;\n }",
"public float getChance()\n {\n return 1.0f;\n }",
"@Override\r\n\tpublic double getProb(double price, double[] realized) {\r\n\t\treturn getPMF(realized)[ bin(price, precision) ];\r\n\t}",
"double getTransProb();",
"public void computeUtility(Tile[] tile, double[] probability, double r, double g) {\n }",
"public double[] ratioPublicVsPrivateNewspaper() {\n\t\tcheckAuthority();\n\t\tdouble ratio[] = new double[2];\n\t\tdouble res[] = new double[2];\n\t\tres[0] = 0.;\n\t\tres[1] = 0.;\n\n\t\ttry {\n\t\t\tratio[0] = this.administratorRepository.ratioPublicNewspaper();\n\t\t\tratio[1] = this.administratorRepository.ratioPrivateNewspaper();\n\t\t\treturn ratio;\n\t\t} catch (Exception e) {\n\t\t\treturn res;\n\t\t}\n\n\t}",
"private double getClassProbability(ClassificationClass classificationClass) {\n if (classificationClass == null) {\n return 0;\n }\n\n double documentsInClass = 0;\n\n for (Document document : documents) {\n if (document.getClassificationClasses().contains(classificationClass)) {\n documentsInClass++;\n }\n }\n\n return documentsInClass / documents.size();\n }",
"public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}",
"@Override\r\n\tpublic Double getPropensity_trust_score() {\n\t\treturn super.getPropensity_trust_score();\r\n\t}",
"@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }",
"private double [] uniformDiscreteProbs(int numStates) \n {\n double [] uniformProbs = new double[2 * numStates];\n for(int i = 0; i < 2 * numStates; i++)\n uniformProbs[i] = (1.0 / (2 * numStates));\n return uniformProbs;\n }",
"public Map<String, WordImageRelevaces> calculateImageWordRelevanceCompact(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\r\n\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\tint index = 0;\r\n\r\n\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Normalise\r\n\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\tindex++;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t}\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}",
"public double calculateSpecificity() {\n final long divisor = trueNegative + falsePositive;\n if(divisor == 0) {\n return 0.0;\n } else {\n return trueNegative / (double)divisor;\n }\n }",
"public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }",
"public double getActionProbability(final State state, final Action action) {\r\n return getProperties(state).getActionProbability(action);\r\n }",
"public double expectedFalsePositiveProbability() {\n\t\treturn Math.pow((1 - Math.exp(-k * (double) expectedElements\n\t\t\t\t/ (double) bitArraySize)), k);\n\t}",
"double getMissChance();",
"public void buildPriors() {\n\t\t// grab the list of all class labels for this fold\n\t\tList<List<String>> classListHolder = dc.getClassificationFold();\n\t\tint totalClasses = 0; // track ALL class occurrences for this fold\n\t\tint[] totalClassOccurrence = new int[classes.size()]; // track respective class occurrence\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue; // skip testing fold\n\t\t\t} else {\n\t\t\t\tcurrentFold = i;\n\t\t\t} // end if\n\n\t\t\t// grab the list of all classes for this current fold\n\t\t\tList<String> classList = classListHolder.get(currentFold);\n\t\t\t// track the total number of classes in this fold and their occurrences\n\t\t\ttotalClasses += classList.size();\n\t\t\t// for each class occurrence, match it to a class and track its occurrence\n\t\t\tfor (String className : classList) {\n\t\t\t\tfor (int j = 0; j < classes.size(); j++) {\n\t\t\t\t\tif (className.equals(classes.get(j))) {\n\t\t\t\t\t\ttotalClassOccurrence[j]++;\n\t\t\t\t\t} // end if\n\t\t\t\t} // end for\n\t\t\t} // end for\n\t\t} // end for\n\n\t\t// divide a particular class occurrence by total number of classes across training set\n\t\tfor (int i = 0; i < classPriors.length; i++) {\n\t\t\tclassPriors[i] = totalClassOccurrence[i] / totalClasses;\n\t\t} // end for\n\t}",
"public static double[] getProbs(List<Derivation> derivations, double temperature) {\n double[] probs = new double[derivations.size()];\n for (int i = 0; i < derivations.size(); i++)\n probs[i] = derivations.get(i).getScore() / temperature;\n if (probs.length > 0)\n NumUtils.expNormalize(probs);\n return probs;\n }",
"public boolean reproducirse() {\n r = new Random();\r\n return Float.compare(r.nextFloat(), probReproducirse) <= 0;\r\n }",
"public double getScore() {\n int as = this.attributes.size(); // # of attributes that were matched\n\n // we use thresholding ranking approach for numInstances to influence the matching score\n int instances = this.train.numInstances();\n int inst_rank = 0;\n if (instances > 100) {\n inst_rank = 1;\n }\n if (instances > 500) {\n inst_rank = 2;\n }\n\n return this.p_sum + as + inst_rank;\n }",
"double getRatio();",
"private double getAttributeProbability(String attribute, int attributeIndex) {\n\t\tDouble value; // store value of raw data\n\t\tif (attribute.chars().allMatch(Character::isDigit) || attribute.contains(\".\")) {\n\t\t\tvalue = Double.valueOf(attribute);\n\t\t} else {\n\t\t\tvalue = (double) attribute.hashCode();\n\t\t} // end if-else\n\n\n\t\tdouble totalSelectedAttribute = 0;\n\t\tfor (Bin bin : attribBins.get(attributeIndex)) {\n\t\t\tif (bin.binContains(value)) {\n\t\t\t\ttotalSelectedAttribute = bin.getFreq();\n\t\t\t\tbreak;\n\t\t\t} // end if\n\t\t} // end for\n\n\t\tint totalAttributes = 0;\n\t\tfor (int i = 0; i < dc.getDataFold().size(); i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\ttotalAttributes += dc.getDataFold().get(i).size();\n\t\t\t} // end if-else\n\t\t} // end for\n\t\treturn totalSelectedAttribute / totalAttributes;\n\t}"
]
| [
"0.57850313",
"0.57010126",
"0.56290585",
"0.5565697",
"0.5559708",
"0.5519075",
"0.5316536",
"0.52727836",
"0.52534455",
"0.5236468",
"0.5236261",
"0.5198736",
"0.5091604",
"0.50812334",
"0.507524",
"0.50379896",
"0.501882",
"0.50101876",
"0.4990364",
"0.49297088",
"0.4920346",
"0.48977584",
"0.4887237",
"0.4882929",
"0.4881551",
"0.4858258",
"0.48483452",
"0.4834792",
"0.48341623",
"0.48206332",
"0.4803132",
"0.4803068",
"0.4780798",
"0.47732636",
"0.4764049",
"0.47585872",
"0.47556025",
"0.4754406",
"0.47432214",
"0.4739686",
"0.47256002",
"0.47245377",
"0.47228524",
"0.47162777",
"0.47157028",
"0.47086036",
"0.4666865",
"0.4665611",
"0.46632558",
"0.4645651",
"0.46408644",
"0.46405217",
"0.46277493",
"0.46264938",
"0.46103412",
"0.46035856",
"0.46001884",
"0.45997664",
"0.4599624",
"0.45977703",
"0.45944738",
"0.45890316",
"0.45888653",
"0.45658395",
"0.45545518",
"0.45524156",
"0.4549637",
"0.45434496",
"0.45414433",
"0.45359334",
"0.45312563",
"0.45248204",
"0.45165217",
"0.451639",
"0.4500414",
"0.44953394",
"0.4487796",
"0.44842905",
"0.448314",
"0.44636157",
"0.44578058",
"0.44550446",
"0.4448973",
"0.44464502",
"0.44306743",
"0.44303733",
"0.4428187",
"0.44217896",
"0.4403683",
"0.44006646",
"0.43915933",
"0.43783802",
"0.43763268",
"0.43704888",
"0.43574792",
"0.4357228",
"0.434867",
"0.43455118",
"0.43342876",
"0.43323204",
"0.43270162"
]
| 0.0 | -1 |
Returns probabilities of the image containing racy or adult content. | public Observable<ServiceResponse<EvaluateInner>> evaluateFileInputWithServiceResponseAsync(byte[] imageStream, Boolean cacheImage) {
if (this.client.baseUrl() == null) {
throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null.");
}
if (imageStream == null) {
throw new IllegalArgumentException("Parameter imageStream is required and cannot be null.");
}
String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl());
RequestBody imageStreamConverted = RequestBody.create(MediaType.parse("image/gif"), imageStream);
return service.evaluateFileInput(cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<EvaluateInner>>>() {
@Override
public Observable<ServiceResponse<EvaluateInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<EvaluateInner> clientResponse = evaluateFileInputDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void calculateProbabilities(){\n\t}",
"private void evaluateProbabilities()\n\t{\n\t}",
"public double[] getProbabilities() { return getProbabilities((int[])null); }",
"public double getProbability() {\n return probability;\n }",
"POGOProtos.Rpc.CaptureProbabilityProto getCaptureProbabilities();",
"float getSpecialProb();",
"double[] calculateProbabilities(LACInstance testInstance) throws Exception\n\t{\n\t\tdouble[] probs;\n\t\tdouble[] scores = calculateScores(testInstance);\n\t\t\n\t\tif(scores != null)\n\t\t{\n\t\t\tprobs = new double[scores.length];\n\t\t\tdouble scoreSum = 0.0;\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tscoreSum += scores[i];\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tprobs[i] = scores[i] / scoreSum;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSet<Integer> allClasses = trainingSet.getAllClasses();\n\t\t\tprobs = new double[allClasses.size()];\n\t\t\tfor (Integer clazz : allClasses) \n\t\t\t{\n\t\t\t\tdouble count = trainingSet.getInstancesOfClass(clazz).size();\n\t\t\t\tprobs[clazz] = (count / ((double) trainingSet.length()));\n\t\t\t}\n\t\t}\n\n\t\treturn probs ;\n\t}",
"public double getProbability() {\r\n\t\treturn Probability;\r\n\t}",
"@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}",
"protected double get_breeding_probability()\n {\n return breeding_probability;\n }",
"private double[] evaluateProbability(double[] data) {\n\t\tdouble[] prob = new double[m_NumClasses], v = new double[m_NumClasses];\n\n\t\t// Log-posterior before normalizing\n\t\tfor (int j = 0; j < m_NumClasses - 1; j++) {\n\t\t\tfor (int k = 0; k <= m_NumPredictors; k++) {\n\t\t\t\tv[j] += m_Par[k][j] * data[k];\n\t\t\t}\n\t\t}\n\t\tv[m_NumClasses - 1] = 0;\n\n\t\t// Do so to avoid scaling problems\n\t\tfor (int m = 0; m < m_NumClasses; m++) {\n\t\t\tdouble sum = 0;\n\t\t\tfor (int n = 0; n < m_NumClasses - 1; n++)\n\t\t\t\tsum += Math.exp(v[n] - v[m]);\n\t\t\tprob[m] = 1 / (sum + Math.exp(-v[m]));\n\t\t\tif (prob[m] == 0)\n\t\t\t\tprob[m] = 1.0e-20;\n\t\t}\n\n\t\treturn prob;\n\t}",
"abstract double rightProbability();",
"void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}",
"public Map<String, WordImage> calculateWordsAndImagePropability(\r\n\t\t\tMap<String, WordImage> wordImageRel, int totalUniqueUserCount) {\r\n\r\n\t\tint totalOcurrance = 0;\r\n\r\n\t\t// Calculate the total number of word occurrences in the set of similar\r\n\t\t// and dissimilar images\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getSimlarImages().size();\r\n\r\n\t\t\tif (this.wordNotSimilarImages.get(word) != null)\r\n\t\t\t\twordOccur += this.wordNotSimilarImages.get(word);\r\n\r\n\t\t\twordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\ttotalOcurrance += wordOccur;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// wordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\tint uniqueUsers = wordImageRel.get(word)\r\n\t\t\t\t\t.getWordUniqueUsers(this.photoList).size();\r\n\r\n\t\t\twordImageRel.get(word).setTotalOcurances(totalOcurrance);\r\n\r\n\t\t\t// .......... Voting-similar word probability\r\n\t\t\t// .......................\r\n\r\n\t\t\t// 1. Word probability without user assumptions\r\n\t\t\tdouble PwOnlyWords = ((double) wordOccur / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyWords(PwOnlyWords);\r\n\r\n\t\t\t// 2. Word probability with user proportion to the total number of\r\n\t\t\t// users\r\n\t\t\tdouble PwAllUsers = PwOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwAllUsers(PwAllUsers);\r\n\r\n\t\t\t// 3. Word probability. Word freq is represented by the number of\r\n\t\t\t// unique users only\r\n\t\t\tdouble PwOnlyUniqueUsers = ((double) uniqueUsers / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyUniqueUsers(PwOnlyUniqueUsers);\r\n\r\n\t\t\t// ..........TF-IDF Word Probability Calculation\r\n\t\t\t// .......................\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// 1. Word probability TF.IDF approach without user assumptions\r\n\t\t\tdouble PwTFIDFlOnlyWords = ((double) Rw / R)\r\n\t\t\t\t\t* (Math.log((double) C / Lw) / Math.log(2))\r\n\t\t\t\t\t/ (Math.log((double) C) / Math.log(2));\r\n\t\t\twordImageRel.get(word).setPwTFIDFlOnlyWords(PwTFIDFlOnlyWords);\r\n\r\n\t\t\t// 2. Word probability TF.IDF approach with user proportion to the\r\n\t\t\t// totall number of users\r\n\t\t\tdouble PwTFIDFlAllUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwTFIDFlAllUsers(PwTFIDFlAllUsers);\r\n\r\n\t\t\t// 3. Word probability TF.IDF approach. Word freq is represented by\r\n\t\t\t// the number of unique users only\r\n\t\t\tdouble PwTFIDFOnlyUniqueUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* (uniqueUsers / (double) wordOccur);\r\n\t\t\twordImageRel.get(word).setPwTFIDFOnlyUniqueUsers(\r\n\t\t\t\t\tPwTFIDFOnlyUniqueUsers);\r\n\r\n\t\t\twordImageRel.get(word)\r\n\t\t\t\t\t.setImageProbability(1.0 / (double) wordOccur); // P(c_j|w)\r\n\r\n\t\t}\r\n\t\treturn wordImageRel;\r\n\r\n\t}",
"public double[] proportionPercentage(){\n if(!this.pcaDone)this.pca();\n return this.proportionPercentage;\n }",
"@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}",
"private double getProbOfClass(int catIndex) {\r\n\t\treturn (classInstanceCount[catIndex] + mCategoryPrior)\r\n\t\t\t\t/ (classInstanceCount[0] + classInstanceCount[1] + mCategories.length\r\n\t\t\t\t\t\t* mCategoryPrior);\r\n\t}",
"POGOProtos.Rpc.CaptureProbabilityProtoOrBuilder getCaptureProbabilitiesOrBuilder();",
"@Override\n\tpublic void computeFinalProbabilities() {\n\t\tsuper.computeFinalProbabilities();\n\t}",
"public double getObservationProbability(){\r\n double ret=0;\r\n int time=o.length;\r\n int N=hmm.stateCount;\r\n for (int t=0;t<=time;++t){\r\n for (int i=0;i<N;++i){\r\n ret+=fbManipulator.alpha[t][i]*fbManipulator.beta[t][i];\r\n }\r\n }\r\n ret/=time;\r\n return ret;\r\n }",
"public double contagionProbability(Person p)\n\t{\n\t\tif(p.getAge()<=18)\n\t\t{\n\t\t\treturn con_18*p.contagionProbability();\n\t\t}\n\t\tif(p.getAge()>18 && p.getAge()<=55)\n\t\t{\n\t\t\treturn con_18_55*p.contagionProbability();\n\t\t}\n\t\treturn con_up55*p.contagionProbability();\n\t}",
"public static int getObstacleProbability() {\n\t\tif(SHOW_OBSTACLES){\n\t\t\treturn RANDOM_OBSTACLE_COUNT;\n\t\t}\n\t\treturn 0;\n\t}",
"public abstract Map getProbabilities(String[] path);",
"abstract double leftProbability();",
"public double getProbabilityP() {\n return this.mProbabilityP;\n }",
"public double getAbandonmentProbability() {\n return Math.random();\n }",
"public double outcomeProb(char[] outcome) {\r\n\t\t// get all forward probabilities\r\n\t\tdouble[][] probs = getForwards(outcome);\r\n\t\t\r\n\t\t// initialize the probability of this outcome to 0\r\n\t\tdouble outcomeProb = 0;\r\n\t\t// loop over all nodes in the last column\r\n\t\tfor (int i = 0; i < states.length; ++i)\r\n\t\t\t// add this node's probability to the overall probability\r\n\t\t\toutcomeProb += probs[i][outcome.length - 1];\r\n\t\t\r\n\t\treturn outcomeProb;\r\n\t}",
"private double infobits(double[] probs) {\r\n\t\tdouble sum = 0;\r\n\t\tfor (int i = 0; i < probs.length; i++) {\r\n\t\t\tsum += entropy(probs[i]);\r\n\t\t}\r\n\t\treturn sum;\r\n\t}",
"public float getSpecialProb() {\n return specialProb_;\n }",
"double getCritChance();",
"private void classifyTestImages() throws FileNotFoundException, UnsupportedEncodingException {\n PrintWriter writer = new PrintWriter(\"result.txt\", \"UTF-8\");\n writer.println(\"#Authors: Thomas Sarlin & Petter Poucette\");\n\n ArrayList<Image> images = testReader.getImages();\n double activationResult[]=new double[4];\n int bestGuess;\n for (Image image : images) {\n for (int j = 0; j < 4; j++)\n activationResult[j] = activationFunction\n .apply(sumWeights(j, image));\n\n bestGuess = getBestGuess(activationResult);\n writer.println(image.getName() + \" \" + bestGuess);\n }\n writer.close();\n }",
"public void calculateProbabilities(Ant ant) {\n int i = ant.trail[currentIndex];\n double pheromone = 0.0;\n for (int l = 0; l < numberOfCities; l++) {\n if (!ant.visited(l)) {\n pheromone += (Math.pow(trails[i][l], alpha) + 1) * (Math.pow(graph[i][l], beta) + 1) *\n (Math.pow(emcMatrix[i][l], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][l], ddd) + 1);\n }\n }\n for (int j = 0; j < numberOfCities; j++) {\n if (ant.visited(j)) {\n probabilities[j] = 0.0;\n } else {\n double numerator = (Math.pow(trails[i][j], alpha) + 1) * (Math.pow(graph[i][j], beta) + 1) *\n (Math.pow(emcMatrix[i][j], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][j], ddd) + 1);\n probabilities[j] = numerator / pheromone;\n }\n }\n }",
"public float getSpecialProb() {\n return specialProb_;\n }",
"private List<Integer> generateProb() {\n Integer[] randArr = new Integer[numCols*numRows];\n\n int start = 0;\n int end;\n for(int i = 0; i < myStateMap.size(); i++) {\n double prob = myStateMap.get(i).getProb();\n end = (int) (prob * numCols * numRows + start);\n for(int j = start; j < end; j++) {\n if(end > randArr.length) {\n break;\n }\n randArr[j] = myStateMap.get(i).getType();\n }\n start = end;\n }\n\n List<Integer> arr = new ArrayList<>(Arrays.asList(randArr));\n Collections.shuffle(arr);\n return arr;\n }",
"public Bounds getProbabilityBounds();",
"public Map<String, WordImageRelevaces> calculateImageWordRelevance(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tPrintWriter tempOut;\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\t\ttry {\r\n\r\n\t\t\ttempOut = new PrintWriter(word_prop_output);\r\n\r\n\t\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\t\tint index = 0;\r\n\r\n\t\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\t\ttempOut.println(\"Word , total Occur , #NotSimImgs, #SimImgs , WordOccur , #Unique Users \"\r\n\t\t\t\t\t+ \", Pw1, Pw2,Pw3 , Pw4 , Pw5,Pw6 , C, R, Rw, Lw\");\r\n\r\n\t\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\t\tint C = totalNumberOfImages;\r\n\t\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t\ttempOut.println(word\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getTotalOcurences()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordNotSimilarImages.get(word)\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getSimilarImageIDs().size()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getOcurrances()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word)\r\n\t\t\t\t\t\t\t\t.getWordUniqueUsers(this.photoList).size()\r\n\t\t\t\t\t\t+ \",\" + +Pw1 + \",\" + Pw2 + \",\" + Pw3 + \",\" + Pw4 + \",\"\r\n\t\t\t\t\t\t+ Pw5 + \",\" + Pw6 + \",\" + C + \",\" + R + \",\" + Rw + \",\"\r\n\t\t\t\t\t\t+ Lw);\r\n\r\n\t\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Normalise\r\n\t\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t\t\ttempOut.close();\r\n\t\t\t}\r\n\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\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}",
"private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}",
"boolean getProbables();",
"@Test\n void adjectivesScoring() {\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day; glad @JeremyKappell is standing up against #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB (Via NEWS 8 WROC)\");\n HashMap<String, Double> as = np.adjectivesScoring(sentences);\n for (String key : as.keySet()) {\n Double value = as.get(key);\n assertTrue(value >= 0 && value <= 4);\n }\n }",
"public abstract float getProbability(String[] tokens);",
"private int getPetImages() {\n int nUserPets = user.getPets().size();\n Drawable defaultDrawable = getResources().getDrawable(R.drawable.single_paw, null);\n Bitmap defaultBitmap = ((BitmapDrawable) defaultDrawable).getBitmap();\n countImagesNotFound = new int[nUserPets];\n Arrays.fill(countImagesNotFound, 0);\n\n ExecutorService executorService = Executors.newCachedThreadPool();\n startRunnable(nUserPets, executorService);\n executorService.shutdown();\n\n try {\n executorService.awaitTermination(3, TimeUnit.MINUTES);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return calculateImagesNotFound();\n }",
"private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}",
"public double getProbability(Object rootState) { return getProbability(rootState, (Object[])null); }",
"private double getProbabilityScore(Cell c,int bitmask)\n {\n\t return Math.pow(\n\t\t\t Math.pow(m_probs1[c.getCol()-1],(1&bitmask) ) * \n\t\t\t Math.pow(m_probs2[c.getRow()-1],(2&bitmask)/2) //geo-mean\n\t\t\t , Math.min(1,3.5-bitmask));\n }",
"private List<ProbabilityOfDefault> getPDs(Scenario s) {\n\t\t\r\n\t\tCountry ctry = getCountry();\r\n\t\t\r\n\t\tDouble probGrowth = ctry.getProbabilityOfGrowth();\r\n\t\tDouble probRecession = ctry.getProbabilityOfRecession();\r\n\t\t\r\n\t\tList<ProbabilityOfDefault> adjustedPDs = new ArrayList<>();\r\n\t\t\r\n\t\tfor (ProbabilityOfDefault pd : rating.getPDs()) {\r\n\t\t\tProbabilityOfDefault newPd = pd;\r\n\t\t\tnewPd.setPD((probGrowth * pd.getGrowthPD()) + (probRecession * pd.getRecessionPD()));\r\n\t\t\tadjustedPDs.add(newPd);\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(adjustedPDs);\r\n\t\treturn adjustedPDs;\r\n\t}",
"private double[] computePredictionValues() {\n double[] predResponses = new double[D];\n for (int d = 0; d < D; d++) {\n double expDotProd = Math.exp(docLabelDotProds[d]);\n double docPred = expDotProd / (expDotProd + 1);\n predResponses[d] = docPred;\n }\n return predResponses;\n }",
"public List<Result> recognize(IplImage image);",
"private static void findBigramProbTuring() {\n\t\t\t\t\n\t\tbigramProbT= new HashMap<String, Double>();\n\t\tdouble prob;\n\t\t\n\t\tfor(String s: corpusBigramCount.keySet()){\n\t\t\tint count=corpusBigramCount.get(s);\n\t\t\tif(count==0){\n\t\t\t\tprob= bucketCountT.getOrDefault(1,0.0)/corpusNumOfBigrams;\n\t\t\t}\n\t\t\telse\n\t\t\t\tprob= bigramCountTI.get(count)/corpusNumOfBigrams;\n\t\t\tbigramProbT.put(s, prob);\n\t\t}\n\t\t\t\n\t}",
"public double outcomeGivenPathProb(char[] outcome, S[] path) {\r\n\t\t// initialize probability to 1\r\n\t\tdouble prob = 1;\r\n\t\t// loop over all emitted chars\r\n\t\tfor (int i = 0; i < outcome.length; ++i)\r\n\t\t\t// multiple probability by the emission probability of this char\r\n\t\t\tprob *= emissProb(indexOf(states, path[i]), outcome[i]);\r\n\t\t\r\n\t\treturn prob;\r\n\t}",
"public Image getNatural();",
"public double getProbability() {\n\t\treturn getD_errorProbability();\n\t}",
"public Double getProb(T element) {\n\t\treturn itemProbs_.get(element);\n\t}",
"public double getCandProbability(String candidate){\n\t\tString[] candTerms = candidate.split(\"\\\\s+\");\n\t\t\n\t\t// Total Tokens\n\t\tdouble totTokens = (double)unigramDict.termCount();\n\t\t//P(w1) in log\n\t\tString w1 = candTerms[0];\n\t\tdouble probW1 = Math.log10((double)unigramDict.count(w1, wordToId)/totTokens);\n\t\t\n\t\t//P (w1, w2, ..., wn)\n\t\tdouble probCandidate = probW1;\n\t\t\n\t\t\n\t\tfor( int i =0; i < candTerms.length-1; i++){\n\t\t\t//Pint(w2|w1) = Pmle(w2) + (1 )Pmle(w2|w1)\n\t\t\tString currentTerm = candTerms[i];\n\t\t\tString nextTerm = candTerms[i+1];\n\t\t\tString bigram = currentTerm + \" \" + nextTerm;\n\t\t\tint freqBigram = bigramDict.count(bigram, wordToId);\n\t\t\t\n\t\t\t//this term should be in dictionary\n\t\t\tint freqFirstTerm = unigramDict.count(currentTerm, wordToId);\n\t\t\t\n\t\t\tdouble PmleW2W1 = (double)freqBigram/(double)freqFirstTerm;\n\t\t\t\n\t\t\t//System.out.println(\"candidate=[\" + candidate + \"]\\tbigram=[\" + bigram + \"]\\tterms=\" + Arrays.toString(terms));\n\t\t\tdouble PmleW2 = (double)unigramDict.count(nextTerm, wordToId) / totTokens;\n\t\t\t//double lamda= 0.1;\n\t\t\tdouble PintW2W1 = lamda*PmleW2 + (1-lamda)*PmleW2W1;\n\t\t\tprobCandidate = probCandidate + Math.log10(PintW2W1);\n\t\t}\n\t\treturn probCandidate;\n\t}",
"public scala.collection.immutable.IndexedSeq<java.lang.Object> getQuantiles (scala.collection.Iterable<java.lang.Object> probabilities) { throw new RuntimeException(); }",
"public void createProbsMap() {\n\t\tif(this.counts == null) {\n\t\t\tcreateCountMap();\n\t\t}\n\t\t\n\t\tMap<String, Double> result = new HashMap<String, Double>();\n\t\t\n\t\t// Make the counts and get the highest probability found \n\t\tdouble highestProb = 0.00;\n\t\tdouble size = (double) this.getData().size();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\tresult.put(entry.getKey(), value / size);\n\t\t\t\n\t\t\tif(value/size > highestProb) {\n\t\t\t\thighestProb = value/size;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fill the highest probilities \n\t\tList<String> highestProbs = new ArrayList<String>();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\t\n\t\t\tif(value/size == highestProb) {\n\t\t\t\thighestProbs.add(entry.getKey());\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.highestProbs = highestProbs;\n\t\tthis.highestProb = highestProb;\n\t\tthis.probs \t\t = result;\n\t}",
"public int[] podium(){\n int[] pod = new int[3];\n for (int i=0; i<3; i++) {\n pod[i]=0;\n }\n \n int n = this.scores.length;\n for (int i=0; i<n; i++) {\n if (scores[i]>pod[2]) {\n pod[0]=pod[1];\n pod[1]=pod[2];\n pod[2]=scores[i];\n } else if ((scores[i]>pod[1])) {\n pod[0]=pod[1];\n pod[1]=scores[i];\n } else if ((scores[i]>pod[0])) {\n pod[0]=scores[i];\n }\n \n }\n return pod;\n \n }",
"public Action getActionBasedOnProbability(final State state) {\r\n final double decision = Math.random();\r\n double decisionCount = 0;\r\n\r\n for (final Map.Entry<Action, Double> actionProb : getProperties(state).getActionProbabilities().entrySet()) {\r\n decisionCount += actionProb.getValue();\r\n if (decisionCount >= decision) {\r\n return actionProb.getKey();\r\n }\r\n }\r\n\r\n System.err.println(\"Error: cannot choose action!\");\r\n System.err.println(getProperties(state).getActionProbabilities());\r\n return null;\r\n }",
"double getBranchProbability();",
"public int getContaminantPPM() {\n return contaminantPPM;\n }",
"float genChance();",
"protected Double successProbability(){\n\t\tnodeKValues = collectKValues();\n\t\tList<Integer[]> placements = getDistinctPlacements(getMinKPath());\n\t\tlong maxNumberOfColorings = 0;\n\t\tfor (Integer[] placement : placements){\n\t\t\tlong colorings = numberOfColorings(placement);\n\t\t\tif (colorings > maxNumberOfColorings)\n\t\t\t\tmaxNumberOfColorings = colorings;\n\t\t}\n\t\tDouble probability = 1.0/maxNumberOfColorings;\n\t\tfor (int i=1; i<=pathLength; i++){ // factorial of pathlength\n\t\t\tprobability = probability * i;\n\t\t}\n\t\treturn probability;\n\t}",
"public abstract double getLinkProbability(int linkId);",
"public double getProb(String word) {\n double numWords = wordMap.get(\"TOTAL_WORDS\");\n return wordMap.getOrDefault(word, 0.0)/numWords;\n }",
"Float getFedAnimalsPercentage();",
"public double getProbRecombinacion() {\n return getDouble(params.probRecombinacion, PROP_PROB_RECOMB, 0.5);\n }",
"private void checkProbability(String mapName, WildEncounterInfo[] wildEncounters) {\n int totalProbability = 0;\n for (WildEncounterInfo wildEncounter : wildEncounters) {\n totalProbability += wildEncounter.getProbability();\n }\n\n Assert.assertEquals(mapName, 100, totalProbability);\n }",
"@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }",
"public double getProbabilityOf(T aData) {\n\t\tdouble freq = this.getFrequencyOf(aData);\n\t\tdouble dblSize = numEntries;\n\t\treturn freq/dblSize;\n\t}",
"public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}",
"protected int getPostiveOnes() {\n Rating[] ratingArray = this.ratings;\n int posOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) {\n if(ratingArray[i].getScore() == 1) posOneCount++; \n }\n }\n return posOneCount;\n }",
"public double people(double precis,double plagiarism,double poster,double video,double presentation,double portfolio,double reflection,double examination,double killerRobot)\n {\n double a = ((4%100)*precis)/100;\n double b = ((8%100)*plagiarism)/100;\n double c = ((12%100)*poster)/100;\n double d = ((16%100)*video)/100;\n double e = ((12%100)*presentation)/100;\n double f = ((10%100)*portfolio)/100;\n double g = ((10%100)*reflection)/100;\n double h = ((16%100)*examination)/100;\n double i = ((12%100)*killerRobot)/100;\n double grade = ((a+b+c+d+e+f+g+h+i)/8);//*100;\n return grade;\n }",
"public abstract float getProbability(String singleToken);",
"@Override\r\n\tpublic Double getPropensity_pension_score() {\n\t\treturn super.getPropensity_pension_score();\r\n\t}",
"public static double[]getBackgroundStatsFromProcessor(ImageProcessor imgP) {\n\t\tint dimX=imgP.getWidth();\n\t\tint dimY=imgP.getHeight();\n\t\tint samplSize=Math.min(10+20,dimX/10);\n\t\tif(dimX<100)samplSize=12;\n\t\tif(dimX>500)samplSize=40;\n\n\t\tint x0=(3*samplSize)/2;\n\t\tint y0=(3*samplSize)/2;\n\t\tint x1=dimX/2;\n\t\tint y1=dimY/2;\n\t\tint x2=dimX-(3*samplSize)/2;\n\t\tint y2=dimY-(3*samplSize)/2;\n\t\tdouble[][] vals=new double[8][];\n\t\tvals[0]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y0,samplSize/2);\n\t\tvals[1]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y2,samplSize/2);\n\t\tvals[2]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y0,samplSize/2);\n\t\tvals[3]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/2);\t\t\n\t\tvals[4]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y1,samplSize/4);\n\t\tvals[5]=VitimageUtils.valuesOfImageProcessor(imgP,x1,y0,samplSize/4);\n\t\tvals[6]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y1,samplSize/4);\n\t\tvals[7]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/4);\n\n\t\t//Compute the global mean over all these squares\n\t\tdouble[]tempStatsMeanVar=null;\n\t\tdouble[]tempStats=new double[vals.length];\n\t\t\n\t\t//Measure local stats, and guess that three of them can host the object\n\t\tfor(int i=0;i<vals.length;i++) {\n\t\t\ttempStatsMeanVar=VitimageUtils.statistics1D(vals[i]);\n\t\t\ttempStats[i]=tempStatsMeanVar[0];\n\t\t}\n\n\t\tdouble[]tempStatsCorrected=null;\n\t\tint incr=0;\n\t\tdouble[][]valsBis=null;\n\t\ttempStatsCorrected=new double[5];//Suppress the 3 maximum, that should be the border or corner where the object lies\n\n\t\tdouble[]tempStats2=doubleArraySort(tempStats);\n\t\tfor(int i=0;i<5;i++)tempStatsCorrected[i]=tempStats2[i];\n\t\tvalsBis=new double[5][];\t\t\t\n\t\tfor(int i=0;i<8 && incr<5;i++) {if(tempStats[i]<=tempStatsCorrected[4]) {valsBis[incr++]=vals[i];}}\n\t\t\t\n\t\tdouble []valsRetBis=VitimageUtils.statistics2D(valsBis);\t\t\n\t\treturn valsRetBis;\n\t}",
"public double getPerimiter(){return (2*height +2*width);}",
"public double[] rotatedProportionPercentage(){\n if(!this.rotationDone)throw new IllegalArgumentException(\"No rotation has been performed\");\n return this.rotatedProportionPercentage;\n }",
"@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }",
"@Override\n\tpublic double getProbability(Robot robot) {\n\t\treturn 0;\n\t}",
"public float getChance() {\n return chance;\n }",
"public float getChance()\n {\n return 1.0f;\n }",
"@Override\r\n\tpublic double getProb(double price, double[] realized) {\r\n\t\treturn getPMF(realized)[ bin(price, precision) ];\r\n\t}",
"double getTransProb();",
"public void computeUtility(Tile[] tile, double[] probability, double r, double g) {\n }",
"public double[] ratioPublicVsPrivateNewspaper() {\n\t\tcheckAuthority();\n\t\tdouble ratio[] = new double[2];\n\t\tdouble res[] = new double[2];\n\t\tres[0] = 0.;\n\t\tres[1] = 0.;\n\n\t\ttry {\n\t\t\tratio[0] = this.administratorRepository.ratioPublicNewspaper();\n\t\t\tratio[1] = this.administratorRepository.ratioPrivateNewspaper();\n\t\t\treturn ratio;\n\t\t} catch (Exception e) {\n\t\t\treturn res;\n\t\t}\n\n\t}",
"private double getClassProbability(ClassificationClass classificationClass) {\n if (classificationClass == null) {\n return 0;\n }\n\n double documentsInClass = 0;\n\n for (Document document : documents) {\n if (document.getClassificationClasses().contains(classificationClass)) {\n documentsInClass++;\n }\n }\n\n return documentsInClass / documents.size();\n }",
"public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}",
"@Override\r\n\tpublic Double getPropensity_trust_score() {\n\t\treturn super.getPropensity_trust_score();\r\n\t}",
"@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }",
"private double [] uniformDiscreteProbs(int numStates) \n {\n double [] uniformProbs = new double[2 * numStates];\n for(int i = 0; i < 2 * numStates; i++)\n uniformProbs[i] = (1.0 / (2 * numStates));\n return uniformProbs;\n }",
"public Map<String, WordImageRelevaces> calculateImageWordRelevanceCompact(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\r\n\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\tint index = 0;\r\n\r\n\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Normalise\r\n\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\tindex++;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t}\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}",
"public double calculateSpecificity() {\n final long divisor = trueNegative + falsePositive;\n if(divisor == 0) {\n return 0.0;\n } else {\n return trueNegative / (double)divisor;\n }\n }",
"public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }",
"public double getActionProbability(final State state, final Action action) {\r\n return getProperties(state).getActionProbability(action);\r\n }",
"public double expectedFalsePositiveProbability() {\n\t\treturn Math.pow((1 - Math.exp(-k * (double) expectedElements\n\t\t\t\t/ (double) bitArraySize)), k);\n\t}",
"double getMissChance();",
"public void buildPriors() {\n\t\t// grab the list of all class labels for this fold\n\t\tList<List<String>> classListHolder = dc.getClassificationFold();\n\t\tint totalClasses = 0; // track ALL class occurrences for this fold\n\t\tint[] totalClassOccurrence = new int[classes.size()]; // track respective class occurrence\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue; // skip testing fold\n\t\t\t} else {\n\t\t\t\tcurrentFold = i;\n\t\t\t} // end if\n\n\t\t\t// grab the list of all classes for this current fold\n\t\t\tList<String> classList = classListHolder.get(currentFold);\n\t\t\t// track the total number of classes in this fold and their occurrences\n\t\t\ttotalClasses += classList.size();\n\t\t\t// for each class occurrence, match it to a class and track its occurrence\n\t\t\tfor (String className : classList) {\n\t\t\t\tfor (int j = 0; j < classes.size(); j++) {\n\t\t\t\t\tif (className.equals(classes.get(j))) {\n\t\t\t\t\t\ttotalClassOccurrence[j]++;\n\t\t\t\t\t} // end if\n\t\t\t\t} // end for\n\t\t\t} // end for\n\t\t} // end for\n\n\t\t// divide a particular class occurrence by total number of classes across training set\n\t\tfor (int i = 0; i < classPriors.length; i++) {\n\t\t\tclassPriors[i] = totalClassOccurrence[i] / totalClasses;\n\t\t} // end for\n\t}",
"public static double[] getProbs(List<Derivation> derivations, double temperature) {\n double[] probs = new double[derivations.size()];\n for (int i = 0; i < derivations.size(); i++)\n probs[i] = derivations.get(i).getScore() / temperature;\n if (probs.length > 0)\n NumUtils.expNormalize(probs);\n return probs;\n }",
"public boolean reproducirse() {\n r = new Random();\r\n return Float.compare(r.nextFloat(), probReproducirse) <= 0;\r\n }",
"public double getScore() {\n int as = this.attributes.size(); // # of attributes that were matched\n\n // we use thresholding ranking approach for numInstances to influence the matching score\n int instances = this.train.numInstances();\n int inst_rank = 0;\n if (instances > 100) {\n inst_rank = 1;\n }\n if (instances > 500) {\n inst_rank = 2;\n }\n\n return this.p_sum + as + inst_rank;\n }",
"double getRatio();",
"private double getAttributeProbability(String attribute, int attributeIndex) {\n\t\tDouble value; // store value of raw data\n\t\tif (attribute.chars().allMatch(Character::isDigit) || attribute.contains(\".\")) {\n\t\t\tvalue = Double.valueOf(attribute);\n\t\t} else {\n\t\t\tvalue = (double) attribute.hashCode();\n\t\t} // end if-else\n\n\n\t\tdouble totalSelectedAttribute = 0;\n\t\tfor (Bin bin : attribBins.get(attributeIndex)) {\n\t\t\tif (bin.binContains(value)) {\n\t\t\t\ttotalSelectedAttribute = bin.getFreq();\n\t\t\t\tbreak;\n\t\t\t} // end if\n\t\t} // end for\n\n\t\tint totalAttributes = 0;\n\t\tfor (int i = 0; i < dc.getDataFold().size(); i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\ttotalAttributes += dc.getDataFold().get(i).size();\n\t\t\t} // end if-else\n\t\t} // end for\n\t\treturn totalSelectedAttribute / totalAttributes;\n\t}"
]
| [
"0.57850313",
"0.57010126",
"0.56290585",
"0.5565697",
"0.5559708",
"0.5519075",
"0.5316536",
"0.52727836",
"0.52534455",
"0.5236468",
"0.5236261",
"0.5198736",
"0.5091604",
"0.50812334",
"0.507524",
"0.50379896",
"0.501882",
"0.50101876",
"0.4990364",
"0.49297088",
"0.4920346",
"0.48977584",
"0.4887237",
"0.4882929",
"0.4881551",
"0.4858258",
"0.48483452",
"0.4834792",
"0.48341623",
"0.48206332",
"0.4803132",
"0.4803068",
"0.4780798",
"0.47732636",
"0.4764049",
"0.47585872",
"0.47556025",
"0.4754406",
"0.47432214",
"0.4739686",
"0.47256002",
"0.47245377",
"0.47228524",
"0.47162777",
"0.47157028",
"0.47086036",
"0.4666865",
"0.4665611",
"0.46632558",
"0.4645651",
"0.46408644",
"0.46405217",
"0.46277493",
"0.46264938",
"0.46103412",
"0.46035856",
"0.46001884",
"0.45997664",
"0.4599624",
"0.45977703",
"0.45944738",
"0.45890316",
"0.45888653",
"0.45658395",
"0.45545518",
"0.45524156",
"0.4549637",
"0.45434496",
"0.45414433",
"0.45359334",
"0.45312563",
"0.45248204",
"0.45165217",
"0.451639",
"0.4500414",
"0.44953394",
"0.4487796",
"0.44842905",
"0.448314",
"0.44636157",
"0.44578058",
"0.44550446",
"0.4448973",
"0.44464502",
"0.44306743",
"0.44303733",
"0.4428187",
"0.44217896",
"0.4403683",
"0.44006646",
"0.43915933",
"0.43783802",
"0.43763268",
"0.43704888",
"0.43574792",
"0.4357228",
"0.434867",
"0.43455118",
"0.43342876",
"0.43323204",
"0.43270162"
]
| 0.0 | -1 |
Returns probabilities of the image containing racy or adult content. | public Observable<EvaluateInner> evaluateUrlInputAsync(String contentType, BodyModelInner imageUrl) {
return evaluateUrlInputWithServiceResponseAsync(contentType, imageUrl).map(new Func1<ServiceResponse<EvaluateInner>, EvaluateInner>() {
@Override
public EvaluateInner call(ServiceResponse<EvaluateInner> response) {
return response.body();
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void calculateProbabilities(){\n\t}",
"private void evaluateProbabilities()\n\t{\n\t}",
"public double[] getProbabilities() { return getProbabilities((int[])null); }",
"public double getProbability() {\n return probability;\n }",
"POGOProtos.Rpc.CaptureProbabilityProto getCaptureProbabilities();",
"float getSpecialProb();",
"double[] calculateProbabilities(LACInstance testInstance) throws Exception\n\t{\n\t\tdouble[] probs;\n\t\tdouble[] scores = calculateScores(testInstance);\n\t\t\n\t\tif(scores != null)\n\t\t{\n\t\t\tprobs = new double[scores.length];\n\t\t\tdouble scoreSum = 0.0;\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tscoreSum += scores[i];\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tprobs[i] = scores[i] / scoreSum;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSet<Integer> allClasses = trainingSet.getAllClasses();\n\t\t\tprobs = new double[allClasses.size()];\n\t\t\tfor (Integer clazz : allClasses) \n\t\t\t{\n\t\t\t\tdouble count = trainingSet.getInstancesOfClass(clazz).size();\n\t\t\t\tprobs[clazz] = (count / ((double) trainingSet.length()));\n\t\t\t}\n\t\t}\n\n\t\treturn probs ;\n\t}",
"public double getProbability() {\r\n\t\treturn Probability;\r\n\t}",
"@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}",
"private double[] evaluateProbability(double[] data) {\n\t\tdouble[] prob = new double[m_NumClasses], v = new double[m_NumClasses];\n\n\t\t// Log-posterior before normalizing\n\t\tfor (int j = 0; j < m_NumClasses - 1; j++) {\n\t\t\tfor (int k = 0; k <= m_NumPredictors; k++) {\n\t\t\t\tv[j] += m_Par[k][j] * data[k];\n\t\t\t}\n\t\t}\n\t\tv[m_NumClasses - 1] = 0;\n\n\t\t// Do so to avoid scaling problems\n\t\tfor (int m = 0; m < m_NumClasses; m++) {\n\t\t\tdouble sum = 0;\n\t\t\tfor (int n = 0; n < m_NumClasses - 1; n++)\n\t\t\t\tsum += Math.exp(v[n] - v[m]);\n\t\t\tprob[m] = 1 / (sum + Math.exp(-v[m]));\n\t\t\tif (prob[m] == 0)\n\t\t\t\tprob[m] = 1.0e-20;\n\t\t}\n\n\t\treturn prob;\n\t}",
"protected double get_breeding_probability()\n {\n return breeding_probability;\n }",
"abstract double rightProbability();",
"void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}",
"public double[] proportionPercentage(){\n if(!this.pcaDone)this.pca();\n return this.proportionPercentage;\n }",
"public Map<String, WordImage> calculateWordsAndImagePropability(\r\n\t\t\tMap<String, WordImage> wordImageRel, int totalUniqueUserCount) {\r\n\r\n\t\tint totalOcurrance = 0;\r\n\r\n\t\t// Calculate the total number of word occurrences in the set of similar\r\n\t\t// and dissimilar images\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getSimlarImages().size();\r\n\r\n\t\t\tif (this.wordNotSimilarImages.get(word) != null)\r\n\t\t\t\twordOccur += this.wordNotSimilarImages.get(word);\r\n\r\n\t\t\twordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\ttotalOcurrance += wordOccur;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// wordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\tint uniqueUsers = wordImageRel.get(word)\r\n\t\t\t\t\t.getWordUniqueUsers(this.photoList).size();\r\n\r\n\t\t\twordImageRel.get(word).setTotalOcurances(totalOcurrance);\r\n\r\n\t\t\t// .......... Voting-similar word probability\r\n\t\t\t// .......................\r\n\r\n\t\t\t// 1. Word probability without user assumptions\r\n\t\t\tdouble PwOnlyWords = ((double) wordOccur / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyWords(PwOnlyWords);\r\n\r\n\t\t\t// 2. Word probability with user proportion to the total number of\r\n\t\t\t// users\r\n\t\t\tdouble PwAllUsers = PwOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwAllUsers(PwAllUsers);\r\n\r\n\t\t\t// 3. Word probability. Word freq is represented by the number of\r\n\t\t\t// unique users only\r\n\t\t\tdouble PwOnlyUniqueUsers = ((double) uniqueUsers / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyUniqueUsers(PwOnlyUniqueUsers);\r\n\r\n\t\t\t// ..........TF-IDF Word Probability Calculation\r\n\t\t\t// .......................\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// 1. Word probability TF.IDF approach without user assumptions\r\n\t\t\tdouble PwTFIDFlOnlyWords = ((double) Rw / R)\r\n\t\t\t\t\t* (Math.log((double) C / Lw) / Math.log(2))\r\n\t\t\t\t\t/ (Math.log((double) C) / Math.log(2));\r\n\t\t\twordImageRel.get(word).setPwTFIDFlOnlyWords(PwTFIDFlOnlyWords);\r\n\r\n\t\t\t// 2. Word probability TF.IDF approach with user proportion to the\r\n\t\t\t// totall number of users\r\n\t\t\tdouble PwTFIDFlAllUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwTFIDFlAllUsers(PwTFIDFlAllUsers);\r\n\r\n\t\t\t// 3. Word probability TF.IDF approach. Word freq is represented by\r\n\t\t\t// the number of unique users only\r\n\t\t\tdouble PwTFIDFOnlyUniqueUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* (uniqueUsers / (double) wordOccur);\r\n\t\t\twordImageRel.get(word).setPwTFIDFOnlyUniqueUsers(\r\n\t\t\t\t\tPwTFIDFOnlyUniqueUsers);\r\n\r\n\t\t\twordImageRel.get(word)\r\n\t\t\t\t\t.setImageProbability(1.0 / (double) wordOccur); // P(c_j|w)\r\n\r\n\t\t}\r\n\t\treturn wordImageRel;\r\n\r\n\t}",
"@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}",
"private double getProbOfClass(int catIndex) {\r\n\t\treturn (classInstanceCount[catIndex] + mCategoryPrior)\r\n\t\t\t\t/ (classInstanceCount[0] + classInstanceCount[1] + mCategories.length\r\n\t\t\t\t\t\t* mCategoryPrior);\r\n\t}",
"POGOProtos.Rpc.CaptureProbabilityProtoOrBuilder getCaptureProbabilitiesOrBuilder();",
"@Override\n\tpublic void computeFinalProbabilities() {\n\t\tsuper.computeFinalProbabilities();\n\t}",
"public double getObservationProbability(){\r\n double ret=0;\r\n int time=o.length;\r\n int N=hmm.stateCount;\r\n for (int t=0;t<=time;++t){\r\n for (int i=0;i<N;++i){\r\n ret+=fbManipulator.alpha[t][i]*fbManipulator.beta[t][i];\r\n }\r\n }\r\n ret/=time;\r\n return ret;\r\n }",
"public double contagionProbability(Person p)\n\t{\n\t\tif(p.getAge()<=18)\n\t\t{\n\t\t\treturn con_18*p.contagionProbability();\n\t\t}\n\t\tif(p.getAge()>18 && p.getAge()<=55)\n\t\t{\n\t\t\treturn con_18_55*p.contagionProbability();\n\t\t}\n\t\treturn con_up55*p.contagionProbability();\n\t}",
"public static int getObstacleProbability() {\n\t\tif(SHOW_OBSTACLES){\n\t\t\treturn RANDOM_OBSTACLE_COUNT;\n\t\t}\n\t\treturn 0;\n\t}",
"public abstract Map getProbabilities(String[] path);",
"public double getProbabilityP() {\n return this.mProbabilityP;\n }",
"abstract double leftProbability();",
"public double getAbandonmentProbability() {\n return Math.random();\n }",
"public double outcomeProb(char[] outcome) {\r\n\t\t// get all forward probabilities\r\n\t\tdouble[][] probs = getForwards(outcome);\r\n\t\t\r\n\t\t// initialize the probability of this outcome to 0\r\n\t\tdouble outcomeProb = 0;\r\n\t\t// loop over all nodes in the last column\r\n\t\tfor (int i = 0; i < states.length; ++i)\r\n\t\t\t// add this node's probability to the overall probability\r\n\t\t\toutcomeProb += probs[i][outcome.length - 1];\r\n\t\t\r\n\t\treturn outcomeProb;\r\n\t}",
"public float getSpecialProb() {\n return specialProb_;\n }",
"private double infobits(double[] probs) {\r\n\t\tdouble sum = 0;\r\n\t\tfor (int i = 0; i < probs.length; i++) {\r\n\t\t\tsum += entropy(probs[i]);\r\n\t\t}\r\n\t\treturn sum;\r\n\t}",
"double getCritChance();",
"public void calculateProbabilities(Ant ant) {\n int i = ant.trail[currentIndex];\n double pheromone = 0.0;\n for (int l = 0; l < numberOfCities; l++) {\n if (!ant.visited(l)) {\n pheromone += (Math.pow(trails[i][l], alpha) + 1) * (Math.pow(graph[i][l], beta) + 1) *\n (Math.pow(emcMatrix[i][l], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][l], ddd) + 1);\n }\n }\n for (int j = 0; j < numberOfCities; j++) {\n if (ant.visited(j)) {\n probabilities[j] = 0.0;\n } else {\n double numerator = (Math.pow(trails[i][j], alpha) + 1) * (Math.pow(graph[i][j], beta) + 1) *\n (Math.pow(emcMatrix[i][j], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][j], ddd) + 1);\n probabilities[j] = numerator / pheromone;\n }\n }\n }",
"private void classifyTestImages() throws FileNotFoundException, UnsupportedEncodingException {\n PrintWriter writer = new PrintWriter(\"result.txt\", \"UTF-8\");\n writer.println(\"#Authors: Thomas Sarlin & Petter Poucette\");\n\n ArrayList<Image> images = testReader.getImages();\n double activationResult[]=new double[4];\n int bestGuess;\n for (Image image : images) {\n for (int j = 0; j < 4; j++)\n activationResult[j] = activationFunction\n .apply(sumWeights(j, image));\n\n bestGuess = getBestGuess(activationResult);\n writer.println(image.getName() + \" \" + bestGuess);\n }\n writer.close();\n }",
"public float getSpecialProb() {\n return specialProb_;\n }",
"private List<Integer> generateProb() {\n Integer[] randArr = new Integer[numCols*numRows];\n\n int start = 0;\n int end;\n for(int i = 0; i < myStateMap.size(); i++) {\n double prob = myStateMap.get(i).getProb();\n end = (int) (prob * numCols * numRows + start);\n for(int j = start; j < end; j++) {\n if(end > randArr.length) {\n break;\n }\n randArr[j] = myStateMap.get(i).getType();\n }\n start = end;\n }\n\n List<Integer> arr = new ArrayList<>(Arrays.asList(randArr));\n Collections.shuffle(arr);\n return arr;\n }",
"public Bounds getProbabilityBounds();",
"private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}",
"boolean getProbables();",
"public Map<String, WordImageRelevaces> calculateImageWordRelevance(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tPrintWriter tempOut;\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\t\ttry {\r\n\r\n\t\t\ttempOut = new PrintWriter(word_prop_output);\r\n\r\n\t\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\t\tint index = 0;\r\n\r\n\t\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\t\ttempOut.println(\"Word , total Occur , #NotSimImgs, #SimImgs , WordOccur , #Unique Users \"\r\n\t\t\t\t\t+ \", Pw1, Pw2,Pw3 , Pw4 , Pw5,Pw6 , C, R, Rw, Lw\");\r\n\r\n\t\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\t\tint C = totalNumberOfImages;\r\n\t\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t\ttempOut.println(word\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getTotalOcurences()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordNotSimilarImages.get(word)\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getSimilarImageIDs().size()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getOcurrances()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word)\r\n\t\t\t\t\t\t\t\t.getWordUniqueUsers(this.photoList).size()\r\n\t\t\t\t\t\t+ \",\" + +Pw1 + \",\" + Pw2 + \",\" + Pw3 + \",\" + Pw4 + \",\"\r\n\t\t\t\t\t\t+ Pw5 + \",\" + Pw6 + \",\" + C + \",\" + R + \",\" + Rw + \",\"\r\n\t\t\t\t\t\t+ Lw);\r\n\r\n\t\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Normalise\r\n\t\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t\t\ttempOut.close();\r\n\t\t\t}\r\n\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\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}",
"public abstract float getProbability(String[] tokens);",
"@Test\n void adjectivesScoring() {\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day; glad @JeremyKappell is standing up against #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB (Via NEWS 8 WROC)\");\n HashMap<String, Double> as = np.adjectivesScoring(sentences);\n for (String key : as.keySet()) {\n Double value = as.get(key);\n assertTrue(value >= 0 && value <= 4);\n }\n }",
"private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}",
"public double getProbability(Object rootState) { return getProbability(rootState, (Object[])null); }",
"private int getPetImages() {\n int nUserPets = user.getPets().size();\n Drawable defaultDrawable = getResources().getDrawable(R.drawable.single_paw, null);\n Bitmap defaultBitmap = ((BitmapDrawable) defaultDrawable).getBitmap();\n countImagesNotFound = new int[nUserPets];\n Arrays.fill(countImagesNotFound, 0);\n\n ExecutorService executorService = Executors.newCachedThreadPool();\n startRunnable(nUserPets, executorService);\n executorService.shutdown();\n\n try {\n executorService.awaitTermination(3, TimeUnit.MINUTES);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return calculateImagesNotFound();\n }",
"private List<ProbabilityOfDefault> getPDs(Scenario s) {\n\t\t\r\n\t\tCountry ctry = getCountry();\r\n\t\t\r\n\t\tDouble probGrowth = ctry.getProbabilityOfGrowth();\r\n\t\tDouble probRecession = ctry.getProbabilityOfRecession();\r\n\t\t\r\n\t\tList<ProbabilityOfDefault> adjustedPDs = new ArrayList<>();\r\n\t\t\r\n\t\tfor (ProbabilityOfDefault pd : rating.getPDs()) {\r\n\t\t\tProbabilityOfDefault newPd = pd;\r\n\t\t\tnewPd.setPD((probGrowth * pd.getGrowthPD()) + (probRecession * pd.getRecessionPD()));\r\n\t\t\tadjustedPDs.add(newPd);\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(adjustedPDs);\r\n\t\treturn adjustedPDs;\r\n\t}",
"private double getProbabilityScore(Cell c,int bitmask)\n {\n\t return Math.pow(\n\t\t\t Math.pow(m_probs1[c.getCol()-1],(1&bitmask) ) * \n\t\t\t Math.pow(m_probs2[c.getRow()-1],(2&bitmask)/2) //geo-mean\n\t\t\t , Math.min(1,3.5-bitmask));\n }",
"private double[] computePredictionValues() {\n double[] predResponses = new double[D];\n for (int d = 0; d < D; d++) {\n double expDotProd = Math.exp(docLabelDotProds[d]);\n double docPred = expDotProd / (expDotProd + 1);\n predResponses[d] = docPred;\n }\n return predResponses;\n }",
"private static void findBigramProbTuring() {\n\t\t\t\t\n\t\tbigramProbT= new HashMap<String, Double>();\n\t\tdouble prob;\n\t\t\n\t\tfor(String s: corpusBigramCount.keySet()){\n\t\t\tint count=corpusBigramCount.get(s);\n\t\t\tif(count==0){\n\t\t\t\tprob= bucketCountT.getOrDefault(1,0.0)/corpusNumOfBigrams;\n\t\t\t}\n\t\t\telse\n\t\t\t\tprob= bigramCountTI.get(count)/corpusNumOfBigrams;\n\t\t\tbigramProbT.put(s, prob);\n\t\t}\n\t\t\t\n\t}",
"public double outcomeGivenPathProb(char[] outcome, S[] path) {\r\n\t\t// initialize probability to 1\r\n\t\tdouble prob = 1;\r\n\t\t// loop over all emitted chars\r\n\t\tfor (int i = 0; i < outcome.length; ++i)\r\n\t\t\t// multiple probability by the emission probability of this char\r\n\t\t\tprob *= emissProb(indexOf(states, path[i]), outcome[i]);\r\n\t\t\r\n\t\treturn prob;\r\n\t}",
"public List<Result> recognize(IplImage image);",
"public Double getProb(T element) {\n\t\treturn itemProbs_.get(element);\n\t}",
"public double getProbability() {\n\t\treturn getD_errorProbability();\n\t}",
"public Image getNatural();",
"public double getCandProbability(String candidate){\n\t\tString[] candTerms = candidate.split(\"\\\\s+\");\n\t\t\n\t\t// Total Tokens\n\t\tdouble totTokens = (double)unigramDict.termCount();\n\t\t//P(w1) in log\n\t\tString w1 = candTerms[0];\n\t\tdouble probW1 = Math.log10((double)unigramDict.count(w1, wordToId)/totTokens);\n\t\t\n\t\t//P (w1, w2, ..., wn)\n\t\tdouble probCandidate = probW1;\n\t\t\n\t\t\n\t\tfor( int i =0; i < candTerms.length-1; i++){\n\t\t\t//Pint(w2|w1) = Pmle(w2) + (1 )Pmle(w2|w1)\n\t\t\tString currentTerm = candTerms[i];\n\t\t\tString nextTerm = candTerms[i+1];\n\t\t\tString bigram = currentTerm + \" \" + nextTerm;\n\t\t\tint freqBigram = bigramDict.count(bigram, wordToId);\n\t\t\t\n\t\t\t//this term should be in dictionary\n\t\t\tint freqFirstTerm = unigramDict.count(currentTerm, wordToId);\n\t\t\t\n\t\t\tdouble PmleW2W1 = (double)freqBigram/(double)freqFirstTerm;\n\t\t\t\n\t\t\t//System.out.println(\"candidate=[\" + candidate + \"]\\tbigram=[\" + bigram + \"]\\tterms=\" + Arrays.toString(terms));\n\t\t\tdouble PmleW2 = (double)unigramDict.count(nextTerm, wordToId) / totTokens;\n\t\t\t//double lamda= 0.1;\n\t\t\tdouble PintW2W1 = lamda*PmleW2 + (1-lamda)*PmleW2W1;\n\t\t\tprobCandidate = probCandidate + Math.log10(PintW2W1);\n\t\t}\n\t\treturn probCandidate;\n\t}",
"public scala.collection.immutable.IndexedSeq<java.lang.Object> getQuantiles (scala.collection.Iterable<java.lang.Object> probabilities) { throw new RuntimeException(); }",
"public void createProbsMap() {\n\t\tif(this.counts == null) {\n\t\t\tcreateCountMap();\n\t\t}\n\t\t\n\t\tMap<String, Double> result = new HashMap<String, Double>();\n\t\t\n\t\t// Make the counts and get the highest probability found \n\t\tdouble highestProb = 0.00;\n\t\tdouble size = (double) this.getData().size();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\tresult.put(entry.getKey(), value / size);\n\t\t\t\n\t\t\tif(value/size > highestProb) {\n\t\t\t\thighestProb = value/size;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fill the highest probilities \n\t\tList<String> highestProbs = new ArrayList<String>();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\t\n\t\t\tif(value/size == highestProb) {\n\t\t\t\thighestProbs.add(entry.getKey());\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.highestProbs = highestProbs;\n\t\tthis.highestProb = highestProb;\n\t\tthis.probs \t\t = result;\n\t}",
"public int[] podium(){\n int[] pod = new int[3];\n for (int i=0; i<3; i++) {\n pod[i]=0;\n }\n \n int n = this.scores.length;\n for (int i=0; i<n; i++) {\n if (scores[i]>pod[2]) {\n pod[0]=pod[1];\n pod[1]=pod[2];\n pod[2]=scores[i];\n } else if ((scores[i]>pod[1])) {\n pod[0]=pod[1];\n pod[1]=scores[i];\n } else if ((scores[i]>pod[0])) {\n pod[0]=scores[i];\n }\n \n }\n return pod;\n \n }",
"public int getContaminantPPM() {\n return contaminantPPM;\n }",
"public Action getActionBasedOnProbability(final State state) {\r\n final double decision = Math.random();\r\n double decisionCount = 0;\r\n\r\n for (final Map.Entry<Action, Double> actionProb : getProperties(state).getActionProbabilities().entrySet()) {\r\n decisionCount += actionProb.getValue();\r\n if (decisionCount >= decision) {\r\n return actionProb.getKey();\r\n }\r\n }\r\n\r\n System.err.println(\"Error: cannot choose action!\");\r\n System.err.println(getProperties(state).getActionProbabilities());\r\n return null;\r\n }",
"double getBranchProbability();",
"float genChance();",
"protected Double successProbability(){\n\t\tnodeKValues = collectKValues();\n\t\tList<Integer[]> placements = getDistinctPlacements(getMinKPath());\n\t\tlong maxNumberOfColorings = 0;\n\t\tfor (Integer[] placement : placements){\n\t\t\tlong colorings = numberOfColorings(placement);\n\t\t\tif (colorings > maxNumberOfColorings)\n\t\t\t\tmaxNumberOfColorings = colorings;\n\t\t}\n\t\tDouble probability = 1.0/maxNumberOfColorings;\n\t\tfor (int i=1; i<=pathLength; i++){ // factorial of pathlength\n\t\t\tprobability = probability * i;\n\t\t}\n\t\treturn probability;\n\t}",
"public double getProb(String word) {\n double numWords = wordMap.get(\"TOTAL_WORDS\");\n return wordMap.getOrDefault(word, 0.0)/numWords;\n }",
"public abstract double getLinkProbability(int linkId);",
"Float getFedAnimalsPercentage();",
"public double getProbRecombinacion() {\n return getDouble(params.probRecombinacion, PROP_PROB_RECOMB, 0.5);\n }",
"private void checkProbability(String mapName, WildEncounterInfo[] wildEncounters) {\n int totalProbability = 0;\n for (WildEncounterInfo wildEncounter : wildEncounters) {\n totalProbability += wildEncounter.getProbability();\n }\n\n Assert.assertEquals(mapName, 100, totalProbability);\n }",
"@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }",
"public double getProbabilityOf(T aData) {\n\t\tdouble freq = this.getFrequencyOf(aData);\n\t\tdouble dblSize = numEntries;\n\t\treturn freq/dblSize;\n\t}",
"public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}",
"protected int getPostiveOnes() {\n Rating[] ratingArray = this.ratings;\n int posOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) {\n if(ratingArray[i].getScore() == 1) posOneCount++; \n }\n }\n return posOneCount;\n }",
"public double people(double precis,double plagiarism,double poster,double video,double presentation,double portfolio,double reflection,double examination,double killerRobot)\n {\n double a = ((4%100)*precis)/100;\n double b = ((8%100)*plagiarism)/100;\n double c = ((12%100)*poster)/100;\n double d = ((16%100)*video)/100;\n double e = ((12%100)*presentation)/100;\n double f = ((10%100)*portfolio)/100;\n double g = ((10%100)*reflection)/100;\n double h = ((16%100)*examination)/100;\n double i = ((12%100)*killerRobot)/100;\n double grade = ((a+b+c+d+e+f+g+h+i)/8);//*100;\n return grade;\n }",
"public abstract float getProbability(String singleToken);",
"@Override\r\n\tpublic Double getPropensity_pension_score() {\n\t\treturn super.getPropensity_pension_score();\r\n\t}",
"public static double[]getBackgroundStatsFromProcessor(ImageProcessor imgP) {\n\t\tint dimX=imgP.getWidth();\n\t\tint dimY=imgP.getHeight();\n\t\tint samplSize=Math.min(10+20,dimX/10);\n\t\tif(dimX<100)samplSize=12;\n\t\tif(dimX>500)samplSize=40;\n\n\t\tint x0=(3*samplSize)/2;\n\t\tint y0=(3*samplSize)/2;\n\t\tint x1=dimX/2;\n\t\tint y1=dimY/2;\n\t\tint x2=dimX-(3*samplSize)/2;\n\t\tint y2=dimY-(3*samplSize)/2;\n\t\tdouble[][] vals=new double[8][];\n\t\tvals[0]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y0,samplSize/2);\n\t\tvals[1]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y2,samplSize/2);\n\t\tvals[2]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y0,samplSize/2);\n\t\tvals[3]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/2);\t\t\n\t\tvals[4]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y1,samplSize/4);\n\t\tvals[5]=VitimageUtils.valuesOfImageProcessor(imgP,x1,y0,samplSize/4);\n\t\tvals[6]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y1,samplSize/4);\n\t\tvals[7]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/4);\n\n\t\t//Compute the global mean over all these squares\n\t\tdouble[]tempStatsMeanVar=null;\n\t\tdouble[]tempStats=new double[vals.length];\n\t\t\n\t\t//Measure local stats, and guess that three of them can host the object\n\t\tfor(int i=0;i<vals.length;i++) {\n\t\t\ttempStatsMeanVar=VitimageUtils.statistics1D(vals[i]);\n\t\t\ttempStats[i]=tempStatsMeanVar[0];\n\t\t}\n\n\t\tdouble[]tempStatsCorrected=null;\n\t\tint incr=0;\n\t\tdouble[][]valsBis=null;\n\t\ttempStatsCorrected=new double[5];//Suppress the 3 maximum, that should be the border or corner where the object lies\n\n\t\tdouble[]tempStats2=doubleArraySort(tempStats);\n\t\tfor(int i=0;i<5;i++)tempStatsCorrected[i]=tempStats2[i];\n\t\tvalsBis=new double[5][];\t\t\t\n\t\tfor(int i=0;i<8 && incr<5;i++) {if(tempStats[i]<=tempStatsCorrected[4]) {valsBis[incr++]=vals[i];}}\n\t\t\t\n\t\tdouble []valsRetBis=VitimageUtils.statistics2D(valsBis);\t\t\n\t\treturn valsRetBis;\n\t}",
"public double getPerimiter(){return (2*height +2*width);}",
"public double[] rotatedProportionPercentage(){\n if(!this.rotationDone)throw new IllegalArgumentException(\"No rotation has been performed\");\n return this.rotatedProportionPercentage;\n }",
"@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }",
"@Override\n\tpublic double getProbability(Robot robot) {\n\t\treturn 0;\n\t}",
"public float getChance() {\n return chance;\n }",
"public float getChance()\n {\n return 1.0f;\n }",
"@Override\r\n\tpublic double getProb(double price, double[] realized) {\r\n\t\treturn getPMF(realized)[ bin(price, precision) ];\r\n\t}",
"double getTransProb();",
"public void computeUtility(Tile[] tile, double[] probability, double r, double g) {\n }",
"public double[] ratioPublicVsPrivateNewspaper() {\n\t\tcheckAuthority();\n\t\tdouble ratio[] = new double[2];\n\t\tdouble res[] = new double[2];\n\t\tres[0] = 0.;\n\t\tres[1] = 0.;\n\n\t\ttry {\n\t\t\tratio[0] = this.administratorRepository.ratioPublicNewspaper();\n\t\t\tratio[1] = this.administratorRepository.ratioPrivateNewspaper();\n\t\t\treturn ratio;\n\t\t} catch (Exception e) {\n\t\t\treturn res;\n\t\t}\n\n\t}",
"public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}",
"private double getClassProbability(ClassificationClass classificationClass) {\n if (classificationClass == null) {\n return 0;\n }\n\n double documentsInClass = 0;\n\n for (Document document : documents) {\n if (document.getClassificationClasses().contains(classificationClass)) {\n documentsInClass++;\n }\n }\n\n return documentsInClass / documents.size();\n }",
"@Override\r\n\tpublic Double getPropensity_trust_score() {\n\t\treturn super.getPropensity_trust_score();\r\n\t}",
"@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }",
"private double [] uniformDiscreteProbs(int numStates) \n {\n double [] uniformProbs = new double[2 * numStates];\n for(int i = 0; i < 2 * numStates; i++)\n uniformProbs[i] = (1.0 / (2 * numStates));\n return uniformProbs;\n }",
"public Map<String, WordImageRelevaces> calculateImageWordRelevanceCompact(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\r\n\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\tint index = 0;\r\n\r\n\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Normalise\r\n\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\tindex++;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t}\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}",
"public double calculateSpecificity() {\n final long divisor = trueNegative + falsePositive;\n if(divisor == 0) {\n return 0.0;\n } else {\n return trueNegative / (double)divisor;\n }\n }",
"public double getActionProbability(final State state, final Action action) {\r\n return getProperties(state).getActionProbability(action);\r\n }",
"public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }",
"public double expectedFalsePositiveProbability() {\n\t\treturn Math.pow((1 - Math.exp(-k * (double) expectedElements\n\t\t\t\t/ (double) bitArraySize)), k);\n\t}",
"public void buildPriors() {\n\t\t// grab the list of all class labels for this fold\n\t\tList<List<String>> classListHolder = dc.getClassificationFold();\n\t\tint totalClasses = 0; // track ALL class occurrences for this fold\n\t\tint[] totalClassOccurrence = new int[classes.size()]; // track respective class occurrence\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue; // skip testing fold\n\t\t\t} else {\n\t\t\t\tcurrentFold = i;\n\t\t\t} // end if\n\n\t\t\t// grab the list of all classes for this current fold\n\t\t\tList<String> classList = classListHolder.get(currentFold);\n\t\t\t// track the total number of classes in this fold and their occurrences\n\t\t\ttotalClasses += classList.size();\n\t\t\t// for each class occurrence, match it to a class and track its occurrence\n\t\t\tfor (String className : classList) {\n\t\t\t\tfor (int j = 0; j < classes.size(); j++) {\n\t\t\t\t\tif (className.equals(classes.get(j))) {\n\t\t\t\t\t\ttotalClassOccurrence[j]++;\n\t\t\t\t\t} // end if\n\t\t\t\t} // end for\n\t\t\t} // end for\n\t\t} // end for\n\n\t\t// divide a particular class occurrence by total number of classes across training set\n\t\tfor (int i = 0; i < classPriors.length; i++) {\n\t\t\tclassPriors[i] = totalClassOccurrence[i] / totalClasses;\n\t\t} // end for\n\t}",
"double getMissChance();",
"public static double[] getProbs(List<Derivation> derivations, double temperature) {\n double[] probs = new double[derivations.size()];\n for (int i = 0; i < derivations.size(); i++)\n probs[i] = derivations.get(i).getScore() / temperature;\n if (probs.length > 0)\n NumUtils.expNormalize(probs);\n return probs;\n }",
"public boolean reproducirse() {\n r = new Random();\r\n return Float.compare(r.nextFloat(), probReproducirse) <= 0;\r\n }",
"public double getScore() {\n int as = this.attributes.size(); // # of attributes that were matched\n\n // we use thresholding ranking approach for numInstances to influence the matching score\n int instances = this.train.numInstances();\n int inst_rank = 0;\n if (instances > 100) {\n inst_rank = 1;\n }\n if (instances > 500) {\n inst_rank = 2;\n }\n\n return this.p_sum + as + inst_rank;\n }",
"double getRatio();",
"private double getAttributeProbability(String attribute, int attributeIndex) {\n\t\tDouble value; // store value of raw data\n\t\tif (attribute.chars().allMatch(Character::isDigit) || attribute.contains(\".\")) {\n\t\t\tvalue = Double.valueOf(attribute);\n\t\t} else {\n\t\t\tvalue = (double) attribute.hashCode();\n\t\t} // end if-else\n\n\n\t\tdouble totalSelectedAttribute = 0;\n\t\tfor (Bin bin : attribBins.get(attributeIndex)) {\n\t\t\tif (bin.binContains(value)) {\n\t\t\t\ttotalSelectedAttribute = bin.getFreq();\n\t\t\t\tbreak;\n\t\t\t} // end if\n\t\t} // end for\n\n\t\tint totalAttributes = 0;\n\t\tfor (int i = 0; i < dc.getDataFold().size(); i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\ttotalAttributes += dc.getDataFold().get(i).size();\n\t\t\t} // end if-else\n\t\t} // end for\n\t\treturn totalSelectedAttribute / totalAttributes;\n\t}"
]
| [
"0.5792197",
"0.57066816",
"0.5635645",
"0.5572759",
"0.5562452",
"0.55257493",
"0.53212327",
"0.5280099",
"0.5259797",
"0.5242405",
"0.5241776",
"0.52029526",
"0.5099709",
"0.50816107",
"0.5081152",
"0.50460213",
"0.5026333",
"0.50131893",
"0.49973923",
"0.49362656",
"0.49274006",
"0.49014637",
"0.48904005",
"0.48893443",
"0.48883486",
"0.48626068",
"0.48553148",
"0.48407963",
"0.48381814",
"0.4823488",
"0.48085284",
"0.48003718",
"0.47874287",
"0.4778859",
"0.47704858",
"0.47612575",
"0.4759973",
"0.47543684",
"0.47448784",
"0.47440794",
"0.47309622",
"0.47279537",
"0.47232834",
"0.47222587",
"0.4720755",
"0.47107315",
"0.46709624",
"0.46687084",
"0.4661704",
"0.46471503",
"0.46448085",
"0.4641382",
"0.46333593",
"0.4630833",
"0.46189335",
"0.46061262",
"0.46044046",
"0.46036986",
"0.46035802",
"0.46022725",
"0.45985234",
"0.4595487",
"0.45929152",
"0.4568836",
"0.4558225",
"0.4557072",
"0.45525363",
"0.45493653",
"0.45481145",
"0.45372245",
"0.45344004",
"0.45292062",
"0.45216995",
"0.45159578",
"0.45023647",
"0.44994995",
"0.44896108",
"0.44894743",
"0.44869757",
"0.44675604",
"0.44656563",
"0.44603154",
"0.4449972",
"0.4446754",
"0.44359973",
"0.44357845",
"0.44308314",
"0.4427383",
"0.44122484",
"0.43956998",
"0.4392812",
"0.4380375",
"0.4375294",
"0.4375232",
"0.43606308",
"0.43596306",
"0.4355109",
"0.43473732",
"0.43359566",
"0.43326777",
"0.43306032"
]
| 0.0 | -1 |
Returns probabilities of the image containing racy or adult content. | public Observable<ServiceResponse<EvaluateInner>> evaluateUrlInputWithServiceResponseAsync(String contentType, BodyModelInner imageUrl) {
if (this.client.baseUrl() == null) {
throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null.");
}
if (contentType == null) {
throw new IllegalArgumentException("Parameter contentType is required and cannot be null.");
}
if (imageUrl == null) {
throw new IllegalArgumentException("Parameter imageUrl is required and cannot be null.");
}
Validator.validate(imageUrl);
final Boolean cacheImage = null;
String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl());
return service.evaluateUrlInput(cacheImage, contentType, imageUrl, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<EvaluateInner>>>() {
@Override
public Observable<ServiceResponse<EvaluateInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<EvaluateInner> clientResponse = evaluateUrlInputDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void calculateProbabilities(){\n\t}",
"private void evaluateProbabilities()\n\t{\n\t}",
"public double[] getProbabilities() { return getProbabilities((int[])null); }",
"public double getProbability() {\n return probability;\n }",
"POGOProtos.Rpc.CaptureProbabilityProto getCaptureProbabilities();",
"float getSpecialProb();",
"double[] calculateProbabilities(LACInstance testInstance) throws Exception\n\t{\n\t\tdouble[] probs;\n\t\tdouble[] scores = calculateScores(testInstance);\n\t\t\n\t\tif(scores != null)\n\t\t{\n\t\t\tprobs = new double[scores.length];\n\t\t\tdouble scoreSum = 0.0;\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tscoreSum += scores[i];\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tprobs[i] = scores[i] / scoreSum;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSet<Integer> allClasses = trainingSet.getAllClasses();\n\t\t\tprobs = new double[allClasses.size()];\n\t\t\tfor (Integer clazz : allClasses) \n\t\t\t{\n\t\t\t\tdouble count = trainingSet.getInstancesOfClass(clazz).size();\n\t\t\t\tprobs[clazz] = (count / ((double) trainingSet.length()));\n\t\t\t}\n\t\t}\n\n\t\treturn probs ;\n\t}",
"public double getProbability() {\r\n\t\treturn Probability;\r\n\t}",
"@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}",
"protected double get_breeding_probability()\n {\n return breeding_probability;\n }",
"private double[] evaluateProbability(double[] data) {\n\t\tdouble[] prob = new double[m_NumClasses], v = new double[m_NumClasses];\n\n\t\t// Log-posterior before normalizing\n\t\tfor (int j = 0; j < m_NumClasses - 1; j++) {\n\t\t\tfor (int k = 0; k <= m_NumPredictors; k++) {\n\t\t\t\tv[j] += m_Par[k][j] * data[k];\n\t\t\t}\n\t\t}\n\t\tv[m_NumClasses - 1] = 0;\n\n\t\t// Do so to avoid scaling problems\n\t\tfor (int m = 0; m < m_NumClasses; m++) {\n\t\t\tdouble sum = 0;\n\t\t\tfor (int n = 0; n < m_NumClasses - 1; n++)\n\t\t\t\tsum += Math.exp(v[n] - v[m]);\n\t\t\tprob[m] = 1 / (sum + Math.exp(-v[m]));\n\t\t\tif (prob[m] == 0)\n\t\t\t\tprob[m] = 1.0e-20;\n\t\t}\n\n\t\treturn prob;\n\t}",
"abstract double rightProbability();",
"void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}",
"public Map<String, WordImage> calculateWordsAndImagePropability(\r\n\t\t\tMap<String, WordImage> wordImageRel, int totalUniqueUserCount) {\r\n\r\n\t\tint totalOcurrance = 0;\r\n\r\n\t\t// Calculate the total number of word occurrences in the set of similar\r\n\t\t// and dissimilar images\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getSimlarImages().size();\r\n\r\n\t\t\tif (this.wordNotSimilarImages.get(word) != null)\r\n\t\t\t\twordOccur += this.wordNotSimilarImages.get(word);\r\n\r\n\t\t\twordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\ttotalOcurrance += wordOccur;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// wordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\tint uniqueUsers = wordImageRel.get(word)\r\n\t\t\t\t\t.getWordUniqueUsers(this.photoList).size();\r\n\r\n\t\t\twordImageRel.get(word).setTotalOcurances(totalOcurrance);\r\n\r\n\t\t\t// .......... Voting-similar word probability\r\n\t\t\t// .......................\r\n\r\n\t\t\t// 1. Word probability without user assumptions\r\n\t\t\tdouble PwOnlyWords = ((double) wordOccur / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyWords(PwOnlyWords);\r\n\r\n\t\t\t// 2. Word probability with user proportion to the total number of\r\n\t\t\t// users\r\n\t\t\tdouble PwAllUsers = PwOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwAllUsers(PwAllUsers);\r\n\r\n\t\t\t// 3. Word probability. Word freq is represented by the number of\r\n\t\t\t// unique users only\r\n\t\t\tdouble PwOnlyUniqueUsers = ((double) uniqueUsers / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyUniqueUsers(PwOnlyUniqueUsers);\r\n\r\n\t\t\t// ..........TF-IDF Word Probability Calculation\r\n\t\t\t// .......................\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// 1. Word probability TF.IDF approach without user assumptions\r\n\t\t\tdouble PwTFIDFlOnlyWords = ((double) Rw / R)\r\n\t\t\t\t\t* (Math.log((double) C / Lw) / Math.log(2))\r\n\t\t\t\t\t/ (Math.log((double) C) / Math.log(2));\r\n\t\t\twordImageRel.get(word).setPwTFIDFlOnlyWords(PwTFIDFlOnlyWords);\r\n\r\n\t\t\t// 2. Word probability TF.IDF approach with user proportion to the\r\n\t\t\t// totall number of users\r\n\t\t\tdouble PwTFIDFlAllUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwTFIDFlAllUsers(PwTFIDFlAllUsers);\r\n\r\n\t\t\t// 3. Word probability TF.IDF approach. Word freq is represented by\r\n\t\t\t// the number of unique users only\r\n\t\t\tdouble PwTFIDFOnlyUniqueUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* (uniqueUsers / (double) wordOccur);\r\n\t\t\twordImageRel.get(word).setPwTFIDFOnlyUniqueUsers(\r\n\t\t\t\t\tPwTFIDFOnlyUniqueUsers);\r\n\r\n\t\t\twordImageRel.get(word)\r\n\t\t\t\t\t.setImageProbability(1.0 / (double) wordOccur); // P(c_j|w)\r\n\r\n\t\t}\r\n\t\treturn wordImageRel;\r\n\r\n\t}",
"public double[] proportionPercentage(){\n if(!this.pcaDone)this.pca();\n return this.proportionPercentage;\n }",
"@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}",
"private double getProbOfClass(int catIndex) {\r\n\t\treturn (classInstanceCount[catIndex] + mCategoryPrior)\r\n\t\t\t\t/ (classInstanceCount[0] + classInstanceCount[1] + mCategories.length\r\n\t\t\t\t\t\t* mCategoryPrior);\r\n\t}",
"POGOProtos.Rpc.CaptureProbabilityProtoOrBuilder getCaptureProbabilitiesOrBuilder();",
"@Override\n\tpublic void computeFinalProbabilities() {\n\t\tsuper.computeFinalProbabilities();\n\t}",
"public double getObservationProbability(){\r\n double ret=0;\r\n int time=o.length;\r\n int N=hmm.stateCount;\r\n for (int t=0;t<=time;++t){\r\n for (int i=0;i<N;++i){\r\n ret+=fbManipulator.alpha[t][i]*fbManipulator.beta[t][i];\r\n }\r\n }\r\n ret/=time;\r\n return ret;\r\n }",
"public double contagionProbability(Person p)\n\t{\n\t\tif(p.getAge()<=18)\n\t\t{\n\t\t\treturn con_18*p.contagionProbability();\n\t\t}\n\t\tif(p.getAge()>18 && p.getAge()<=55)\n\t\t{\n\t\t\treturn con_18_55*p.contagionProbability();\n\t\t}\n\t\treturn con_up55*p.contagionProbability();\n\t}",
"public static int getObstacleProbability() {\n\t\tif(SHOW_OBSTACLES){\n\t\t\treturn RANDOM_OBSTACLE_COUNT;\n\t\t}\n\t\treturn 0;\n\t}",
"public abstract Map getProbabilities(String[] path);",
"abstract double leftProbability();",
"public double getProbabilityP() {\n return this.mProbabilityP;\n }",
"public double getAbandonmentProbability() {\n return Math.random();\n }",
"public double outcomeProb(char[] outcome) {\r\n\t\t// get all forward probabilities\r\n\t\tdouble[][] probs = getForwards(outcome);\r\n\t\t\r\n\t\t// initialize the probability of this outcome to 0\r\n\t\tdouble outcomeProb = 0;\r\n\t\t// loop over all nodes in the last column\r\n\t\tfor (int i = 0; i < states.length; ++i)\r\n\t\t\t// add this node's probability to the overall probability\r\n\t\t\toutcomeProb += probs[i][outcome.length - 1];\r\n\t\t\r\n\t\treturn outcomeProb;\r\n\t}",
"private double infobits(double[] probs) {\r\n\t\tdouble sum = 0;\r\n\t\tfor (int i = 0; i < probs.length; i++) {\r\n\t\t\tsum += entropy(probs[i]);\r\n\t\t}\r\n\t\treturn sum;\r\n\t}",
"public float getSpecialProb() {\n return specialProb_;\n }",
"double getCritChance();",
"public void calculateProbabilities(Ant ant) {\n int i = ant.trail[currentIndex];\n double pheromone = 0.0;\n for (int l = 0; l < numberOfCities; l++) {\n if (!ant.visited(l)) {\n pheromone += (Math.pow(trails[i][l], alpha) + 1) * (Math.pow(graph[i][l], beta) + 1) *\n (Math.pow(emcMatrix[i][l], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][l], ddd) + 1);\n }\n }\n for (int j = 0; j < numberOfCities; j++) {\n if (ant.visited(j)) {\n probabilities[j] = 0.0;\n } else {\n double numerator = (Math.pow(trails[i][j], alpha) + 1) * (Math.pow(graph[i][j], beta) + 1) *\n (Math.pow(emcMatrix[i][j], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][j], ddd) + 1);\n probabilities[j] = numerator / pheromone;\n }\n }\n }",
"private void classifyTestImages() throws FileNotFoundException, UnsupportedEncodingException {\n PrintWriter writer = new PrintWriter(\"result.txt\", \"UTF-8\");\n writer.println(\"#Authors: Thomas Sarlin & Petter Poucette\");\n\n ArrayList<Image> images = testReader.getImages();\n double activationResult[]=new double[4];\n int bestGuess;\n for (Image image : images) {\n for (int j = 0; j < 4; j++)\n activationResult[j] = activationFunction\n .apply(sumWeights(j, image));\n\n bestGuess = getBestGuess(activationResult);\n writer.println(image.getName() + \" \" + bestGuess);\n }\n writer.close();\n }",
"public float getSpecialProb() {\n return specialProb_;\n }",
"private List<Integer> generateProb() {\n Integer[] randArr = new Integer[numCols*numRows];\n\n int start = 0;\n int end;\n for(int i = 0; i < myStateMap.size(); i++) {\n double prob = myStateMap.get(i).getProb();\n end = (int) (prob * numCols * numRows + start);\n for(int j = start; j < end; j++) {\n if(end > randArr.length) {\n break;\n }\n randArr[j] = myStateMap.get(i).getType();\n }\n start = end;\n }\n\n List<Integer> arr = new ArrayList<>(Arrays.asList(randArr));\n Collections.shuffle(arr);\n return arr;\n }",
"public Bounds getProbabilityBounds();",
"private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}",
"public Map<String, WordImageRelevaces> calculateImageWordRelevance(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tPrintWriter tempOut;\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\t\ttry {\r\n\r\n\t\t\ttempOut = new PrintWriter(word_prop_output);\r\n\r\n\t\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\t\tint index = 0;\r\n\r\n\t\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\t\ttempOut.println(\"Word , total Occur , #NotSimImgs, #SimImgs , WordOccur , #Unique Users \"\r\n\t\t\t\t\t+ \", Pw1, Pw2,Pw3 , Pw4 , Pw5,Pw6 , C, R, Rw, Lw\");\r\n\r\n\t\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\t\tint C = totalNumberOfImages;\r\n\t\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t\ttempOut.println(word\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getTotalOcurences()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordNotSimilarImages.get(word)\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getSimilarImageIDs().size()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getOcurrances()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word)\r\n\t\t\t\t\t\t\t\t.getWordUniqueUsers(this.photoList).size()\r\n\t\t\t\t\t\t+ \",\" + +Pw1 + \",\" + Pw2 + \",\" + Pw3 + \",\" + Pw4 + \",\"\r\n\t\t\t\t\t\t+ Pw5 + \",\" + Pw6 + \",\" + C + \",\" + R + \",\" + Rw + \",\"\r\n\t\t\t\t\t\t+ Lw);\r\n\r\n\t\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Normalise\r\n\t\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t\t\ttempOut.close();\r\n\t\t\t}\r\n\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\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}",
"boolean getProbables();",
"@Test\n void adjectivesScoring() {\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day; glad @JeremyKappell is standing up against #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB (Via NEWS 8 WROC)\");\n HashMap<String, Double> as = np.adjectivesScoring(sentences);\n for (String key : as.keySet()) {\n Double value = as.get(key);\n assertTrue(value >= 0 && value <= 4);\n }\n }",
"public abstract float getProbability(String[] tokens);",
"private int getPetImages() {\n int nUserPets = user.getPets().size();\n Drawable defaultDrawable = getResources().getDrawable(R.drawable.single_paw, null);\n Bitmap defaultBitmap = ((BitmapDrawable) defaultDrawable).getBitmap();\n countImagesNotFound = new int[nUserPets];\n Arrays.fill(countImagesNotFound, 0);\n\n ExecutorService executorService = Executors.newCachedThreadPool();\n startRunnable(nUserPets, executorService);\n executorService.shutdown();\n\n try {\n executorService.awaitTermination(3, TimeUnit.MINUTES);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return calculateImagesNotFound();\n }",
"private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}",
"public double getProbability(Object rootState) { return getProbability(rootState, (Object[])null); }",
"private double getProbabilityScore(Cell c,int bitmask)\n {\n\t return Math.pow(\n\t\t\t Math.pow(m_probs1[c.getCol()-1],(1&bitmask) ) * \n\t\t\t Math.pow(m_probs2[c.getRow()-1],(2&bitmask)/2) //geo-mean\n\t\t\t , Math.min(1,3.5-bitmask));\n }",
"private List<ProbabilityOfDefault> getPDs(Scenario s) {\n\t\t\r\n\t\tCountry ctry = getCountry();\r\n\t\t\r\n\t\tDouble probGrowth = ctry.getProbabilityOfGrowth();\r\n\t\tDouble probRecession = ctry.getProbabilityOfRecession();\r\n\t\t\r\n\t\tList<ProbabilityOfDefault> adjustedPDs = new ArrayList<>();\r\n\t\t\r\n\t\tfor (ProbabilityOfDefault pd : rating.getPDs()) {\r\n\t\t\tProbabilityOfDefault newPd = pd;\r\n\t\t\tnewPd.setPD((probGrowth * pd.getGrowthPD()) + (probRecession * pd.getRecessionPD()));\r\n\t\t\tadjustedPDs.add(newPd);\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(adjustedPDs);\r\n\t\treturn adjustedPDs;\r\n\t}",
"private double[] computePredictionValues() {\n double[] predResponses = new double[D];\n for (int d = 0; d < D; d++) {\n double expDotProd = Math.exp(docLabelDotProds[d]);\n double docPred = expDotProd / (expDotProd + 1);\n predResponses[d] = docPred;\n }\n return predResponses;\n }",
"private static void findBigramProbTuring() {\n\t\t\t\t\n\t\tbigramProbT= new HashMap<String, Double>();\n\t\tdouble prob;\n\t\t\n\t\tfor(String s: corpusBigramCount.keySet()){\n\t\t\tint count=corpusBigramCount.get(s);\n\t\t\tif(count==0){\n\t\t\t\tprob= bucketCountT.getOrDefault(1,0.0)/corpusNumOfBigrams;\n\t\t\t}\n\t\t\telse\n\t\t\t\tprob= bigramCountTI.get(count)/corpusNumOfBigrams;\n\t\t\tbigramProbT.put(s, prob);\n\t\t}\n\t\t\t\n\t}",
"public List<Result> recognize(IplImage image);",
"public double outcomeGivenPathProb(char[] outcome, S[] path) {\r\n\t\t// initialize probability to 1\r\n\t\tdouble prob = 1;\r\n\t\t// loop over all emitted chars\r\n\t\tfor (int i = 0; i < outcome.length; ++i)\r\n\t\t\t// multiple probability by the emission probability of this char\r\n\t\t\tprob *= emissProb(indexOf(states, path[i]), outcome[i]);\r\n\t\t\r\n\t\treturn prob;\r\n\t}",
"public Image getNatural();",
"public double getProbability() {\n\t\treturn getD_errorProbability();\n\t}",
"public Double getProb(T element) {\n\t\treturn itemProbs_.get(element);\n\t}",
"public double getCandProbability(String candidate){\n\t\tString[] candTerms = candidate.split(\"\\\\s+\");\n\t\t\n\t\t// Total Tokens\n\t\tdouble totTokens = (double)unigramDict.termCount();\n\t\t//P(w1) in log\n\t\tString w1 = candTerms[0];\n\t\tdouble probW1 = Math.log10((double)unigramDict.count(w1, wordToId)/totTokens);\n\t\t\n\t\t//P (w1, w2, ..., wn)\n\t\tdouble probCandidate = probW1;\n\t\t\n\t\t\n\t\tfor( int i =0; i < candTerms.length-1; i++){\n\t\t\t//Pint(w2|w1) = Pmle(w2) + (1 )Pmle(w2|w1)\n\t\t\tString currentTerm = candTerms[i];\n\t\t\tString nextTerm = candTerms[i+1];\n\t\t\tString bigram = currentTerm + \" \" + nextTerm;\n\t\t\tint freqBigram = bigramDict.count(bigram, wordToId);\n\t\t\t\n\t\t\t//this term should be in dictionary\n\t\t\tint freqFirstTerm = unigramDict.count(currentTerm, wordToId);\n\t\t\t\n\t\t\tdouble PmleW2W1 = (double)freqBigram/(double)freqFirstTerm;\n\t\t\t\n\t\t\t//System.out.println(\"candidate=[\" + candidate + \"]\\tbigram=[\" + bigram + \"]\\tterms=\" + Arrays.toString(terms));\n\t\t\tdouble PmleW2 = (double)unigramDict.count(nextTerm, wordToId) / totTokens;\n\t\t\t//double lamda= 0.1;\n\t\t\tdouble PintW2W1 = lamda*PmleW2 + (1-lamda)*PmleW2W1;\n\t\t\tprobCandidate = probCandidate + Math.log10(PintW2W1);\n\t\t}\n\t\treturn probCandidate;\n\t}",
"public scala.collection.immutable.IndexedSeq<java.lang.Object> getQuantiles (scala.collection.Iterable<java.lang.Object> probabilities) { throw new RuntimeException(); }",
"public void createProbsMap() {\n\t\tif(this.counts == null) {\n\t\t\tcreateCountMap();\n\t\t}\n\t\t\n\t\tMap<String, Double> result = new HashMap<String, Double>();\n\t\t\n\t\t// Make the counts and get the highest probability found \n\t\tdouble highestProb = 0.00;\n\t\tdouble size = (double) this.getData().size();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\tresult.put(entry.getKey(), value / size);\n\t\t\t\n\t\t\tif(value/size > highestProb) {\n\t\t\t\thighestProb = value/size;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fill the highest probilities \n\t\tList<String> highestProbs = new ArrayList<String>();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\t\n\t\t\tif(value/size == highestProb) {\n\t\t\t\thighestProbs.add(entry.getKey());\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.highestProbs = highestProbs;\n\t\tthis.highestProb = highestProb;\n\t\tthis.probs \t\t = result;\n\t}",
"public int[] podium(){\n int[] pod = new int[3];\n for (int i=0; i<3; i++) {\n pod[i]=0;\n }\n \n int n = this.scores.length;\n for (int i=0; i<n; i++) {\n if (scores[i]>pod[2]) {\n pod[0]=pod[1];\n pod[1]=pod[2];\n pod[2]=scores[i];\n } else if ((scores[i]>pod[1])) {\n pod[0]=pod[1];\n pod[1]=scores[i];\n } else if ((scores[i]>pod[0])) {\n pod[0]=scores[i];\n }\n \n }\n return pod;\n \n }",
"double getBranchProbability();",
"public Action getActionBasedOnProbability(final State state) {\r\n final double decision = Math.random();\r\n double decisionCount = 0;\r\n\r\n for (final Map.Entry<Action, Double> actionProb : getProperties(state).getActionProbabilities().entrySet()) {\r\n decisionCount += actionProb.getValue();\r\n if (decisionCount >= decision) {\r\n return actionProb.getKey();\r\n }\r\n }\r\n\r\n System.err.println(\"Error: cannot choose action!\");\r\n System.err.println(getProperties(state).getActionProbabilities());\r\n return null;\r\n }",
"public int getContaminantPPM() {\n return contaminantPPM;\n }",
"float genChance();",
"protected Double successProbability(){\n\t\tnodeKValues = collectKValues();\n\t\tList<Integer[]> placements = getDistinctPlacements(getMinKPath());\n\t\tlong maxNumberOfColorings = 0;\n\t\tfor (Integer[] placement : placements){\n\t\t\tlong colorings = numberOfColorings(placement);\n\t\t\tif (colorings > maxNumberOfColorings)\n\t\t\t\tmaxNumberOfColorings = colorings;\n\t\t}\n\t\tDouble probability = 1.0/maxNumberOfColorings;\n\t\tfor (int i=1; i<=pathLength; i++){ // factorial of pathlength\n\t\t\tprobability = probability * i;\n\t\t}\n\t\treturn probability;\n\t}",
"public abstract double getLinkProbability(int linkId);",
"public double getProb(String word) {\n double numWords = wordMap.get(\"TOTAL_WORDS\");\n return wordMap.getOrDefault(word, 0.0)/numWords;\n }",
"Float getFedAnimalsPercentage();",
"private void checkProbability(String mapName, WildEncounterInfo[] wildEncounters) {\n int totalProbability = 0;\n for (WildEncounterInfo wildEncounter : wildEncounters) {\n totalProbability += wildEncounter.getProbability();\n }\n\n Assert.assertEquals(mapName, 100, totalProbability);\n }",
"public double getProbRecombinacion() {\n return getDouble(params.probRecombinacion, PROP_PROB_RECOMB, 0.5);\n }",
"@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }",
"public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}",
"public double getProbabilityOf(T aData) {\n\t\tdouble freq = this.getFrequencyOf(aData);\n\t\tdouble dblSize = numEntries;\n\t\treturn freq/dblSize;\n\t}",
"protected int getPostiveOnes() {\n Rating[] ratingArray = this.ratings;\n int posOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) {\n if(ratingArray[i].getScore() == 1) posOneCount++; \n }\n }\n return posOneCount;\n }",
"public double people(double precis,double plagiarism,double poster,double video,double presentation,double portfolio,double reflection,double examination,double killerRobot)\n {\n double a = ((4%100)*precis)/100;\n double b = ((8%100)*plagiarism)/100;\n double c = ((12%100)*poster)/100;\n double d = ((16%100)*video)/100;\n double e = ((12%100)*presentation)/100;\n double f = ((10%100)*portfolio)/100;\n double g = ((10%100)*reflection)/100;\n double h = ((16%100)*examination)/100;\n double i = ((12%100)*killerRobot)/100;\n double grade = ((a+b+c+d+e+f+g+h+i)/8);//*100;\n return grade;\n }",
"public abstract float getProbability(String singleToken);",
"@Override\r\n\tpublic Double getPropensity_pension_score() {\n\t\treturn super.getPropensity_pension_score();\r\n\t}",
"public static double[]getBackgroundStatsFromProcessor(ImageProcessor imgP) {\n\t\tint dimX=imgP.getWidth();\n\t\tint dimY=imgP.getHeight();\n\t\tint samplSize=Math.min(10+20,dimX/10);\n\t\tif(dimX<100)samplSize=12;\n\t\tif(dimX>500)samplSize=40;\n\n\t\tint x0=(3*samplSize)/2;\n\t\tint y0=(3*samplSize)/2;\n\t\tint x1=dimX/2;\n\t\tint y1=dimY/2;\n\t\tint x2=dimX-(3*samplSize)/2;\n\t\tint y2=dimY-(3*samplSize)/2;\n\t\tdouble[][] vals=new double[8][];\n\t\tvals[0]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y0,samplSize/2);\n\t\tvals[1]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y2,samplSize/2);\n\t\tvals[2]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y0,samplSize/2);\n\t\tvals[3]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/2);\t\t\n\t\tvals[4]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y1,samplSize/4);\n\t\tvals[5]=VitimageUtils.valuesOfImageProcessor(imgP,x1,y0,samplSize/4);\n\t\tvals[6]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y1,samplSize/4);\n\t\tvals[7]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/4);\n\n\t\t//Compute the global mean over all these squares\n\t\tdouble[]tempStatsMeanVar=null;\n\t\tdouble[]tempStats=new double[vals.length];\n\t\t\n\t\t//Measure local stats, and guess that three of them can host the object\n\t\tfor(int i=0;i<vals.length;i++) {\n\t\t\ttempStatsMeanVar=VitimageUtils.statistics1D(vals[i]);\n\t\t\ttempStats[i]=tempStatsMeanVar[0];\n\t\t}\n\n\t\tdouble[]tempStatsCorrected=null;\n\t\tint incr=0;\n\t\tdouble[][]valsBis=null;\n\t\ttempStatsCorrected=new double[5];//Suppress the 3 maximum, that should be the border or corner where the object lies\n\n\t\tdouble[]tempStats2=doubleArraySort(tempStats);\n\t\tfor(int i=0;i<5;i++)tempStatsCorrected[i]=tempStats2[i];\n\t\tvalsBis=new double[5][];\t\t\t\n\t\tfor(int i=0;i<8 && incr<5;i++) {if(tempStats[i]<=tempStatsCorrected[4]) {valsBis[incr++]=vals[i];}}\n\t\t\t\n\t\tdouble []valsRetBis=VitimageUtils.statistics2D(valsBis);\t\t\n\t\treturn valsRetBis;\n\t}",
"public double getPerimiter(){return (2*height +2*width);}",
"public double[] rotatedProportionPercentage(){\n if(!this.rotationDone)throw new IllegalArgumentException(\"No rotation has been performed\");\n return this.rotatedProportionPercentage;\n }",
"@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }",
"@Override\n\tpublic double getProbability(Robot robot) {\n\t\treturn 0;\n\t}",
"public float getChance() {\n return chance;\n }",
"public float getChance()\n {\n return 1.0f;\n }",
"@Override\r\n\tpublic double getProb(double price, double[] realized) {\r\n\t\treturn getPMF(realized)[ bin(price, precision) ];\r\n\t}",
"double getTransProb();",
"public void computeUtility(Tile[] tile, double[] probability, double r, double g) {\n }",
"public double[] ratioPublicVsPrivateNewspaper() {\n\t\tcheckAuthority();\n\t\tdouble ratio[] = new double[2];\n\t\tdouble res[] = new double[2];\n\t\tres[0] = 0.;\n\t\tres[1] = 0.;\n\n\t\ttry {\n\t\t\tratio[0] = this.administratorRepository.ratioPublicNewspaper();\n\t\t\tratio[1] = this.administratorRepository.ratioPrivateNewspaper();\n\t\t\treturn ratio;\n\t\t} catch (Exception e) {\n\t\t\treturn res;\n\t\t}\n\n\t}",
"private double getClassProbability(ClassificationClass classificationClass) {\n if (classificationClass == null) {\n return 0;\n }\n\n double documentsInClass = 0;\n\n for (Document document : documents) {\n if (document.getClassificationClasses().contains(classificationClass)) {\n documentsInClass++;\n }\n }\n\n return documentsInClass / documents.size();\n }",
"public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}",
"@Override\r\n\tpublic Double getPropensity_trust_score() {\n\t\treturn super.getPropensity_trust_score();\r\n\t}",
"@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }",
"private double [] uniformDiscreteProbs(int numStates) \n {\n double [] uniformProbs = new double[2 * numStates];\n for(int i = 0; i < 2 * numStates; i++)\n uniformProbs[i] = (1.0 / (2 * numStates));\n return uniformProbs;\n }",
"public Map<String, WordImageRelevaces> calculateImageWordRelevanceCompact(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\r\n\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\tint index = 0;\r\n\r\n\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Normalise\r\n\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\tindex++;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t}\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}",
"public double calculateSpecificity() {\n final long divisor = trueNegative + falsePositive;\n if(divisor == 0) {\n return 0.0;\n } else {\n return trueNegative / (double)divisor;\n }\n }",
"public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }",
"public double getActionProbability(final State state, final Action action) {\r\n return getProperties(state).getActionProbability(action);\r\n }",
"public double expectedFalsePositiveProbability() {\n\t\treturn Math.pow((1 - Math.exp(-k * (double) expectedElements\n\t\t\t\t/ (double) bitArraySize)), k);\n\t}",
"double getMissChance();",
"public void buildPriors() {\n\t\t// grab the list of all class labels for this fold\n\t\tList<List<String>> classListHolder = dc.getClassificationFold();\n\t\tint totalClasses = 0; // track ALL class occurrences for this fold\n\t\tint[] totalClassOccurrence = new int[classes.size()]; // track respective class occurrence\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue; // skip testing fold\n\t\t\t} else {\n\t\t\t\tcurrentFold = i;\n\t\t\t} // end if\n\n\t\t\t// grab the list of all classes for this current fold\n\t\t\tList<String> classList = classListHolder.get(currentFold);\n\t\t\t// track the total number of classes in this fold and their occurrences\n\t\t\ttotalClasses += classList.size();\n\t\t\t// for each class occurrence, match it to a class and track its occurrence\n\t\t\tfor (String className : classList) {\n\t\t\t\tfor (int j = 0; j < classes.size(); j++) {\n\t\t\t\t\tif (className.equals(classes.get(j))) {\n\t\t\t\t\t\ttotalClassOccurrence[j]++;\n\t\t\t\t\t} // end if\n\t\t\t\t} // end for\n\t\t\t} // end for\n\t\t} // end for\n\n\t\t// divide a particular class occurrence by total number of classes across training set\n\t\tfor (int i = 0; i < classPriors.length; i++) {\n\t\t\tclassPriors[i] = totalClassOccurrence[i] / totalClasses;\n\t\t} // end for\n\t}",
"public static double[] getProbs(List<Derivation> derivations, double temperature) {\n double[] probs = new double[derivations.size()];\n for (int i = 0; i < derivations.size(); i++)\n probs[i] = derivations.get(i).getScore() / temperature;\n if (probs.length > 0)\n NumUtils.expNormalize(probs);\n return probs;\n }",
"public boolean reproducirse() {\n r = new Random();\r\n return Float.compare(r.nextFloat(), probReproducirse) <= 0;\r\n }",
"public double getScore() {\n int as = this.attributes.size(); // # of attributes that were matched\n\n // we use thresholding ranking approach for numInstances to influence the matching score\n int instances = this.train.numInstances();\n int inst_rank = 0;\n if (instances > 100) {\n inst_rank = 1;\n }\n if (instances > 500) {\n inst_rank = 2;\n }\n\n return this.p_sum + as + inst_rank;\n }",
"double getRatio();",
"private double convert() {\n\t\t// modulus is private, but we have the getter\n\t\treturn riskNeutralProbabilityUp * (randomGenerator.getModulus() - 1);\n\t}"
]
| [
"0.5786381",
"0.57027304",
"0.5630279",
"0.5566898",
"0.55602795",
"0.5521205",
"0.53160524",
"0.527399",
"0.52547306",
"0.5238439",
"0.52371645",
"0.5200319",
"0.50942767",
"0.5080741",
"0.5075284",
"0.5040735",
"0.5020369",
"0.5010527",
"0.4992298",
"0.49309567",
"0.49230972",
"0.4899623",
"0.4887625",
"0.48843288",
"0.48821422",
"0.48607966",
"0.48496944",
"0.4836154",
"0.4835873",
"0.48235402",
"0.48042262",
"0.48031998",
"0.47824162",
"0.4775374",
"0.4766173",
"0.47577423",
"0.47575927",
"0.47563463",
"0.47446194",
"0.47406387",
"0.47259223",
"0.47253844",
"0.47236726",
"0.47176018",
"0.4717528",
"0.47095484",
"0.4667282",
"0.46652988",
"0.46641463",
"0.46451575",
"0.46410877",
"0.4640894",
"0.46286342",
"0.4627548",
"0.46115872",
"0.46045855",
"0.46012986",
"0.46012837",
"0.46012086",
"0.46003717",
"0.45955324",
"0.45902592",
"0.45890653",
"0.45657274",
"0.4554271",
"0.45542195",
"0.4550101",
"0.45439222",
"0.45435953",
"0.45366648",
"0.45324874",
"0.45259416",
"0.45175546",
"0.45165685",
"0.4500676",
"0.44949433",
"0.44894037",
"0.4486637",
"0.448473",
"0.4465555",
"0.44596",
"0.44567797",
"0.44500646",
"0.44468585",
"0.4432141",
"0.44306624",
"0.4429654",
"0.44237533",
"0.4406469",
"0.43994612",
"0.43938962",
"0.43787175",
"0.43769315",
"0.4372416",
"0.4359772",
"0.4357929",
"0.4349213",
"0.43470952",
"0.43335533",
"0.43318015",
"0.43277287"
]
| 0.0 | -1 |
Returns probabilities of the image containing racy or adult content. | public Observable<EvaluateInner> evaluateUrlInputAsync(String contentType, BodyModelInner imageUrl, Boolean cacheImage) {
return evaluateUrlInputWithServiceResponseAsync(contentType, imageUrl, cacheImage).map(new Func1<ServiceResponse<EvaluateInner>, EvaluateInner>() {
@Override
public EvaluateInner call(ServiceResponse<EvaluateInner> response) {
return response.body();
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void calculateProbabilities(){\n\t}",
"private void evaluateProbabilities()\n\t{\n\t}",
"public double[] getProbabilities() { return getProbabilities((int[])null); }",
"public double getProbability() {\n return probability;\n }",
"POGOProtos.Rpc.CaptureProbabilityProto getCaptureProbabilities();",
"float getSpecialProb();",
"double[] calculateProbabilities(LACInstance testInstance) throws Exception\n\t{\n\t\tdouble[] probs;\n\t\tdouble[] scores = calculateScores(testInstance);\n\t\t\n\t\tif(scores != null)\n\t\t{\n\t\t\tprobs = new double[scores.length];\n\t\t\tdouble scoreSum = 0.0;\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tscoreSum += scores[i];\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tprobs[i] = scores[i] / scoreSum;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSet<Integer> allClasses = trainingSet.getAllClasses();\n\t\t\tprobs = new double[allClasses.size()];\n\t\t\tfor (Integer clazz : allClasses) \n\t\t\t{\n\t\t\t\tdouble count = trainingSet.getInstancesOfClass(clazz).size();\n\t\t\t\tprobs[clazz] = (count / ((double) trainingSet.length()));\n\t\t\t}\n\t\t}\n\n\t\treturn probs ;\n\t}",
"public double getProbability() {\r\n\t\treturn Probability;\r\n\t}",
"@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}",
"protected double get_breeding_probability()\n {\n return breeding_probability;\n }",
"private double[] evaluateProbability(double[] data) {\n\t\tdouble[] prob = new double[m_NumClasses], v = new double[m_NumClasses];\n\n\t\t// Log-posterior before normalizing\n\t\tfor (int j = 0; j < m_NumClasses - 1; j++) {\n\t\t\tfor (int k = 0; k <= m_NumPredictors; k++) {\n\t\t\t\tv[j] += m_Par[k][j] * data[k];\n\t\t\t}\n\t\t}\n\t\tv[m_NumClasses - 1] = 0;\n\n\t\t// Do so to avoid scaling problems\n\t\tfor (int m = 0; m < m_NumClasses; m++) {\n\t\t\tdouble sum = 0;\n\t\t\tfor (int n = 0; n < m_NumClasses - 1; n++)\n\t\t\t\tsum += Math.exp(v[n] - v[m]);\n\t\t\tprob[m] = 1 / (sum + Math.exp(-v[m]));\n\t\t\tif (prob[m] == 0)\n\t\t\t\tprob[m] = 1.0e-20;\n\t\t}\n\n\t\treturn prob;\n\t}",
"abstract double rightProbability();",
"void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}",
"public Map<String, WordImage> calculateWordsAndImagePropability(\r\n\t\t\tMap<String, WordImage> wordImageRel, int totalUniqueUserCount) {\r\n\r\n\t\tint totalOcurrance = 0;\r\n\r\n\t\t// Calculate the total number of word occurrences in the set of similar\r\n\t\t// and dissimilar images\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getSimlarImages().size();\r\n\r\n\t\t\tif (this.wordNotSimilarImages.get(word) != null)\r\n\t\t\t\twordOccur += this.wordNotSimilarImages.get(word);\r\n\r\n\t\t\twordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\ttotalOcurrance += wordOccur;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// wordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\tint uniqueUsers = wordImageRel.get(word)\r\n\t\t\t\t\t.getWordUniqueUsers(this.photoList).size();\r\n\r\n\t\t\twordImageRel.get(word).setTotalOcurances(totalOcurrance);\r\n\r\n\t\t\t// .......... Voting-similar word probability\r\n\t\t\t// .......................\r\n\r\n\t\t\t// 1. Word probability without user assumptions\r\n\t\t\tdouble PwOnlyWords = ((double) wordOccur / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyWords(PwOnlyWords);\r\n\r\n\t\t\t// 2. Word probability with user proportion to the total number of\r\n\t\t\t// users\r\n\t\t\tdouble PwAllUsers = PwOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwAllUsers(PwAllUsers);\r\n\r\n\t\t\t// 3. Word probability. Word freq is represented by the number of\r\n\t\t\t// unique users only\r\n\t\t\tdouble PwOnlyUniqueUsers = ((double) uniqueUsers / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyUniqueUsers(PwOnlyUniqueUsers);\r\n\r\n\t\t\t// ..........TF-IDF Word Probability Calculation\r\n\t\t\t// .......................\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// 1. Word probability TF.IDF approach without user assumptions\r\n\t\t\tdouble PwTFIDFlOnlyWords = ((double) Rw / R)\r\n\t\t\t\t\t* (Math.log((double) C / Lw) / Math.log(2))\r\n\t\t\t\t\t/ (Math.log((double) C) / Math.log(2));\r\n\t\t\twordImageRel.get(word).setPwTFIDFlOnlyWords(PwTFIDFlOnlyWords);\r\n\r\n\t\t\t// 2. Word probability TF.IDF approach with user proportion to the\r\n\t\t\t// totall number of users\r\n\t\t\tdouble PwTFIDFlAllUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwTFIDFlAllUsers(PwTFIDFlAllUsers);\r\n\r\n\t\t\t// 3. Word probability TF.IDF approach. Word freq is represented by\r\n\t\t\t// the number of unique users only\r\n\t\t\tdouble PwTFIDFOnlyUniqueUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* (uniqueUsers / (double) wordOccur);\r\n\t\t\twordImageRel.get(word).setPwTFIDFOnlyUniqueUsers(\r\n\t\t\t\t\tPwTFIDFOnlyUniqueUsers);\r\n\r\n\t\t\twordImageRel.get(word)\r\n\t\t\t\t\t.setImageProbability(1.0 / (double) wordOccur); // P(c_j|w)\r\n\r\n\t\t}\r\n\t\treturn wordImageRel;\r\n\r\n\t}",
"public double[] proportionPercentage(){\n if(!this.pcaDone)this.pca();\n return this.proportionPercentage;\n }",
"@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}",
"private double getProbOfClass(int catIndex) {\r\n\t\treturn (classInstanceCount[catIndex] + mCategoryPrior)\r\n\t\t\t\t/ (classInstanceCount[0] + classInstanceCount[1] + mCategories.length\r\n\t\t\t\t\t\t* mCategoryPrior);\r\n\t}",
"POGOProtos.Rpc.CaptureProbabilityProtoOrBuilder getCaptureProbabilitiesOrBuilder();",
"@Override\n\tpublic void computeFinalProbabilities() {\n\t\tsuper.computeFinalProbabilities();\n\t}",
"public double getObservationProbability(){\r\n double ret=0;\r\n int time=o.length;\r\n int N=hmm.stateCount;\r\n for (int t=0;t<=time;++t){\r\n for (int i=0;i<N;++i){\r\n ret+=fbManipulator.alpha[t][i]*fbManipulator.beta[t][i];\r\n }\r\n }\r\n ret/=time;\r\n return ret;\r\n }",
"public double contagionProbability(Person p)\n\t{\n\t\tif(p.getAge()<=18)\n\t\t{\n\t\t\treturn con_18*p.contagionProbability();\n\t\t}\n\t\tif(p.getAge()>18 && p.getAge()<=55)\n\t\t{\n\t\t\treturn con_18_55*p.contagionProbability();\n\t\t}\n\t\treturn con_up55*p.contagionProbability();\n\t}",
"public static int getObstacleProbability() {\n\t\tif(SHOW_OBSTACLES){\n\t\t\treturn RANDOM_OBSTACLE_COUNT;\n\t\t}\n\t\treturn 0;\n\t}",
"public abstract Map getProbabilities(String[] path);",
"abstract double leftProbability();",
"public double getProbabilityP() {\n return this.mProbabilityP;\n }",
"public double getAbandonmentProbability() {\n return Math.random();\n }",
"public double outcomeProb(char[] outcome) {\r\n\t\t// get all forward probabilities\r\n\t\tdouble[][] probs = getForwards(outcome);\r\n\t\t\r\n\t\t// initialize the probability of this outcome to 0\r\n\t\tdouble outcomeProb = 0;\r\n\t\t// loop over all nodes in the last column\r\n\t\tfor (int i = 0; i < states.length; ++i)\r\n\t\t\t// add this node's probability to the overall probability\r\n\t\t\toutcomeProb += probs[i][outcome.length - 1];\r\n\t\t\r\n\t\treturn outcomeProb;\r\n\t}",
"private double infobits(double[] probs) {\r\n\t\tdouble sum = 0;\r\n\t\tfor (int i = 0; i < probs.length; i++) {\r\n\t\t\tsum += entropy(probs[i]);\r\n\t\t}\r\n\t\treturn sum;\r\n\t}",
"public float getSpecialProb() {\n return specialProb_;\n }",
"double getCritChance();",
"private void classifyTestImages() throws FileNotFoundException, UnsupportedEncodingException {\n PrintWriter writer = new PrintWriter(\"result.txt\", \"UTF-8\");\n writer.println(\"#Authors: Thomas Sarlin & Petter Poucette\");\n\n ArrayList<Image> images = testReader.getImages();\n double activationResult[]=new double[4];\n int bestGuess;\n for (Image image : images) {\n for (int j = 0; j < 4; j++)\n activationResult[j] = activationFunction\n .apply(sumWeights(j, image));\n\n bestGuess = getBestGuess(activationResult);\n writer.println(image.getName() + \" \" + bestGuess);\n }\n writer.close();\n }",
"public void calculateProbabilities(Ant ant) {\n int i = ant.trail[currentIndex];\n double pheromone = 0.0;\n for (int l = 0; l < numberOfCities; l++) {\n if (!ant.visited(l)) {\n pheromone += (Math.pow(trails[i][l], alpha) + 1) * (Math.pow(graph[i][l], beta) + 1) *\n (Math.pow(emcMatrix[i][l], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][l], ddd) + 1);\n }\n }\n for (int j = 0; j < numberOfCities; j++) {\n if (ant.visited(j)) {\n probabilities[j] = 0.0;\n } else {\n double numerator = (Math.pow(trails[i][j], alpha) + 1) * (Math.pow(graph[i][j], beta) + 1) *\n (Math.pow(emcMatrix[i][j], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][j], ddd) + 1);\n probabilities[j] = numerator / pheromone;\n }\n }\n }",
"public float getSpecialProb() {\n return specialProb_;\n }",
"private List<Integer> generateProb() {\n Integer[] randArr = new Integer[numCols*numRows];\n\n int start = 0;\n int end;\n for(int i = 0; i < myStateMap.size(); i++) {\n double prob = myStateMap.get(i).getProb();\n end = (int) (prob * numCols * numRows + start);\n for(int j = start; j < end; j++) {\n if(end > randArr.length) {\n break;\n }\n randArr[j] = myStateMap.get(i).getType();\n }\n start = end;\n }\n\n List<Integer> arr = new ArrayList<>(Arrays.asList(randArr));\n Collections.shuffle(arr);\n return arr;\n }",
"public Bounds getProbabilityBounds();",
"public Map<String, WordImageRelevaces> calculateImageWordRelevance(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tPrintWriter tempOut;\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\t\ttry {\r\n\r\n\t\t\ttempOut = new PrintWriter(word_prop_output);\r\n\r\n\t\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\t\tint index = 0;\r\n\r\n\t\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\t\ttempOut.println(\"Word , total Occur , #NotSimImgs, #SimImgs , WordOccur , #Unique Users \"\r\n\t\t\t\t\t+ \", Pw1, Pw2,Pw3 , Pw4 , Pw5,Pw6 , C, R, Rw, Lw\");\r\n\r\n\t\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\t\tint C = totalNumberOfImages;\r\n\t\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t\ttempOut.println(word\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getTotalOcurences()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordNotSimilarImages.get(word)\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getSimilarImageIDs().size()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getOcurrances()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word)\r\n\t\t\t\t\t\t\t\t.getWordUniqueUsers(this.photoList).size()\r\n\t\t\t\t\t\t+ \",\" + +Pw1 + \",\" + Pw2 + \",\" + Pw3 + \",\" + Pw4 + \",\"\r\n\t\t\t\t\t\t+ Pw5 + \",\" + Pw6 + \",\" + C + \",\" + R + \",\" + Rw + \",\"\r\n\t\t\t\t\t\t+ Lw);\r\n\r\n\t\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Normalise\r\n\t\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t\t\ttempOut.close();\r\n\t\t\t}\r\n\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\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}",
"private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}",
"boolean getProbables();",
"@Test\n void adjectivesScoring() {\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day; glad @JeremyKappell is standing up against #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB (Via NEWS 8 WROC)\");\n HashMap<String, Double> as = np.adjectivesScoring(sentences);\n for (String key : as.keySet()) {\n Double value = as.get(key);\n assertTrue(value >= 0 && value <= 4);\n }\n }",
"public abstract float getProbability(String[] tokens);",
"private int getPetImages() {\n int nUserPets = user.getPets().size();\n Drawable defaultDrawable = getResources().getDrawable(R.drawable.single_paw, null);\n Bitmap defaultBitmap = ((BitmapDrawable) defaultDrawable).getBitmap();\n countImagesNotFound = new int[nUserPets];\n Arrays.fill(countImagesNotFound, 0);\n\n ExecutorService executorService = Executors.newCachedThreadPool();\n startRunnable(nUserPets, executorService);\n executorService.shutdown();\n\n try {\n executorService.awaitTermination(3, TimeUnit.MINUTES);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return calculateImagesNotFound();\n }",
"private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}",
"public double getProbability(Object rootState) { return getProbability(rootState, (Object[])null); }",
"private double getProbabilityScore(Cell c,int bitmask)\n {\n\t return Math.pow(\n\t\t\t Math.pow(m_probs1[c.getCol()-1],(1&bitmask) ) * \n\t\t\t Math.pow(m_probs2[c.getRow()-1],(2&bitmask)/2) //geo-mean\n\t\t\t , Math.min(1,3.5-bitmask));\n }",
"private List<ProbabilityOfDefault> getPDs(Scenario s) {\n\t\t\r\n\t\tCountry ctry = getCountry();\r\n\t\t\r\n\t\tDouble probGrowth = ctry.getProbabilityOfGrowth();\r\n\t\tDouble probRecession = ctry.getProbabilityOfRecession();\r\n\t\t\r\n\t\tList<ProbabilityOfDefault> adjustedPDs = new ArrayList<>();\r\n\t\t\r\n\t\tfor (ProbabilityOfDefault pd : rating.getPDs()) {\r\n\t\t\tProbabilityOfDefault newPd = pd;\r\n\t\t\tnewPd.setPD((probGrowth * pd.getGrowthPD()) + (probRecession * pd.getRecessionPD()));\r\n\t\t\tadjustedPDs.add(newPd);\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(adjustedPDs);\r\n\t\treturn adjustedPDs;\r\n\t}",
"private double[] computePredictionValues() {\n double[] predResponses = new double[D];\n for (int d = 0; d < D; d++) {\n double expDotProd = Math.exp(docLabelDotProds[d]);\n double docPred = expDotProd / (expDotProd + 1);\n predResponses[d] = docPred;\n }\n return predResponses;\n }",
"public List<Result> recognize(IplImage image);",
"private static void findBigramProbTuring() {\n\t\t\t\t\n\t\tbigramProbT= new HashMap<String, Double>();\n\t\tdouble prob;\n\t\t\n\t\tfor(String s: corpusBigramCount.keySet()){\n\t\t\tint count=corpusBigramCount.get(s);\n\t\t\tif(count==0){\n\t\t\t\tprob= bucketCountT.getOrDefault(1,0.0)/corpusNumOfBigrams;\n\t\t\t}\n\t\t\telse\n\t\t\t\tprob= bigramCountTI.get(count)/corpusNumOfBigrams;\n\t\t\tbigramProbT.put(s, prob);\n\t\t}\n\t\t\t\n\t}",
"public double outcomeGivenPathProb(char[] outcome, S[] path) {\r\n\t\t// initialize probability to 1\r\n\t\tdouble prob = 1;\r\n\t\t// loop over all emitted chars\r\n\t\tfor (int i = 0; i < outcome.length; ++i)\r\n\t\t\t// multiple probability by the emission probability of this char\r\n\t\t\tprob *= emissProb(indexOf(states, path[i]), outcome[i]);\r\n\t\t\r\n\t\treturn prob;\r\n\t}",
"public Image getNatural();",
"public double getProbability() {\n\t\treturn getD_errorProbability();\n\t}",
"public Double getProb(T element) {\n\t\treturn itemProbs_.get(element);\n\t}",
"public double getCandProbability(String candidate){\n\t\tString[] candTerms = candidate.split(\"\\\\s+\");\n\t\t\n\t\t// Total Tokens\n\t\tdouble totTokens = (double)unigramDict.termCount();\n\t\t//P(w1) in log\n\t\tString w1 = candTerms[0];\n\t\tdouble probW1 = Math.log10((double)unigramDict.count(w1, wordToId)/totTokens);\n\t\t\n\t\t//P (w1, w2, ..., wn)\n\t\tdouble probCandidate = probW1;\n\t\t\n\t\t\n\t\tfor( int i =0; i < candTerms.length-1; i++){\n\t\t\t//Pint(w2|w1) = Pmle(w2) + (1 )Pmle(w2|w1)\n\t\t\tString currentTerm = candTerms[i];\n\t\t\tString nextTerm = candTerms[i+1];\n\t\t\tString bigram = currentTerm + \" \" + nextTerm;\n\t\t\tint freqBigram = bigramDict.count(bigram, wordToId);\n\t\t\t\n\t\t\t//this term should be in dictionary\n\t\t\tint freqFirstTerm = unigramDict.count(currentTerm, wordToId);\n\t\t\t\n\t\t\tdouble PmleW2W1 = (double)freqBigram/(double)freqFirstTerm;\n\t\t\t\n\t\t\t//System.out.println(\"candidate=[\" + candidate + \"]\\tbigram=[\" + bigram + \"]\\tterms=\" + Arrays.toString(terms));\n\t\t\tdouble PmleW2 = (double)unigramDict.count(nextTerm, wordToId) / totTokens;\n\t\t\t//double lamda= 0.1;\n\t\t\tdouble PintW2W1 = lamda*PmleW2 + (1-lamda)*PmleW2W1;\n\t\t\tprobCandidate = probCandidate + Math.log10(PintW2W1);\n\t\t}\n\t\treturn probCandidate;\n\t}",
"public scala.collection.immutable.IndexedSeq<java.lang.Object> getQuantiles (scala.collection.Iterable<java.lang.Object> probabilities) { throw new RuntimeException(); }",
"public void createProbsMap() {\n\t\tif(this.counts == null) {\n\t\t\tcreateCountMap();\n\t\t}\n\t\t\n\t\tMap<String, Double> result = new HashMap<String, Double>();\n\t\t\n\t\t// Make the counts and get the highest probability found \n\t\tdouble highestProb = 0.00;\n\t\tdouble size = (double) this.getData().size();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\tresult.put(entry.getKey(), value / size);\n\t\t\t\n\t\t\tif(value/size > highestProb) {\n\t\t\t\thighestProb = value/size;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fill the highest probilities \n\t\tList<String> highestProbs = new ArrayList<String>();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\t\n\t\t\tif(value/size == highestProb) {\n\t\t\t\thighestProbs.add(entry.getKey());\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.highestProbs = highestProbs;\n\t\tthis.highestProb = highestProb;\n\t\tthis.probs \t\t = result;\n\t}",
"public int[] podium(){\n int[] pod = new int[3];\n for (int i=0; i<3; i++) {\n pod[i]=0;\n }\n \n int n = this.scores.length;\n for (int i=0; i<n; i++) {\n if (scores[i]>pod[2]) {\n pod[0]=pod[1];\n pod[1]=pod[2];\n pod[2]=scores[i];\n } else if ((scores[i]>pod[1])) {\n pod[0]=pod[1];\n pod[1]=scores[i];\n } else if ((scores[i]>pod[0])) {\n pod[0]=scores[i];\n }\n \n }\n return pod;\n \n }",
"public Action getActionBasedOnProbability(final State state) {\r\n final double decision = Math.random();\r\n double decisionCount = 0;\r\n\r\n for (final Map.Entry<Action, Double> actionProb : getProperties(state).getActionProbabilities().entrySet()) {\r\n decisionCount += actionProb.getValue();\r\n if (decisionCount >= decision) {\r\n return actionProb.getKey();\r\n }\r\n }\r\n\r\n System.err.println(\"Error: cannot choose action!\");\r\n System.err.println(getProperties(state).getActionProbabilities());\r\n return null;\r\n }",
"double getBranchProbability();",
"public int getContaminantPPM() {\n return contaminantPPM;\n }",
"float genChance();",
"protected Double successProbability(){\n\t\tnodeKValues = collectKValues();\n\t\tList<Integer[]> placements = getDistinctPlacements(getMinKPath());\n\t\tlong maxNumberOfColorings = 0;\n\t\tfor (Integer[] placement : placements){\n\t\t\tlong colorings = numberOfColorings(placement);\n\t\t\tif (colorings > maxNumberOfColorings)\n\t\t\t\tmaxNumberOfColorings = colorings;\n\t\t}\n\t\tDouble probability = 1.0/maxNumberOfColorings;\n\t\tfor (int i=1; i<=pathLength; i++){ // factorial of pathlength\n\t\t\tprobability = probability * i;\n\t\t}\n\t\treturn probability;\n\t}",
"public abstract double getLinkProbability(int linkId);",
"public double getProb(String word) {\n double numWords = wordMap.get(\"TOTAL_WORDS\");\n return wordMap.getOrDefault(word, 0.0)/numWords;\n }",
"Float getFedAnimalsPercentage();",
"public double getProbRecombinacion() {\n return getDouble(params.probRecombinacion, PROP_PROB_RECOMB, 0.5);\n }",
"private void checkProbability(String mapName, WildEncounterInfo[] wildEncounters) {\n int totalProbability = 0;\n for (WildEncounterInfo wildEncounter : wildEncounters) {\n totalProbability += wildEncounter.getProbability();\n }\n\n Assert.assertEquals(mapName, 100, totalProbability);\n }",
"@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }",
"public double getProbabilityOf(T aData) {\n\t\tdouble freq = this.getFrequencyOf(aData);\n\t\tdouble dblSize = numEntries;\n\t\treturn freq/dblSize;\n\t}",
"public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}",
"protected int getPostiveOnes() {\n Rating[] ratingArray = this.ratings;\n int posOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) {\n if(ratingArray[i].getScore() == 1) posOneCount++; \n }\n }\n return posOneCount;\n }",
"public double people(double precis,double plagiarism,double poster,double video,double presentation,double portfolio,double reflection,double examination,double killerRobot)\n {\n double a = ((4%100)*precis)/100;\n double b = ((8%100)*plagiarism)/100;\n double c = ((12%100)*poster)/100;\n double d = ((16%100)*video)/100;\n double e = ((12%100)*presentation)/100;\n double f = ((10%100)*portfolio)/100;\n double g = ((10%100)*reflection)/100;\n double h = ((16%100)*examination)/100;\n double i = ((12%100)*killerRobot)/100;\n double grade = ((a+b+c+d+e+f+g+h+i)/8);//*100;\n return grade;\n }",
"public abstract float getProbability(String singleToken);",
"@Override\r\n\tpublic Double getPropensity_pension_score() {\n\t\treturn super.getPropensity_pension_score();\r\n\t}",
"public static double[]getBackgroundStatsFromProcessor(ImageProcessor imgP) {\n\t\tint dimX=imgP.getWidth();\n\t\tint dimY=imgP.getHeight();\n\t\tint samplSize=Math.min(10+20,dimX/10);\n\t\tif(dimX<100)samplSize=12;\n\t\tif(dimX>500)samplSize=40;\n\n\t\tint x0=(3*samplSize)/2;\n\t\tint y0=(3*samplSize)/2;\n\t\tint x1=dimX/2;\n\t\tint y1=dimY/2;\n\t\tint x2=dimX-(3*samplSize)/2;\n\t\tint y2=dimY-(3*samplSize)/2;\n\t\tdouble[][] vals=new double[8][];\n\t\tvals[0]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y0,samplSize/2);\n\t\tvals[1]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y2,samplSize/2);\n\t\tvals[2]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y0,samplSize/2);\n\t\tvals[3]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/2);\t\t\n\t\tvals[4]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y1,samplSize/4);\n\t\tvals[5]=VitimageUtils.valuesOfImageProcessor(imgP,x1,y0,samplSize/4);\n\t\tvals[6]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y1,samplSize/4);\n\t\tvals[7]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/4);\n\n\t\t//Compute the global mean over all these squares\n\t\tdouble[]tempStatsMeanVar=null;\n\t\tdouble[]tempStats=new double[vals.length];\n\t\t\n\t\t//Measure local stats, and guess that three of them can host the object\n\t\tfor(int i=0;i<vals.length;i++) {\n\t\t\ttempStatsMeanVar=VitimageUtils.statistics1D(vals[i]);\n\t\t\ttempStats[i]=tempStatsMeanVar[0];\n\t\t}\n\n\t\tdouble[]tempStatsCorrected=null;\n\t\tint incr=0;\n\t\tdouble[][]valsBis=null;\n\t\ttempStatsCorrected=new double[5];//Suppress the 3 maximum, that should be the border or corner where the object lies\n\n\t\tdouble[]tempStats2=doubleArraySort(tempStats);\n\t\tfor(int i=0;i<5;i++)tempStatsCorrected[i]=tempStats2[i];\n\t\tvalsBis=new double[5][];\t\t\t\n\t\tfor(int i=0;i<8 && incr<5;i++) {if(tempStats[i]<=tempStatsCorrected[4]) {valsBis[incr++]=vals[i];}}\n\t\t\t\n\t\tdouble []valsRetBis=VitimageUtils.statistics2D(valsBis);\t\t\n\t\treturn valsRetBis;\n\t}",
"public double getPerimiter(){return (2*height +2*width);}",
"public double[] rotatedProportionPercentage(){\n if(!this.rotationDone)throw new IllegalArgumentException(\"No rotation has been performed\");\n return this.rotatedProportionPercentage;\n }",
"@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }",
"@Override\n\tpublic double getProbability(Robot robot) {\n\t\treturn 0;\n\t}",
"public float getChance() {\n return chance;\n }",
"public float getChance()\n {\n return 1.0f;\n }",
"@Override\r\n\tpublic double getProb(double price, double[] realized) {\r\n\t\treturn getPMF(realized)[ bin(price, precision) ];\r\n\t}",
"double getTransProb();",
"public void computeUtility(Tile[] tile, double[] probability, double r, double g) {\n }",
"public double[] ratioPublicVsPrivateNewspaper() {\n\t\tcheckAuthority();\n\t\tdouble ratio[] = new double[2];\n\t\tdouble res[] = new double[2];\n\t\tres[0] = 0.;\n\t\tres[1] = 0.;\n\n\t\ttry {\n\t\t\tratio[0] = this.administratorRepository.ratioPublicNewspaper();\n\t\t\tratio[1] = this.administratorRepository.ratioPrivateNewspaper();\n\t\t\treturn ratio;\n\t\t} catch (Exception e) {\n\t\t\treturn res;\n\t\t}\n\n\t}",
"private double getClassProbability(ClassificationClass classificationClass) {\n if (classificationClass == null) {\n return 0;\n }\n\n double documentsInClass = 0;\n\n for (Document document : documents) {\n if (document.getClassificationClasses().contains(classificationClass)) {\n documentsInClass++;\n }\n }\n\n return documentsInClass / documents.size();\n }",
"public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}",
"@Override\r\n\tpublic Double getPropensity_trust_score() {\n\t\treturn super.getPropensity_trust_score();\r\n\t}",
"@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }",
"private double [] uniformDiscreteProbs(int numStates) \n {\n double [] uniformProbs = new double[2 * numStates];\n for(int i = 0; i < 2 * numStates; i++)\n uniformProbs[i] = (1.0 / (2 * numStates));\n return uniformProbs;\n }",
"public Map<String, WordImageRelevaces> calculateImageWordRelevanceCompact(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\r\n\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\tint index = 0;\r\n\r\n\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Normalise\r\n\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\tindex++;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t}\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}",
"public double calculateSpecificity() {\n final long divisor = trueNegative + falsePositive;\n if(divisor == 0) {\n return 0.0;\n } else {\n return trueNegative / (double)divisor;\n }\n }",
"public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }",
"public double getActionProbability(final State state, final Action action) {\r\n return getProperties(state).getActionProbability(action);\r\n }",
"public double expectedFalsePositiveProbability() {\n\t\treturn Math.pow((1 - Math.exp(-k * (double) expectedElements\n\t\t\t\t/ (double) bitArraySize)), k);\n\t}",
"double getMissChance();",
"public void buildPriors() {\n\t\t// grab the list of all class labels for this fold\n\t\tList<List<String>> classListHolder = dc.getClassificationFold();\n\t\tint totalClasses = 0; // track ALL class occurrences for this fold\n\t\tint[] totalClassOccurrence = new int[classes.size()]; // track respective class occurrence\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue; // skip testing fold\n\t\t\t} else {\n\t\t\t\tcurrentFold = i;\n\t\t\t} // end if\n\n\t\t\t// grab the list of all classes for this current fold\n\t\t\tList<String> classList = classListHolder.get(currentFold);\n\t\t\t// track the total number of classes in this fold and their occurrences\n\t\t\ttotalClasses += classList.size();\n\t\t\t// for each class occurrence, match it to a class and track its occurrence\n\t\t\tfor (String className : classList) {\n\t\t\t\tfor (int j = 0; j < classes.size(); j++) {\n\t\t\t\t\tif (className.equals(classes.get(j))) {\n\t\t\t\t\t\ttotalClassOccurrence[j]++;\n\t\t\t\t\t} // end if\n\t\t\t\t} // end for\n\t\t\t} // end for\n\t\t} // end for\n\n\t\t// divide a particular class occurrence by total number of classes across training set\n\t\tfor (int i = 0; i < classPriors.length; i++) {\n\t\t\tclassPriors[i] = totalClassOccurrence[i] / totalClasses;\n\t\t} // end for\n\t}",
"public static double[] getProbs(List<Derivation> derivations, double temperature) {\n double[] probs = new double[derivations.size()];\n for (int i = 0; i < derivations.size(); i++)\n probs[i] = derivations.get(i).getScore() / temperature;\n if (probs.length > 0)\n NumUtils.expNormalize(probs);\n return probs;\n }",
"public boolean reproducirse() {\n r = new Random();\r\n return Float.compare(r.nextFloat(), probReproducirse) <= 0;\r\n }",
"public double getScore() {\n int as = this.attributes.size(); // # of attributes that were matched\n\n // we use thresholding ranking approach for numInstances to influence the matching score\n int instances = this.train.numInstances();\n int inst_rank = 0;\n if (instances > 100) {\n inst_rank = 1;\n }\n if (instances > 500) {\n inst_rank = 2;\n }\n\n return this.p_sum + as + inst_rank;\n }",
"double getRatio();",
"private double getAttributeProbability(String attribute, int attributeIndex) {\n\t\tDouble value; // store value of raw data\n\t\tif (attribute.chars().allMatch(Character::isDigit) || attribute.contains(\".\")) {\n\t\t\tvalue = Double.valueOf(attribute);\n\t\t} else {\n\t\t\tvalue = (double) attribute.hashCode();\n\t\t} // end if-else\n\n\n\t\tdouble totalSelectedAttribute = 0;\n\t\tfor (Bin bin : attribBins.get(attributeIndex)) {\n\t\t\tif (bin.binContains(value)) {\n\t\t\t\ttotalSelectedAttribute = bin.getFreq();\n\t\t\t\tbreak;\n\t\t\t} // end if\n\t\t} // end for\n\n\t\tint totalAttributes = 0;\n\t\tfor (int i = 0; i < dc.getDataFold().size(); i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\ttotalAttributes += dc.getDataFold().get(i).size();\n\t\t\t} // end if-else\n\t\t} // end for\n\t\treturn totalSelectedAttribute / totalAttributes;\n\t}"
]
| [
"0.57850313",
"0.57010126",
"0.56290585",
"0.5565697",
"0.5559708",
"0.5519075",
"0.5316536",
"0.52727836",
"0.52534455",
"0.5236468",
"0.5236261",
"0.5198736",
"0.5091604",
"0.50812334",
"0.507524",
"0.50379896",
"0.501882",
"0.50101876",
"0.4990364",
"0.49297088",
"0.4920346",
"0.48977584",
"0.4887237",
"0.4882929",
"0.4881551",
"0.4858258",
"0.48483452",
"0.4834792",
"0.48341623",
"0.48206332",
"0.4803132",
"0.4803068",
"0.4780798",
"0.47732636",
"0.4764049",
"0.47585872",
"0.47556025",
"0.4754406",
"0.47432214",
"0.4739686",
"0.47256002",
"0.47245377",
"0.47228524",
"0.47162777",
"0.47157028",
"0.47086036",
"0.4666865",
"0.4665611",
"0.46632558",
"0.4645651",
"0.46408644",
"0.46405217",
"0.46277493",
"0.46264938",
"0.46103412",
"0.46035856",
"0.46001884",
"0.45997664",
"0.4599624",
"0.45977703",
"0.45944738",
"0.45890316",
"0.45888653",
"0.45658395",
"0.45545518",
"0.45524156",
"0.4549637",
"0.45434496",
"0.45414433",
"0.45359334",
"0.45312563",
"0.45248204",
"0.45165217",
"0.451639",
"0.4500414",
"0.44953394",
"0.4487796",
"0.44842905",
"0.448314",
"0.44636157",
"0.44578058",
"0.44550446",
"0.4448973",
"0.44464502",
"0.44306743",
"0.44303733",
"0.4428187",
"0.44217896",
"0.4403683",
"0.44006646",
"0.43915933",
"0.43783802",
"0.43763268",
"0.43704888",
"0.43574792",
"0.4357228",
"0.434867",
"0.43455118",
"0.43342876",
"0.43323204",
"0.43270162"
]
| 0.0 | -1 |
Returns probabilities of the image containing racy or adult content. | public Observable<ServiceResponse<EvaluateInner>> evaluateUrlInputWithServiceResponseAsync(String contentType, BodyModelInner imageUrl, Boolean cacheImage) {
if (this.client.baseUrl() == null) {
throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null.");
}
if (contentType == null) {
throw new IllegalArgumentException("Parameter contentType is required and cannot be null.");
}
if (imageUrl == null) {
throw new IllegalArgumentException("Parameter imageUrl is required and cannot be null.");
}
Validator.validate(imageUrl);
String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl());
return service.evaluateUrlInput(cacheImage, contentType, imageUrl, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<EvaluateInner>>>() {
@Override
public Observable<ServiceResponse<EvaluateInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<EvaluateInner> clientResponse = evaluateUrlInputDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void calculateProbabilities(){\n\t}",
"private void evaluateProbabilities()\n\t{\n\t}",
"public double[] getProbabilities() { return getProbabilities((int[])null); }",
"public double getProbability() {\n return probability;\n }",
"POGOProtos.Rpc.CaptureProbabilityProto getCaptureProbabilities();",
"float getSpecialProb();",
"double[] calculateProbabilities(LACInstance testInstance) throws Exception\n\t{\n\t\tdouble[] probs;\n\t\tdouble[] scores = calculateScores(testInstance);\n\t\t\n\t\tif(scores != null)\n\t\t{\n\t\t\tprobs = new double[scores.length];\n\t\t\tdouble scoreSum = 0.0;\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tscoreSum += scores[i];\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < scores.length; i++)\n\t\t\t{\n\t\t\t\tprobs[i] = scores[i] / scoreSum;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSet<Integer> allClasses = trainingSet.getAllClasses();\n\t\t\tprobs = new double[allClasses.size()];\n\t\t\tfor (Integer clazz : allClasses) \n\t\t\t{\n\t\t\t\tdouble count = trainingSet.getInstancesOfClass(clazz).size();\n\t\t\t\tprobs[clazz] = (count / ((double) trainingSet.length()));\n\t\t\t}\n\t\t}\n\n\t\treturn probs ;\n\t}",
"public double getProbability() {\r\n\t\treturn Probability;\r\n\t}",
"@Override\r\n\tpublic double getProbabilityScore() {\n\t\treturn this.probability;\r\n\t}",
"protected double get_breeding_probability()\n {\n return breeding_probability;\n }",
"private double[] evaluateProbability(double[] data) {\n\t\tdouble[] prob = new double[m_NumClasses], v = new double[m_NumClasses];\n\n\t\t// Log-posterior before normalizing\n\t\tfor (int j = 0; j < m_NumClasses - 1; j++) {\n\t\t\tfor (int k = 0; k <= m_NumPredictors; k++) {\n\t\t\t\tv[j] += m_Par[k][j] * data[k];\n\t\t\t}\n\t\t}\n\t\tv[m_NumClasses - 1] = 0;\n\n\t\t// Do so to avoid scaling problems\n\t\tfor (int m = 0; m < m_NumClasses; m++) {\n\t\t\tdouble sum = 0;\n\t\t\tfor (int n = 0; n < m_NumClasses - 1; n++)\n\t\t\t\tsum += Math.exp(v[n] - v[m]);\n\t\t\tprob[m] = 1 / (sum + Math.exp(-v[m]));\n\t\t\tif (prob[m] == 0)\n\t\t\t\tprob[m] = 1.0e-20;\n\t\t}\n\n\t\treturn prob;\n\t}",
"abstract double rightProbability();",
"void CalculateProbabilities()\n\t{\n\t int i;\n\t double maxfit;\n\t maxfit=fitness[0];\n\t for (i=1;i<FoodNumber;i++)\n\t {\n\t if (fitness[i]>maxfit)\n\t maxfit=fitness[i];\n\t }\n\n\t for (i=0;i<FoodNumber;i++)\n\t {\n\t prob[i]=(0.9*(fitness[i]/maxfit))+0.1;\n\t }\n\n\t}",
"public Map<String, WordImage> calculateWordsAndImagePropability(\r\n\t\t\tMap<String, WordImage> wordImageRel, int totalUniqueUserCount) {\r\n\r\n\t\tint totalOcurrance = 0;\r\n\r\n\t\t// Calculate the total number of word occurrences in the set of similar\r\n\t\t// and dissimilar images\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getSimlarImages().size();\r\n\r\n\t\t\tif (this.wordNotSimilarImages.get(word) != null)\r\n\t\t\t\twordOccur += this.wordNotSimilarImages.get(word);\r\n\r\n\t\t\twordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\ttotalOcurrance += wordOccur;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tint wordOccur = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// wordImageRel.get(word).setOcurrances(wordOccur);\r\n\r\n\t\t\tint uniqueUsers = wordImageRel.get(word)\r\n\t\t\t\t\t.getWordUniqueUsers(this.photoList).size();\r\n\r\n\t\t\twordImageRel.get(word).setTotalOcurances(totalOcurrance);\r\n\r\n\t\t\t// .......... Voting-similar word probability\r\n\t\t\t// .......................\r\n\r\n\t\t\t// 1. Word probability without user assumptions\r\n\t\t\tdouble PwOnlyWords = ((double) wordOccur / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyWords(PwOnlyWords);\r\n\r\n\t\t\t// 2. Word probability with user proportion to the total number of\r\n\t\t\t// users\r\n\t\t\tdouble PwAllUsers = PwOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwAllUsers(PwAllUsers);\r\n\r\n\t\t\t// 3. Word probability. Word freq is represented by the number of\r\n\t\t\t// unique users only\r\n\t\t\tdouble PwOnlyUniqueUsers = ((double) uniqueUsers / (double) totalOcurrance);\r\n\t\t\twordImageRel.get(word).setPwOnlyUniqueUsers(PwOnlyUniqueUsers);\r\n\r\n\t\t\t// ..........TF-IDF Word Probability Calculation\r\n\t\t\t// .......................\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t// 1. Word probability TF.IDF approach without user assumptions\r\n\t\t\tdouble PwTFIDFlOnlyWords = ((double) Rw / R)\r\n\t\t\t\t\t* (Math.log((double) C / Lw) / Math.log(2))\r\n\t\t\t\t\t/ (Math.log((double) C) / Math.log(2));\r\n\t\t\twordImageRel.get(word).setPwTFIDFlOnlyWords(PwTFIDFlOnlyWords);\r\n\r\n\t\t\t// 2. Word probability TF.IDF approach with user proportion to the\r\n\t\t\t// totall number of users\r\n\t\t\tdouble PwTFIDFlAllUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* ((double) uniqueUsers / (double) totalUniqueUserCount);\r\n\t\t\twordImageRel.get(word).setPwTFIDFlAllUsers(PwTFIDFlAllUsers);\r\n\r\n\t\t\t// 3. Word probability TF.IDF approach. Word freq is represented by\r\n\t\t\t// the number of unique users only\r\n\t\t\tdouble PwTFIDFOnlyUniqueUsers = PwTFIDFlOnlyWords\r\n\t\t\t\t\t* (uniqueUsers / (double) wordOccur);\r\n\t\t\twordImageRel.get(word).setPwTFIDFOnlyUniqueUsers(\r\n\t\t\t\t\tPwTFIDFOnlyUniqueUsers);\r\n\r\n\t\t\twordImageRel.get(word)\r\n\t\t\t\t\t.setImageProbability(1.0 / (double) wordOccur); // P(c_j|w)\r\n\r\n\t\t}\r\n\t\treturn wordImageRel;\r\n\r\n\t}",
"public double[] proportionPercentage(){\n if(!this.pcaDone)this.pca();\n return this.proportionPercentage;\n }",
"@Override\n\tpublic double probability() {\n\t\treturn 0;\n\n\t}",
"private double getProbOfClass(int catIndex) {\r\n\t\treturn (classInstanceCount[catIndex] + mCategoryPrior)\r\n\t\t\t\t/ (classInstanceCount[0] + classInstanceCount[1] + mCategories.length\r\n\t\t\t\t\t\t* mCategoryPrior);\r\n\t}",
"POGOProtos.Rpc.CaptureProbabilityProtoOrBuilder getCaptureProbabilitiesOrBuilder();",
"@Override\n\tpublic void computeFinalProbabilities() {\n\t\tsuper.computeFinalProbabilities();\n\t}",
"public double getObservationProbability(){\r\n double ret=0;\r\n int time=o.length;\r\n int N=hmm.stateCount;\r\n for (int t=0;t<=time;++t){\r\n for (int i=0;i<N;++i){\r\n ret+=fbManipulator.alpha[t][i]*fbManipulator.beta[t][i];\r\n }\r\n }\r\n ret/=time;\r\n return ret;\r\n }",
"public double contagionProbability(Person p)\n\t{\n\t\tif(p.getAge()<=18)\n\t\t{\n\t\t\treturn con_18*p.contagionProbability();\n\t\t}\n\t\tif(p.getAge()>18 && p.getAge()<=55)\n\t\t{\n\t\t\treturn con_18_55*p.contagionProbability();\n\t\t}\n\t\treturn con_up55*p.contagionProbability();\n\t}",
"public static int getObstacleProbability() {\n\t\tif(SHOW_OBSTACLES){\n\t\t\treturn RANDOM_OBSTACLE_COUNT;\n\t\t}\n\t\treturn 0;\n\t}",
"public abstract Map getProbabilities(String[] path);",
"abstract double leftProbability();",
"public double getProbabilityP() {\n return this.mProbabilityP;\n }",
"public double getAbandonmentProbability() {\n return Math.random();\n }",
"public double outcomeProb(char[] outcome) {\r\n\t\t// get all forward probabilities\r\n\t\tdouble[][] probs = getForwards(outcome);\r\n\t\t\r\n\t\t// initialize the probability of this outcome to 0\r\n\t\tdouble outcomeProb = 0;\r\n\t\t// loop over all nodes in the last column\r\n\t\tfor (int i = 0; i < states.length; ++i)\r\n\t\t\t// add this node's probability to the overall probability\r\n\t\t\toutcomeProb += probs[i][outcome.length - 1];\r\n\t\t\r\n\t\treturn outcomeProb;\r\n\t}",
"private double infobits(double[] probs) {\r\n\t\tdouble sum = 0;\r\n\t\tfor (int i = 0; i < probs.length; i++) {\r\n\t\t\tsum += entropy(probs[i]);\r\n\t\t}\r\n\t\treturn sum;\r\n\t}",
"public float getSpecialProb() {\n return specialProb_;\n }",
"double getCritChance();",
"private void classifyTestImages() throws FileNotFoundException, UnsupportedEncodingException {\n PrintWriter writer = new PrintWriter(\"result.txt\", \"UTF-8\");\n writer.println(\"#Authors: Thomas Sarlin & Petter Poucette\");\n\n ArrayList<Image> images = testReader.getImages();\n double activationResult[]=new double[4];\n int bestGuess;\n for (Image image : images) {\n for (int j = 0; j < 4; j++)\n activationResult[j] = activationFunction\n .apply(sumWeights(j, image));\n\n bestGuess = getBestGuess(activationResult);\n writer.println(image.getName() + \" \" + bestGuess);\n }\n writer.close();\n }",
"public void calculateProbabilities(Ant ant) {\n int i = ant.trail[currentIndex];\n double pheromone = 0.0;\n for (int l = 0; l < numberOfCities; l++) {\n if (!ant.visited(l)) {\n pheromone += (Math.pow(trails[i][l], alpha) + 1) * (Math.pow(graph[i][l], beta) + 1) *\n (Math.pow(emcMatrix[i][l], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][l], ddd) + 1);\n }\n }\n for (int j = 0; j < numberOfCities; j++) {\n if (ant.visited(j)) {\n probabilities[j] = 0.0;\n } else {\n double numerator = (Math.pow(trails[i][j], alpha) + 1) * (Math.pow(graph[i][j], beta) + 1) *\n (Math.pow(emcMatrix[i][j], ccc) + 1) * (Math.pow(functionalAttachmentMatrix[i][j], ddd) + 1);\n probabilities[j] = numerator / pheromone;\n }\n }\n }",
"public float getSpecialProb() {\n return specialProb_;\n }",
"private List<Integer> generateProb() {\n Integer[] randArr = new Integer[numCols*numRows];\n\n int start = 0;\n int end;\n for(int i = 0; i < myStateMap.size(); i++) {\n double prob = myStateMap.get(i).getProb();\n end = (int) (prob * numCols * numRows + start);\n for(int j = start; j < end; j++) {\n if(end > randArr.length) {\n break;\n }\n randArr[j] = myStateMap.get(i).getType();\n }\n start = end;\n }\n\n List<Integer> arr = new ArrayList<>(Arrays.asList(randArr));\n Collections.shuffle(arr);\n return arr;\n }",
"public Bounds getProbabilityBounds();",
"public Map<String, WordImageRelevaces> calculateImageWordRelevance(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tPrintWriter tempOut;\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\t\ttry {\r\n\r\n\t\t\ttempOut = new PrintWriter(word_prop_output);\r\n\r\n\t\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\t\tint index = 0;\r\n\r\n\t\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\t\ttempOut.println(\"Word , total Occur , #NotSimImgs, #SimImgs , WordOccur , #Unique Users \"\r\n\t\t\t\t\t+ \", Pw1, Pw2,Pw3 , Pw4 , Pw5,Pw6 , C, R, Rw, Lw\");\r\n\r\n\t\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\t\tint C = totalNumberOfImages;\r\n\t\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\t\ttempOut.println(word\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getTotalOcurences()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordNotSimilarImages.get(word)\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getSimilarImageIDs().size()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word).getOcurrances()\r\n\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t+ wordImageRel.get(word)\r\n\t\t\t\t\t\t\t\t.getWordUniqueUsers(this.photoList).size()\r\n\t\t\t\t\t\t+ \",\" + +Pw1 + \",\" + Pw2 + \",\" + Pw3 + \",\" + Pw4 + \",\"\r\n\t\t\t\t\t\t+ Pw5 + \",\" + Pw6 + \",\" + C + \",\" + R + \",\" + Rw + \",\"\r\n\t\t\t\t\t\t+ Lw);\r\n\r\n\t\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Normalise\r\n\t\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t\t\ttempOut.close();\r\n\t\t\t}\r\n\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\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}",
"private void figureOutProbability() {\n\t\tMysqlDAOFactory mysqlFactory = (MysqlDAOFactory) DAOFactory\n\t\t\t\t.getDAOFactory(DAOFactory.MYSQL);\n\n\t\tstaticPr = new StaticProbability(trialId);\n\t\tstatisticPr = new StatisticProbability(trialId);\n\t\tstaticProbability = staticPr.getProbability();\n\t\tstatisticProbability = statisticPr.getProbability();\n\n\t\tfor (Entry<Integer, BigDecimal> entry : staticProbability.entrySet()) {\n\t\t\ttotalProbability.put(\n\t\t\t\t\tentry.getKey(),\n\t\t\t\t\tentry.getValue().add(statisticProbability.get(entry.getKey())).setScale(2));\n\t\t}\n\n\t\tBigDecimal summaryProbability = BigDecimal.valueOf(0);\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tsummaryProbability = summaryProbability.add(entry.getValue());\n\t\t}\n\t\t\n\t\t// figures out probability\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tentry.setValue(entry.getValue().divide(summaryProbability, 2,\n\t\t\t\t\tBigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Total probability -> \" + totalProbability);\n\t\t\n\t\t// figures out and sets margin\n\t\tfor (Entry<Integer, BigDecimal> entry : totalProbability.entrySet()) {\n\t\t\tBigDecimal probability = entry.getValue();\n\t\t\tBigDecimal winCoefficient = (BigDecimal.valueOf(1.).divide(\n\t\t\t\t\tprobability, 2, BigDecimal.ROUND_HALF_UP))\n\t\t\t\t\t.multiply(BigDecimal.valueOf(1.).subtract(Constants.MARGIN));\n\t\t\tentry.setValue(winCoefficient.setScale(2, BigDecimal.ROUND_HALF_UP));\n\t\t}\n\t\tlog.info(\"Winning coefficient -> \" + totalProbability);\n\t\t\n\t\t// updates info in db\n\t\tTrialHorseDAO trialHorseDAO = mysqlFactory.getTrialHorseDAO();\n\t\tTrialHorseDTO trialHorseDTO = null;\n\t\tfor(Entry<Integer, BigDecimal> entry : totalProbability.entrySet()){\n\t\t\ttrialHorseDTO = trialHorseDAO.findTrialHorseByTrialIdHorseId(trialId, entry.getKey());\n\t\t\ttrialHorseDTO.setWinCoefficient(entry.getValue());\n\t\t\ttrialHorseDAO.updateTrialHorseInfo(trialHorseDTO);\n\t\t}\t\n\t}",
"boolean getProbables();",
"@Test\n void adjectivesScoring() {\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day; glad @JeremyKappell is standing up against #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB (Via NEWS 8 WROC)\");\n HashMap<String, Double> as = np.adjectivesScoring(sentences);\n for (String key : as.keySet()) {\n Double value = as.get(key);\n assertTrue(value >= 0 && value <= 4);\n }\n }",
"public abstract float getProbability(String[] tokens);",
"private int getPetImages() {\n int nUserPets = user.getPets().size();\n Drawable defaultDrawable = getResources().getDrawable(R.drawable.single_paw, null);\n Bitmap defaultBitmap = ((BitmapDrawable) defaultDrawable).getBitmap();\n countImagesNotFound = new int[nUserPets];\n Arrays.fill(countImagesNotFound, 0);\n\n ExecutorService executorService = Executors.newCachedThreadPool();\n startRunnable(nUserPets, executorService);\n executorService.shutdown();\n\n try {\n executorService.awaitTermination(3, TimeUnit.MINUTES);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return calculateImagesNotFound();\n }",
"private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}",
"public double getProbability(Object rootState) { return getProbability(rootState, (Object[])null); }",
"private double getProbabilityScore(Cell c,int bitmask)\n {\n\t return Math.pow(\n\t\t\t Math.pow(m_probs1[c.getCol()-1],(1&bitmask) ) * \n\t\t\t Math.pow(m_probs2[c.getRow()-1],(2&bitmask)/2) //geo-mean\n\t\t\t , Math.min(1,3.5-bitmask));\n }",
"private List<ProbabilityOfDefault> getPDs(Scenario s) {\n\t\t\r\n\t\tCountry ctry = getCountry();\r\n\t\t\r\n\t\tDouble probGrowth = ctry.getProbabilityOfGrowth();\r\n\t\tDouble probRecession = ctry.getProbabilityOfRecession();\r\n\t\t\r\n\t\tList<ProbabilityOfDefault> adjustedPDs = new ArrayList<>();\r\n\t\t\r\n\t\tfor (ProbabilityOfDefault pd : rating.getPDs()) {\r\n\t\t\tProbabilityOfDefault newPd = pd;\r\n\t\t\tnewPd.setPD((probGrowth * pd.getGrowthPD()) + (probRecession * pd.getRecessionPD()));\r\n\t\t\tadjustedPDs.add(newPd);\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(adjustedPDs);\r\n\t\treturn adjustedPDs;\r\n\t}",
"private double[] computePredictionValues() {\n double[] predResponses = new double[D];\n for (int d = 0; d < D; d++) {\n double expDotProd = Math.exp(docLabelDotProds[d]);\n double docPred = expDotProd / (expDotProd + 1);\n predResponses[d] = docPred;\n }\n return predResponses;\n }",
"public List<Result> recognize(IplImage image);",
"private static void findBigramProbTuring() {\n\t\t\t\t\n\t\tbigramProbT= new HashMap<String, Double>();\n\t\tdouble prob;\n\t\t\n\t\tfor(String s: corpusBigramCount.keySet()){\n\t\t\tint count=corpusBigramCount.get(s);\n\t\t\tif(count==0){\n\t\t\t\tprob= bucketCountT.getOrDefault(1,0.0)/corpusNumOfBigrams;\n\t\t\t}\n\t\t\telse\n\t\t\t\tprob= bigramCountTI.get(count)/corpusNumOfBigrams;\n\t\t\tbigramProbT.put(s, prob);\n\t\t}\n\t\t\t\n\t}",
"public double outcomeGivenPathProb(char[] outcome, S[] path) {\r\n\t\t// initialize probability to 1\r\n\t\tdouble prob = 1;\r\n\t\t// loop over all emitted chars\r\n\t\tfor (int i = 0; i < outcome.length; ++i)\r\n\t\t\t// multiple probability by the emission probability of this char\r\n\t\t\tprob *= emissProb(indexOf(states, path[i]), outcome[i]);\r\n\t\t\r\n\t\treturn prob;\r\n\t}",
"public Image getNatural();",
"public double getProbability() {\n\t\treturn getD_errorProbability();\n\t}",
"public Double getProb(T element) {\n\t\treturn itemProbs_.get(element);\n\t}",
"public double getCandProbability(String candidate){\n\t\tString[] candTerms = candidate.split(\"\\\\s+\");\n\t\t\n\t\t// Total Tokens\n\t\tdouble totTokens = (double)unigramDict.termCount();\n\t\t//P(w1) in log\n\t\tString w1 = candTerms[0];\n\t\tdouble probW1 = Math.log10((double)unigramDict.count(w1, wordToId)/totTokens);\n\t\t\n\t\t//P (w1, w2, ..., wn)\n\t\tdouble probCandidate = probW1;\n\t\t\n\t\t\n\t\tfor( int i =0; i < candTerms.length-1; i++){\n\t\t\t//Pint(w2|w1) = Pmle(w2) + (1 )Pmle(w2|w1)\n\t\t\tString currentTerm = candTerms[i];\n\t\t\tString nextTerm = candTerms[i+1];\n\t\t\tString bigram = currentTerm + \" \" + nextTerm;\n\t\t\tint freqBigram = bigramDict.count(bigram, wordToId);\n\t\t\t\n\t\t\t//this term should be in dictionary\n\t\t\tint freqFirstTerm = unigramDict.count(currentTerm, wordToId);\n\t\t\t\n\t\t\tdouble PmleW2W1 = (double)freqBigram/(double)freqFirstTerm;\n\t\t\t\n\t\t\t//System.out.println(\"candidate=[\" + candidate + \"]\\tbigram=[\" + bigram + \"]\\tterms=\" + Arrays.toString(terms));\n\t\t\tdouble PmleW2 = (double)unigramDict.count(nextTerm, wordToId) / totTokens;\n\t\t\t//double lamda= 0.1;\n\t\t\tdouble PintW2W1 = lamda*PmleW2 + (1-lamda)*PmleW2W1;\n\t\t\tprobCandidate = probCandidate + Math.log10(PintW2W1);\n\t\t}\n\t\treturn probCandidate;\n\t}",
"public scala.collection.immutable.IndexedSeq<java.lang.Object> getQuantiles (scala.collection.Iterable<java.lang.Object> probabilities) { throw new RuntimeException(); }",
"public void createProbsMap() {\n\t\tif(this.counts == null) {\n\t\t\tcreateCountMap();\n\t\t}\n\t\t\n\t\tMap<String, Double> result = new HashMap<String, Double>();\n\t\t\n\t\t// Make the counts and get the highest probability found \n\t\tdouble highestProb = 0.00;\n\t\tdouble size = (double) this.getData().size();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\tresult.put(entry.getKey(), value / size);\n\t\t\t\n\t\t\tif(value/size > highestProb) {\n\t\t\t\thighestProb = value/size;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fill the highest probilities \n\t\tList<String> highestProbs = new ArrayList<String>();\n\t\tfor(Entry<String, Integer> entry : counts.entrySet()) {\n\t\t\tdouble value = (double) entry.getValue();\n\t\t\t\n\t\t\tif(value/size == highestProb) {\n\t\t\t\thighestProbs.add(entry.getKey());\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.highestProbs = highestProbs;\n\t\tthis.highestProb = highestProb;\n\t\tthis.probs \t\t = result;\n\t}",
"public int[] podium(){\n int[] pod = new int[3];\n for (int i=0; i<3; i++) {\n pod[i]=0;\n }\n \n int n = this.scores.length;\n for (int i=0; i<n; i++) {\n if (scores[i]>pod[2]) {\n pod[0]=pod[1];\n pod[1]=pod[2];\n pod[2]=scores[i];\n } else if ((scores[i]>pod[1])) {\n pod[0]=pod[1];\n pod[1]=scores[i];\n } else if ((scores[i]>pod[0])) {\n pod[0]=scores[i];\n }\n \n }\n return pod;\n \n }",
"public Action getActionBasedOnProbability(final State state) {\r\n final double decision = Math.random();\r\n double decisionCount = 0;\r\n\r\n for (final Map.Entry<Action, Double> actionProb : getProperties(state).getActionProbabilities().entrySet()) {\r\n decisionCount += actionProb.getValue();\r\n if (decisionCount >= decision) {\r\n return actionProb.getKey();\r\n }\r\n }\r\n\r\n System.err.println(\"Error: cannot choose action!\");\r\n System.err.println(getProperties(state).getActionProbabilities());\r\n return null;\r\n }",
"double getBranchProbability();",
"public int getContaminantPPM() {\n return contaminantPPM;\n }",
"float genChance();",
"protected Double successProbability(){\n\t\tnodeKValues = collectKValues();\n\t\tList<Integer[]> placements = getDistinctPlacements(getMinKPath());\n\t\tlong maxNumberOfColorings = 0;\n\t\tfor (Integer[] placement : placements){\n\t\t\tlong colorings = numberOfColorings(placement);\n\t\t\tif (colorings > maxNumberOfColorings)\n\t\t\t\tmaxNumberOfColorings = colorings;\n\t\t}\n\t\tDouble probability = 1.0/maxNumberOfColorings;\n\t\tfor (int i=1; i<=pathLength; i++){ // factorial of pathlength\n\t\t\tprobability = probability * i;\n\t\t}\n\t\treturn probability;\n\t}",
"public abstract double getLinkProbability(int linkId);",
"public double getProb(String word) {\n double numWords = wordMap.get(\"TOTAL_WORDS\");\n return wordMap.getOrDefault(word, 0.0)/numWords;\n }",
"Float getFedAnimalsPercentage();",
"public double getProbRecombinacion() {\n return getDouble(params.probRecombinacion, PROP_PROB_RECOMB, 0.5);\n }",
"private void checkProbability(String mapName, WildEncounterInfo[] wildEncounters) {\n int totalProbability = 0;\n for (WildEncounterInfo wildEncounter : wildEncounters) {\n totalProbability += wildEncounter.getProbability();\n }\n\n Assert.assertEquals(mapName, 100, totalProbability);\n }",
"@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }",
"public double getProbabilityOf(T aData) {\n\t\tdouble freq = this.getFrequencyOf(aData);\n\t\tdouble dblSize = numEntries;\n\t\treturn freq/dblSize;\n\t}",
"public double conditionalProb(Observation obs) {\n\n\t\tdouble condProb = 0.0;\n\n\t\t//TODO: Should this have weighting factor for time and distance?\n\t\tfor(Observation otherObs : observations) {\n\t\t\tdouble distance = Math.pow((obs.timeObserved-otherObs.timeObserved)/DisasterConstants.MAX_TIMESCALE_FOR_CLUSTERING,2);\n\t\t\tdistance += Math.pow((obs.location.x-otherObs.location.x)/(DisasterConstants.XMAX-DisasterConstants.XMIN),2);\n\t\t\tdistance += Math.pow((obs.location.y-otherObs.location.y)/(DisasterConstants.YMAX-DisasterConstants.YMIN),2);\n\t\t\tcondProb += Math.exp(-distance);\n\t\t}\n\n\t\t//Get conditional probability, making sure to normalize by the size\n\t\treturn condProb/observations.size();\n\t}",
"protected int getPostiveOnes() {\n Rating[] ratingArray = this.ratings;\n int posOneCount = 0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) {\n if(ratingArray[i].getScore() == 1) posOneCount++; \n }\n }\n return posOneCount;\n }",
"public double people(double precis,double plagiarism,double poster,double video,double presentation,double portfolio,double reflection,double examination,double killerRobot)\n {\n double a = ((4%100)*precis)/100;\n double b = ((8%100)*plagiarism)/100;\n double c = ((12%100)*poster)/100;\n double d = ((16%100)*video)/100;\n double e = ((12%100)*presentation)/100;\n double f = ((10%100)*portfolio)/100;\n double g = ((10%100)*reflection)/100;\n double h = ((16%100)*examination)/100;\n double i = ((12%100)*killerRobot)/100;\n double grade = ((a+b+c+d+e+f+g+h+i)/8);//*100;\n return grade;\n }",
"public abstract float getProbability(String singleToken);",
"@Override\r\n\tpublic Double getPropensity_pension_score() {\n\t\treturn super.getPropensity_pension_score();\r\n\t}",
"public static double[]getBackgroundStatsFromProcessor(ImageProcessor imgP) {\n\t\tint dimX=imgP.getWidth();\n\t\tint dimY=imgP.getHeight();\n\t\tint samplSize=Math.min(10+20,dimX/10);\n\t\tif(dimX<100)samplSize=12;\n\t\tif(dimX>500)samplSize=40;\n\n\t\tint x0=(3*samplSize)/2;\n\t\tint y0=(3*samplSize)/2;\n\t\tint x1=dimX/2;\n\t\tint y1=dimY/2;\n\t\tint x2=dimX-(3*samplSize)/2;\n\t\tint y2=dimY-(3*samplSize)/2;\n\t\tdouble[][] vals=new double[8][];\n\t\tvals[0]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y0,samplSize/2);\n\t\tvals[1]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y2,samplSize/2);\n\t\tvals[2]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y0,samplSize/2);\n\t\tvals[3]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/2);\t\t\n\t\tvals[4]=VitimageUtils.valuesOfImageProcessor(imgP,x0,y1,samplSize/4);\n\t\tvals[5]=VitimageUtils.valuesOfImageProcessor(imgP,x1,y0,samplSize/4);\n\t\tvals[6]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y1,samplSize/4);\n\t\tvals[7]=VitimageUtils.valuesOfImageProcessor(imgP,x2,y2,samplSize/4);\n\n\t\t//Compute the global mean over all these squares\n\t\tdouble[]tempStatsMeanVar=null;\n\t\tdouble[]tempStats=new double[vals.length];\n\t\t\n\t\t//Measure local stats, and guess that three of them can host the object\n\t\tfor(int i=0;i<vals.length;i++) {\n\t\t\ttempStatsMeanVar=VitimageUtils.statistics1D(vals[i]);\n\t\t\ttempStats[i]=tempStatsMeanVar[0];\n\t\t}\n\n\t\tdouble[]tempStatsCorrected=null;\n\t\tint incr=0;\n\t\tdouble[][]valsBis=null;\n\t\ttempStatsCorrected=new double[5];//Suppress the 3 maximum, that should be the border or corner where the object lies\n\n\t\tdouble[]tempStats2=doubleArraySort(tempStats);\n\t\tfor(int i=0;i<5;i++)tempStatsCorrected[i]=tempStats2[i];\n\t\tvalsBis=new double[5][];\t\t\t\n\t\tfor(int i=0;i<8 && incr<5;i++) {if(tempStats[i]<=tempStatsCorrected[4]) {valsBis[incr++]=vals[i];}}\n\t\t\t\n\t\tdouble []valsRetBis=VitimageUtils.statistics2D(valsBis);\t\t\n\t\treturn valsRetBis;\n\t}",
"public double getPerimiter(){return (2*height +2*width);}",
"public double[] rotatedProportionPercentage(){\n if(!this.rotationDone)throw new IllegalArgumentException(\"No rotation has been performed\");\n return this.rotatedProportionPercentage;\n }",
"@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }",
"@Override\n\tpublic double getProbability(Robot robot) {\n\t\treturn 0;\n\t}",
"public float getChance() {\n return chance;\n }",
"public float getChance()\n {\n return 1.0f;\n }",
"@Override\r\n\tpublic double getProb(double price, double[] realized) {\r\n\t\treturn getPMF(realized)[ bin(price, precision) ];\r\n\t}",
"double getTransProb();",
"public void computeUtility(Tile[] tile, double[] probability, double r, double g) {\n }",
"public double[] ratioPublicVsPrivateNewspaper() {\n\t\tcheckAuthority();\n\t\tdouble ratio[] = new double[2];\n\t\tdouble res[] = new double[2];\n\t\tres[0] = 0.;\n\t\tres[1] = 0.;\n\n\t\ttry {\n\t\t\tratio[0] = this.administratorRepository.ratioPublicNewspaper();\n\t\t\tratio[1] = this.administratorRepository.ratioPrivateNewspaper();\n\t\t\treturn ratio;\n\t\t} catch (Exception e) {\n\t\t\treturn res;\n\t\t}\n\n\t}",
"private double getClassProbability(ClassificationClass classificationClass) {\n if (classificationClass == null) {\n return 0;\n }\n\n double documentsInClass = 0;\n\n for (Document document : documents) {\n if (document.getClassificationClasses().contains(classificationClass)) {\n documentsInClass++;\n }\n }\n\n return documentsInClass / documents.size();\n }",
"public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}",
"@Override\r\n\tpublic Double getPropensity_trust_score() {\n\t\treturn super.getPropensity_trust_score();\r\n\t}",
"@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }",
"private double [] uniformDiscreteProbs(int numStates) \n {\n double [] uniformProbs = new double[2 * numStates];\n for(int i = 0; i < 2 * numStates; i++)\n uniformProbs[i] = (1.0 / (2 * numStates));\n return uniformProbs;\n }",
"public Map<String, WordImageRelevaces> calculateImageWordRelevanceCompact(\r\n\t\t\tMap<String, WordImage> wordImageRel) {\r\n\r\n\t\tMap<String, WordImageRelevaces> wordImgRelevance = new HashMap<String, WordImageRelevaces>();\r\n\r\n\t\tdouble IuWTotal1 = 0; // The normalization factor\r\n\t\tdouble IuWTotal2 = 0; // The normalization factor\r\n\t\tdouble IuWTotal3 = 0; // The normalization factor\r\n\t\tdouble IuWTotal4 = 0; // The normalization factor\r\n\t\tdouble IuWTotal5 = 0; // The normalization factor\r\n\t\tdouble IuWTotal6 = 0; // The normalization factor\r\n\r\n\t\tint index = 0;\r\n\r\n\t\tdouble IuWSingle1[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle2[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle3[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle4[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle5[] = new double[wordImageRel.size()];\r\n\t\tdouble IuWSingle6[] = new double[wordImageRel.size()];\r\n\r\n\t\tfor (String word : wordImageRel.keySet()) { // For each word\r\n\r\n\t\t\tWordImage wordImage = wordImageRel.get(word);\r\n\t\t\tdouble PcjW = wordImage.getImageProbability();\r\n\r\n\t\t\tdouble Pw1 = wordImage.getPwOnlyWords();\r\n\t\t\tdouble Pw2 = wordImage.getPwAllUsers();\r\n\t\t\tdouble Pw3 = wordImage.getPwOnlyUniqueUsers();\r\n\t\t\tdouble Pw4 = wordImage.getPwTFIDFlOnlyWords();\r\n\t\t\tdouble Pw5 = wordImage.getPwTFIDFlAllUsers();\r\n\t\t\tdouble Pw6 = wordImage.getPwTFIDFOnlyUniqueUsers();\r\n\r\n\t\t\tint C = totalNumberOfImages;\r\n\t\t\tint R = totalNumberOfSimilarImages;\r\n\t\t\tint Rw = wordImageRel.get(word).getSimlarImages().size();\r\n\t\t\tint Lw = wordImageRel.get(word).getOcurrances();\r\n\r\n\t\t\tSet<String> imgIDs = wordImage.getSimilarImageIDs(); // Get images\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// related\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to that\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\r\n\t\t\tfor (String imgID : imgIDs) {\r\n\r\n\t\t\t\tdouble PIc = wordImage.getSimilarImage(imgID)\r\n\t\t\t\t\t\t.getPointSimilarity();\r\n\r\n\t\t\t\tIuWSingle1[index] += Pw1 * PcjW * PIc;\r\n\t\t\t\tIuWSingle2[index] += Pw2 * PcjW * PIc;\r\n\t\t\t\tIuWSingle3[index] += Pw3 * PcjW * PIc;\r\n\t\t\t\tIuWSingle4[index] += Pw4 * PcjW * PIc;\r\n\t\t\t\tIuWSingle5[index] += Pw5 * PcjW * PIc;\r\n\t\t\t\tIuWSingle6[index] += Pw6 * PcjW * PIc;\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Normalise\r\n\t\t\tWordImageRelevaces wImgRels = new WordImageRelevaces();\r\n\t\t\twImgRels.setFreqRelOnlyWords(IuWSingle1[index]);\r\n\t\t\twImgRels.setFreqRelWordsAndAllUsers(IuWSingle2[index]);\r\n\t\t\twImgRels.setFreqRelWordAndOnlyUniqueUsers(IuWSingle3[index]);\r\n\t\t\twImgRels.setTfIdfRelOnlyWords(IuWSingle4[index]);\r\n\t\t\twImgRels.setTfIdfRelWordsAndAllUsers(IuWSingle5[index]);\r\n\t\t\twImgRels.setTfIdfRelWordAndOnlyUniqueUsers(IuWSingle6[index]);\r\n\r\n\t\t\twordImgRelevance.put(word, wImgRels); // unnormalized value\r\n\r\n\t\t\tIuWTotal1 += IuWSingle1[index];\r\n\t\t\tIuWTotal2 += IuWSingle2[index];\r\n\t\t\tIuWTotal3 += IuWSingle3[index];\r\n\t\t\tIuWTotal4 += IuWSingle4[index];\r\n\t\t\tIuWTotal5 += IuWSingle5[index];\r\n\t\t\tIuWTotal6 += IuWSingle6[index];\r\n\r\n\t\t\tindex++;\r\n\t\t}\r\n\r\n\t\tfor (String word : wordImgRelevance.keySet()) {\r\n\r\n\t\t\tdouble notNormalizedValue1 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setFreqRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue1 / IuWTotal1);\r\n\r\n\t\t\tdouble notNormalizedValue2 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue2 / IuWTotal2);\r\n\r\n\t\t\tdouble notNormalizedValue3 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getFreqRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setFreqRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue3 / IuWTotal3);\r\n\r\n\t\t\tdouble notNormalizedValue4 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelOnlyWords();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelOnlyWords(\r\n\t\t\t\t\tnotNormalizedValue4 / IuWTotal4);\r\n\r\n\t\t\tdouble notNormalizedValue5 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordsAndAllUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordsAndAllUsers(\r\n\t\t\t\t\tnotNormalizedValue5 / IuWTotal5);\r\n\r\n\t\t\tdouble notNormalizedValue6 = wordImgRelevance.get(word)\r\n\t\t\t\t\t.getTfIdfRelWordAndOnlyUniqueUsers();\r\n\t\t\twordImgRelevance.get(word).setTfIdfRelWordAndOnlyUniqueUsers(\r\n\t\t\t\t\tnotNormalizedValue6 / IuWTotal6);\r\n\r\n\t\t}\r\n\t\treturn wordImgRelevance;\r\n\r\n\t}",
"public double calculateSpecificity() {\n final long divisor = trueNegative + falsePositive;\n if(divisor == 0) {\n return 0.0;\n } else {\n return trueNegative / (double)divisor;\n }\n }",
"public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }",
"public double getActionProbability(final State state, final Action action) {\r\n return getProperties(state).getActionProbability(action);\r\n }",
"public double expectedFalsePositiveProbability() {\n\t\treturn Math.pow((1 - Math.exp(-k * (double) expectedElements\n\t\t\t\t/ (double) bitArraySize)), k);\n\t}",
"double getMissChance();",
"public void buildPriors() {\n\t\t// grab the list of all class labels for this fold\n\t\tList<List<String>> classListHolder = dc.getClassificationFold();\n\t\tint totalClasses = 0; // track ALL class occurrences for this fold\n\t\tint[] totalClassOccurrence = new int[classes.size()]; // track respective class occurrence\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue; // skip testing fold\n\t\t\t} else {\n\t\t\t\tcurrentFold = i;\n\t\t\t} // end if\n\n\t\t\t// grab the list of all classes for this current fold\n\t\t\tList<String> classList = classListHolder.get(currentFold);\n\t\t\t// track the total number of classes in this fold and their occurrences\n\t\t\ttotalClasses += classList.size();\n\t\t\t// for each class occurrence, match it to a class and track its occurrence\n\t\t\tfor (String className : classList) {\n\t\t\t\tfor (int j = 0; j < classes.size(); j++) {\n\t\t\t\t\tif (className.equals(classes.get(j))) {\n\t\t\t\t\t\ttotalClassOccurrence[j]++;\n\t\t\t\t\t} // end if\n\t\t\t\t} // end for\n\t\t\t} // end for\n\t\t} // end for\n\n\t\t// divide a particular class occurrence by total number of classes across training set\n\t\tfor (int i = 0; i < classPriors.length; i++) {\n\t\t\tclassPriors[i] = totalClassOccurrence[i] / totalClasses;\n\t\t} // end for\n\t}",
"public static double[] getProbs(List<Derivation> derivations, double temperature) {\n double[] probs = new double[derivations.size()];\n for (int i = 0; i < derivations.size(); i++)\n probs[i] = derivations.get(i).getScore() / temperature;\n if (probs.length > 0)\n NumUtils.expNormalize(probs);\n return probs;\n }",
"public boolean reproducirse() {\n r = new Random();\r\n return Float.compare(r.nextFloat(), probReproducirse) <= 0;\r\n }",
"public double getScore() {\n int as = this.attributes.size(); // # of attributes that were matched\n\n // we use thresholding ranking approach for numInstances to influence the matching score\n int instances = this.train.numInstances();\n int inst_rank = 0;\n if (instances > 100) {\n inst_rank = 1;\n }\n if (instances > 500) {\n inst_rank = 2;\n }\n\n return this.p_sum + as + inst_rank;\n }",
"double getRatio();",
"private double getAttributeProbability(String attribute, int attributeIndex) {\n\t\tDouble value; // store value of raw data\n\t\tif (attribute.chars().allMatch(Character::isDigit) || attribute.contains(\".\")) {\n\t\t\tvalue = Double.valueOf(attribute);\n\t\t} else {\n\t\t\tvalue = (double) attribute.hashCode();\n\t\t} // end if-else\n\n\n\t\tdouble totalSelectedAttribute = 0;\n\t\tfor (Bin bin : attribBins.get(attributeIndex)) {\n\t\t\tif (bin.binContains(value)) {\n\t\t\t\ttotalSelectedAttribute = bin.getFreq();\n\t\t\t\tbreak;\n\t\t\t} // end if\n\t\t} // end for\n\n\t\tint totalAttributes = 0;\n\t\tfor (int i = 0; i < dc.getDataFold().size(); i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\ttotalAttributes += dc.getDataFold().get(i).size();\n\t\t\t} // end if-else\n\t\t} // end for\n\t\treturn totalSelectedAttribute / totalAttributes;\n\t}"
]
| [
"0.57850313",
"0.57010126",
"0.56290585",
"0.5565697",
"0.5559708",
"0.5519075",
"0.5316536",
"0.52727836",
"0.52534455",
"0.5236468",
"0.5236261",
"0.5198736",
"0.5091604",
"0.50812334",
"0.507524",
"0.50379896",
"0.501882",
"0.50101876",
"0.4990364",
"0.49297088",
"0.4920346",
"0.48977584",
"0.4887237",
"0.4882929",
"0.4881551",
"0.4858258",
"0.48483452",
"0.4834792",
"0.48341623",
"0.48206332",
"0.4803132",
"0.4803068",
"0.4780798",
"0.47732636",
"0.4764049",
"0.47585872",
"0.47556025",
"0.4754406",
"0.47432214",
"0.4739686",
"0.47256002",
"0.47245377",
"0.47228524",
"0.47162777",
"0.47157028",
"0.47086036",
"0.4666865",
"0.4665611",
"0.46632558",
"0.4645651",
"0.46408644",
"0.46405217",
"0.46277493",
"0.46264938",
"0.46103412",
"0.46035856",
"0.46001884",
"0.45997664",
"0.4599624",
"0.45977703",
"0.45944738",
"0.45890316",
"0.45888653",
"0.45658395",
"0.45545518",
"0.45524156",
"0.4549637",
"0.45434496",
"0.45414433",
"0.45359334",
"0.45312563",
"0.45248204",
"0.45165217",
"0.451639",
"0.4500414",
"0.44953394",
"0.4487796",
"0.44842905",
"0.448314",
"0.44636157",
"0.44578058",
"0.44550446",
"0.4448973",
"0.44464502",
"0.44306743",
"0.44303733",
"0.4428187",
"0.44217896",
"0.4403683",
"0.44006646",
"0.43915933",
"0.43783802",
"0.43763268",
"0.43704888",
"0.43574792",
"0.4357228",
"0.434867",
"0.43455118",
"0.43342876",
"0.43323204",
"0.43270162"
]
| 0.0 | -1 |
Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using this API. Returns ID and tags of matching image. Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. | public Observable<MatchResponseInner> matchUrlInputAsync(String contentType, BodyModelInner imageUrl) {
return matchUrlInputWithServiceResponseAsync(contentType, imageUrl).map(new Func1<ServiceResponse<MatchResponseInner>, MatchResponseInner>() {
@Override
public MatchResponseInner call(ServiceResponse<MatchResponseInner> response) {
return response.body();
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int match(ArrayList<ImageCell> images);",
"ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);",
"private void searchImage(String text){\n\n // Set toolbar title as query string\n toolbar.setTitle(text);\n\n Map<String, String> options = setSearchOptions(text, Constants.NEW_SEARCH);\n Call<SearchResponse> call = service.searchPhoto(options);\n\n call.enqueue(new Callback<SearchResponse>() {\n @Override\n public void onResponse(Response<SearchResponse> response, Retrofit retrofit) {\n SearchResponse result = response.body();\n if (result.getStat().equals(\"ok\")) {\n // Status is ok, add result to photo list\n if (photoList != null) {\n photoList.clear();\n photoList.addAll(result.getPhotos().getPhoto());\n imageAdapter.notifyDataSetChanged();\n pageCount = 2;\n }\n\n } else {\n // Display error if something wrong with result\n Toast.makeText(context, result.getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Display error here since request failed\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }\n });\n }",
"@ApiOperation(value = \"Return images matching supplied digest found in supplied repository\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in supplied repository with supplied digest\") })\n\t// Pass in digest only in specific registry, get images and tags back that match\n\t@RequestMapping(path = \"/{registry}/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAndRegistry(@PathVariable String registry,\n\t\t\t@PathVariable String id) {\n\t\tRegistryConnection localConnection;\n\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\ttry {\n\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(registry));\n\n\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t// Get all tags from specific repo\n\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\timage.setRegistryName(registry);\n\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\timages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Iterate through images and only add to new list, what digests are identical\n\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\tfor (DockerImageData image : images) {\n\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from \" + registry + \" matching image id \" + id,\n\t\t\t\t\tmatchingImages);\n\t\t} catch (RegistryNotFoundException e) {\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\"Failed to find Registry\");\n\t\t}\n\t}",
"public List<Result> recognize(IplImage image);",
"@SuppressWarnings({ \"unchecked\", \"null\" })\n public List<String> calcSimilarity(String imgPath) {\n\n FileInputStream imageFile;\n double minDistance = Double.MAX_VALUE;\n\n // 返回查询结果\n List<String> matchUrls = new ArrayList<String>();\n\n\n try {\n\n imageFile = new FileInputStream(imgPath);\n BufferedImage bufferImage;\n\n bufferImage = ImageIO.read(imageFile);\n LTxXORP.setRotaIvaPats();//设定旋转模式值\n\n //得到图片的纹理一维数组特征向量(各颜色分量频率(统计量))\n double[] lbpSourceFecture = LTxXORP.getLBPFeature(imgPath);\n\n // 提取数据库数据\n List<Object> list = DBHelper.fetchALLCloth();\n\n // long startTime = System.currentTimeMillis();\n\n // 把每个条数据的路径和最短距离特征提取出来并存储在lbpResultMap的键值对中。\n Map<String, Double> lbpResultMap = new HashMap<String, Double>();\n\n for (int i = 0; i < list.size(); i++) {\n\n Map<String, Object> map = (Map<String, Object>) list.get(i);\n\n Object candidatePath = map.get(\"path\");\n Object candidateLBP = map.get(\"lbpFeature\");\n\n // 从快速搜索中选取TOP N结果,继续进行纹理特征匹配\n //获取当前由颜色匹配相似度排序的结果并提取其LBP纹理特征\n\n double[] lbpTargetFeature = MatchUtil.jsonToArr((String) candidateLBP);\n double lbpDistance = textureStrategy.similarity(lbpTargetFeature, lbpSourceFecture);\n lbpResultMap.put((String) candidatePath, lbpDistance);\n\n // 判断衡量标准选取距离还是相似度\n if (lbpDistance < minDistance)\n minDistance = lbpDistance;\n\n }\n\n Map<String, Double> tempResultMap;\n\n System.out.println(\"Min Distance : \" + (float) minDistance);\n\n\n\n System.out.println(\"============== finish Texture =================\");\n\n Map<String, Double> finalResult = MatchUtil.sortByValueAsc(lbpResultMap);\n\n int counter = 0;\n for (Map.Entry<String, Double> map : finalResult.entrySet()) {\n if (counter >= Config.finalResultNumber)\n break;\n //matchUrls截取只存储finalResultNumber数量的查询结果\n matchUrls.add(map.getKey());\n counter ++;\n double TSimilarity=Math.pow(Math.E,-map.getValue());\n System.out.println(TSimilarity + \" 图片路径 \" + map.getKey());\n\n }\n\n System.out.println();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return matchUrls;\n }",
"public interface ImageSearchService {\n\n /**\n * Register an image into the search instance.\n *\n * @param imageData Image data in JPEG or PNG format.\n * @param imageType Image format.\n * @param uuid Unique identifier of the image.\n */\n void register(byte[] imageData, ObjectImageType imageType, String uuid);\n\n /**\n * Un-register an image from the search instance.\n *\n * @param uuid Unique identifier of the image.\n */\n void unregister(String uuid);\n\n /**\n * Find all images similar to the given one.\n *\n * @param imageData Image to match with registered ones in the search instance.\n * @param objectRegion object region to search.\n * @return Found images UUIDs and raw response.\n */\n ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);\n\n /**\n * Check the image search configuration is correct by making a fake search request.\n *\n * @param configuration Configuration to check.\n */\n void checkImageSearchConfiguration(Configuration configuration) throws InvalidConfigurationException;\n}",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByHandler(int index);",
"@ApiOperation(value = \"Return all images matching supplied digest in all configured registries\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in configured registries with supplied digest\") })\n\t// Pass in only digest, get images and tags back that much from all repos\n\t@RequestMapping(path = \"/registries/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAllRegistries(@PathVariable String id) {\n\t\t\t\tRegistryConnection localConnection;\n\t\t\t\t// List persists outside all registries\n\t\t\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\t\t\tList<RegistryItem> items = configs.getItems();\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\t// For each configured registry\n\t\t\t\t\tfor(RegistryItem item : items) {\n\t\t\t\t\t\t// Get connection to registry\n\t\t\t\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(item.getRegistryLabel()));\n\t\t\t\t\t\t\n\t\t\t\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\t\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t\t\t\t// Get all tags from specific repo\n\t\t\t\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\t\t\t\timage.setRegistryName(item.getRegistryLabel());\n\t\t\t\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\t\t\t\timages.add(image);\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// Iterate through images and only add to new list, what digests are identical\n\t\t\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\t\t\tfor (DockerImageData image : images) {\n\t\t\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from all configured registries \",\n\t\t\t\t\t\t\tmatchingImages);\n\t\t\t\t} catch (RegistryNotFoundException e) {\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\t\t\"Failed to find Registry\");\n\t\t\t\t}\n\t}",
"Receta getByIdWithImages(long id);",
"public int displayRandomImage() {\n\n int randomImageIndex;\n\n do\n { // making sure that the same images aren't repeated & images of the same car makes aren't shown together\n\n randomCarMake = allCarMakes[getRandomBreed()]; // get a random breed\n randomImageIndex = getRandomImage(); // get a random image of a particular breed\n\n randomImageOfChosenCarMake = displayRelevantImage(randomCarMake, randomImageIndex);\n\n } while (displayingCarMakes.contains(randomCarMake) || allDisplayedImages.contains(randomImageOfChosenCarMake));\n\n allDisplayedImages.add(randomImageOfChosenCarMake); // to make sure that the image isn't repeated\n displayingCarMakes.add(randomCarMake); // to make sure that images of the same breed aren't shown at once\n displayingImageIndexes.add(randomImageIndex); // to recall indexes when the device is rotated\n\n // return chosen random image\n return getResources().getIdentifier(randomImageOfChosenCarMake, \"drawable\", \"com.example.car_match_game_app\");\n }",
"@GET\n @Path(\"{factoryId}/image\")\n @Produces(\"image/*\")\n public Response getImage(@PathParam(\"factoryId\") String factoryId, @DefaultValue(\"\") @QueryParam(\"imgId\") String imageId)\n throws FactoryUrlException {\n Set<FactoryImage> factoryImages = factoryStore.getFactoryImages(factoryId, null);\n if (factoryImages == null) {\n LOG.warn(\"Factory URL with id {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Factory URL with id \" + factoryId + \" is not found.\");\n }\n if (imageId.isEmpty()) {\n if (factoryImages.size() > 0) {\n FactoryImage image = factoryImages.iterator().next();\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n } else {\n LOG.warn(\"Default image for factory {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(),\n \"Default image for factory \" + factoryId + \" is not found.\");\n }\n } else {\n for (FactoryImage image : factoryImages) {\n if (image.getName().equals(imageId)) {\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n }\n }\n }\n LOG.warn(\"Image with id {} is not found.\", imageId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Image with id \" + imageId + \" is not found.\");\n }",
"public void findGeoSurfSimilarPhotosWithTagStatistics(\r\n\t\t\tfinal Set<String> allCandidateWords,\r\n\t\t\tfinal Map<String, WordImage> relevantWordImages, boolean tagReq,\r\n\t\t\tboolean techTagReq, boolean compact) {\r\n\r\n\t\ttopImagesURLs = new HashMap<String, Double>();\r\n\t\ttopImagesNames = new HashMap<String, String>();\r\n\t\t// The list of all Photo objects\r\n\t\tphotoList = new HashMap<String, Photo>();\r\n\t\tphotoList = createGeoSimilarPhotoList(PANORAMIO_DEFUALT_NUM_ITERATIONS, tagReq,\r\n\t\t\t\ttechTagReq);\r\n\r\n\t\t// Word Image Relevance Dictionary\r\n\t\t// The statistics consider for each word the set of images annotated\r\n\t\t// with them and similar\r\n\t\t// to the input image and the those which are tagged with it and not\r\n\t\t// similar to the input image\r\n\t\t// Map<String, WordImage> relevantWordImages = new HashMap<String,\r\n\t\t// WordImage>();\r\n\r\n\t\t// Prepare the result output\r\n\r\n\t\tif (!compact) {\r\n\t\t\toutRel.println(\"Image URL , Score , Distance , Point Similarity, Common Keypoints , Iter Point Similariy, Title , Tags , distance, userid\");\r\n\t\t\t// An CSV file for the set of visually irrelevant images\r\n\t\t\toutIrrRel.println(\"Image URL , Title , Tags , distance, userid\");\r\n\t\t}\r\n\r\n\t\t// *** Extract SURF feature for the input image\r\n\r\n\t\tSurfMatcher surfMatcher = new SurfMatcher();\r\n\t\t// The SURF feature of the input image\r\n\t\tList<InterestPoint> ipts1 = surfMatcher.extractKeypoints(inputImageURL,\r\n\t\t\t\tsurfMatcher.p1);\r\n\r\n\t\t// inputImageInterstPoints = ipts1 ;\r\n\r\n\t\t// Add the photo with its interestpoint to the cache\r\n\t\t// this.photoInterestPoints.put(imageName, ipts1);\r\n\r\n\t\t// Find SURF correspondences in the geo-related images\r\n\t\ttotalNumberOfSimilarImages = 0; // R\r\n\r\n\t\tfor (String photoId : photoList.keySet()) {\r\n\r\n\t\t\tPhoto photo = photoList.get(photoId);\r\n\r\n\t\r\n\r\n\t\t\tString toMatchedPhotoURL = photo.getPhotoFileUrl();\r\n\t\t\t// The SURF feature of a geo close image\r\n\t\t\tList<InterestPoint> ipts2 = surfMatcher.extractKeypoints(\r\n\t\t\t\t\ttoMatchedPhotoURL, surfMatcher.p2);\r\n\r\n\t\t\t// this.photoInterestPoints.put(photo.getPhotoId(), ipts2);\r\n\t\t\t// this.cachedImageInterstPoint.put(photo.getPhotoId(), ipts2);\r\n\r\n\t\t\tMatchingResult surfResult = null;\r\n\r\n\t\t\tsurfResult = surfMatcher.matchKeypoints(inputImageURL, photoId,\r\n\t\t\t\t\tipts1, ipts2, MIN_COMMON_IP_COUNT);\r\n\r\n\t\t\tif (surfResult != null) { // the images are visually similar\r\n\r\n\t\t\t\ttopImagesURLs.put(toMatchedPhotoURL,\r\n\t\t\t\t\t\tsurfResult.getPiontSimilarity());\r\n\r\n\t\t\t\ttopImagesNames.put(toMatchedPhotoURL, photo.getPhotoId());\r\n\r\n\t\t\t\ttotalNumberOfSimilarImages += 1;\r\n\t\t\t\tif (!compact) {\r\n\r\n\t\t\t\t\toutRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getScore()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getAvgDistance()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getPiontSimilarity()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getCommonKeyPointsCount()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ \"null ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\tSystem.out.println(\"Downloading Similar Image\");\r\n\t\t\t\t\tString destFileName = similarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Generate Word Statistics\r\n\t\t\t\t// For the a certain word (tag) add image info to its list if\r\n\t\t\t\t// this image\r\n\t\t\t\t// is visually similar to the input image\r\n\t\t\t\tupdateWordRelatedImageList(allCandidateWords,\r\n\t\t\t\t\t\trelevantWordImages, photo, surfResult);\r\n\t\t\t} else {\r\n\r\n\t\t\t\tif (!compact) {\r\n\t\t\t\t\t// Images are visually not similar\r\n\t\t\t\t\toutIrrRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \" ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t// We also need to get some information if a certain word is\r\n\t\t\t\t\t// also used by visually not similar images\r\n\t\t\t\t\tSystem.out.println(\"Downloading Non Similar Image\");\r\n\t\t\t\t\tString destFileName = dissimilarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tupdateWordNotRelatedImageList(relevantWordImages, photo);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByHandlerList();",
"@GET(\"/tags/{query}/media/recent\" + CLIENT_ID)\n public void searchPhotos(@Path(\"query\") String query, Callback<WebResponse<ArrayList<InstagramPhoto>>> callback);",
"List<Bitmap> getFavoriteRecipeImgs();",
"private void processImages() throws MalformedURLException, IOException {\r\n\r\n\t\tNodeFilter imageFilter = new NodeClassFilter(ImageTag.class);\r\n\t\timageList = fullList.extractAllNodesThatMatch(imageFilter, true);\r\n\t\tthePageImages = new HashMap<String, byte[]>();\r\n\r\n\t\tfor (SimpleNodeIterator nodeIter = imageList.elements(); nodeIter\r\n\t\t\t\t.hasMoreNodes();) {\r\n\t\t\tImageTag tempNode = (ImageTag) nodeIter.nextNode();\r\n\t\t\tString tagText = tempNode.getText();\r\n\r\n\t\t\t// Populate imageUrlText String\r\n\t\t\tString imageUrlText = tempNode.getImageURL();\r\n\r\n\t\t\tif (imageUrlText != \"\") {\r\n\t\t\t\t// Print to console, to verify relative link processing\r\n\t\t\t\tSystem.out.println(\"ImageUrl to Retrieve:\" + imageUrlText);\r\n\r\n\t\t\t\tbyte[] imgArray = downloadBinaryData(imageUrlText);\r\n\r\n\t\t\t\tthePageImages.put(tagText, imgArray);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"@Override\n public FlickrResponse searchPhoto(String tags) throws IOException {\n return flickrService.searchPhoto(tags);\n }",
"public void getImageResults(String tag){\n showProgressBar(true);\n HttpClient.get(\"rest/\", getRequestParams(tag), new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n String response = new String(responseBody, StandardCharsets.UTF_8);\n response = StringUtils.replace(response, \"jsonFlickrApi(\", \"\");\n response = StringUtils.removeEnd(response, \")\");\n Log.d(\"SERVICE RESPONSE\", response);\n Gson gson = new Gson();\n FlickrSearchResponse jsonResponse = gson.fromJson(response, FlickrSearchResponse.class);\n if(jsonResponse.getStat().equals(\"fail\")){\n //api returned an error\n searchHelperListener.onErrorResponseReceived(jsonResponse.getMessage());\n } else {\n //api returned data\n searchHelperListener.onSuccessResponseReceived(jsonResponse);\n }\n showProgressBar(false);\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n Log.d(\"SERVICE FAILURE\", error.getMessage());\n searchHelperListener.onErrorResponseReceived(error.getMessage());\n showProgressBar(false);\n }\n });\n\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByTransform(int index);",
"public EC2DescribeImagesResponse describeImages(EC2DescribeImages request) {\n EC2DescribeImagesResponse images = new EC2DescribeImagesResponse();\n try {\n String[] templateIds = request.getImageSet();\n EC2ImageFilterSet ifs = request.getFilterSet();\n\n if (templateIds.length == 0) {\n images = listTemplates(null, images);\n } else {\n for (String s : templateIds) {\n images = listTemplates(s, images);\n }\n }\n if (ifs != null)\n return ifs.evaluate(images);\n } catch (Exception e) {\n logger.error(\"EC2 DescribeImages - \", e);\n handleException(e);\n }\n return images;\n }",
"GetImagesResult getImages(GetImagesRequest getImagesRequest);",
"int seachImage(Image img) {\r\n\t\treturn 1;\r\n\t}",
"public void searchImages(View view) {\n imageList.clear();\n adapter.clear();\n Log.d(\"DEBUG\", \"Search Images\");\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n Log.d(\"DEBUG\", getUrl(1).toString());\n retrieveImages(getUrl(1).toString());\n }",
"java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByTransformList();",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform();",
"FetchedImage getFujimiyaUrl(String query,int maxRankOfResult){\n try{\n //Get SearchResult\n Search search = getSearchResult(query, maxRankOfResult);\n List<Result> items = search.getItems();\n for(Result result: items){\n int i = items.indexOf(result);\n logger.log(Level.INFO,\"query: \" + query + \" URL: \"+result.getLink());\n logger.log(Level.INFO,\"page URL: \"+result.getImage().getContextLink());\n if(result.getImage().getWidth()+result.getImage().getHeight()<600){\n logger.log(Level.INFO,\"Result No.\"+i+\" is too small image. next.\");\n continue;\n }\n if(DBConnection.isInBlackList(result.getLink())){\n logger.log(Level.INFO,\"Result No.\"+i+\" is included in the blacklist. next.\");\n continue;\n }\n HttpURLConnection connection = (HttpURLConnection)(new URL(result.getLink())).openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setInstanceFollowRedirects(false);\n connection.connect();\n if(connection.getResponseCode()==200){\n return new FetchedImage(connection.getInputStream(),result.getLink());\n }else{\n logger.log(Level.INFO,\"Result No.\"+i+\" occurs error while fetching the image. next.\");\n continue;\n }\n }\n //If execution comes here, connection has failed 10 times.\n throw new ConnectException(\"Connection failed 10 times\");\n\n } catch (IOException e) {\n // TODO Auto-generated catch block\n logger.log(Level.SEVERE,e.toString());\n e.printStackTrace();\n }\n return null;\n}",
"void loadImages(int id_image, HouseRepository.GetImageFromHouseCallback callback);",
"@Override\n\tpublic String imageSearch(QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(IData.URL_SEARCH + param.toString());\n\t}",
"private void onImagePicked(@NonNull final byte[] imageBytes) {\n setBusy(true);\n\n // Make sure we don't show a list of old concepts while the image is being uploaded\n adapter.setData(Collections.<Concept>emptyList());\n\n new AsyncTask<Void, Void, ClarifaiResponse<List<ClarifaiOutput<Concept>>>>() {\n @Override protected ClarifaiResponse<List<ClarifaiOutput<Concept>>> doInBackground(Void... params) {\n // The default Clarifai model that identifies concepts in images\n final ConceptModel generalModel = App.get().clarifaiClient().getDefaultModels().foodModel();\n\n // Use this model to predict, with the image that the user just selected as the input\n return generalModel.predict()\n .withInputs(ClarifaiInput.forImage(ClarifaiImage.of(imageBytes)))\n .executeSync();\n }\n\n @Override protected void onPostExecute(ClarifaiResponse<List<ClarifaiOutput<Concept>>> response) {\n setBusy(false);\n if (!response.isSuccessful()) {\n showErrorSnackbar(R.string.error_while_contacting_api);\n return;\n }\n final List<ClarifaiOutput<Concept>> predictions = response.get();\n if (predictions.isEmpty()) {\n showErrorSnackbar(R.string.no_results_from_api);\n return;\n }\n adapter.setData(predictions.get(0).data());\n\n // INSERT METHOD FOR USER SELECTION OF FOOD\n\n // ADDED FOR DATABASE\n try {\n readCSVToMap(\"ABBREV_2.txt\");\n }\n catch (Exception e){\n Log.d(\"Failure\", \"CSV not read into database\");\n }\n String exampleResult = predictions.get(0).data().get(0).name();\n final List<String> list = listOfKeys(exampleResult);\n\n // change this line to take in user input\n final String key2 = list.get(0); // arbitrary selection of key\n\n final List<String> val = db.get(key2);\n final String message = String.valueOf(val.get(6)); //index 6 contains carb info\n Log.d(\"Output\", message);\n imageView.setImageBitmap(BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.length));\n }\n\n private void showErrorSnackbar(@StringRes int errorString) {\n Snackbar.make(\n root,\n errorString,\n Snackbar.LENGTH_INDEFINITE\n ).show();\n }\n }.execute();\n }",
"private void imageSearch(ArrayList<Html> src) {\n // loop through the Html objects\n for(Html page : src) {\n\n // Temp List for improved readability\n ArrayList<Image> images = page.getImages();\n\n // loop through the corresponding images\n for(Image i : images) {\n if(i.getName().equals(this.fileName)) {\n this.numPagesDisplayed++;\n this.pageList.add(page.getLocalPath());\n }\n }\n }\n }",
"@Override\n\tpublic String imageLists(String url, QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(url + param.toString());\n\t}",
"@Override\n\tpublic List<PersonalisationMediaModel> getImageByID(final String imageID)\n\t{\n\t\tfinal String query1 = \"Select {pk} from {PersonalisationMedia} Where {code}=?imageId and {user}=?user\";\n\t\t/**\n\t\t * select distinct {val:pk} from {PersonalisationMediaModel as val join MediaModel as media on\n\t\t * {media:PK}={val.image} join User as user on {user:pk}={val:user} and {media:code}=?imageId and {user:pk}=?user}\n\t\t */\n\t\tfinal UserModel user = getUserService().getCurrentUser();\n\t\tfinal FlexibleSearchQuery fQuery = new FlexibleSearchQuery(query1);\n\t\tfinal Map<String, Object> params = new HashMap<>();\n\t\tparams.put(\"imageId\", imageID);\n\t\tparams.put(\"user\", user);\n\t\tfQuery.addQueryParameters(params);\n\t\tLOG.info(\"getImageByID\" + fQuery);\n\t\tfinal SearchResult<PersonalisationMediaModel> searchResult = flexibleSearchService.search(fQuery);\n\t\treturn searchResult.getResult();\n\t}",
"public void findImages() {\n \t\tthis.mNoteItemModel.findImages(this.mNoteItemModel.getContent());\n \t}",
"public void notifyFinishGetSimilarArtist(ArtistInfo a, Image img, long id);",
"private void imgDetected(Matcher matcher) {\n String component;\n matcher.reset();\n\n // store src value if <img> exist\n while (matcher.find()) {\n Data.imagesSrc.add(matcher.group(1));\n }\n\n // separate if the paragraph contain img\n // replace <img> with -+-img-+- to indicate image position in the text\n component = matcher.replaceAll(\"-+-img-+-\");\n\n //split the delimiter to structure image position\n String[] imageStructure = component.split(\"-\\\\+-\");\n\n // start looping the structured text\n int imageFoundIndex = 0;\n for (String structure : imageStructure) {\n // continue if the current index is not empty string \"\"\n if (!structure.trim().equals(\"\")) {\n // create ImageView if current index value equeal to \"img\"\n if (structure.trim().equals(\"img\")) {\n createImageView();\n imageFoundIndex++;\n } else {\n // else create textView for the text\n generateView(structure);\n }\n }\n }\n }",
"List<IbeisImage> uploadImages(List<File> images) throws UnsupportedImageFileTypeException, IOException,\n MalformedHttpRequestException, UnsuccessfulHttpRequestException;",
"public DetectorMatchResponse findMatchingDetectorMappings(List<Map<String, String>> tagsList) {\n isTrue(tagsList.size() > 0, \"tagsList must not be empty\");\n\n val uri = baseUri + API_PATH_MATCHING_DETECTOR_BY_TAGS;\n Content content;\n try {\n String body = objectMapper.writeValueAsString(tagsList);\n content = httpClient.post(uri, body);\n } catch (IOException e) {\n val message = \"IOException while getting matching detectors for\" +\n \": tags=\" + tagsList +\n \", httpMethod=POST\" +\n \", uri=\" + uri;\n throw new DetectorMappingRetrievalException(message, e);\n }\n try {\n return objectMapper.readValue(content.asBytes(), DetectorMatchResponse.class);\n } catch (IOException e) {\n val message = \"IOException while deserializing detectorMatchResponse\" +\n \": tags=\" + tagsList;\n throw new DetectorMappingDeserializationException(message, e);\n }\n\n }",
"public Observable<ServiceResponse<MatchResponseInner>> matchMethodWithServiceResponseAsync(String listId, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.matchMethod(listId, cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {\n @Override\n public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<MatchResponseInner> clientResponse = matchMethodDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }",
"List<Bitmap> getRecipeImgSmall();",
"private void getImagesFromServer() {\n trObtainAllPetImages.setUser(user);\n trObtainAllPetImages.execute();\n Map<String, byte[]> petImages = trObtainAllPetImages.getResult();\n Set<String> names = petImages.keySet();\n\n for (String petName : names) {\n byte[] bytes = petImages.get(petName);\n Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, Objects.requireNonNull(bytes).length);\n int index = user.getPets().indexOf(new Pet(petName));\n user.getPets().get(index).setProfileImage(bitmap);\n ImageManager.writeImage(ImageManager.PET_PROFILE_IMAGES_PATH, user.getUsername() + '_' + petName, bytes);\n }\n }",
"private static final byte[] xfuzzy_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -95, 0, 0, -1,\n\t\t\t\t-1, -1, -82, 69, 12, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77,\n\t\t\t\t97, 100, 101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0,\n\t\t\t\t33, -7, 4, 1, 10, 0, 0, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 2,\n\t\t\t\t36, -124, -113, -87, -101, -31, -33, 32, 120, 97, 57, 68, -93,\n\t\t\t\t-54, -26, 90, -24, 49, 84, -59, 116, -100, 88, -99, -102, 25,\n\t\t\t\t30, -19, 36, -103, -97, -89, -62, 117, -119, 51, 5, 0, 59 };\n\t\treturn data;\n\t}",
"public RatingSearch explode() {\n Elements elements = doc.getElementsByTag(\"table\");\n IqdbMatch bestMatch = null;\n List<IqdbMatch> additionalMatches = new LinkedList<>();\n for (int i = 1; i < elements.size(); i++) {\n //iterating through all the table elements. First one is your uploaded image\n\n //Each table is one \"card\" on iqdb so only the second one will be the \"best match\"\n Element element = elements.get(i);\n IqdbElement iqdbElement = new IqdbElement(element);\n\n Elements noMatch = element.getElementsContainingText(\"No relevant matches\");\n if (noMatch.size() > 0) {\n log.warn(\"There was no relevant match for this document\");\n// break;\n return null;\n }\n// TODO I don't think we can determine if these are even relevant. So once we see 'No relevent matches' we can\n// just call it there. We won't need 'Possible Match' yet\n// Elements possibleMatchElement = element.getElementsContainingText(\"Possible match\");\n// if (possibleMatchElement.size() > 0) {\n// additionalMatches.add(iqdbElement.explode(IqdbMatchType.NO_RELEVANT_BUT_POSSIBLE));\n// }\n\n //Second element will provide all the information you need. going into the similarity and all that is a waste of time\n //Use the similarity search for Best Match to identify the element that is best match if you don't trust the 2nd.\n Elements bestMatchElement = element.getElementsContainingText(\"Best Match\");\n if (bestMatchElement.size() > 0) {\n bestMatch = iqdbElement.explode(IqdbMatchType.BEST);\n }\n\n //can similarly search for \"Additional match\" to find all teh additional matches. Anything beyond additional matches is a waste of time.\n Elements additionalMatchElements = element.getElementsContainingText(\"Additional match\");\n if (additionalMatchElements.size() > 0) {\n additionalMatches.add(iqdbElement.explode(IqdbMatchType.ADDITIONAL));\n }\n }\n\n if (bestMatch == null && !additionalMatches.isEmpty()) {\n log.warn(\"No Best Match found, taking first additionalMatch, does this ever happen?\");\n bestMatch = additionalMatches.remove(0);\n }\n\n return null;//new RatingSearch(bestMatch, additionalMatches);\n }",
"public static SearchResult getChampionImage(String championList, String championID) {\n try {\r\n JSONObject holder = new JSONObject(championList);\r\n JSONObject holderItems = holder.getJSONObject(\"data\");\r\n SearchResult champion = new SearchResult();\r\n\r\n for (Iterator<String> it = holderItems.keys(); it.hasNext(); ) { //iterate through champion json objects\r\n String key = it.next();\r\n JSONObject resultItem = holderItems.getJSONObject(key);\r\n\r\n if (resultItem.getString(\"key\").equals(championID)) {\r\n champion.championName = key; //the key for the json object is also the name of the champion\r\n break;\r\n }\r\n }\r\n\r\n String tempName = champion.championName + \".png\"; //construct string for champion image\r\n\r\n champion.championImage = Uri.parse(BASE_URL_CHAMPION_IMAGE + tempName).buildUpon().build().toString();\r\n\r\n return champion;\r\n } catch (JSONException e) {\r\n System.out.println(e);\r\n return null;\r\n }\r\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByHandlerOrBuilder();",
"private EC2DescribeImagesResponse listTemplates(String templateId, EC2DescribeImagesResponse images) throws Exception {\n try {\n List<CloudStackTemplate> result = new ArrayList<CloudStackTemplate>();\n\n if (templateId != null) {\n List<CloudStackTemplate> template = getApi().listTemplates(\"executable\", null, null, null, templateId, null, null, null);\n if (template != null) {\n result.addAll(template);\n }\n } else {\n List<CloudStackTemplate> selfExecutable = getApi().listTemplates(\"selfexecutable\", null, null, null, null, null, null, null);\n if (selfExecutable != null) {\n result.addAll(selfExecutable);\n }\n\n List<CloudStackTemplate> featured = getApi().listTemplates(\"featured\", null, null, null, null, null, null, null);\n if (featured != null) {\n result.addAll(featured);\n }\n\n List<CloudStackTemplate> sharedExecutable = getApi().listTemplates(\"sharedexecutable\", null, null, null, null, null, null, null);\n if (sharedExecutable != null) {\n result.addAll(sharedExecutable);\n }\n\n List<CloudStackTemplate> community = getApi().listTemplates(\"community\", null, null, null, null, null, null, null);\n if (community != null) {\n result.addAll(community);\n }\n }\n\n if (result != null && result.size() > 0) {\n for (CloudStackTemplate temp : result) {\n EC2Image ec2Image = new EC2Image();\n ec2Image.setId(temp.getId().toString());\n ec2Image.setAccountName(temp.getAccount());\n ec2Image.setName(temp.getName());\n ec2Image.setDescription(temp.getDisplayText());\n ec2Image.setOsTypeId(temp.getOsTypeId().toString());\n ec2Image.setIsPublic(temp.getIsPublic());\n ec2Image.setState(temp.getIsReady() ? \"available\" : \"pending\");\n ec2Image.setDomainId(temp.getDomainId());\n if (temp.getHyperVisor().equalsIgnoreCase(\"xenserver\"))\n ec2Image.setHypervisor(\"xen\");\n else if (temp.getHyperVisor().equalsIgnoreCase(\"ovm\"))\n ec2Image.setHypervisor(\"ovm\"); // valid values for hypervisor is 'ovm' and 'xen'\n else\n ec2Image.setHypervisor(\"\");\n if (temp.getDisplayText() == null)\n ec2Image.setArchitecture(\"\");\n else if (temp.getDisplayText().indexOf(\"x86_64\") != -1)\n ec2Image.setArchitecture(\"x86_64\");\n else if (temp.getDisplayText().indexOf(\"i386\") != -1)\n ec2Image.setArchitecture(\"i386\");\n else\n ec2Image.setArchitecture(\"\");\n List<CloudStackKeyValue> resourceTags = temp.getTags();\n for (CloudStackKeyValue resourceTag : resourceTags) {\n EC2TagKeyValue param = new EC2TagKeyValue();\n param.setKey(resourceTag.getKey());\n if (resourceTag.getValue() != null)\n param.setValue(resourceTag.getValue());\n ec2Image.addResourceTag(param);\n }\n images.addImage(ec2Image);\n }\n }\n return images;\n } catch (Exception e) {\n logger.error(\"List Templates - \", e);\n throw new Exception(e.getMessage() != null ? e.getMessage() : e.toString());\n }\n }",
"java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByHandlerOrBuilderList();",
"public interface ImageMetadataService {\n\n List<ArtistDTO> getArtistsByPrediction(String name, String name2, String surname);\n\n List<ImageTypeDTO> getImageTypesByPrediction(String name);\n\n UploadImageMetadataDTO saveMetadata(UploadImageMetadataDTO uploadImageMetadataDTO);\n\n List<ImageDTO> getTop10Images(String username, String title);\n\n List<ImageDTO> getAllUserImages(String username);\n\n List<ImageDTO> searchImagesByCriteria(SearchImageCriteriaDTO searchImageCriteriaDTO);\n\n ImageDTO updateImageMetadata(ImageDTO imageDTO);\n\n List<ImageDTO> getImagesTop50();\n\n void rateImage(RateImageDTO rateImageDTO);\n\n List<ImageDTO> getAllImages();\n}",
"public static List<PNMedia> discoveryFlickrImages(String[] tags) throws Exception{\r\n\t\tif(tags != null && tags.length > 0){\r\n\t\t\tList<PNMedia> flickrPhotosList = new ArrayList<PNMedia>();\r\n\t\t\t\t\r\n\t\t\tFlickr flickr = new Flickr(flickrApiKey, flickrSharedSecret, new REST());\r\n\t\t\tFlickr.debugStream = false;\r\n\t\t\t\r\n\t\t\tSearchParameters searchParams=new SearchParameters();\r\n\t\t searchParams.setSort(SearchParameters.INTERESTINGNESS_ASC);\r\n\t\t \r\n\t\t searchParams.setTags(tags);\r\n\t\t \r\n\t\t PhotosInterface photosInterface = flickr.getPhotosInterface();\r\n\t\t PhotoList<Photo> photoList = photosInterface.search(searchParams, 10, 1); // quantidade de fotos retornadas (5)\r\n\t\t \r\n\t\t if(photoList != null){\r\n\t\t for(int i=0; i<photoList.size(); i++){\r\n\t\t Photo photo = (Photo)photoList.get(i);\r\n\t\t PNMedia media = new PNMedia();\r\n\t\t \r\n\t\t String description = photo.getDescription();\r\n\t\t if(description == null)\r\n\t\t \t description = photo.getTitle();\r\n\t\t media.setMediaURL(photo.getLargeUrl()); media.setMediaURLAux(photo.getSmallSquareUrl()); media.setMediaCaption(photo.getTitle()); media.setMediaInfo(description);\r\n\t\t flickrPhotosList.add(media);\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t return flickrPhotosList;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tthrow new Exception(\"Null tags or tags is empty. \");\r\n\t\t}\r\n\t}",
"public interface Image {\n /**\n * @return the image ID\n */\n String getId();\n\n /**\n * @return the image ID, or null if not present\n */\n String getParentId();\n\n /**\n * @return Image create timestamp\n */\n long getCreated();\n\n /**\n * @return the image size\n */\n long getSize();\n\n /**\n * @return the image virtual size\n */\n long getVirtualSize();\n\n /**\n * @return the labels assigned to the image\n */\n Map<String, String> getLabels();\n\n /**\n * @return the names associated with the image (formatted as repository:tag)\n */\n List<String> getRepoTags();\n\n /**\n * @return the digests associated with the image (formatted as repository:tag@sha256:digest)\n */\n List<String> getRepoDigests();\n}",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage();",
"public void features() throws MalformedURLException, IOException {\n\t\tMBFImage query = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao01.jpg\"));\n\t\tMBFImage target = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao02.jpg\"));\n\n\t\tDoGSIFTEngine engine = new DoGSIFTEngine();\n\t\tLocalFeatureList<Keypoint> queryKeypoints = engine.findFeatures(query.flatten());\n\t\tLocalFeatureList<Keypoint> targetKeypoints = engine.findFeatures(target.flatten());\n\t\tLocalFeatureMatcher<Keypoint> matcher1 = new BasicMatcher<Keypoint>(80);\n\t\tLocalFeatureMatcher<Keypoint> matcher = new BasicTwoWayMatcher<Keypoint>();\n\t\t/*\n\t\t * matcher.setModelFeatures(queryKeypoints);\n\t\t * matcher.findMatches(targetKeypoints); MBFImage basicMatches =\n\t\t * MatchingUtilities.drawMatches(query, target, matcher.getMatches(),\n\t\t * RGBColour.RED); DisplayUtilities.display(basicMatches);\n\t\t */\n\t\tRobustAffineTransformEstimator modelFitter = new RobustAffineTransformEstimator(5.0, 1500,\n\t\t\t\tnew RANSAC.PercentageInliersStoppingCondition(0.5));\n\t\tmatcher = new ConsistentLocalFeatureMatcher2d<Keypoint>(new FastBasicKeypointMatcher<Keypoint>(8), modelFitter);\n\t\tmatcher.setModelFeatures(queryKeypoints);\n\t\tmatcher.findMatches(targetKeypoints);\n\t\tMBFImage consistentMatches = MatchingUtilities.drawMatches(query, target, matcher.getMatches(), RGBColour.RED);\n\t\tDisplayUtilities.display(consistentMatches);\n\t\ttarget.drawShape(query.getBounds().transform(modelFitter.getModel().getTransform().inverse()), 3,\n\t\t\t\tRGBColour.BLUE);\n\t\t// DisplayUtilities.display(target);\n\t}",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage(\n @QueryMap ListImage queryParameters);",
"private static void updateRelatedImageList(\r\n\t\t\tMap<String, WordImage> relevantWordImages, Photo photo,\r\n\t\t\tMatchingResult surfResult, String word) {\n\r\n\t\tString key = getRelevantKeyForRelevantImages(relevantWordImages, word);\r\n\r\n\t\tif (key != null) {\r\n\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImages().add(info);\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImagesMap()\r\n\t\t\t\t\t.put(info.getId(), info);\r\n\r\n\t\t\trelevantWordImages.get(key).addSimilarImageId(info.getId());\r\n\r\n\t\t}\r\n\r\n\t\telse {\r\n\r\n\t\t\tWordImage wi = new WordImage(word);\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\twi.addSimilarImage(info);\r\n\r\n\t\t\twi.addSimilarImage(photo.getPhotoId(), info);\r\n\r\n\t\t\trelevantWordImages.put(word, wi);\r\n\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic String searchimage(int cbid) throws Exception {\n\t\treturn dao.searchimage(cbid);\r\n\t}",
"public Point findImage(BufferedImage image, int index) {\n int smallWidth = image.getWidth();\n int smallHeight = image.getHeight();\n int[][] smallPixels = new int[smallWidth][smallHeight];\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n smallPixels[x][y] = image.getRGB(x, y);\n }\n }\n boolean good;\n int count = 0;\n for(int X = 0; X <= bigWidth - smallWidth; X++) {\n for(int Y = 0; Y <= bigHeight - smallHeight; Y++) {\n good = true;\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n if(smallPixels[x][y] != bigPixels[X + x][Y + y]) {\n good = false;\n break;\n }\n }\n if(!good) {\n break;\n }\n }\n if(good) {\n if(count == index) {\n return(new Point(X, Y));\n }\n count++;\n }\n }\n }\n return(null);\n }",
"public static String getImageId(WebElement image) {\n String imageUrl = image.getAttribute(\"src\");\n\n int indexComparisonStart = imageUrl.indexOf(START_TOKEN) + START_TOKEN.length();\n int indexComparisonFinish = imageUrl.substring(indexComparisonStart).indexOf(STOP_TOKEN);\n\n return imageUrl.substring(indexComparisonStart, indexComparisonStart + indexComparisonFinish);\n }",
"private void searchImages()\n {\n searchWeb = false;\n search();\n }",
"java.lang.String getHotelImageURLs(int index);",
"public void findBookDetails(AnnotateImageResponse imageResponse) throws IOException {\n\n String google = \"http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=\";\n String search = \"searchString\";\n String charset = \"UTF-8\";\n\n URL url = new URL(google + URLEncoder.encode(search, charset));\n Reader reader = new InputStreamReader(url.openStream(), charset);\n GoogleResults results = new Gson().fromJson(reader, GoogleResults.class);\n\n // Show title and URL of 1st result.\n System.out.println(results.getResponseData().getResults().get(0).getTitle());\n System.out.println(results.getResponseData().getResults().get(0).getUrl());\n }",
"@Override\n\tpublic List<Image> findAllImage() {\n\t\treturn new ImageDaoImpl().findAllImage();\n\t}",
"public interface IImageInputBoundary {\n\n List<ImageResponseModel> GetImagesByCategory(ImageRequestModel requestModel);\n List<ImageResponseModel> GetImagesByComposition(ImageRequestModel requestModel);\n}",
"@Override\n\tpublic List<AddBookDto> findListimage(List<addBookBo> listBo) throws IOException {\n\n\t\tFile uploadFileDir, uploadImageDir;\n\n\t\tFileInputStream fileInputStream = null;\n\n\t\tList<AddBookDto> dtoList = new ArrayList<>();\n\n\t\tSet<Category> setCategory = new HashSet<>();\n\n\t\tSystem.out.println(\"UploadService.findListimage()\");\n\n\t\tfor (addBookBo bo : listBo) {\n\n\t\t\tAddBookDto dto = new AddBookDto();\n\n\t\t\tBeanUtils.copyProperties(bo, dto);\n\n\t\t\tSystem.out.println(\"UploadService.findListimage()-------\" + bo.getAuthor());\n\n\t\t\tuploadImageDir = new File(imageUploadpath + \"/\" + dto.getImageUrl() + \".jpg\");\n\n\t\t\tif (uploadImageDir.exists()) {\n\n\t\t\t\tbyte[] buffer = getBytesFromFile(uploadImageDir);\n\t\t\t\t// System.out.println(bo.getTitle()+\"====b===\" + buffer);\n\t\t\t\tdto.setImgeContent(buffer);\n\n\t\t\t}\n\n\t\t\tSystem.out.println(dto.getTitle() + \"====dto===\" + dto.getImgeContent());\n\t\t\tdtoList.add(dto);\n\n\t\t}\n\n\t\treturn dtoList;\n\t}",
"@Test\n\tpublic void searchImageWithUpload() throws InterruptedException, Exception {\n\n\t\t// To click on Images link\n\t\thomePage.clickSearchByImage();\n\t\t\n\t\t// To verify if ui is navigated to Search by image page\n\t\tAssert.assertTrue(homePage.verifySearchByImageBox());\n\n\t\t// Upload an image from local machine\n\t\tsearchPage.uploadLocalImage(Settings.getLocalImage());\n\t\t// To verify upload status\n\t\tAssert.assertTrue(searchPage.verifyUploadStatus());\n\n\t\t// Find specified image on GUI\n\t\tWebElement webElement = searchPage.navigateToImage(Settings.getVisitRule());\n\n\t\t// Take a snapshot for expected visit page\n\t\tsearchPage.snapshotLastPage(webElement);\n\n\t\t// Download specified image by expected rule\n\t\tString fileName = Settings.getDownloadImage();\n\t\tboolean down = searchPage.downloadImagetoLocal(webElement, fileName);\n\t\tAssert.assertTrue(down);\n\n\t\t// verify two images match or not\n\t\tAssert.assertTrue(searchPage.verifyImageIsSame(Settings.getDownloadImage(), Settings.getLocalImage()));\n\n\t}",
"public Image getImageById(final String imageId)\n {\n GetImageByIdQuery getImageByIdQuery = new GetImageByIdQuery(imageId);\n List<Image> ImageList = super.queryResult(getImageByIdQuery);\n if (CollectionUtils.isEmpty(ImageList) || ImageList.size() > 1)\n {\n LOG.error(\"The Image cannot be found by this id:\" + imageId);\n return null;\n }\n return ImageList.get(0);\n }",
"@Override\n public void onSuccess(Uri uri) {\n if (!ImageListUrl.contains(uri.toString())) {\n ImageListUrl.add(uri.toString());\n\n /// add property if imageurl arraylist same with imagelist arraylist\n if (ImageListUrl.size() == ImageList.size()) {\n Toast.makeText(NewRecipe.this, ImageListUrl.toString(), Toast.LENGTH_SHORT).show();\n\n saveRecipe();\n\n }\n }\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByTransformOrBuilder();",
"public List<Recognition> recognizeImage(Bitmap bitmap) {\n Bitmap croppedBitmap = Bitmap.createScaledBitmap(bitmap, cropSize, cropSize, true);\n// Bitmap croppedBitmap = Bitmap.createBitmap(cropSize, cropSize, Bitmap.Config.ARGB_8888);\n// final Canvas canvas = new Canvas(croppedBitmap);\n// canvas.drawBitmap(bitmap, frameToCropTransform, null);\n final List<Recognition> ret = new LinkedList<>();\n List<Recognition> recognitions = detector.recognizeImage(croppedBitmap);\n// long before=System.currentTimeMillis();\n// for (int k=0; k<100; k++) {\n// recognitions = detector.recognizeImage(croppedBitmap);\n// int a = 0;\n// }\n// long after=System.currentTimeMillis();\n// String log = String.format(\"tensorflow takes %.03f s\\n\", ((float)(after-before)/1000/100));\n// Log.d(\"MATCH TEST\", log);\n for (Recognition r : recognitions) {\n if (r.getConfidence() < minConfidence)\n continue;\n// RectF location = r.getLocation();\n// cropToFrameTransform.mapRect(location);\n// r.setOriginalLoc(location);\n// Bitmap cropped = Bitmap.createBitmap(bitmap, (int)location.left, (int)location.top, (int)location.width(), (int)location.height());\n// r.setObjectImage(cropped);\n BoxPosition bp = r.getLocation();\n// r.rectF = new RectF(bp.getLeft(), bp.getTop(), bp.getRight(), bp.getBottom());\n// cropToFrameTransform.mapRect(r.rectF);\n ret.add(r);\n }\n\n return ret;\n }",
"private static final byte[] xfuzzyload_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, -82,\n\t\t\t\t69, 12, -128, -128, -128, -1, -1, -1, -64, -64, -64, -1, -1, 0,\n\t\t\t\t0, 0, 0, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100, 101,\n\t\t\t\t32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4, 1,\n\t\t\t\t10, 0, 6, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 3, 75, 8, -86,\n\t\t\t\t-42, 11, 45, -82, -24, 32, -83, -42, -80, 43, -39, -26, -35,\n\t\t\t\t22, -116, 1, -9, 24, -127, -96, 10, 101, 23, 44, 2, 49, -56,\n\t\t\t\t108, 21, 15, -53, -84, -105, 74, -86, -25, 50, -62, -117, 68,\n\t\t\t\t44, -54, 74, -87, -107, 82, 21, 40, 8, 81, -73, -96, 78, 86,\n\t\t\t\t24, 53, 82, -46, 108, -77, -27, -53, 78, -85, -111, -18, 116,\n\t\t\t\t87, 8, 23, -49, -123, 4, 0, 59 };\n\t\treturn data;\n\t}",
"public static ArrayList<Result> getCCVBasedSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.CCV));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t\t// create result object\n\t\t\t \tResult result = new Result();\n\t\t\t \tresult.mFilename = imageName;\n\t\t\t \tresult.mSimilarity = intersection;\n\t\t\t \t\n\t\t\t \t// store result\n\t\t\t \trv.add(result);\n\t\t\t\t} catch (Exception ex) {}\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}",
"public Map<String, Photo> createGeoSimilarPhotoList(int maxCycles,\r\n\t\t\tboolean tagReq, boolean techTagReq) {\r\n\r\n\t\tMap<String, Photo> photoList = new HashMap<String, Photo>();\r\n\r\n\t\tpFet.getPanoramioGeoSimilarPhotoList(maxCycles, tagReq, techTagReq,\r\n\t\t\t\tphotoList);\r\n\r\n\t\tint panoPhotoReturend = photoList.size();\r\n\r\n\t\tMap<String, Photo> flickrPhotoList = fFet\r\n\t\t\t\t.getFlickrGeoSimilarPhotoList();\r\n\r\n\t\tint flickrPhotoReturend = flickrPhotoList.size();\r\n\r\n\t\tphotoList.putAll(flickrPhotoList);\r\n\r\n\t\ttotalNumberOfImages = flickrPhotoReturend + panoPhotoReturend;\r\n\r\n\t\treturn photoList;\r\n\t}",
"List<IbeisImage> uploadImages(List<File> images, File pathToTemporaryZipFile) throws\n UnsupportedImageFileTypeException, IOException, MalformedHttpRequestException, UnsuccessfulHttpRequestException;",
"public static ArrayList<Result> getColorHistogramSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.HISTOGRAM));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t// create result object\n\t\t \tResult result = new Result();\n\t\t \tresult.mFilename = imageName;\n\t\t \tresult.mSimilarity = intersection;\n\t\t \t\n\t\t \t// store result\n\t\t \trv.add(result);\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImagesByHandlerOrBuilder(\n int index);",
"private void loadAndCacheImages(Node node, FileContext cachedImageFilesystem) throws Exception\n {\n String imagePathBase = \"/\" + node.getTypeCode() + \"/\" + node.getNid();\n ImagesReponse imagesReponse = this.queryRemoteApi(ImagesReponse.class, imagePathBase + ImagesReponse.PATH, null);\n if (imagesReponse != null && imagesReponse.getNodes() != null && imagesReponse.getNodes().getNode() != null) {\n for (Image i : imagesReponse.getNodes().getNode()) {\n node.addImage(i);\n\n URI imageUri = UriBuilder.fromUri(Settings.instance().getTpAccessApiBaseUrl())\n .path(BASE_PATH)\n .path(imagePathBase + \"/image/\" + i.getData().mediaObjectId + \"/original\")\n .replaceQueryParam(ACCESS_TOKEN_PARAM, this.getAccessToken())\n .replaceQueryParam(FORMAT_PARAM, FORMAT_JSON)\n .build();\n\n ClientConfig config = new ClientConfig();\n Client httpClient = ClientBuilder.newClient(config);\n Response response = httpClient.target(imageUri).request().get();\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n org.apache.hadoop.fs.Path nodeImages = new org.apache.hadoop.fs.Path(HDFS_CACHE_ROOT_PATH + node.getNid());\n if (!cachedImageFilesystem.util().exists(nodeImages)) {\n cachedImageFilesystem.mkdir(nodeImages, FsPermission.getDirDefault(), true);\n }\n org.apache.hadoop.fs.Path cachedImage = new org.apache.hadoop.fs.Path(nodeImages, i.getData().mediaObjectId);\n i.setCachedUrl(cachedImage.toUri());\n if (!cachedImageFilesystem.util().exists(cachedImage)) {\n try (OutputStream os = cachedImageFilesystem.create(cachedImage, EnumSet.of(CreateFlag.CREATE, CreateFlag.OVERWRITE))) {\n IOUtils.copy(response.readEntity(InputStream.class), os);\n }\n }\n }\n else {\n throw new IOException(\"Error status returned while fetching remote API data;\" + response);\n }\n\n }\n }\n }",
"public void compareImageAction() {\n\t\tif (selectedAnimalModel == null) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (selectedAnimalModel.getId() == 0L || isImageChangedFlag) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tAsyncTask asyncTask = new AsyncTask() {\n\t\t\tAnimalModel animal1 = null;\n\t\t\tAnimalModel animal2 = null;\n\t\t\tAnimalModel animal3 = null;\n\n\t\t\t@Override\n\t\t\tprotected void onDone(boolean success) {\n\t\t\t\tif (!success) {\n\t\t\t\t\tshowDialog(ERROR_MESSAGE, \"Cannot compare images.\");\n\t\t\t\t} else {\n\t\t\t\t\tCompareImagesDialog dialog = new CompareImagesDialog(multimediaPanel, selectedAnimalModel, animal1, animal2, animal3);\n\t\t\t\t\tdialog.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected Boolean doInBackground() throws Exception {\n\t\t\t\ttry {\n\t\t\t\t\tArrayList<AnimalModel> models;\n\n\t\t\t\t\tmodels = DataManager.getInstance().getThreeSimilarImages(selectedAnimalModel);\n\n\t\t\t\t\tif (models.size() > 0) {\n\t\t\t\t\t\tanimal1 = models.get(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 1) {\n\t\t\t\t\t\tanimal2 = models.get(1);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 2) {\n\t\t\t\t\t\tanimal3 = models.get(2);\n\t\t\t\t\t}\n\n\t\t\t\t} catch (DataManagerException e1) {\n\t\t\t\t\tLogger.createLog(Logger.ERROR_LOG, e1.getMessage());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tasyncTask.start();\n\n\t}",
"private ArrayList<ImageItem> getData() {\n final ArrayList<ImageItem> imageItems = new ArrayList<>();\n // TypedArray imgs = getResources().obtainTypedArray(R.array.image_ids);\n for (int i = 0; i < f.size(); i++) {\n Bitmap bitmap = imageLoader.loadImageSync(\"file://\" + f.get(i));;\n imageItems.add(new ImageItem(bitmap, \"Image#\" + i));\n }\n return imageItems;\n }",
"static void redactImageFileColoredInfoTypes(String projectId, String inputPath, String outputPath)\n throws IOException {\n try (DlpServiceClient dlp = DlpServiceClient.create()) {\n // Specify the content to be redacted.\n ByteString fileBytes = ByteString.readFrom(new FileInputStream(inputPath));\n ByteContentItem byteItem =\n ByteContentItem.newBuilder().setType(BytesType.IMAGE_JPEG).setData(fileBytes).build();\n\n // Define types of info to redact associate each one with a different color.\n // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types\n ImageRedactionConfig ssnRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"US_SOCIAL_SECURITY_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(.3f).setGreen(.1f).setBlue(.6f).build())\n .build();\n ImageRedactionConfig emailRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"EMAIL_ADDRESS\").build())\n .setRedactionColor(Color.newBuilder().setRed(.5f).setGreen(.5f).setBlue(1).build())\n .build();\n ImageRedactionConfig phoneRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"PHONE_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(1).setGreen(0).setBlue(.6f).build())\n .build();\n\n // Create collection of all redact configurations.\n List<ImageRedactionConfig> imageRedactionConfigs =\n Arrays.asList(ssnRedactionConfig, emailRedactionConfig, phoneRedactionConfig);\n\n // List types of info to search for.\n InspectConfig config =\n InspectConfig.newBuilder()\n .addAllInfoTypes(\n imageRedactionConfigs.stream()\n .map(ImageRedactionConfig::getInfoType)\n .collect(Collectors.toList()))\n .build();\n\n // Construct the Redact request to be sent by the client.\n RedactImageRequest request =\n RedactImageRequest.newBuilder()\n .setParent(LocationName.of(projectId, \"global\").toString())\n .setByteItem(byteItem)\n .addAllImageRedactionConfigs(imageRedactionConfigs)\n .setInspectConfig(config)\n .build();\n\n // Use the client to send the API request.\n RedactImageResponse response = dlp.redactImage(request);\n\n // Parse the response and process results.\n FileOutputStream redacted = new FileOutputStream(outputPath);\n redacted.write(response.getRedactedImage().toByteArray());\n redacted.close();\n System.out.println(\"Redacted image written to \" + outputPath);\n }\n }",
"@GET\n @Path(\"image\")\n @Produces(MediaType.TEXT_PLAIN)\n public Response voidImage() {\n return Response.status(Response.Status.NOT_FOUND).build();\n }",
"public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }",
"public List<Image> parseBestOfImagesResult(Document doc) {\n\n ArrayList<Image> bestOfImages = new ArrayList<>();\n Elements htmlImages = doc.select(CSS_BEST_OF_IMAGE_QUERY);\n Timber.i(\"Best OfImages: %s\", htmlImages.toString());\n String href;\n Image bestOfImage;\n for (Element image : htmlImages) {\n href = image.attr(\"src\");\n Timber.i(\"Image src: %s\", href);\n bestOfImage = new Image(href);\n bestOfImages.add(bestOfImage);\n }\n return bestOfImages;\n }",
"public Observable<MatchResponseInner> matchMethodAsync(String listId, Boolean cacheImage) {\n return matchMethodWithServiceResponseAsync(listId, cacheImage).map(new Func1<ServiceResponse<MatchResponseInner>, MatchResponseInner>() {\n @Override\n public MatchResponseInner call(ServiceResponse<MatchResponseInner> response) {\n return response.body();\n }\n });\n }",
"public Observable<ServiceResponse<MatchResponseInner>> matchFileInputWithServiceResponseAsync(byte[] imageStream, String listId, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n if (imageStream == null) {\n throw new IllegalArgumentException(\"Parameter imageStream is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n RequestBody imageStreamConverted = RequestBody.create(MediaType.parse(\"image/gif\"), imageStream);\n return service.matchFileInput(listId, cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {\n @Override\n public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<MatchResponseInner> clientResponse = matchFileInputDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }",
"public ImageFiles() {\n\t\tthis.listOne = new ArrayList<String>();\n\t\tthis.listTwo = new ArrayList<String>();\n\t\tthis.listThree = new ArrayList<String>();\n\t\tthis.seenImages = new ArrayList<String>();\n\t\tthis.unseenImages = new ArrayList<String>();\n\t}",
"public interface SearchService {\n List<String> siftSearch(MultipartFile image) throws IOException;\n}",
"@ApiModelProperty(value = \"An image to give an indication of what to expect when renting this vehicle.\")\n public List<Image> getImages() {\n return images;\n }",
"private void getImagesFromDatabase() {\n try {\n mCursor = mDbAccess.getPuzzleImages();\n\n if (mCursor.moveToNext()) {\n for (int i = 0; i < mCursor.getCount(); i++) {\n String imagetitle = mCursor.getString(mCursor.getColumnIndex(\"imagetitle\"));\n String imageurl = mCursor.getString(mCursor.getColumnIndex(\"imageurl\"));\n mImageModel.add(new CustomImageModel(imagetitle, imageurl));\n mCursor.moveToNext();\n }\n } else {\n Toast.makeText(getActivity(), \"databse not created...\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }",
"public yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesResponse list(yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListMethod(), getCallOptions(), request);\n }",
"public boolean displayedDepartmentEmployeeImageMatch(List<String> names, List<String> images) {\n List<String> nonMatchingRecords = new ArrayList<>();\n for (int i = 0; i < names.size(); i++) {\n\n String imageSource = images.get(i).toLowerCase();\n String imageFileName = createImageName(names.get(i).toLowerCase());\n\n if (!imageSource.contains(imageFileName)) {\n nonMatchingRecords.add(names.get(i));\n }\n }\n if (nonMatchingRecords.size() > 0) {\n Reporter.log(\"FAILURE: Names of employees with non matching images\" +\n \" or inconsistently named imageFiles: \" +\n Arrays.toString(nonMatchingRecords.toArray()), true);\n return false;\n }\n return true;\n }",
"public Detections recognizeImage(Image image, int rotation) {\n\n Bitmap rgbFrameBitmap = Transform.convertYUVtoRGB(image);\n\n\n if (image.getFormat() != ImageFormat.YUV_420_888) {\n // unsupported image format\n Logger.addln(\"\\nWARN YoloHTTP.recognizeImage() unsupported image format\");\n return new Detections();\n }\n //return recognize(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkMaxAreaRectangle(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkNineBoxes(Transform.yuvBytes(image), image.getWidth(),image.getHeight(),rotation, rgbFrameBitmap,image.getHeight()/3,image.getWidth()/3,image.getHeight()/3,image.getWidth()/3);\n //return frameworkQuadrant(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n return frameworkMaxAreaRectBD(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n\n }",
"public List<Recognition> recognizeImage(Mat img) {\n frameToCropTransform =\n ImageUtil.getTransformationMatrix(\n img.cols(), img.rows(),\n cropSize, cropSize,\n 0, MAINTAIN_ASPECT);\n cropToFrameTransform = new Matrix();\n frameToCropTransform.invert(cropToFrameTransform);\n Bitmap tBM = Bitmap.createBitmap(img.cols(), img.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(img, tBM);\n return recognizeImage(tBM);\n }",
"public BufferedImage GetImage(String name) { return ImageList.get(name); }",
"public void setImage(int imageId) {\n this.imageId=imageId;\n\t}",
"public static Long getAValidImageId() {\n\t\tLong id = getAId();\n\t\tif (id == null) {\n\n\t\t\tImage img = new Image(\"http://dummy.com/img.jpg\", (long)(Math.random()*10000), \"Description\", \"keyword\", new Date(0001L));\n\t\t\tIImageStore imageStore = StoreFactory.getImageStore();\n\t\t\timageStore.insert(img);\n\n\t\t\tid = getAId();\n\t\t\tif (id == null) {\n\t\t\t\tthrow new RuntimeException(\"There are no images in DB, and I can't insert one. Cannot run tests without.\");\n\t\t\t}\n\t\t}\n\t\treturn id;\n\t}",
"public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}",
"@GetMapping(path = \"/images\", produces = \"application/json; charset=UTF-8\")\n public @ResponseBody ArrayNode getImageList() {\n final ArrayNode nodes = mapper.createArrayNode();\n for (final Image image : imageRepository.findAllPublic())\n try {\n nodes.add(mapper.readTree(image.toString()));\n } catch (final JsonProcessingException e) {\n e.printStackTrace();\n }\n return nodes;\n }",
"String getItemImage();",
"java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByTransformOrBuilderList();",
"protected abstract void setupImages(Context context);",
"public AugmentedImageNode(Context context, String[] imageList, Integer augmentedImageIndex) {\n\n // we check if sushi is null\n // sushi is used in order to check if the renderables are null\n // because the renderables are built using the same block of code all at once, if sushi (or any other completable future) is null,\n // then they all are null\n if (sushi == null) {\n\n if (!(AugmentedImageFragment.imagePlaysVideoBooleanList[augmentedImageIndex])) {\n currentRenderable = renderableList.get(augmentedImageIndex);\n currentRenderable =\n // build the renderable using the image that is detected\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/\" + imageList[augmentedImageIndex] + \".sfb\"))\n .build();\n Log.d(\"modelrenderable\", (\"conditional is running! filepath: \" + Uri.parse(\"models/\" + imageList[augmentedImageIndex] + \".sfb\")));\n\n } else {\n\n frame_ul =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_upper_left.sfb\"))\n .build();\n Log.d(\"running\", (\"running\"));\n frame_ur =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_upper_right.sfb\"))\n .build();\n frame_ll =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_lower_left.sfb\"))\n .build();\n frame_lr =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_lower_right.sfb\"))\n .build();\n\n }\n\n\n }\n\n // Checks if videoRenderable is null, if it is, videoRenderable is loaded from models.\n // Will be used as the thing that the video is placed on.\n if (AugmentedImageActivity.videoRenderable == null) {\n AugmentedImageActivity.videoRenderable =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/chroma_key_video.sfb\"))\n .build();\n }\n }"
]
| [
"0.6268177",
"0.5889108",
"0.57670414",
"0.57589924",
"0.57436514",
"0.5731581",
"0.5511194",
"0.5501659",
"0.550006",
"0.5452095",
"0.53226525",
"0.525605",
"0.5253426",
"0.5196022",
"0.51808035",
"0.5179484",
"0.516819",
"0.5141495",
"0.51305956",
"0.51303494",
"0.512022",
"0.5114837",
"0.5085196",
"0.50661075",
"0.5051815",
"0.5051217",
"0.50302094",
"0.502194",
"0.5019136",
"0.50189114",
"0.50175506",
"0.49923682",
"0.49802214",
"0.4977202",
"0.49740383",
"0.4962518",
"0.49486563",
"0.49302784",
"0.49177086",
"0.49086106",
"0.490474",
"0.4900562",
"0.49002978",
"0.487019",
"0.4868976",
"0.4867385",
"0.48648655",
"0.48331422",
"0.4825292",
"0.48212713",
"0.4812381",
"0.48099214",
"0.47965372",
"0.4787633",
"0.47812676",
"0.477861",
"0.4768132",
"0.4766136",
"0.4763595",
"0.47626832",
"0.47560656",
"0.47553316",
"0.475151",
"0.47421148",
"0.47407493",
"0.4739602",
"0.4738623",
"0.47357088",
"0.47315642",
"0.47315082",
"0.47211283",
"0.47166783",
"0.47096226",
"0.47077644",
"0.47077018",
"0.4707549",
"0.469874",
"0.46948472",
"0.4687398",
"0.46773568",
"0.46640363",
"0.46639773",
"0.46639344",
"0.46632206",
"0.4662197",
"0.46473208",
"0.46431518",
"0.4641886",
"0.4637323",
"0.4635154",
"0.46329367",
"0.46304187",
"0.46277556",
"0.4621483",
"0.46211785",
"0.46151412",
"0.46061975",
"0.46035555",
"0.46011278",
"0.45994547",
"0.4583557"
]
| 0.0 | -1 |
Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using this API. Returns ID and tags of matching image. Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. | public Observable<ServiceResponse<MatchResponseInner>> matchUrlInputWithServiceResponseAsync(String contentType, BodyModelInner imageUrl) {
if (this.client.baseUrl() == null) {
throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null.");
}
if (contentType == null) {
throw new IllegalArgumentException("Parameter contentType is required and cannot be null.");
}
if (imageUrl == null) {
throw new IllegalArgumentException("Parameter imageUrl is required and cannot be null.");
}
Validator.validate(imageUrl);
final String listId = null;
final Boolean cacheImage = null;
String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl());
return service.matchUrlInput(listId, cacheImage, contentType, imageUrl, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {
@Override
public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<MatchResponseInner> clientResponse = matchUrlInputDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int match(ArrayList<ImageCell> images);",
"ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);",
"private void searchImage(String text){\n\n // Set toolbar title as query string\n toolbar.setTitle(text);\n\n Map<String, String> options = setSearchOptions(text, Constants.NEW_SEARCH);\n Call<SearchResponse> call = service.searchPhoto(options);\n\n call.enqueue(new Callback<SearchResponse>() {\n @Override\n public void onResponse(Response<SearchResponse> response, Retrofit retrofit) {\n SearchResponse result = response.body();\n if (result.getStat().equals(\"ok\")) {\n // Status is ok, add result to photo list\n if (photoList != null) {\n photoList.clear();\n photoList.addAll(result.getPhotos().getPhoto());\n imageAdapter.notifyDataSetChanged();\n pageCount = 2;\n }\n\n } else {\n // Display error if something wrong with result\n Toast.makeText(context, result.getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Display error here since request failed\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }\n });\n }",
"@ApiOperation(value = \"Return images matching supplied digest found in supplied repository\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in supplied repository with supplied digest\") })\n\t// Pass in digest only in specific registry, get images and tags back that match\n\t@RequestMapping(path = \"/{registry}/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAndRegistry(@PathVariable String registry,\n\t\t\t@PathVariable String id) {\n\t\tRegistryConnection localConnection;\n\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\ttry {\n\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(registry));\n\n\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t// Get all tags from specific repo\n\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\timage.setRegistryName(registry);\n\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\timages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Iterate through images and only add to new list, what digests are identical\n\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\tfor (DockerImageData image : images) {\n\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from \" + registry + \" matching image id \" + id,\n\t\t\t\t\tmatchingImages);\n\t\t} catch (RegistryNotFoundException e) {\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\"Failed to find Registry\");\n\t\t}\n\t}",
"public List<Result> recognize(IplImage image);",
"@SuppressWarnings({ \"unchecked\", \"null\" })\n public List<String> calcSimilarity(String imgPath) {\n\n FileInputStream imageFile;\n double minDistance = Double.MAX_VALUE;\n\n // 返回查询结果\n List<String> matchUrls = new ArrayList<String>();\n\n\n try {\n\n imageFile = new FileInputStream(imgPath);\n BufferedImage bufferImage;\n\n bufferImage = ImageIO.read(imageFile);\n LTxXORP.setRotaIvaPats();//设定旋转模式值\n\n //得到图片的纹理一维数组特征向量(各颜色分量频率(统计量))\n double[] lbpSourceFecture = LTxXORP.getLBPFeature(imgPath);\n\n // 提取数据库数据\n List<Object> list = DBHelper.fetchALLCloth();\n\n // long startTime = System.currentTimeMillis();\n\n // 把每个条数据的路径和最短距离特征提取出来并存储在lbpResultMap的键值对中。\n Map<String, Double> lbpResultMap = new HashMap<String, Double>();\n\n for (int i = 0; i < list.size(); i++) {\n\n Map<String, Object> map = (Map<String, Object>) list.get(i);\n\n Object candidatePath = map.get(\"path\");\n Object candidateLBP = map.get(\"lbpFeature\");\n\n // 从快速搜索中选取TOP N结果,继续进行纹理特征匹配\n //获取当前由颜色匹配相似度排序的结果并提取其LBP纹理特征\n\n double[] lbpTargetFeature = MatchUtil.jsonToArr((String) candidateLBP);\n double lbpDistance = textureStrategy.similarity(lbpTargetFeature, lbpSourceFecture);\n lbpResultMap.put((String) candidatePath, lbpDistance);\n\n // 判断衡量标准选取距离还是相似度\n if (lbpDistance < minDistance)\n minDistance = lbpDistance;\n\n }\n\n Map<String, Double> tempResultMap;\n\n System.out.println(\"Min Distance : \" + (float) minDistance);\n\n\n\n System.out.println(\"============== finish Texture =================\");\n\n Map<String, Double> finalResult = MatchUtil.sortByValueAsc(lbpResultMap);\n\n int counter = 0;\n for (Map.Entry<String, Double> map : finalResult.entrySet()) {\n if (counter >= Config.finalResultNumber)\n break;\n //matchUrls截取只存储finalResultNumber数量的查询结果\n matchUrls.add(map.getKey());\n counter ++;\n double TSimilarity=Math.pow(Math.E,-map.getValue());\n System.out.println(TSimilarity + \" 图片路径 \" + map.getKey());\n\n }\n\n System.out.println();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return matchUrls;\n }",
"public interface ImageSearchService {\n\n /**\n * Register an image into the search instance.\n *\n * @param imageData Image data in JPEG or PNG format.\n * @param imageType Image format.\n * @param uuid Unique identifier of the image.\n */\n void register(byte[] imageData, ObjectImageType imageType, String uuid);\n\n /**\n * Un-register an image from the search instance.\n *\n * @param uuid Unique identifier of the image.\n */\n void unregister(String uuid);\n\n /**\n * Find all images similar to the given one.\n *\n * @param imageData Image to match with registered ones in the search instance.\n * @param objectRegion object region to search.\n * @return Found images UUIDs and raw response.\n */\n ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);\n\n /**\n * Check the image search configuration is correct by making a fake search request.\n *\n * @param configuration Configuration to check.\n */\n void checkImageSearchConfiguration(Configuration configuration) throws InvalidConfigurationException;\n}",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByHandler(int index);",
"@ApiOperation(value = \"Return all images matching supplied digest in all configured registries\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in configured registries with supplied digest\") })\n\t// Pass in only digest, get images and tags back that much from all repos\n\t@RequestMapping(path = \"/registries/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAllRegistries(@PathVariable String id) {\n\t\t\t\tRegistryConnection localConnection;\n\t\t\t\t// List persists outside all registries\n\t\t\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\t\t\tList<RegistryItem> items = configs.getItems();\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\t// For each configured registry\n\t\t\t\t\tfor(RegistryItem item : items) {\n\t\t\t\t\t\t// Get connection to registry\n\t\t\t\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(item.getRegistryLabel()));\n\t\t\t\t\t\t\n\t\t\t\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\t\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t\t\t\t// Get all tags from specific repo\n\t\t\t\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\t\t\t\timage.setRegistryName(item.getRegistryLabel());\n\t\t\t\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\t\t\t\timages.add(image);\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// Iterate through images and only add to new list, what digests are identical\n\t\t\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\t\t\tfor (DockerImageData image : images) {\n\t\t\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from all configured registries \",\n\t\t\t\t\t\t\tmatchingImages);\n\t\t\t\t} catch (RegistryNotFoundException e) {\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\t\t\"Failed to find Registry\");\n\t\t\t\t}\n\t}",
"Receta getByIdWithImages(long id);",
"public int displayRandomImage() {\n\n int randomImageIndex;\n\n do\n { // making sure that the same images aren't repeated & images of the same car makes aren't shown together\n\n randomCarMake = allCarMakes[getRandomBreed()]; // get a random breed\n randomImageIndex = getRandomImage(); // get a random image of a particular breed\n\n randomImageOfChosenCarMake = displayRelevantImage(randomCarMake, randomImageIndex);\n\n } while (displayingCarMakes.contains(randomCarMake) || allDisplayedImages.contains(randomImageOfChosenCarMake));\n\n allDisplayedImages.add(randomImageOfChosenCarMake); // to make sure that the image isn't repeated\n displayingCarMakes.add(randomCarMake); // to make sure that images of the same breed aren't shown at once\n displayingImageIndexes.add(randomImageIndex); // to recall indexes when the device is rotated\n\n // return chosen random image\n return getResources().getIdentifier(randomImageOfChosenCarMake, \"drawable\", \"com.example.car_match_game_app\");\n }",
"@GET\n @Path(\"{factoryId}/image\")\n @Produces(\"image/*\")\n public Response getImage(@PathParam(\"factoryId\") String factoryId, @DefaultValue(\"\") @QueryParam(\"imgId\") String imageId)\n throws FactoryUrlException {\n Set<FactoryImage> factoryImages = factoryStore.getFactoryImages(factoryId, null);\n if (factoryImages == null) {\n LOG.warn(\"Factory URL with id {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Factory URL with id \" + factoryId + \" is not found.\");\n }\n if (imageId.isEmpty()) {\n if (factoryImages.size() > 0) {\n FactoryImage image = factoryImages.iterator().next();\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n } else {\n LOG.warn(\"Default image for factory {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(),\n \"Default image for factory \" + factoryId + \" is not found.\");\n }\n } else {\n for (FactoryImage image : factoryImages) {\n if (image.getName().equals(imageId)) {\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n }\n }\n }\n LOG.warn(\"Image with id {} is not found.\", imageId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Image with id \" + imageId + \" is not found.\");\n }",
"public void findGeoSurfSimilarPhotosWithTagStatistics(\r\n\t\t\tfinal Set<String> allCandidateWords,\r\n\t\t\tfinal Map<String, WordImage> relevantWordImages, boolean tagReq,\r\n\t\t\tboolean techTagReq, boolean compact) {\r\n\r\n\t\ttopImagesURLs = new HashMap<String, Double>();\r\n\t\ttopImagesNames = new HashMap<String, String>();\r\n\t\t// The list of all Photo objects\r\n\t\tphotoList = new HashMap<String, Photo>();\r\n\t\tphotoList = createGeoSimilarPhotoList(PANORAMIO_DEFUALT_NUM_ITERATIONS, tagReq,\r\n\t\t\t\ttechTagReq);\r\n\r\n\t\t// Word Image Relevance Dictionary\r\n\t\t// The statistics consider for each word the set of images annotated\r\n\t\t// with them and similar\r\n\t\t// to the input image and the those which are tagged with it and not\r\n\t\t// similar to the input image\r\n\t\t// Map<String, WordImage> relevantWordImages = new HashMap<String,\r\n\t\t// WordImage>();\r\n\r\n\t\t// Prepare the result output\r\n\r\n\t\tif (!compact) {\r\n\t\t\toutRel.println(\"Image URL , Score , Distance , Point Similarity, Common Keypoints , Iter Point Similariy, Title , Tags , distance, userid\");\r\n\t\t\t// An CSV file for the set of visually irrelevant images\r\n\t\t\toutIrrRel.println(\"Image URL , Title , Tags , distance, userid\");\r\n\t\t}\r\n\r\n\t\t// *** Extract SURF feature for the input image\r\n\r\n\t\tSurfMatcher surfMatcher = new SurfMatcher();\r\n\t\t// The SURF feature of the input image\r\n\t\tList<InterestPoint> ipts1 = surfMatcher.extractKeypoints(inputImageURL,\r\n\t\t\t\tsurfMatcher.p1);\r\n\r\n\t\t// inputImageInterstPoints = ipts1 ;\r\n\r\n\t\t// Add the photo with its interestpoint to the cache\r\n\t\t// this.photoInterestPoints.put(imageName, ipts1);\r\n\r\n\t\t// Find SURF correspondences in the geo-related images\r\n\t\ttotalNumberOfSimilarImages = 0; // R\r\n\r\n\t\tfor (String photoId : photoList.keySet()) {\r\n\r\n\t\t\tPhoto photo = photoList.get(photoId);\r\n\r\n\t\r\n\r\n\t\t\tString toMatchedPhotoURL = photo.getPhotoFileUrl();\r\n\t\t\t// The SURF feature of a geo close image\r\n\t\t\tList<InterestPoint> ipts2 = surfMatcher.extractKeypoints(\r\n\t\t\t\t\ttoMatchedPhotoURL, surfMatcher.p2);\r\n\r\n\t\t\t// this.photoInterestPoints.put(photo.getPhotoId(), ipts2);\r\n\t\t\t// this.cachedImageInterstPoint.put(photo.getPhotoId(), ipts2);\r\n\r\n\t\t\tMatchingResult surfResult = null;\r\n\r\n\t\t\tsurfResult = surfMatcher.matchKeypoints(inputImageURL, photoId,\r\n\t\t\t\t\tipts1, ipts2, MIN_COMMON_IP_COUNT);\r\n\r\n\t\t\tif (surfResult != null) { // the images are visually similar\r\n\r\n\t\t\t\ttopImagesURLs.put(toMatchedPhotoURL,\r\n\t\t\t\t\t\tsurfResult.getPiontSimilarity());\r\n\r\n\t\t\t\ttopImagesNames.put(toMatchedPhotoURL, photo.getPhotoId());\r\n\r\n\t\t\t\ttotalNumberOfSimilarImages += 1;\r\n\t\t\t\tif (!compact) {\r\n\r\n\t\t\t\t\toutRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getScore()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getAvgDistance()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getPiontSimilarity()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getCommonKeyPointsCount()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ \"null ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\tSystem.out.println(\"Downloading Similar Image\");\r\n\t\t\t\t\tString destFileName = similarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Generate Word Statistics\r\n\t\t\t\t// For the a certain word (tag) add image info to its list if\r\n\t\t\t\t// this image\r\n\t\t\t\t// is visually similar to the input image\r\n\t\t\t\tupdateWordRelatedImageList(allCandidateWords,\r\n\t\t\t\t\t\trelevantWordImages, photo, surfResult);\r\n\t\t\t} else {\r\n\r\n\t\t\t\tif (!compact) {\r\n\t\t\t\t\t// Images are visually not similar\r\n\t\t\t\t\toutIrrRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \" ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t// We also need to get some information if a certain word is\r\n\t\t\t\t\t// also used by visually not similar images\r\n\t\t\t\t\tSystem.out.println(\"Downloading Non Similar Image\");\r\n\t\t\t\t\tString destFileName = dissimilarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tupdateWordNotRelatedImageList(relevantWordImages, photo);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByHandlerList();",
"@GET(\"/tags/{query}/media/recent\" + CLIENT_ID)\n public void searchPhotos(@Path(\"query\") String query, Callback<WebResponse<ArrayList<InstagramPhoto>>> callback);",
"List<Bitmap> getFavoriteRecipeImgs();",
"private void processImages() throws MalformedURLException, IOException {\r\n\r\n\t\tNodeFilter imageFilter = new NodeClassFilter(ImageTag.class);\r\n\t\timageList = fullList.extractAllNodesThatMatch(imageFilter, true);\r\n\t\tthePageImages = new HashMap<String, byte[]>();\r\n\r\n\t\tfor (SimpleNodeIterator nodeIter = imageList.elements(); nodeIter\r\n\t\t\t\t.hasMoreNodes();) {\r\n\t\t\tImageTag tempNode = (ImageTag) nodeIter.nextNode();\r\n\t\t\tString tagText = tempNode.getText();\r\n\r\n\t\t\t// Populate imageUrlText String\r\n\t\t\tString imageUrlText = tempNode.getImageURL();\r\n\r\n\t\t\tif (imageUrlText != \"\") {\r\n\t\t\t\t// Print to console, to verify relative link processing\r\n\t\t\t\tSystem.out.println(\"ImageUrl to Retrieve:\" + imageUrlText);\r\n\r\n\t\t\t\tbyte[] imgArray = downloadBinaryData(imageUrlText);\r\n\r\n\t\t\t\tthePageImages.put(tagText, imgArray);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"@Override\n public FlickrResponse searchPhoto(String tags) throws IOException {\n return flickrService.searchPhoto(tags);\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByTransform(int index);",
"public void getImageResults(String tag){\n showProgressBar(true);\n HttpClient.get(\"rest/\", getRequestParams(tag), new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n String response = new String(responseBody, StandardCharsets.UTF_8);\n response = StringUtils.replace(response, \"jsonFlickrApi(\", \"\");\n response = StringUtils.removeEnd(response, \")\");\n Log.d(\"SERVICE RESPONSE\", response);\n Gson gson = new Gson();\n FlickrSearchResponse jsonResponse = gson.fromJson(response, FlickrSearchResponse.class);\n if(jsonResponse.getStat().equals(\"fail\")){\n //api returned an error\n searchHelperListener.onErrorResponseReceived(jsonResponse.getMessage());\n } else {\n //api returned data\n searchHelperListener.onSuccessResponseReceived(jsonResponse);\n }\n showProgressBar(false);\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n Log.d(\"SERVICE FAILURE\", error.getMessage());\n searchHelperListener.onErrorResponseReceived(error.getMessage());\n showProgressBar(false);\n }\n });\n\n }",
"public EC2DescribeImagesResponse describeImages(EC2DescribeImages request) {\n EC2DescribeImagesResponse images = new EC2DescribeImagesResponse();\n try {\n String[] templateIds = request.getImageSet();\n EC2ImageFilterSet ifs = request.getFilterSet();\n\n if (templateIds.length == 0) {\n images = listTemplates(null, images);\n } else {\n for (String s : templateIds) {\n images = listTemplates(s, images);\n }\n }\n if (ifs != null)\n return ifs.evaluate(images);\n } catch (Exception e) {\n logger.error(\"EC2 DescribeImages - \", e);\n handleException(e);\n }\n return images;\n }",
"GetImagesResult getImages(GetImagesRequest getImagesRequest);",
"int seachImage(Image img) {\r\n\t\treturn 1;\r\n\t}",
"public void searchImages(View view) {\n imageList.clear();\n adapter.clear();\n Log.d(\"DEBUG\", \"Search Images\");\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n Log.d(\"DEBUG\", getUrl(1).toString());\n retrieveImages(getUrl(1).toString());\n }",
"java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByTransformList();",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform();",
"FetchedImage getFujimiyaUrl(String query,int maxRankOfResult){\n try{\n //Get SearchResult\n Search search = getSearchResult(query, maxRankOfResult);\n List<Result> items = search.getItems();\n for(Result result: items){\n int i = items.indexOf(result);\n logger.log(Level.INFO,\"query: \" + query + \" URL: \"+result.getLink());\n logger.log(Level.INFO,\"page URL: \"+result.getImage().getContextLink());\n if(result.getImage().getWidth()+result.getImage().getHeight()<600){\n logger.log(Level.INFO,\"Result No.\"+i+\" is too small image. next.\");\n continue;\n }\n if(DBConnection.isInBlackList(result.getLink())){\n logger.log(Level.INFO,\"Result No.\"+i+\" is included in the blacklist. next.\");\n continue;\n }\n HttpURLConnection connection = (HttpURLConnection)(new URL(result.getLink())).openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setInstanceFollowRedirects(false);\n connection.connect();\n if(connection.getResponseCode()==200){\n return new FetchedImage(connection.getInputStream(),result.getLink());\n }else{\n logger.log(Level.INFO,\"Result No.\"+i+\" occurs error while fetching the image. next.\");\n continue;\n }\n }\n //If execution comes here, connection has failed 10 times.\n throw new ConnectException(\"Connection failed 10 times\");\n\n } catch (IOException e) {\n // TODO Auto-generated catch block\n logger.log(Level.SEVERE,e.toString());\n e.printStackTrace();\n }\n return null;\n}",
"void loadImages(int id_image, HouseRepository.GetImageFromHouseCallback callback);",
"@Override\n\tpublic String imageSearch(QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(IData.URL_SEARCH + param.toString());\n\t}",
"private void onImagePicked(@NonNull final byte[] imageBytes) {\n setBusy(true);\n\n // Make sure we don't show a list of old concepts while the image is being uploaded\n adapter.setData(Collections.<Concept>emptyList());\n\n new AsyncTask<Void, Void, ClarifaiResponse<List<ClarifaiOutput<Concept>>>>() {\n @Override protected ClarifaiResponse<List<ClarifaiOutput<Concept>>> doInBackground(Void... params) {\n // The default Clarifai model that identifies concepts in images\n final ConceptModel generalModel = App.get().clarifaiClient().getDefaultModels().foodModel();\n\n // Use this model to predict, with the image that the user just selected as the input\n return generalModel.predict()\n .withInputs(ClarifaiInput.forImage(ClarifaiImage.of(imageBytes)))\n .executeSync();\n }\n\n @Override protected void onPostExecute(ClarifaiResponse<List<ClarifaiOutput<Concept>>> response) {\n setBusy(false);\n if (!response.isSuccessful()) {\n showErrorSnackbar(R.string.error_while_contacting_api);\n return;\n }\n final List<ClarifaiOutput<Concept>> predictions = response.get();\n if (predictions.isEmpty()) {\n showErrorSnackbar(R.string.no_results_from_api);\n return;\n }\n adapter.setData(predictions.get(0).data());\n\n // INSERT METHOD FOR USER SELECTION OF FOOD\n\n // ADDED FOR DATABASE\n try {\n readCSVToMap(\"ABBREV_2.txt\");\n }\n catch (Exception e){\n Log.d(\"Failure\", \"CSV not read into database\");\n }\n String exampleResult = predictions.get(0).data().get(0).name();\n final List<String> list = listOfKeys(exampleResult);\n\n // change this line to take in user input\n final String key2 = list.get(0); // arbitrary selection of key\n\n final List<String> val = db.get(key2);\n final String message = String.valueOf(val.get(6)); //index 6 contains carb info\n Log.d(\"Output\", message);\n imageView.setImageBitmap(BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.length));\n }\n\n private void showErrorSnackbar(@StringRes int errorString) {\n Snackbar.make(\n root,\n errorString,\n Snackbar.LENGTH_INDEFINITE\n ).show();\n }\n }.execute();\n }",
"private void imageSearch(ArrayList<Html> src) {\n // loop through the Html objects\n for(Html page : src) {\n\n // Temp List for improved readability\n ArrayList<Image> images = page.getImages();\n\n // loop through the corresponding images\n for(Image i : images) {\n if(i.getName().equals(this.fileName)) {\n this.numPagesDisplayed++;\n this.pageList.add(page.getLocalPath());\n }\n }\n }\n }",
"@Override\n\tpublic String imageLists(String url, QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(url + param.toString());\n\t}",
"@Override\n\tpublic List<PersonalisationMediaModel> getImageByID(final String imageID)\n\t{\n\t\tfinal String query1 = \"Select {pk} from {PersonalisationMedia} Where {code}=?imageId and {user}=?user\";\n\t\t/**\n\t\t * select distinct {val:pk} from {PersonalisationMediaModel as val join MediaModel as media on\n\t\t * {media:PK}={val.image} join User as user on {user:pk}={val:user} and {media:code}=?imageId and {user:pk}=?user}\n\t\t */\n\t\tfinal UserModel user = getUserService().getCurrentUser();\n\t\tfinal FlexibleSearchQuery fQuery = new FlexibleSearchQuery(query1);\n\t\tfinal Map<String, Object> params = new HashMap<>();\n\t\tparams.put(\"imageId\", imageID);\n\t\tparams.put(\"user\", user);\n\t\tfQuery.addQueryParameters(params);\n\t\tLOG.info(\"getImageByID\" + fQuery);\n\t\tfinal SearchResult<PersonalisationMediaModel> searchResult = flexibleSearchService.search(fQuery);\n\t\treturn searchResult.getResult();\n\t}",
"public void findImages() {\n \t\tthis.mNoteItemModel.findImages(this.mNoteItemModel.getContent());\n \t}",
"public void notifyFinishGetSimilarArtist(ArtistInfo a, Image img, long id);",
"private void imgDetected(Matcher matcher) {\n String component;\n matcher.reset();\n\n // store src value if <img> exist\n while (matcher.find()) {\n Data.imagesSrc.add(matcher.group(1));\n }\n\n // separate if the paragraph contain img\n // replace <img> with -+-img-+- to indicate image position in the text\n component = matcher.replaceAll(\"-+-img-+-\");\n\n //split the delimiter to structure image position\n String[] imageStructure = component.split(\"-\\\\+-\");\n\n // start looping the structured text\n int imageFoundIndex = 0;\n for (String structure : imageStructure) {\n // continue if the current index is not empty string \"\"\n if (!structure.trim().equals(\"\")) {\n // create ImageView if current index value equeal to \"img\"\n if (structure.trim().equals(\"img\")) {\n createImageView();\n imageFoundIndex++;\n } else {\n // else create textView for the text\n generateView(structure);\n }\n }\n }\n }",
"List<IbeisImage> uploadImages(List<File> images) throws UnsupportedImageFileTypeException, IOException,\n MalformedHttpRequestException, UnsuccessfulHttpRequestException;",
"public DetectorMatchResponse findMatchingDetectorMappings(List<Map<String, String>> tagsList) {\n isTrue(tagsList.size() > 0, \"tagsList must not be empty\");\n\n val uri = baseUri + API_PATH_MATCHING_DETECTOR_BY_TAGS;\n Content content;\n try {\n String body = objectMapper.writeValueAsString(tagsList);\n content = httpClient.post(uri, body);\n } catch (IOException e) {\n val message = \"IOException while getting matching detectors for\" +\n \": tags=\" + tagsList +\n \", httpMethod=POST\" +\n \", uri=\" + uri;\n throw new DetectorMappingRetrievalException(message, e);\n }\n try {\n return objectMapper.readValue(content.asBytes(), DetectorMatchResponse.class);\n } catch (IOException e) {\n val message = \"IOException while deserializing detectorMatchResponse\" +\n \": tags=\" + tagsList;\n throw new DetectorMappingDeserializationException(message, e);\n }\n\n }",
"public Observable<ServiceResponse<MatchResponseInner>> matchMethodWithServiceResponseAsync(String listId, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.matchMethod(listId, cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {\n @Override\n public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<MatchResponseInner> clientResponse = matchMethodDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }",
"List<Bitmap> getRecipeImgSmall();",
"private void getImagesFromServer() {\n trObtainAllPetImages.setUser(user);\n trObtainAllPetImages.execute();\n Map<String, byte[]> petImages = trObtainAllPetImages.getResult();\n Set<String> names = petImages.keySet();\n\n for (String petName : names) {\n byte[] bytes = petImages.get(petName);\n Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, Objects.requireNonNull(bytes).length);\n int index = user.getPets().indexOf(new Pet(petName));\n user.getPets().get(index).setProfileImage(bitmap);\n ImageManager.writeImage(ImageManager.PET_PROFILE_IMAGES_PATH, user.getUsername() + '_' + petName, bytes);\n }\n }",
"private static final byte[] xfuzzy_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -95, 0, 0, -1,\n\t\t\t\t-1, -1, -82, 69, 12, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77,\n\t\t\t\t97, 100, 101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0,\n\t\t\t\t33, -7, 4, 1, 10, 0, 0, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 2,\n\t\t\t\t36, -124, -113, -87, -101, -31, -33, 32, 120, 97, 57, 68, -93,\n\t\t\t\t-54, -26, 90, -24, 49, 84, -59, 116, -100, 88, -99, -102, 25,\n\t\t\t\t30, -19, 36, -103, -97, -89, -62, 117, -119, 51, 5, 0, 59 };\n\t\treturn data;\n\t}",
"public RatingSearch explode() {\n Elements elements = doc.getElementsByTag(\"table\");\n IqdbMatch bestMatch = null;\n List<IqdbMatch> additionalMatches = new LinkedList<>();\n for (int i = 1; i < elements.size(); i++) {\n //iterating through all the table elements. First one is your uploaded image\n\n //Each table is one \"card\" on iqdb so only the second one will be the \"best match\"\n Element element = elements.get(i);\n IqdbElement iqdbElement = new IqdbElement(element);\n\n Elements noMatch = element.getElementsContainingText(\"No relevant matches\");\n if (noMatch.size() > 0) {\n log.warn(\"There was no relevant match for this document\");\n// break;\n return null;\n }\n// TODO I don't think we can determine if these are even relevant. So once we see 'No relevent matches' we can\n// just call it there. We won't need 'Possible Match' yet\n// Elements possibleMatchElement = element.getElementsContainingText(\"Possible match\");\n// if (possibleMatchElement.size() > 0) {\n// additionalMatches.add(iqdbElement.explode(IqdbMatchType.NO_RELEVANT_BUT_POSSIBLE));\n// }\n\n //Second element will provide all the information you need. going into the similarity and all that is a waste of time\n //Use the similarity search for Best Match to identify the element that is best match if you don't trust the 2nd.\n Elements bestMatchElement = element.getElementsContainingText(\"Best Match\");\n if (bestMatchElement.size() > 0) {\n bestMatch = iqdbElement.explode(IqdbMatchType.BEST);\n }\n\n //can similarly search for \"Additional match\" to find all teh additional matches. Anything beyond additional matches is a waste of time.\n Elements additionalMatchElements = element.getElementsContainingText(\"Additional match\");\n if (additionalMatchElements.size() > 0) {\n additionalMatches.add(iqdbElement.explode(IqdbMatchType.ADDITIONAL));\n }\n }\n\n if (bestMatch == null && !additionalMatches.isEmpty()) {\n log.warn(\"No Best Match found, taking first additionalMatch, does this ever happen?\");\n bestMatch = additionalMatches.remove(0);\n }\n\n return null;//new RatingSearch(bestMatch, additionalMatches);\n }",
"public static SearchResult getChampionImage(String championList, String championID) {\n try {\r\n JSONObject holder = new JSONObject(championList);\r\n JSONObject holderItems = holder.getJSONObject(\"data\");\r\n SearchResult champion = new SearchResult();\r\n\r\n for (Iterator<String> it = holderItems.keys(); it.hasNext(); ) { //iterate through champion json objects\r\n String key = it.next();\r\n JSONObject resultItem = holderItems.getJSONObject(key);\r\n\r\n if (resultItem.getString(\"key\").equals(championID)) {\r\n champion.championName = key; //the key for the json object is also the name of the champion\r\n break;\r\n }\r\n }\r\n\r\n String tempName = champion.championName + \".png\"; //construct string for champion image\r\n\r\n champion.championImage = Uri.parse(BASE_URL_CHAMPION_IMAGE + tempName).buildUpon().build().toString();\r\n\r\n return champion;\r\n } catch (JSONException e) {\r\n System.out.println(e);\r\n return null;\r\n }\r\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByHandlerOrBuilder();",
"private EC2DescribeImagesResponse listTemplates(String templateId, EC2DescribeImagesResponse images) throws Exception {\n try {\n List<CloudStackTemplate> result = new ArrayList<CloudStackTemplate>();\n\n if (templateId != null) {\n List<CloudStackTemplate> template = getApi().listTemplates(\"executable\", null, null, null, templateId, null, null, null);\n if (template != null) {\n result.addAll(template);\n }\n } else {\n List<CloudStackTemplate> selfExecutable = getApi().listTemplates(\"selfexecutable\", null, null, null, null, null, null, null);\n if (selfExecutable != null) {\n result.addAll(selfExecutable);\n }\n\n List<CloudStackTemplate> featured = getApi().listTemplates(\"featured\", null, null, null, null, null, null, null);\n if (featured != null) {\n result.addAll(featured);\n }\n\n List<CloudStackTemplate> sharedExecutable = getApi().listTemplates(\"sharedexecutable\", null, null, null, null, null, null, null);\n if (sharedExecutable != null) {\n result.addAll(sharedExecutable);\n }\n\n List<CloudStackTemplate> community = getApi().listTemplates(\"community\", null, null, null, null, null, null, null);\n if (community != null) {\n result.addAll(community);\n }\n }\n\n if (result != null && result.size() > 0) {\n for (CloudStackTemplate temp : result) {\n EC2Image ec2Image = new EC2Image();\n ec2Image.setId(temp.getId().toString());\n ec2Image.setAccountName(temp.getAccount());\n ec2Image.setName(temp.getName());\n ec2Image.setDescription(temp.getDisplayText());\n ec2Image.setOsTypeId(temp.getOsTypeId().toString());\n ec2Image.setIsPublic(temp.getIsPublic());\n ec2Image.setState(temp.getIsReady() ? \"available\" : \"pending\");\n ec2Image.setDomainId(temp.getDomainId());\n if (temp.getHyperVisor().equalsIgnoreCase(\"xenserver\"))\n ec2Image.setHypervisor(\"xen\");\n else if (temp.getHyperVisor().equalsIgnoreCase(\"ovm\"))\n ec2Image.setHypervisor(\"ovm\"); // valid values for hypervisor is 'ovm' and 'xen'\n else\n ec2Image.setHypervisor(\"\");\n if (temp.getDisplayText() == null)\n ec2Image.setArchitecture(\"\");\n else if (temp.getDisplayText().indexOf(\"x86_64\") != -1)\n ec2Image.setArchitecture(\"x86_64\");\n else if (temp.getDisplayText().indexOf(\"i386\") != -1)\n ec2Image.setArchitecture(\"i386\");\n else\n ec2Image.setArchitecture(\"\");\n List<CloudStackKeyValue> resourceTags = temp.getTags();\n for (CloudStackKeyValue resourceTag : resourceTags) {\n EC2TagKeyValue param = new EC2TagKeyValue();\n param.setKey(resourceTag.getKey());\n if (resourceTag.getValue() != null)\n param.setValue(resourceTag.getValue());\n ec2Image.addResourceTag(param);\n }\n images.addImage(ec2Image);\n }\n }\n return images;\n } catch (Exception e) {\n logger.error(\"List Templates - \", e);\n throw new Exception(e.getMessage() != null ? e.getMessage() : e.toString());\n }\n }",
"java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByHandlerOrBuilderList();",
"public interface ImageMetadataService {\n\n List<ArtistDTO> getArtistsByPrediction(String name, String name2, String surname);\n\n List<ImageTypeDTO> getImageTypesByPrediction(String name);\n\n UploadImageMetadataDTO saveMetadata(UploadImageMetadataDTO uploadImageMetadataDTO);\n\n List<ImageDTO> getTop10Images(String username, String title);\n\n List<ImageDTO> getAllUserImages(String username);\n\n List<ImageDTO> searchImagesByCriteria(SearchImageCriteriaDTO searchImageCriteriaDTO);\n\n ImageDTO updateImageMetadata(ImageDTO imageDTO);\n\n List<ImageDTO> getImagesTop50();\n\n void rateImage(RateImageDTO rateImageDTO);\n\n List<ImageDTO> getAllImages();\n}",
"public static List<PNMedia> discoveryFlickrImages(String[] tags) throws Exception{\r\n\t\tif(tags != null && tags.length > 0){\r\n\t\t\tList<PNMedia> flickrPhotosList = new ArrayList<PNMedia>();\r\n\t\t\t\t\r\n\t\t\tFlickr flickr = new Flickr(flickrApiKey, flickrSharedSecret, new REST());\r\n\t\t\tFlickr.debugStream = false;\r\n\t\t\t\r\n\t\t\tSearchParameters searchParams=new SearchParameters();\r\n\t\t searchParams.setSort(SearchParameters.INTERESTINGNESS_ASC);\r\n\t\t \r\n\t\t searchParams.setTags(tags);\r\n\t\t \r\n\t\t PhotosInterface photosInterface = flickr.getPhotosInterface();\r\n\t\t PhotoList<Photo> photoList = photosInterface.search(searchParams, 10, 1); // quantidade de fotos retornadas (5)\r\n\t\t \r\n\t\t if(photoList != null){\r\n\t\t for(int i=0; i<photoList.size(); i++){\r\n\t\t Photo photo = (Photo)photoList.get(i);\r\n\t\t PNMedia media = new PNMedia();\r\n\t\t \r\n\t\t String description = photo.getDescription();\r\n\t\t if(description == null)\r\n\t\t \t description = photo.getTitle();\r\n\t\t media.setMediaURL(photo.getLargeUrl()); media.setMediaURLAux(photo.getSmallSquareUrl()); media.setMediaCaption(photo.getTitle()); media.setMediaInfo(description);\r\n\t\t flickrPhotosList.add(media);\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t return flickrPhotosList;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tthrow new Exception(\"Null tags or tags is empty. \");\r\n\t\t}\r\n\t}",
"public interface Image {\n /**\n * @return the image ID\n */\n String getId();\n\n /**\n * @return the image ID, or null if not present\n */\n String getParentId();\n\n /**\n * @return Image create timestamp\n */\n long getCreated();\n\n /**\n * @return the image size\n */\n long getSize();\n\n /**\n * @return the image virtual size\n */\n long getVirtualSize();\n\n /**\n * @return the labels assigned to the image\n */\n Map<String, String> getLabels();\n\n /**\n * @return the names associated with the image (formatted as repository:tag)\n */\n List<String> getRepoTags();\n\n /**\n * @return the digests associated with the image (formatted as repository:tag@sha256:digest)\n */\n List<String> getRepoDigests();\n}",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage();",
"public void features() throws MalformedURLException, IOException {\n\t\tMBFImage query = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao01.jpg\"));\n\t\tMBFImage target = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao02.jpg\"));\n\n\t\tDoGSIFTEngine engine = new DoGSIFTEngine();\n\t\tLocalFeatureList<Keypoint> queryKeypoints = engine.findFeatures(query.flatten());\n\t\tLocalFeatureList<Keypoint> targetKeypoints = engine.findFeatures(target.flatten());\n\t\tLocalFeatureMatcher<Keypoint> matcher1 = new BasicMatcher<Keypoint>(80);\n\t\tLocalFeatureMatcher<Keypoint> matcher = new BasicTwoWayMatcher<Keypoint>();\n\t\t/*\n\t\t * matcher.setModelFeatures(queryKeypoints);\n\t\t * matcher.findMatches(targetKeypoints); MBFImage basicMatches =\n\t\t * MatchingUtilities.drawMatches(query, target, matcher.getMatches(),\n\t\t * RGBColour.RED); DisplayUtilities.display(basicMatches);\n\t\t */\n\t\tRobustAffineTransformEstimator modelFitter = new RobustAffineTransformEstimator(5.0, 1500,\n\t\t\t\tnew RANSAC.PercentageInliersStoppingCondition(0.5));\n\t\tmatcher = new ConsistentLocalFeatureMatcher2d<Keypoint>(new FastBasicKeypointMatcher<Keypoint>(8), modelFitter);\n\t\tmatcher.setModelFeatures(queryKeypoints);\n\t\tmatcher.findMatches(targetKeypoints);\n\t\tMBFImage consistentMatches = MatchingUtilities.drawMatches(query, target, matcher.getMatches(), RGBColour.RED);\n\t\tDisplayUtilities.display(consistentMatches);\n\t\ttarget.drawShape(query.getBounds().transform(modelFitter.getModel().getTransform().inverse()), 3,\n\t\t\t\tRGBColour.BLUE);\n\t\t// DisplayUtilities.display(target);\n\t}",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage(\n @QueryMap ListImage queryParameters);",
"private static void updateRelatedImageList(\r\n\t\t\tMap<String, WordImage> relevantWordImages, Photo photo,\r\n\t\t\tMatchingResult surfResult, String word) {\n\r\n\t\tString key = getRelevantKeyForRelevantImages(relevantWordImages, word);\r\n\r\n\t\tif (key != null) {\r\n\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImages().add(info);\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImagesMap()\r\n\t\t\t\t\t.put(info.getId(), info);\r\n\r\n\t\t\trelevantWordImages.get(key).addSimilarImageId(info.getId());\r\n\r\n\t\t}\r\n\r\n\t\telse {\r\n\r\n\t\t\tWordImage wi = new WordImage(word);\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\twi.addSimilarImage(info);\r\n\r\n\t\t\twi.addSimilarImage(photo.getPhotoId(), info);\r\n\r\n\t\t\trelevantWordImages.put(word, wi);\r\n\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic String searchimage(int cbid) throws Exception {\n\t\treturn dao.searchimage(cbid);\r\n\t}",
"public Point findImage(BufferedImage image, int index) {\n int smallWidth = image.getWidth();\n int smallHeight = image.getHeight();\n int[][] smallPixels = new int[smallWidth][smallHeight];\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n smallPixels[x][y] = image.getRGB(x, y);\n }\n }\n boolean good;\n int count = 0;\n for(int X = 0; X <= bigWidth - smallWidth; X++) {\n for(int Y = 0; Y <= bigHeight - smallHeight; Y++) {\n good = true;\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n if(smallPixels[x][y] != bigPixels[X + x][Y + y]) {\n good = false;\n break;\n }\n }\n if(!good) {\n break;\n }\n }\n if(good) {\n if(count == index) {\n return(new Point(X, Y));\n }\n count++;\n }\n }\n }\n return(null);\n }",
"public static String getImageId(WebElement image) {\n String imageUrl = image.getAttribute(\"src\");\n\n int indexComparisonStart = imageUrl.indexOf(START_TOKEN) + START_TOKEN.length();\n int indexComparisonFinish = imageUrl.substring(indexComparisonStart).indexOf(STOP_TOKEN);\n\n return imageUrl.substring(indexComparisonStart, indexComparisonStart + indexComparisonFinish);\n }",
"private void searchImages()\n {\n searchWeb = false;\n search();\n }",
"java.lang.String getHotelImageURLs(int index);",
"@Override\n\tpublic List<Image> findAllImage() {\n\t\treturn new ImageDaoImpl().findAllImage();\n\t}",
"public void findBookDetails(AnnotateImageResponse imageResponse) throws IOException {\n\n String google = \"http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=\";\n String search = \"searchString\";\n String charset = \"UTF-8\";\n\n URL url = new URL(google + URLEncoder.encode(search, charset));\n Reader reader = new InputStreamReader(url.openStream(), charset);\n GoogleResults results = new Gson().fromJson(reader, GoogleResults.class);\n\n // Show title and URL of 1st result.\n System.out.println(results.getResponseData().getResults().get(0).getTitle());\n System.out.println(results.getResponseData().getResults().get(0).getUrl());\n }",
"public interface IImageInputBoundary {\n\n List<ImageResponseModel> GetImagesByCategory(ImageRequestModel requestModel);\n List<ImageResponseModel> GetImagesByComposition(ImageRequestModel requestModel);\n}",
"@Override\n\tpublic List<AddBookDto> findListimage(List<addBookBo> listBo) throws IOException {\n\n\t\tFile uploadFileDir, uploadImageDir;\n\n\t\tFileInputStream fileInputStream = null;\n\n\t\tList<AddBookDto> dtoList = new ArrayList<>();\n\n\t\tSet<Category> setCategory = new HashSet<>();\n\n\t\tSystem.out.println(\"UploadService.findListimage()\");\n\n\t\tfor (addBookBo bo : listBo) {\n\n\t\t\tAddBookDto dto = new AddBookDto();\n\n\t\t\tBeanUtils.copyProperties(bo, dto);\n\n\t\t\tSystem.out.println(\"UploadService.findListimage()-------\" + bo.getAuthor());\n\n\t\t\tuploadImageDir = new File(imageUploadpath + \"/\" + dto.getImageUrl() + \".jpg\");\n\n\t\t\tif (uploadImageDir.exists()) {\n\n\t\t\t\tbyte[] buffer = getBytesFromFile(uploadImageDir);\n\t\t\t\t// System.out.println(bo.getTitle()+\"====b===\" + buffer);\n\t\t\t\tdto.setImgeContent(buffer);\n\n\t\t\t}\n\n\t\t\tSystem.out.println(dto.getTitle() + \"====dto===\" + dto.getImgeContent());\n\t\t\tdtoList.add(dto);\n\n\t\t}\n\n\t\treturn dtoList;\n\t}",
"public Image getImageById(final String imageId)\n {\n GetImageByIdQuery getImageByIdQuery = new GetImageByIdQuery(imageId);\n List<Image> ImageList = super.queryResult(getImageByIdQuery);\n if (CollectionUtils.isEmpty(ImageList) || ImageList.size() > 1)\n {\n LOG.error(\"The Image cannot be found by this id:\" + imageId);\n return null;\n }\n return ImageList.get(0);\n }",
"@Test\n\tpublic void searchImageWithUpload() throws InterruptedException, Exception {\n\n\t\t// To click on Images link\n\t\thomePage.clickSearchByImage();\n\t\t\n\t\t// To verify if ui is navigated to Search by image page\n\t\tAssert.assertTrue(homePage.verifySearchByImageBox());\n\n\t\t// Upload an image from local machine\n\t\tsearchPage.uploadLocalImage(Settings.getLocalImage());\n\t\t// To verify upload status\n\t\tAssert.assertTrue(searchPage.verifyUploadStatus());\n\n\t\t// Find specified image on GUI\n\t\tWebElement webElement = searchPage.navigateToImage(Settings.getVisitRule());\n\n\t\t// Take a snapshot for expected visit page\n\t\tsearchPage.snapshotLastPage(webElement);\n\n\t\t// Download specified image by expected rule\n\t\tString fileName = Settings.getDownloadImage();\n\t\tboolean down = searchPage.downloadImagetoLocal(webElement, fileName);\n\t\tAssert.assertTrue(down);\n\n\t\t// verify two images match or not\n\t\tAssert.assertTrue(searchPage.verifyImageIsSame(Settings.getDownloadImage(), Settings.getLocalImage()));\n\n\t}",
"@Override\n public void onSuccess(Uri uri) {\n if (!ImageListUrl.contains(uri.toString())) {\n ImageListUrl.add(uri.toString());\n\n /// add property if imageurl arraylist same with imagelist arraylist\n if (ImageListUrl.size() == ImageList.size()) {\n Toast.makeText(NewRecipe.this, ImageListUrl.toString(), Toast.LENGTH_SHORT).show();\n\n saveRecipe();\n\n }\n }\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByTransformOrBuilder();",
"private static final byte[] xfuzzyload_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, -82,\n\t\t\t\t69, 12, -128, -128, -128, -1, -1, -1, -64, -64, -64, -1, -1, 0,\n\t\t\t\t0, 0, 0, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100, 101,\n\t\t\t\t32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4, 1,\n\t\t\t\t10, 0, 6, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 3, 75, 8, -86,\n\t\t\t\t-42, 11, 45, -82, -24, 32, -83, -42, -80, 43, -39, -26, -35,\n\t\t\t\t22, -116, 1, -9, 24, -127, -96, 10, 101, 23, 44, 2, 49, -56,\n\t\t\t\t108, 21, 15, -53, -84, -105, 74, -86, -25, 50, -62, -117, 68,\n\t\t\t\t44, -54, 74, -87, -107, 82, 21, 40, 8, 81, -73, -96, 78, 86,\n\t\t\t\t24, 53, 82, -46, 108, -77, -27, -53, 78, -85, -111, -18, 116,\n\t\t\t\t87, 8, 23, -49, -123, 4, 0, 59 };\n\t\treturn data;\n\t}",
"public List<Recognition> recognizeImage(Bitmap bitmap) {\n Bitmap croppedBitmap = Bitmap.createScaledBitmap(bitmap, cropSize, cropSize, true);\n// Bitmap croppedBitmap = Bitmap.createBitmap(cropSize, cropSize, Bitmap.Config.ARGB_8888);\n// final Canvas canvas = new Canvas(croppedBitmap);\n// canvas.drawBitmap(bitmap, frameToCropTransform, null);\n final List<Recognition> ret = new LinkedList<>();\n List<Recognition> recognitions = detector.recognizeImage(croppedBitmap);\n// long before=System.currentTimeMillis();\n// for (int k=0; k<100; k++) {\n// recognitions = detector.recognizeImage(croppedBitmap);\n// int a = 0;\n// }\n// long after=System.currentTimeMillis();\n// String log = String.format(\"tensorflow takes %.03f s\\n\", ((float)(after-before)/1000/100));\n// Log.d(\"MATCH TEST\", log);\n for (Recognition r : recognitions) {\n if (r.getConfidence() < minConfidence)\n continue;\n// RectF location = r.getLocation();\n// cropToFrameTransform.mapRect(location);\n// r.setOriginalLoc(location);\n// Bitmap cropped = Bitmap.createBitmap(bitmap, (int)location.left, (int)location.top, (int)location.width(), (int)location.height());\n// r.setObjectImage(cropped);\n BoxPosition bp = r.getLocation();\n// r.rectF = new RectF(bp.getLeft(), bp.getTop(), bp.getRight(), bp.getBottom());\n// cropToFrameTransform.mapRect(r.rectF);\n ret.add(r);\n }\n\n return ret;\n }",
"public static ArrayList<Result> getCCVBasedSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.CCV));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t\t// create result object\n\t\t\t \tResult result = new Result();\n\t\t\t \tresult.mFilename = imageName;\n\t\t\t \tresult.mSimilarity = intersection;\n\t\t\t \t\n\t\t\t \t// store result\n\t\t\t \trv.add(result);\n\t\t\t\t} catch (Exception ex) {}\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}",
"public Map<String, Photo> createGeoSimilarPhotoList(int maxCycles,\r\n\t\t\tboolean tagReq, boolean techTagReq) {\r\n\r\n\t\tMap<String, Photo> photoList = new HashMap<String, Photo>();\r\n\r\n\t\tpFet.getPanoramioGeoSimilarPhotoList(maxCycles, tagReq, techTagReq,\r\n\t\t\t\tphotoList);\r\n\r\n\t\tint panoPhotoReturend = photoList.size();\r\n\r\n\t\tMap<String, Photo> flickrPhotoList = fFet\r\n\t\t\t\t.getFlickrGeoSimilarPhotoList();\r\n\r\n\t\tint flickrPhotoReturend = flickrPhotoList.size();\r\n\r\n\t\tphotoList.putAll(flickrPhotoList);\r\n\r\n\t\ttotalNumberOfImages = flickrPhotoReturend + panoPhotoReturend;\r\n\r\n\t\treturn photoList;\r\n\t}",
"List<IbeisImage> uploadImages(List<File> images, File pathToTemporaryZipFile) throws\n UnsupportedImageFileTypeException, IOException, MalformedHttpRequestException, UnsuccessfulHttpRequestException;",
"private void loadAndCacheImages(Node node, FileContext cachedImageFilesystem) throws Exception\n {\n String imagePathBase = \"/\" + node.getTypeCode() + \"/\" + node.getNid();\n ImagesReponse imagesReponse = this.queryRemoteApi(ImagesReponse.class, imagePathBase + ImagesReponse.PATH, null);\n if (imagesReponse != null && imagesReponse.getNodes() != null && imagesReponse.getNodes().getNode() != null) {\n for (Image i : imagesReponse.getNodes().getNode()) {\n node.addImage(i);\n\n URI imageUri = UriBuilder.fromUri(Settings.instance().getTpAccessApiBaseUrl())\n .path(BASE_PATH)\n .path(imagePathBase + \"/image/\" + i.getData().mediaObjectId + \"/original\")\n .replaceQueryParam(ACCESS_TOKEN_PARAM, this.getAccessToken())\n .replaceQueryParam(FORMAT_PARAM, FORMAT_JSON)\n .build();\n\n ClientConfig config = new ClientConfig();\n Client httpClient = ClientBuilder.newClient(config);\n Response response = httpClient.target(imageUri).request().get();\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n org.apache.hadoop.fs.Path nodeImages = new org.apache.hadoop.fs.Path(HDFS_CACHE_ROOT_PATH + node.getNid());\n if (!cachedImageFilesystem.util().exists(nodeImages)) {\n cachedImageFilesystem.mkdir(nodeImages, FsPermission.getDirDefault(), true);\n }\n org.apache.hadoop.fs.Path cachedImage = new org.apache.hadoop.fs.Path(nodeImages, i.getData().mediaObjectId);\n i.setCachedUrl(cachedImage.toUri());\n if (!cachedImageFilesystem.util().exists(cachedImage)) {\n try (OutputStream os = cachedImageFilesystem.create(cachedImage, EnumSet.of(CreateFlag.CREATE, CreateFlag.OVERWRITE))) {\n IOUtils.copy(response.readEntity(InputStream.class), os);\n }\n }\n }\n else {\n throw new IOException(\"Error status returned while fetching remote API data;\" + response);\n }\n\n }\n }\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImagesByHandlerOrBuilder(\n int index);",
"public static ArrayList<Result> getColorHistogramSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.HISTOGRAM));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t// create result object\n\t\t \tResult result = new Result();\n\t\t \tresult.mFilename = imageName;\n\t\t \tresult.mSimilarity = intersection;\n\t\t \t\n\t\t \t// store result\n\t\t \trv.add(result);\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}",
"public void compareImageAction() {\n\t\tif (selectedAnimalModel == null) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (selectedAnimalModel.getId() == 0L || isImageChangedFlag) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tAsyncTask asyncTask = new AsyncTask() {\n\t\t\tAnimalModel animal1 = null;\n\t\t\tAnimalModel animal2 = null;\n\t\t\tAnimalModel animal3 = null;\n\n\t\t\t@Override\n\t\t\tprotected void onDone(boolean success) {\n\t\t\t\tif (!success) {\n\t\t\t\t\tshowDialog(ERROR_MESSAGE, \"Cannot compare images.\");\n\t\t\t\t} else {\n\t\t\t\t\tCompareImagesDialog dialog = new CompareImagesDialog(multimediaPanel, selectedAnimalModel, animal1, animal2, animal3);\n\t\t\t\t\tdialog.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected Boolean doInBackground() throws Exception {\n\t\t\t\ttry {\n\t\t\t\t\tArrayList<AnimalModel> models;\n\n\t\t\t\t\tmodels = DataManager.getInstance().getThreeSimilarImages(selectedAnimalModel);\n\n\t\t\t\t\tif (models.size() > 0) {\n\t\t\t\t\t\tanimal1 = models.get(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 1) {\n\t\t\t\t\t\tanimal2 = models.get(1);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 2) {\n\t\t\t\t\t\tanimal3 = models.get(2);\n\t\t\t\t\t}\n\n\t\t\t\t} catch (DataManagerException e1) {\n\t\t\t\t\tLogger.createLog(Logger.ERROR_LOG, e1.getMessage());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tasyncTask.start();\n\n\t}",
"private ArrayList<ImageItem> getData() {\n final ArrayList<ImageItem> imageItems = new ArrayList<>();\n // TypedArray imgs = getResources().obtainTypedArray(R.array.image_ids);\n for (int i = 0; i < f.size(); i++) {\n Bitmap bitmap = imageLoader.loadImageSync(\"file://\" + f.get(i));;\n imageItems.add(new ImageItem(bitmap, \"Image#\" + i));\n }\n return imageItems;\n }",
"static void redactImageFileColoredInfoTypes(String projectId, String inputPath, String outputPath)\n throws IOException {\n try (DlpServiceClient dlp = DlpServiceClient.create()) {\n // Specify the content to be redacted.\n ByteString fileBytes = ByteString.readFrom(new FileInputStream(inputPath));\n ByteContentItem byteItem =\n ByteContentItem.newBuilder().setType(BytesType.IMAGE_JPEG).setData(fileBytes).build();\n\n // Define types of info to redact associate each one with a different color.\n // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types\n ImageRedactionConfig ssnRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"US_SOCIAL_SECURITY_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(.3f).setGreen(.1f).setBlue(.6f).build())\n .build();\n ImageRedactionConfig emailRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"EMAIL_ADDRESS\").build())\n .setRedactionColor(Color.newBuilder().setRed(.5f).setGreen(.5f).setBlue(1).build())\n .build();\n ImageRedactionConfig phoneRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"PHONE_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(1).setGreen(0).setBlue(.6f).build())\n .build();\n\n // Create collection of all redact configurations.\n List<ImageRedactionConfig> imageRedactionConfigs =\n Arrays.asList(ssnRedactionConfig, emailRedactionConfig, phoneRedactionConfig);\n\n // List types of info to search for.\n InspectConfig config =\n InspectConfig.newBuilder()\n .addAllInfoTypes(\n imageRedactionConfigs.stream()\n .map(ImageRedactionConfig::getInfoType)\n .collect(Collectors.toList()))\n .build();\n\n // Construct the Redact request to be sent by the client.\n RedactImageRequest request =\n RedactImageRequest.newBuilder()\n .setParent(LocationName.of(projectId, \"global\").toString())\n .setByteItem(byteItem)\n .addAllImageRedactionConfigs(imageRedactionConfigs)\n .setInspectConfig(config)\n .build();\n\n // Use the client to send the API request.\n RedactImageResponse response = dlp.redactImage(request);\n\n // Parse the response and process results.\n FileOutputStream redacted = new FileOutputStream(outputPath);\n redacted.write(response.getRedactedImage().toByteArray());\n redacted.close();\n System.out.println(\"Redacted image written to \" + outputPath);\n }\n }",
"@GET\n @Path(\"image\")\n @Produces(MediaType.TEXT_PLAIN)\n public Response voidImage() {\n return Response.status(Response.Status.NOT_FOUND).build();\n }",
"public List<Image> parseBestOfImagesResult(Document doc) {\n\n ArrayList<Image> bestOfImages = new ArrayList<>();\n Elements htmlImages = doc.select(CSS_BEST_OF_IMAGE_QUERY);\n Timber.i(\"Best OfImages: %s\", htmlImages.toString());\n String href;\n Image bestOfImage;\n for (Element image : htmlImages) {\n href = image.attr(\"src\");\n Timber.i(\"Image src: %s\", href);\n bestOfImage = new Image(href);\n bestOfImages.add(bestOfImage);\n }\n return bestOfImages;\n }",
"public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }",
"public Observable<MatchResponseInner> matchMethodAsync(String listId, Boolean cacheImage) {\n return matchMethodWithServiceResponseAsync(listId, cacheImage).map(new Func1<ServiceResponse<MatchResponseInner>, MatchResponseInner>() {\n @Override\n public MatchResponseInner call(ServiceResponse<MatchResponseInner> response) {\n return response.body();\n }\n });\n }",
"public Observable<ServiceResponse<MatchResponseInner>> matchFileInputWithServiceResponseAsync(byte[] imageStream, String listId, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n if (imageStream == null) {\n throw new IllegalArgumentException(\"Parameter imageStream is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n RequestBody imageStreamConverted = RequestBody.create(MediaType.parse(\"image/gif\"), imageStream);\n return service.matchFileInput(listId, cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {\n @Override\n public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<MatchResponseInner> clientResponse = matchFileInputDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }",
"public ImageFiles() {\n\t\tthis.listOne = new ArrayList<String>();\n\t\tthis.listTwo = new ArrayList<String>();\n\t\tthis.listThree = new ArrayList<String>();\n\t\tthis.seenImages = new ArrayList<String>();\n\t\tthis.unseenImages = new ArrayList<String>();\n\t}",
"public interface SearchService {\n List<String> siftSearch(MultipartFile image) throws IOException;\n}",
"@ApiModelProperty(value = \"An image to give an indication of what to expect when renting this vehicle.\")\n public List<Image> getImages() {\n return images;\n }",
"private void getImagesFromDatabase() {\n try {\n mCursor = mDbAccess.getPuzzleImages();\n\n if (mCursor.moveToNext()) {\n for (int i = 0; i < mCursor.getCount(); i++) {\n String imagetitle = mCursor.getString(mCursor.getColumnIndex(\"imagetitle\"));\n String imageurl = mCursor.getString(mCursor.getColumnIndex(\"imageurl\"));\n mImageModel.add(new CustomImageModel(imagetitle, imageurl));\n mCursor.moveToNext();\n }\n } else {\n Toast.makeText(getActivity(), \"databse not created...\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }",
"public yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesResponse list(yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListMethod(), getCallOptions(), request);\n }",
"public boolean displayedDepartmentEmployeeImageMatch(List<String> names, List<String> images) {\n List<String> nonMatchingRecords = new ArrayList<>();\n for (int i = 0; i < names.size(); i++) {\n\n String imageSource = images.get(i).toLowerCase();\n String imageFileName = createImageName(names.get(i).toLowerCase());\n\n if (!imageSource.contains(imageFileName)) {\n nonMatchingRecords.add(names.get(i));\n }\n }\n if (nonMatchingRecords.size() > 0) {\n Reporter.log(\"FAILURE: Names of employees with non matching images\" +\n \" or inconsistently named imageFiles: \" +\n Arrays.toString(nonMatchingRecords.toArray()), true);\n return false;\n }\n return true;\n }",
"public Detections recognizeImage(Image image, int rotation) {\n\n Bitmap rgbFrameBitmap = Transform.convertYUVtoRGB(image);\n\n\n if (image.getFormat() != ImageFormat.YUV_420_888) {\n // unsupported image format\n Logger.addln(\"\\nWARN YoloHTTP.recognizeImage() unsupported image format\");\n return new Detections();\n }\n //return recognize(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkMaxAreaRectangle(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkNineBoxes(Transform.yuvBytes(image), image.getWidth(),image.getHeight(),rotation, rgbFrameBitmap,image.getHeight()/3,image.getWidth()/3,image.getHeight()/3,image.getWidth()/3);\n //return frameworkQuadrant(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n return frameworkMaxAreaRectBD(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n\n }",
"public List<Recognition> recognizeImage(Mat img) {\n frameToCropTransform =\n ImageUtil.getTransformationMatrix(\n img.cols(), img.rows(),\n cropSize, cropSize,\n 0, MAINTAIN_ASPECT);\n cropToFrameTransform = new Matrix();\n frameToCropTransform.invert(cropToFrameTransform);\n Bitmap tBM = Bitmap.createBitmap(img.cols(), img.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(img, tBM);\n return recognizeImage(tBM);\n }",
"public BufferedImage GetImage(String name) { return ImageList.get(name); }",
"public static Long getAValidImageId() {\n\t\tLong id = getAId();\n\t\tif (id == null) {\n\n\t\t\tImage img = new Image(\"http://dummy.com/img.jpg\", (long)(Math.random()*10000), \"Description\", \"keyword\", new Date(0001L));\n\t\t\tIImageStore imageStore = StoreFactory.getImageStore();\n\t\t\timageStore.insert(img);\n\n\t\t\tid = getAId();\n\t\t\tif (id == null) {\n\t\t\t\tthrow new RuntimeException(\"There are no images in DB, and I can't insert one. Cannot run tests without.\");\n\t\t\t}\n\t\t}\n\t\treturn id;\n\t}",
"public void setImage(int imageId) {\n this.imageId=imageId;\n\t}",
"public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}",
"@GetMapping(path = \"/images\", produces = \"application/json; charset=UTF-8\")\n public @ResponseBody ArrayNode getImageList() {\n final ArrayNode nodes = mapper.createArrayNode();\n for (final Image image : imageRepository.findAllPublic())\n try {\n nodes.add(mapper.readTree(image.toString()));\n } catch (final JsonProcessingException e) {\n e.printStackTrace();\n }\n return nodes;\n }",
"String getItemImage();",
"java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByTransformOrBuilderList();",
"protected abstract void setupImages(Context context);",
"public AugmentedImageNode(Context context, String[] imageList, Integer augmentedImageIndex) {\n\n // we check if sushi is null\n // sushi is used in order to check if the renderables are null\n // because the renderables are built using the same block of code all at once, if sushi (or any other completable future) is null,\n // then they all are null\n if (sushi == null) {\n\n if (!(AugmentedImageFragment.imagePlaysVideoBooleanList[augmentedImageIndex])) {\n currentRenderable = renderableList.get(augmentedImageIndex);\n currentRenderable =\n // build the renderable using the image that is detected\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/\" + imageList[augmentedImageIndex] + \".sfb\"))\n .build();\n Log.d(\"modelrenderable\", (\"conditional is running! filepath: \" + Uri.parse(\"models/\" + imageList[augmentedImageIndex] + \".sfb\")));\n\n } else {\n\n frame_ul =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_upper_left.sfb\"))\n .build();\n Log.d(\"running\", (\"running\"));\n frame_ur =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_upper_right.sfb\"))\n .build();\n frame_ll =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_lower_left.sfb\"))\n .build();\n frame_lr =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_lower_right.sfb\"))\n .build();\n\n }\n\n\n }\n\n // Checks if videoRenderable is null, if it is, videoRenderable is loaded from models.\n // Will be used as the thing that the video is placed on.\n if (AugmentedImageActivity.videoRenderable == null) {\n AugmentedImageActivity.videoRenderable =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/chroma_key_video.sfb\"))\n .build();\n }\n }"
]
| [
"0.6268827",
"0.58894795",
"0.57677805",
"0.57601416",
"0.5745048",
"0.57317436",
"0.55123144",
"0.5503459",
"0.55010366",
"0.54535496",
"0.53231597",
"0.52577794",
"0.5252809",
"0.5197598",
"0.51810634",
"0.5180938",
"0.5170541",
"0.5143361",
"0.5132484",
"0.51319265",
"0.51224333",
"0.5117683",
"0.5087638",
"0.5067504",
"0.50536203",
"0.5053161",
"0.5032371",
"0.50230694",
"0.5020064",
"0.50197476",
"0.5017497",
"0.49934095",
"0.4982133",
"0.49786833",
"0.4976476",
"0.49622747",
"0.49486583",
"0.49327984",
"0.4917589",
"0.4908509",
"0.4905867",
"0.49023446",
"0.4901031",
"0.48701972",
"0.48697302",
"0.48693508",
"0.4865608",
"0.48344868",
"0.4826242",
"0.4823214",
"0.48141134",
"0.48121142",
"0.47974515",
"0.47896698",
"0.47813424",
"0.47794077",
"0.4770224",
"0.47676432",
"0.4765288",
"0.47643593",
"0.4757827",
"0.4757143",
"0.47531438",
"0.47432348",
"0.4742203",
"0.47421885",
"0.4740627",
"0.4737963",
"0.4731806",
"0.47313228",
"0.47210446",
"0.47168025",
"0.47118372",
"0.4709293",
"0.47092316",
"0.47077367",
"0.4699514",
"0.4696686",
"0.46891865",
"0.46795154",
"0.46656293",
"0.46641228",
"0.46640646",
"0.4663976",
"0.4662889",
"0.46480772",
"0.4645193",
"0.4644105",
"0.46395627",
"0.4636299",
"0.46341047",
"0.4631616",
"0.46303436",
"0.46229544",
"0.4621968",
"0.46167204",
"0.46087825",
"0.4605549",
"0.46027145",
"0.45995033",
"0.45839757"
]
| 0.0 | -1 |
Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using this API. Returns ID and tags of matching image. Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. | public Observable<MatchResponseInner> matchUrlInputAsync(String contentType, BodyModelInner imageUrl, String listId, Boolean cacheImage) {
return matchUrlInputWithServiceResponseAsync(contentType, imageUrl, listId, cacheImage).map(new Func1<ServiceResponse<MatchResponseInner>, MatchResponseInner>() {
@Override
public MatchResponseInner call(ServiceResponse<MatchResponseInner> response) {
return response.body();
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int match(ArrayList<ImageCell> images);",
"ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);",
"private void searchImage(String text){\n\n // Set toolbar title as query string\n toolbar.setTitle(text);\n\n Map<String, String> options = setSearchOptions(text, Constants.NEW_SEARCH);\n Call<SearchResponse> call = service.searchPhoto(options);\n\n call.enqueue(new Callback<SearchResponse>() {\n @Override\n public void onResponse(Response<SearchResponse> response, Retrofit retrofit) {\n SearchResponse result = response.body();\n if (result.getStat().equals(\"ok\")) {\n // Status is ok, add result to photo list\n if (photoList != null) {\n photoList.clear();\n photoList.addAll(result.getPhotos().getPhoto());\n imageAdapter.notifyDataSetChanged();\n pageCount = 2;\n }\n\n } else {\n // Display error if something wrong with result\n Toast.makeText(context, result.getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Display error here since request failed\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }\n });\n }",
"@ApiOperation(value = \"Return images matching supplied digest found in supplied repository\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in supplied repository with supplied digest\") })\n\t// Pass in digest only in specific registry, get images and tags back that match\n\t@RequestMapping(path = \"/{registry}/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAndRegistry(@PathVariable String registry,\n\t\t\t@PathVariable String id) {\n\t\tRegistryConnection localConnection;\n\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\ttry {\n\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(registry));\n\n\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t// Get all tags from specific repo\n\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\timage.setRegistryName(registry);\n\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\timages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Iterate through images and only add to new list, what digests are identical\n\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\tfor (DockerImageData image : images) {\n\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from \" + registry + \" matching image id \" + id,\n\t\t\t\t\tmatchingImages);\n\t\t} catch (RegistryNotFoundException e) {\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\"Failed to find Registry\");\n\t\t}\n\t}",
"public List<Result> recognize(IplImage image);",
"@SuppressWarnings({ \"unchecked\", \"null\" })\n public List<String> calcSimilarity(String imgPath) {\n\n FileInputStream imageFile;\n double minDistance = Double.MAX_VALUE;\n\n // 返回查询结果\n List<String> matchUrls = new ArrayList<String>();\n\n\n try {\n\n imageFile = new FileInputStream(imgPath);\n BufferedImage bufferImage;\n\n bufferImage = ImageIO.read(imageFile);\n LTxXORP.setRotaIvaPats();//设定旋转模式值\n\n //得到图片的纹理一维数组特征向量(各颜色分量频率(统计量))\n double[] lbpSourceFecture = LTxXORP.getLBPFeature(imgPath);\n\n // 提取数据库数据\n List<Object> list = DBHelper.fetchALLCloth();\n\n // long startTime = System.currentTimeMillis();\n\n // 把每个条数据的路径和最短距离特征提取出来并存储在lbpResultMap的键值对中。\n Map<String, Double> lbpResultMap = new HashMap<String, Double>();\n\n for (int i = 0; i < list.size(); i++) {\n\n Map<String, Object> map = (Map<String, Object>) list.get(i);\n\n Object candidatePath = map.get(\"path\");\n Object candidateLBP = map.get(\"lbpFeature\");\n\n // 从快速搜索中选取TOP N结果,继续进行纹理特征匹配\n //获取当前由颜色匹配相似度排序的结果并提取其LBP纹理特征\n\n double[] lbpTargetFeature = MatchUtil.jsonToArr((String) candidateLBP);\n double lbpDistance = textureStrategy.similarity(lbpTargetFeature, lbpSourceFecture);\n lbpResultMap.put((String) candidatePath, lbpDistance);\n\n // 判断衡量标准选取距离还是相似度\n if (lbpDistance < minDistance)\n minDistance = lbpDistance;\n\n }\n\n Map<String, Double> tempResultMap;\n\n System.out.println(\"Min Distance : \" + (float) minDistance);\n\n\n\n System.out.println(\"============== finish Texture =================\");\n\n Map<String, Double> finalResult = MatchUtil.sortByValueAsc(lbpResultMap);\n\n int counter = 0;\n for (Map.Entry<String, Double> map : finalResult.entrySet()) {\n if (counter >= Config.finalResultNumber)\n break;\n //matchUrls截取只存储finalResultNumber数量的查询结果\n matchUrls.add(map.getKey());\n counter ++;\n double TSimilarity=Math.pow(Math.E,-map.getValue());\n System.out.println(TSimilarity + \" 图片路径 \" + map.getKey());\n\n }\n\n System.out.println();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return matchUrls;\n }",
"public interface ImageSearchService {\n\n /**\n * Register an image into the search instance.\n *\n * @param imageData Image data in JPEG or PNG format.\n * @param imageType Image format.\n * @param uuid Unique identifier of the image.\n */\n void register(byte[] imageData, ObjectImageType imageType, String uuid);\n\n /**\n * Un-register an image from the search instance.\n *\n * @param uuid Unique identifier of the image.\n */\n void unregister(String uuid);\n\n /**\n * Find all images similar to the given one.\n *\n * @param imageData Image to match with registered ones in the search instance.\n * @param objectRegion object region to search.\n * @return Found images UUIDs and raw response.\n */\n ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);\n\n /**\n * Check the image search configuration is correct by making a fake search request.\n *\n * @param configuration Configuration to check.\n */\n void checkImageSearchConfiguration(Configuration configuration) throws InvalidConfigurationException;\n}",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByHandler(int index);",
"@ApiOperation(value = \"Return all images matching supplied digest in all configured registries\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in configured registries with supplied digest\") })\n\t// Pass in only digest, get images and tags back that much from all repos\n\t@RequestMapping(path = \"/registries/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAllRegistries(@PathVariable String id) {\n\t\t\t\tRegistryConnection localConnection;\n\t\t\t\t// List persists outside all registries\n\t\t\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\t\t\tList<RegistryItem> items = configs.getItems();\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\t// For each configured registry\n\t\t\t\t\tfor(RegistryItem item : items) {\n\t\t\t\t\t\t// Get connection to registry\n\t\t\t\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(item.getRegistryLabel()));\n\t\t\t\t\t\t\n\t\t\t\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\t\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t\t\t\t// Get all tags from specific repo\n\t\t\t\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\t\t\t\timage.setRegistryName(item.getRegistryLabel());\n\t\t\t\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\t\t\t\timages.add(image);\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// Iterate through images and only add to new list, what digests are identical\n\t\t\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\t\t\tfor (DockerImageData image : images) {\n\t\t\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from all configured registries \",\n\t\t\t\t\t\t\tmatchingImages);\n\t\t\t\t} catch (RegistryNotFoundException e) {\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\t\t\"Failed to find Registry\");\n\t\t\t\t}\n\t}",
"Receta getByIdWithImages(long id);",
"public int displayRandomImage() {\n\n int randomImageIndex;\n\n do\n { // making sure that the same images aren't repeated & images of the same car makes aren't shown together\n\n randomCarMake = allCarMakes[getRandomBreed()]; // get a random breed\n randomImageIndex = getRandomImage(); // get a random image of a particular breed\n\n randomImageOfChosenCarMake = displayRelevantImage(randomCarMake, randomImageIndex);\n\n } while (displayingCarMakes.contains(randomCarMake) || allDisplayedImages.contains(randomImageOfChosenCarMake));\n\n allDisplayedImages.add(randomImageOfChosenCarMake); // to make sure that the image isn't repeated\n displayingCarMakes.add(randomCarMake); // to make sure that images of the same breed aren't shown at once\n displayingImageIndexes.add(randomImageIndex); // to recall indexes when the device is rotated\n\n // return chosen random image\n return getResources().getIdentifier(randomImageOfChosenCarMake, \"drawable\", \"com.example.car_match_game_app\");\n }",
"@GET\n @Path(\"{factoryId}/image\")\n @Produces(\"image/*\")\n public Response getImage(@PathParam(\"factoryId\") String factoryId, @DefaultValue(\"\") @QueryParam(\"imgId\") String imageId)\n throws FactoryUrlException {\n Set<FactoryImage> factoryImages = factoryStore.getFactoryImages(factoryId, null);\n if (factoryImages == null) {\n LOG.warn(\"Factory URL with id {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Factory URL with id \" + factoryId + \" is not found.\");\n }\n if (imageId.isEmpty()) {\n if (factoryImages.size() > 0) {\n FactoryImage image = factoryImages.iterator().next();\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n } else {\n LOG.warn(\"Default image for factory {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(),\n \"Default image for factory \" + factoryId + \" is not found.\");\n }\n } else {\n for (FactoryImage image : factoryImages) {\n if (image.getName().equals(imageId)) {\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n }\n }\n }\n LOG.warn(\"Image with id {} is not found.\", imageId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Image with id \" + imageId + \" is not found.\");\n }",
"public void findGeoSurfSimilarPhotosWithTagStatistics(\r\n\t\t\tfinal Set<String> allCandidateWords,\r\n\t\t\tfinal Map<String, WordImage> relevantWordImages, boolean tagReq,\r\n\t\t\tboolean techTagReq, boolean compact) {\r\n\r\n\t\ttopImagesURLs = new HashMap<String, Double>();\r\n\t\ttopImagesNames = new HashMap<String, String>();\r\n\t\t// The list of all Photo objects\r\n\t\tphotoList = new HashMap<String, Photo>();\r\n\t\tphotoList = createGeoSimilarPhotoList(PANORAMIO_DEFUALT_NUM_ITERATIONS, tagReq,\r\n\t\t\t\ttechTagReq);\r\n\r\n\t\t// Word Image Relevance Dictionary\r\n\t\t// The statistics consider for each word the set of images annotated\r\n\t\t// with them and similar\r\n\t\t// to the input image and the those which are tagged with it and not\r\n\t\t// similar to the input image\r\n\t\t// Map<String, WordImage> relevantWordImages = new HashMap<String,\r\n\t\t// WordImage>();\r\n\r\n\t\t// Prepare the result output\r\n\r\n\t\tif (!compact) {\r\n\t\t\toutRel.println(\"Image URL , Score , Distance , Point Similarity, Common Keypoints , Iter Point Similariy, Title , Tags , distance, userid\");\r\n\t\t\t// An CSV file for the set of visually irrelevant images\r\n\t\t\toutIrrRel.println(\"Image URL , Title , Tags , distance, userid\");\r\n\t\t}\r\n\r\n\t\t// *** Extract SURF feature for the input image\r\n\r\n\t\tSurfMatcher surfMatcher = new SurfMatcher();\r\n\t\t// The SURF feature of the input image\r\n\t\tList<InterestPoint> ipts1 = surfMatcher.extractKeypoints(inputImageURL,\r\n\t\t\t\tsurfMatcher.p1);\r\n\r\n\t\t// inputImageInterstPoints = ipts1 ;\r\n\r\n\t\t// Add the photo with its interestpoint to the cache\r\n\t\t// this.photoInterestPoints.put(imageName, ipts1);\r\n\r\n\t\t// Find SURF correspondences in the geo-related images\r\n\t\ttotalNumberOfSimilarImages = 0; // R\r\n\r\n\t\tfor (String photoId : photoList.keySet()) {\r\n\r\n\t\t\tPhoto photo = photoList.get(photoId);\r\n\r\n\t\r\n\r\n\t\t\tString toMatchedPhotoURL = photo.getPhotoFileUrl();\r\n\t\t\t// The SURF feature of a geo close image\r\n\t\t\tList<InterestPoint> ipts2 = surfMatcher.extractKeypoints(\r\n\t\t\t\t\ttoMatchedPhotoURL, surfMatcher.p2);\r\n\r\n\t\t\t// this.photoInterestPoints.put(photo.getPhotoId(), ipts2);\r\n\t\t\t// this.cachedImageInterstPoint.put(photo.getPhotoId(), ipts2);\r\n\r\n\t\t\tMatchingResult surfResult = null;\r\n\r\n\t\t\tsurfResult = surfMatcher.matchKeypoints(inputImageURL, photoId,\r\n\t\t\t\t\tipts1, ipts2, MIN_COMMON_IP_COUNT);\r\n\r\n\t\t\tif (surfResult != null) { // the images are visually similar\r\n\r\n\t\t\t\ttopImagesURLs.put(toMatchedPhotoURL,\r\n\t\t\t\t\t\tsurfResult.getPiontSimilarity());\r\n\r\n\t\t\t\ttopImagesNames.put(toMatchedPhotoURL, photo.getPhotoId());\r\n\r\n\t\t\t\ttotalNumberOfSimilarImages += 1;\r\n\t\t\t\tif (!compact) {\r\n\r\n\t\t\t\t\toutRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getScore()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getAvgDistance()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getPiontSimilarity()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getCommonKeyPointsCount()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ \"null ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\tSystem.out.println(\"Downloading Similar Image\");\r\n\t\t\t\t\tString destFileName = similarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Generate Word Statistics\r\n\t\t\t\t// For the a certain word (tag) add image info to its list if\r\n\t\t\t\t// this image\r\n\t\t\t\t// is visually similar to the input image\r\n\t\t\t\tupdateWordRelatedImageList(allCandidateWords,\r\n\t\t\t\t\t\trelevantWordImages, photo, surfResult);\r\n\t\t\t} else {\r\n\r\n\t\t\t\tif (!compact) {\r\n\t\t\t\t\t// Images are visually not similar\r\n\t\t\t\t\toutIrrRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \" ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t// We also need to get some information if a certain word is\r\n\t\t\t\t\t// also used by visually not similar images\r\n\t\t\t\t\tSystem.out.println(\"Downloading Non Similar Image\");\r\n\t\t\t\t\tString destFileName = dissimilarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tupdateWordNotRelatedImageList(relevantWordImages, photo);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByHandlerList();",
"@GET(\"/tags/{query}/media/recent\" + CLIENT_ID)\n public void searchPhotos(@Path(\"query\") String query, Callback<WebResponse<ArrayList<InstagramPhoto>>> callback);",
"List<Bitmap> getFavoriteRecipeImgs();",
"private void processImages() throws MalformedURLException, IOException {\r\n\r\n\t\tNodeFilter imageFilter = new NodeClassFilter(ImageTag.class);\r\n\t\timageList = fullList.extractAllNodesThatMatch(imageFilter, true);\r\n\t\tthePageImages = new HashMap<String, byte[]>();\r\n\r\n\t\tfor (SimpleNodeIterator nodeIter = imageList.elements(); nodeIter\r\n\t\t\t\t.hasMoreNodes();) {\r\n\t\t\tImageTag tempNode = (ImageTag) nodeIter.nextNode();\r\n\t\t\tString tagText = tempNode.getText();\r\n\r\n\t\t\t// Populate imageUrlText String\r\n\t\t\tString imageUrlText = tempNode.getImageURL();\r\n\r\n\t\t\tif (imageUrlText != \"\") {\r\n\t\t\t\t// Print to console, to verify relative link processing\r\n\t\t\t\tSystem.out.println(\"ImageUrl to Retrieve:\" + imageUrlText);\r\n\r\n\t\t\t\tbyte[] imgArray = downloadBinaryData(imageUrlText);\r\n\r\n\t\t\t\tthePageImages.put(tagText, imgArray);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"@Override\n public FlickrResponse searchPhoto(String tags) throws IOException {\n return flickrService.searchPhoto(tags);\n }",
"public void getImageResults(String tag){\n showProgressBar(true);\n HttpClient.get(\"rest/\", getRequestParams(tag), new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n String response = new String(responseBody, StandardCharsets.UTF_8);\n response = StringUtils.replace(response, \"jsonFlickrApi(\", \"\");\n response = StringUtils.removeEnd(response, \")\");\n Log.d(\"SERVICE RESPONSE\", response);\n Gson gson = new Gson();\n FlickrSearchResponse jsonResponse = gson.fromJson(response, FlickrSearchResponse.class);\n if(jsonResponse.getStat().equals(\"fail\")){\n //api returned an error\n searchHelperListener.onErrorResponseReceived(jsonResponse.getMessage());\n } else {\n //api returned data\n searchHelperListener.onSuccessResponseReceived(jsonResponse);\n }\n showProgressBar(false);\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n Log.d(\"SERVICE FAILURE\", error.getMessage());\n searchHelperListener.onErrorResponseReceived(error.getMessage());\n showProgressBar(false);\n }\n });\n\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByTransform(int index);",
"public EC2DescribeImagesResponse describeImages(EC2DescribeImages request) {\n EC2DescribeImagesResponse images = new EC2DescribeImagesResponse();\n try {\n String[] templateIds = request.getImageSet();\n EC2ImageFilterSet ifs = request.getFilterSet();\n\n if (templateIds.length == 0) {\n images = listTemplates(null, images);\n } else {\n for (String s : templateIds) {\n images = listTemplates(s, images);\n }\n }\n if (ifs != null)\n return ifs.evaluate(images);\n } catch (Exception e) {\n logger.error(\"EC2 DescribeImages - \", e);\n handleException(e);\n }\n return images;\n }",
"GetImagesResult getImages(GetImagesRequest getImagesRequest);",
"int seachImage(Image img) {\r\n\t\treturn 1;\r\n\t}",
"public void searchImages(View view) {\n imageList.clear();\n adapter.clear();\n Log.d(\"DEBUG\", \"Search Images\");\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n Log.d(\"DEBUG\", getUrl(1).toString());\n retrieveImages(getUrl(1).toString());\n }",
"java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByTransformList();",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform();",
"FetchedImage getFujimiyaUrl(String query,int maxRankOfResult){\n try{\n //Get SearchResult\n Search search = getSearchResult(query, maxRankOfResult);\n List<Result> items = search.getItems();\n for(Result result: items){\n int i = items.indexOf(result);\n logger.log(Level.INFO,\"query: \" + query + \" URL: \"+result.getLink());\n logger.log(Level.INFO,\"page URL: \"+result.getImage().getContextLink());\n if(result.getImage().getWidth()+result.getImage().getHeight()<600){\n logger.log(Level.INFO,\"Result No.\"+i+\" is too small image. next.\");\n continue;\n }\n if(DBConnection.isInBlackList(result.getLink())){\n logger.log(Level.INFO,\"Result No.\"+i+\" is included in the blacklist. next.\");\n continue;\n }\n HttpURLConnection connection = (HttpURLConnection)(new URL(result.getLink())).openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setInstanceFollowRedirects(false);\n connection.connect();\n if(connection.getResponseCode()==200){\n return new FetchedImage(connection.getInputStream(),result.getLink());\n }else{\n logger.log(Level.INFO,\"Result No.\"+i+\" occurs error while fetching the image. next.\");\n continue;\n }\n }\n //If execution comes here, connection has failed 10 times.\n throw new ConnectException(\"Connection failed 10 times\");\n\n } catch (IOException e) {\n // TODO Auto-generated catch block\n logger.log(Level.SEVERE,e.toString());\n e.printStackTrace();\n }\n return null;\n}",
"@Override\n\tpublic String imageSearch(QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(IData.URL_SEARCH + param.toString());\n\t}",
"void loadImages(int id_image, HouseRepository.GetImageFromHouseCallback callback);",
"private void onImagePicked(@NonNull final byte[] imageBytes) {\n setBusy(true);\n\n // Make sure we don't show a list of old concepts while the image is being uploaded\n adapter.setData(Collections.<Concept>emptyList());\n\n new AsyncTask<Void, Void, ClarifaiResponse<List<ClarifaiOutput<Concept>>>>() {\n @Override protected ClarifaiResponse<List<ClarifaiOutput<Concept>>> doInBackground(Void... params) {\n // The default Clarifai model that identifies concepts in images\n final ConceptModel generalModel = App.get().clarifaiClient().getDefaultModels().foodModel();\n\n // Use this model to predict, with the image that the user just selected as the input\n return generalModel.predict()\n .withInputs(ClarifaiInput.forImage(ClarifaiImage.of(imageBytes)))\n .executeSync();\n }\n\n @Override protected void onPostExecute(ClarifaiResponse<List<ClarifaiOutput<Concept>>> response) {\n setBusy(false);\n if (!response.isSuccessful()) {\n showErrorSnackbar(R.string.error_while_contacting_api);\n return;\n }\n final List<ClarifaiOutput<Concept>> predictions = response.get();\n if (predictions.isEmpty()) {\n showErrorSnackbar(R.string.no_results_from_api);\n return;\n }\n adapter.setData(predictions.get(0).data());\n\n // INSERT METHOD FOR USER SELECTION OF FOOD\n\n // ADDED FOR DATABASE\n try {\n readCSVToMap(\"ABBREV_2.txt\");\n }\n catch (Exception e){\n Log.d(\"Failure\", \"CSV not read into database\");\n }\n String exampleResult = predictions.get(0).data().get(0).name();\n final List<String> list = listOfKeys(exampleResult);\n\n // change this line to take in user input\n final String key2 = list.get(0); // arbitrary selection of key\n\n final List<String> val = db.get(key2);\n final String message = String.valueOf(val.get(6)); //index 6 contains carb info\n Log.d(\"Output\", message);\n imageView.setImageBitmap(BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.length));\n }\n\n private void showErrorSnackbar(@StringRes int errorString) {\n Snackbar.make(\n root,\n errorString,\n Snackbar.LENGTH_INDEFINITE\n ).show();\n }\n }.execute();\n }",
"private void imageSearch(ArrayList<Html> src) {\n // loop through the Html objects\n for(Html page : src) {\n\n // Temp List for improved readability\n ArrayList<Image> images = page.getImages();\n\n // loop through the corresponding images\n for(Image i : images) {\n if(i.getName().equals(this.fileName)) {\n this.numPagesDisplayed++;\n this.pageList.add(page.getLocalPath());\n }\n }\n }\n }",
"@Override\n\tpublic String imageLists(String url, QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(url + param.toString());\n\t}",
"@Override\n\tpublic List<PersonalisationMediaModel> getImageByID(final String imageID)\n\t{\n\t\tfinal String query1 = \"Select {pk} from {PersonalisationMedia} Where {code}=?imageId and {user}=?user\";\n\t\t/**\n\t\t * select distinct {val:pk} from {PersonalisationMediaModel as val join MediaModel as media on\n\t\t * {media:PK}={val.image} join User as user on {user:pk}={val:user} and {media:code}=?imageId and {user:pk}=?user}\n\t\t */\n\t\tfinal UserModel user = getUserService().getCurrentUser();\n\t\tfinal FlexibleSearchQuery fQuery = new FlexibleSearchQuery(query1);\n\t\tfinal Map<String, Object> params = new HashMap<>();\n\t\tparams.put(\"imageId\", imageID);\n\t\tparams.put(\"user\", user);\n\t\tfQuery.addQueryParameters(params);\n\t\tLOG.info(\"getImageByID\" + fQuery);\n\t\tfinal SearchResult<PersonalisationMediaModel> searchResult = flexibleSearchService.search(fQuery);\n\t\treturn searchResult.getResult();\n\t}",
"public void findImages() {\n \t\tthis.mNoteItemModel.findImages(this.mNoteItemModel.getContent());\n \t}",
"public void notifyFinishGetSimilarArtist(ArtistInfo a, Image img, long id);",
"private void imgDetected(Matcher matcher) {\n String component;\n matcher.reset();\n\n // store src value if <img> exist\n while (matcher.find()) {\n Data.imagesSrc.add(matcher.group(1));\n }\n\n // separate if the paragraph contain img\n // replace <img> with -+-img-+- to indicate image position in the text\n component = matcher.replaceAll(\"-+-img-+-\");\n\n //split the delimiter to structure image position\n String[] imageStructure = component.split(\"-\\\\+-\");\n\n // start looping the structured text\n int imageFoundIndex = 0;\n for (String structure : imageStructure) {\n // continue if the current index is not empty string \"\"\n if (!structure.trim().equals(\"\")) {\n // create ImageView if current index value equeal to \"img\"\n if (structure.trim().equals(\"img\")) {\n createImageView();\n imageFoundIndex++;\n } else {\n // else create textView for the text\n generateView(structure);\n }\n }\n }\n }",
"List<IbeisImage> uploadImages(List<File> images) throws UnsupportedImageFileTypeException, IOException,\n MalformedHttpRequestException, UnsuccessfulHttpRequestException;",
"public DetectorMatchResponse findMatchingDetectorMappings(List<Map<String, String>> tagsList) {\n isTrue(tagsList.size() > 0, \"tagsList must not be empty\");\n\n val uri = baseUri + API_PATH_MATCHING_DETECTOR_BY_TAGS;\n Content content;\n try {\n String body = objectMapper.writeValueAsString(tagsList);\n content = httpClient.post(uri, body);\n } catch (IOException e) {\n val message = \"IOException while getting matching detectors for\" +\n \": tags=\" + tagsList +\n \", httpMethod=POST\" +\n \", uri=\" + uri;\n throw new DetectorMappingRetrievalException(message, e);\n }\n try {\n return objectMapper.readValue(content.asBytes(), DetectorMatchResponse.class);\n } catch (IOException e) {\n val message = \"IOException while deserializing detectorMatchResponse\" +\n \": tags=\" + tagsList;\n throw new DetectorMappingDeserializationException(message, e);\n }\n\n }",
"public Observable<ServiceResponse<MatchResponseInner>> matchMethodWithServiceResponseAsync(String listId, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.matchMethod(listId, cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {\n @Override\n public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<MatchResponseInner> clientResponse = matchMethodDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }",
"List<Bitmap> getRecipeImgSmall();",
"private void getImagesFromServer() {\n trObtainAllPetImages.setUser(user);\n trObtainAllPetImages.execute();\n Map<String, byte[]> petImages = trObtainAllPetImages.getResult();\n Set<String> names = petImages.keySet();\n\n for (String petName : names) {\n byte[] bytes = petImages.get(petName);\n Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, Objects.requireNonNull(bytes).length);\n int index = user.getPets().indexOf(new Pet(petName));\n user.getPets().get(index).setProfileImage(bitmap);\n ImageManager.writeImage(ImageManager.PET_PROFILE_IMAGES_PATH, user.getUsername() + '_' + petName, bytes);\n }\n }",
"private static final byte[] xfuzzy_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -95, 0, 0, -1,\n\t\t\t\t-1, -1, -82, 69, 12, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77,\n\t\t\t\t97, 100, 101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0,\n\t\t\t\t33, -7, 4, 1, 10, 0, 0, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 2,\n\t\t\t\t36, -124, -113, -87, -101, -31, -33, 32, 120, 97, 57, 68, -93,\n\t\t\t\t-54, -26, 90, -24, 49, 84, -59, 116, -100, 88, -99, -102, 25,\n\t\t\t\t30, -19, 36, -103, -97, -89, -62, 117, -119, 51, 5, 0, 59 };\n\t\treturn data;\n\t}",
"public RatingSearch explode() {\n Elements elements = doc.getElementsByTag(\"table\");\n IqdbMatch bestMatch = null;\n List<IqdbMatch> additionalMatches = new LinkedList<>();\n for (int i = 1; i < elements.size(); i++) {\n //iterating through all the table elements. First one is your uploaded image\n\n //Each table is one \"card\" on iqdb so only the second one will be the \"best match\"\n Element element = elements.get(i);\n IqdbElement iqdbElement = new IqdbElement(element);\n\n Elements noMatch = element.getElementsContainingText(\"No relevant matches\");\n if (noMatch.size() > 0) {\n log.warn(\"There was no relevant match for this document\");\n// break;\n return null;\n }\n// TODO I don't think we can determine if these are even relevant. So once we see 'No relevent matches' we can\n// just call it there. We won't need 'Possible Match' yet\n// Elements possibleMatchElement = element.getElementsContainingText(\"Possible match\");\n// if (possibleMatchElement.size() > 0) {\n// additionalMatches.add(iqdbElement.explode(IqdbMatchType.NO_RELEVANT_BUT_POSSIBLE));\n// }\n\n //Second element will provide all the information you need. going into the similarity and all that is a waste of time\n //Use the similarity search for Best Match to identify the element that is best match if you don't trust the 2nd.\n Elements bestMatchElement = element.getElementsContainingText(\"Best Match\");\n if (bestMatchElement.size() > 0) {\n bestMatch = iqdbElement.explode(IqdbMatchType.BEST);\n }\n\n //can similarly search for \"Additional match\" to find all teh additional matches. Anything beyond additional matches is a waste of time.\n Elements additionalMatchElements = element.getElementsContainingText(\"Additional match\");\n if (additionalMatchElements.size() > 0) {\n additionalMatches.add(iqdbElement.explode(IqdbMatchType.ADDITIONAL));\n }\n }\n\n if (bestMatch == null && !additionalMatches.isEmpty()) {\n log.warn(\"No Best Match found, taking first additionalMatch, does this ever happen?\");\n bestMatch = additionalMatches.remove(0);\n }\n\n return null;//new RatingSearch(bestMatch, additionalMatches);\n }",
"public static SearchResult getChampionImage(String championList, String championID) {\n try {\r\n JSONObject holder = new JSONObject(championList);\r\n JSONObject holderItems = holder.getJSONObject(\"data\");\r\n SearchResult champion = new SearchResult();\r\n\r\n for (Iterator<String> it = holderItems.keys(); it.hasNext(); ) { //iterate through champion json objects\r\n String key = it.next();\r\n JSONObject resultItem = holderItems.getJSONObject(key);\r\n\r\n if (resultItem.getString(\"key\").equals(championID)) {\r\n champion.championName = key; //the key for the json object is also the name of the champion\r\n break;\r\n }\r\n }\r\n\r\n String tempName = champion.championName + \".png\"; //construct string for champion image\r\n\r\n champion.championImage = Uri.parse(BASE_URL_CHAMPION_IMAGE + tempName).buildUpon().build().toString();\r\n\r\n return champion;\r\n } catch (JSONException e) {\r\n System.out.println(e);\r\n return null;\r\n }\r\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByHandlerOrBuilder();",
"private EC2DescribeImagesResponse listTemplates(String templateId, EC2DescribeImagesResponse images) throws Exception {\n try {\n List<CloudStackTemplate> result = new ArrayList<CloudStackTemplate>();\n\n if (templateId != null) {\n List<CloudStackTemplate> template = getApi().listTemplates(\"executable\", null, null, null, templateId, null, null, null);\n if (template != null) {\n result.addAll(template);\n }\n } else {\n List<CloudStackTemplate> selfExecutable = getApi().listTemplates(\"selfexecutable\", null, null, null, null, null, null, null);\n if (selfExecutable != null) {\n result.addAll(selfExecutable);\n }\n\n List<CloudStackTemplate> featured = getApi().listTemplates(\"featured\", null, null, null, null, null, null, null);\n if (featured != null) {\n result.addAll(featured);\n }\n\n List<CloudStackTemplate> sharedExecutable = getApi().listTemplates(\"sharedexecutable\", null, null, null, null, null, null, null);\n if (sharedExecutable != null) {\n result.addAll(sharedExecutable);\n }\n\n List<CloudStackTemplate> community = getApi().listTemplates(\"community\", null, null, null, null, null, null, null);\n if (community != null) {\n result.addAll(community);\n }\n }\n\n if (result != null && result.size() > 0) {\n for (CloudStackTemplate temp : result) {\n EC2Image ec2Image = new EC2Image();\n ec2Image.setId(temp.getId().toString());\n ec2Image.setAccountName(temp.getAccount());\n ec2Image.setName(temp.getName());\n ec2Image.setDescription(temp.getDisplayText());\n ec2Image.setOsTypeId(temp.getOsTypeId().toString());\n ec2Image.setIsPublic(temp.getIsPublic());\n ec2Image.setState(temp.getIsReady() ? \"available\" : \"pending\");\n ec2Image.setDomainId(temp.getDomainId());\n if (temp.getHyperVisor().equalsIgnoreCase(\"xenserver\"))\n ec2Image.setHypervisor(\"xen\");\n else if (temp.getHyperVisor().equalsIgnoreCase(\"ovm\"))\n ec2Image.setHypervisor(\"ovm\"); // valid values for hypervisor is 'ovm' and 'xen'\n else\n ec2Image.setHypervisor(\"\");\n if (temp.getDisplayText() == null)\n ec2Image.setArchitecture(\"\");\n else if (temp.getDisplayText().indexOf(\"x86_64\") != -1)\n ec2Image.setArchitecture(\"x86_64\");\n else if (temp.getDisplayText().indexOf(\"i386\") != -1)\n ec2Image.setArchitecture(\"i386\");\n else\n ec2Image.setArchitecture(\"\");\n List<CloudStackKeyValue> resourceTags = temp.getTags();\n for (CloudStackKeyValue resourceTag : resourceTags) {\n EC2TagKeyValue param = new EC2TagKeyValue();\n param.setKey(resourceTag.getKey());\n if (resourceTag.getValue() != null)\n param.setValue(resourceTag.getValue());\n ec2Image.addResourceTag(param);\n }\n images.addImage(ec2Image);\n }\n }\n return images;\n } catch (Exception e) {\n logger.error(\"List Templates - \", e);\n throw new Exception(e.getMessage() != null ? e.getMessage() : e.toString());\n }\n }",
"java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByHandlerOrBuilderList();",
"public interface ImageMetadataService {\n\n List<ArtistDTO> getArtistsByPrediction(String name, String name2, String surname);\n\n List<ImageTypeDTO> getImageTypesByPrediction(String name);\n\n UploadImageMetadataDTO saveMetadata(UploadImageMetadataDTO uploadImageMetadataDTO);\n\n List<ImageDTO> getTop10Images(String username, String title);\n\n List<ImageDTO> getAllUserImages(String username);\n\n List<ImageDTO> searchImagesByCriteria(SearchImageCriteriaDTO searchImageCriteriaDTO);\n\n ImageDTO updateImageMetadata(ImageDTO imageDTO);\n\n List<ImageDTO> getImagesTop50();\n\n void rateImage(RateImageDTO rateImageDTO);\n\n List<ImageDTO> getAllImages();\n}",
"public static List<PNMedia> discoveryFlickrImages(String[] tags) throws Exception{\r\n\t\tif(tags != null && tags.length > 0){\r\n\t\t\tList<PNMedia> flickrPhotosList = new ArrayList<PNMedia>();\r\n\t\t\t\t\r\n\t\t\tFlickr flickr = new Flickr(flickrApiKey, flickrSharedSecret, new REST());\r\n\t\t\tFlickr.debugStream = false;\r\n\t\t\t\r\n\t\t\tSearchParameters searchParams=new SearchParameters();\r\n\t\t searchParams.setSort(SearchParameters.INTERESTINGNESS_ASC);\r\n\t\t \r\n\t\t searchParams.setTags(tags);\r\n\t\t \r\n\t\t PhotosInterface photosInterface = flickr.getPhotosInterface();\r\n\t\t PhotoList<Photo> photoList = photosInterface.search(searchParams, 10, 1); // quantidade de fotos retornadas (5)\r\n\t\t \r\n\t\t if(photoList != null){\r\n\t\t for(int i=0; i<photoList.size(); i++){\r\n\t\t Photo photo = (Photo)photoList.get(i);\r\n\t\t PNMedia media = new PNMedia();\r\n\t\t \r\n\t\t String description = photo.getDescription();\r\n\t\t if(description == null)\r\n\t\t \t description = photo.getTitle();\r\n\t\t media.setMediaURL(photo.getLargeUrl()); media.setMediaURLAux(photo.getSmallSquareUrl()); media.setMediaCaption(photo.getTitle()); media.setMediaInfo(description);\r\n\t\t flickrPhotosList.add(media);\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t return flickrPhotosList;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tthrow new Exception(\"Null tags or tags is empty. \");\r\n\t\t}\r\n\t}",
"public interface Image {\n /**\n * @return the image ID\n */\n String getId();\n\n /**\n * @return the image ID, or null if not present\n */\n String getParentId();\n\n /**\n * @return Image create timestamp\n */\n long getCreated();\n\n /**\n * @return the image size\n */\n long getSize();\n\n /**\n * @return the image virtual size\n */\n long getVirtualSize();\n\n /**\n * @return the labels assigned to the image\n */\n Map<String, String> getLabels();\n\n /**\n * @return the names associated with the image (formatted as repository:tag)\n */\n List<String> getRepoTags();\n\n /**\n * @return the digests associated with the image (formatted as repository:tag@sha256:digest)\n */\n List<String> getRepoDigests();\n}",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage();",
"public void features() throws MalformedURLException, IOException {\n\t\tMBFImage query = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao01.jpg\"));\n\t\tMBFImage target = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao02.jpg\"));\n\n\t\tDoGSIFTEngine engine = new DoGSIFTEngine();\n\t\tLocalFeatureList<Keypoint> queryKeypoints = engine.findFeatures(query.flatten());\n\t\tLocalFeatureList<Keypoint> targetKeypoints = engine.findFeatures(target.flatten());\n\t\tLocalFeatureMatcher<Keypoint> matcher1 = new BasicMatcher<Keypoint>(80);\n\t\tLocalFeatureMatcher<Keypoint> matcher = new BasicTwoWayMatcher<Keypoint>();\n\t\t/*\n\t\t * matcher.setModelFeatures(queryKeypoints);\n\t\t * matcher.findMatches(targetKeypoints); MBFImage basicMatches =\n\t\t * MatchingUtilities.drawMatches(query, target, matcher.getMatches(),\n\t\t * RGBColour.RED); DisplayUtilities.display(basicMatches);\n\t\t */\n\t\tRobustAffineTransformEstimator modelFitter = new RobustAffineTransformEstimator(5.0, 1500,\n\t\t\t\tnew RANSAC.PercentageInliersStoppingCondition(0.5));\n\t\tmatcher = new ConsistentLocalFeatureMatcher2d<Keypoint>(new FastBasicKeypointMatcher<Keypoint>(8), modelFitter);\n\t\tmatcher.setModelFeatures(queryKeypoints);\n\t\tmatcher.findMatches(targetKeypoints);\n\t\tMBFImage consistentMatches = MatchingUtilities.drawMatches(query, target, matcher.getMatches(), RGBColour.RED);\n\t\tDisplayUtilities.display(consistentMatches);\n\t\ttarget.drawShape(query.getBounds().transform(modelFitter.getModel().getTransform().inverse()), 3,\n\t\t\t\tRGBColour.BLUE);\n\t\t// DisplayUtilities.display(target);\n\t}",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage(\n @QueryMap ListImage queryParameters);",
"private static void updateRelatedImageList(\r\n\t\t\tMap<String, WordImage> relevantWordImages, Photo photo,\r\n\t\t\tMatchingResult surfResult, String word) {\n\r\n\t\tString key = getRelevantKeyForRelevantImages(relevantWordImages, word);\r\n\r\n\t\tif (key != null) {\r\n\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImages().add(info);\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImagesMap()\r\n\t\t\t\t\t.put(info.getId(), info);\r\n\r\n\t\t\trelevantWordImages.get(key).addSimilarImageId(info.getId());\r\n\r\n\t\t}\r\n\r\n\t\telse {\r\n\r\n\t\t\tWordImage wi = new WordImage(word);\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\twi.addSimilarImage(info);\r\n\r\n\t\t\twi.addSimilarImage(photo.getPhotoId(), info);\r\n\r\n\t\t\trelevantWordImages.put(word, wi);\r\n\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic String searchimage(int cbid) throws Exception {\n\t\treturn dao.searchimage(cbid);\r\n\t}",
"public Point findImage(BufferedImage image, int index) {\n int smallWidth = image.getWidth();\n int smallHeight = image.getHeight();\n int[][] smallPixels = new int[smallWidth][smallHeight];\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n smallPixels[x][y] = image.getRGB(x, y);\n }\n }\n boolean good;\n int count = 0;\n for(int X = 0; X <= bigWidth - smallWidth; X++) {\n for(int Y = 0; Y <= bigHeight - smallHeight; Y++) {\n good = true;\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n if(smallPixels[x][y] != bigPixels[X + x][Y + y]) {\n good = false;\n break;\n }\n }\n if(!good) {\n break;\n }\n }\n if(good) {\n if(count == index) {\n return(new Point(X, Y));\n }\n count++;\n }\n }\n }\n return(null);\n }",
"public static String getImageId(WebElement image) {\n String imageUrl = image.getAttribute(\"src\");\n\n int indexComparisonStart = imageUrl.indexOf(START_TOKEN) + START_TOKEN.length();\n int indexComparisonFinish = imageUrl.substring(indexComparisonStart).indexOf(STOP_TOKEN);\n\n return imageUrl.substring(indexComparisonStart, indexComparisonStart + indexComparisonFinish);\n }",
"private void searchImages()\n {\n searchWeb = false;\n search();\n }",
"java.lang.String getHotelImageURLs(int index);",
"public void findBookDetails(AnnotateImageResponse imageResponse) throws IOException {\n\n String google = \"http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=\";\n String search = \"searchString\";\n String charset = \"UTF-8\";\n\n URL url = new URL(google + URLEncoder.encode(search, charset));\n Reader reader = new InputStreamReader(url.openStream(), charset);\n GoogleResults results = new Gson().fromJson(reader, GoogleResults.class);\n\n // Show title and URL of 1st result.\n System.out.println(results.getResponseData().getResults().get(0).getTitle());\n System.out.println(results.getResponseData().getResults().get(0).getUrl());\n }",
"@Override\n\tpublic List<Image> findAllImage() {\n\t\treturn new ImageDaoImpl().findAllImage();\n\t}",
"public interface IImageInputBoundary {\n\n List<ImageResponseModel> GetImagesByCategory(ImageRequestModel requestModel);\n List<ImageResponseModel> GetImagesByComposition(ImageRequestModel requestModel);\n}",
"@Override\n\tpublic List<AddBookDto> findListimage(List<addBookBo> listBo) throws IOException {\n\n\t\tFile uploadFileDir, uploadImageDir;\n\n\t\tFileInputStream fileInputStream = null;\n\n\t\tList<AddBookDto> dtoList = new ArrayList<>();\n\n\t\tSet<Category> setCategory = new HashSet<>();\n\n\t\tSystem.out.println(\"UploadService.findListimage()\");\n\n\t\tfor (addBookBo bo : listBo) {\n\n\t\t\tAddBookDto dto = new AddBookDto();\n\n\t\t\tBeanUtils.copyProperties(bo, dto);\n\n\t\t\tSystem.out.println(\"UploadService.findListimage()-------\" + bo.getAuthor());\n\n\t\t\tuploadImageDir = new File(imageUploadpath + \"/\" + dto.getImageUrl() + \".jpg\");\n\n\t\t\tif (uploadImageDir.exists()) {\n\n\t\t\t\tbyte[] buffer = getBytesFromFile(uploadImageDir);\n\t\t\t\t// System.out.println(bo.getTitle()+\"====b===\" + buffer);\n\t\t\t\tdto.setImgeContent(buffer);\n\n\t\t\t}\n\n\t\t\tSystem.out.println(dto.getTitle() + \"====dto===\" + dto.getImgeContent());\n\t\t\tdtoList.add(dto);\n\n\t\t}\n\n\t\treturn dtoList;\n\t}",
"public Image getImageById(final String imageId)\n {\n GetImageByIdQuery getImageByIdQuery = new GetImageByIdQuery(imageId);\n List<Image> ImageList = super.queryResult(getImageByIdQuery);\n if (CollectionUtils.isEmpty(ImageList) || ImageList.size() > 1)\n {\n LOG.error(\"The Image cannot be found by this id:\" + imageId);\n return null;\n }\n return ImageList.get(0);\n }",
"@Test\n\tpublic void searchImageWithUpload() throws InterruptedException, Exception {\n\n\t\t// To click on Images link\n\t\thomePage.clickSearchByImage();\n\t\t\n\t\t// To verify if ui is navigated to Search by image page\n\t\tAssert.assertTrue(homePage.verifySearchByImageBox());\n\n\t\t// Upload an image from local machine\n\t\tsearchPage.uploadLocalImage(Settings.getLocalImage());\n\t\t// To verify upload status\n\t\tAssert.assertTrue(searchPage.verifyUploadStatus());\n\n\t\t// Find specified image on GUI\n\t\tWebElement webElement = searchPage.navigateToImage(Settings.getVisitRule());\n\n\t\t// Take a snapshot for expected visit page\n\t\tsearchPage.snapshotLastPage(webElement);\n\n\t\t// Download specified image by expected rule\n\t\tString fileName = Settings.getDownloadImage();\n\t\tboolean down = searchPage.downloadImagetoLocal(webElement, fileName);\n\t\tAssert.assertTrue(down);\n\n\t\t// verify two images match or not\n\t\tAssert.assertTrue(searchPage.verifyImageIsSame(Settings.getDownloadImage(), Settings.getLocalImage()));\n\n\t}",
"@Override\n public void onSuccess(Uri uri) {\n if (!ImageListUrl.contains(uri.toString())) {\n ImageListUrl.add(uri.toString());\n\n /// add property if imageurl arraylist same with imagelist arraylist\n if (ImageListUrl.size() == ImageList.size()) {\n Toast.makeText(NewRecipe.this, ImageListUrl.toString(), Toast.LENGTH_SHORT).show();\n\n saveRecipe();\n\n }\n }\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByTransformOrBuilder();",
"public List<Recognition> recognizeImage(Bitmap bitmap) {\n Bitmap croppedBitmap = Bitmap.createScaledBitmap(bitmap, cropSize, cropSize, true);\n// Bitmap croppedBitmap = Bitmap.createBitmap(cropSize, cropSize, Bitmap.Config.ARGB_8888);\n// final Canvas canvas = new Canvas(croppedBitmap);\n// canvas.drawBitmap(bitmap, frameToCropTransform, null);\n final List<Recognition> ret = new LinkedList<>();\n List<Recognition> recognitions = detector.recognizeImage(croppedBitmap);\n// long before=System.currentTimeMillis();\n// for (int k=0; k<100; k++) {\n// recognitions = detector.recognizeImage(croppedBitmap);\n// int a = 0;\n// }\n// long after=System.currentTimeMillis();\n// String log = String.format(\"tensorflow takes %.03f s\\n\", ((float)(after-before)/1000/100));\n// Log.d(\"MATCH TEST\", log);\n for (Recognition r : recognitions) {\n if (r.getConfidence() < minConfidence)\n continue;\n// RectF location = r.getLocation();\n// cropToFrameTransform.mapRect(location);\n// r.setOriginalLoc(location);\n// Bitmap cropped = Bitmap.createBitmap(bitmap, (int)location.left, (int)location.top, (int)location.width(), (int)location.height());\n// r.setObjectImage(cropped);\n BoxPosition bp = r.getLocation();\n// r.rectF = new RectF(bp.getLeft(), bp.getTop(), bp.getRight(), bp.getBottom());\n// cropToFrameTransform.mapRect(r.rectF);\n ret.add(r);\n }\n\n return ret;\n }",
"private static final byte[] xfuzzyload_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, -82,\n\t\t\t\t69, 12, -128, -128, -128, -1, -1, -1, -64, -64, -64, -1, -1, 0,\n\t\t\t\t0, 0, 0, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100, 101,\n\t\t\t\t32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4, 1,\n\t\t\t\t10, 0, 6, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 3, 75, 8, -86,\n\t\t\t\t-42, 11, 45, -82, -24, 32, -83, -42, -80, 43, -39, -26, -35,\n\t\t\t\t22, -116, 1, -9, 24, -127, -96, 10, 101, 23, 44, 2, 49, -56,\n\t\t\t\t108, 21, 15, -53, -84, -105, 74, -86, -25, 50, -62, -117, 68,\n\t\t\t\t44, -54, 74, -87, -107, 82, 21, 40, 8, 81, -73, -96, 78, 86,\n\t\t\t\t24, 53, 82, -46, 108, -77, -27, -53, 78, -85, -111, -18, 116,\n\t\t\t\t87, 8, 23, -49, -123, 4, 0, 59 };\n\t\treturn data;\n\t}",
"public static ArrayList<Result> getCCVBasedSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.CCV));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t\t// create result object\n\t\t\t \tResult result = new Result();\n\t\t\t \tresult.mFilename = imageName;\n\t\t\t \tresult.mSimilarity = intersection;\n\t\t\t \t\n\t\t\t \t// store result\n\t\t\t \trv.add(result);\n\t\t\t\t} catch (Exception ex) {}\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}",
"public Map<String, Photo> createGeoSimilarPhotoList(int maxCycles,\r\n\t\t\tboolean tagReq, boolean techTagReq) {\r\n\r\n\t\tMap<String, Photo> photoList = new HashMap<String, Photo>();\r\n\r\n\t\tpFet.getPanoramioGeoSimilarPhotoList(maxCycles, tagReq, techTagReq,\r\n\t\t\t\tphotoList);\r\n\r\n\t\tint panoPhotoReturend = photoList.size();\r\n\r\n\t\tMap<String, Photo> flickrPhotoList = fFet\r\n\t\t\t\t.getFlickrGeoSimilarPhotoList();\r\n\r\n\t\tint flickrPhotoReturend = flickrPhotoList.size();\r\n\r\n\t\tphotoList.putAll(flickrPhotoList);\r\n\r\n\t\ttotalNumberOfImages = flickrPhotoReturend + panoPhotoReturend;\r\n\r\n\t\treturn photoList;\r\n\t}",
"List<IbeisImage> uploadImages(List<File> images, File pathToTemporaryZipFile) throws\n UnsupportedImageFileTypeException, IOException, MalformedHttpRequestException, UnsuccessfulHttpRequestException;",
"private void loadAndCacheImages(Node node, FileContext cachedImageFilesystem) throws Exception\n {\n String imagePathBase = \"/\" + node.getTypeCode() + \"/\" + node.getNid();\n ImagesReponse imagesReponse = this.queryRemoteApi(ImagesReponse.class, imagePathBase + ImagesReponse.PATH, null);\n if (imagesReponse != null && imagesReponse.getNodes() != null && imagesReponse.getNodes().getNode() != null) {\n for (Image i : imagesReponse.getNodes().getNode()) {\n node.addImage(i);\n\n URI imageUri = UriBuilder.fromUri(Settings.instance().getTpAccessApiBaseUrl())\n .path(BASE_PATH)\n .path(imagePathBase + \"/image/\" + i.getData().mediaObjectId + \"/original\")\n .replaceQueryParam(ACCESS_TOKEN_PARAM, this.getAccessToken())\n .replaceQueryParam(FORMAT_PARAM, FORMAT_JSON)\n .build();\n\n ClientConfig config = new ClientConfig();\n Client httpClient = ClientBuilder.newClient(config);\n Response response = httpClient.target(imageUri).request().get();\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n org.apache.hadoop.fs.Path nodeImages = new org.apache.hadoop.fs.Path(HDFS_CACHE_ROOT_PATH + node.getNid());\n if (!cachedImageFilesystem.util().exists(nodeImages)) {\n cachedImageFilesystem.mkdir(nodeImages, FsPermission.getDirDefault(), true);\n }\n org.apache.hadoop.fs.Path cachedImage = new org.apache.hadoop.fs.Path(nodeImages, i.getData().mediaObjectId);\n i.setCachedUrl(cachedImage.toUri());\n if (!cachedImageFilesystem.util().exists(cachedImage)) {\n try (OutputStream os = cachedImageFilesystem.create(cachedImage, EnumSet.of(CreateFlag.CREATE, CreateFlag.OVERWRITE))) {\n IOUtils.copy(response.readEntity(InputStream.class), os);\n }\n }\n }\n else {\n throw new IOException(\"Error status returned while fetching remote API data;\" + response);\n }\n\n }\n }\n }",
"public static ArrayList<Result> getColorHistogramSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.HISTOGRAM));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t// create result object\n\t\t \tResult result = new Result();\n\t\t \tresult.mFilename = imageName;\n\t\t \tresult.mSimilarity = intersection;\n\t\t \t\n\t\t \t// store result\n\t\t \trv.add(result);\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImagesByHandlerOrBuilder(\n int index);",
"public void compareImageAction() {\n\t\tif (selectedAnimalModel == null) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (selectedAnimalModel.getId() == 0L || isImageChangedFlag) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tAsyncTask asyncTask = new AsyncTask() {\n\t\t\tAnimalModel animal1 = null;\n\t\t\tAnimalModel animal2 = null;\n\t\t\tAnimalModel animal3 = null;\n\n\t\t\t@Override\n\t\t\tprotected void onDone(boolean success) {\n\t\t\t\tif (!success) {\n\t\t\t\t\tshowDialog(ERROR_MESSAGE, \"Cannot compare images.\");\n\t\t\t\t} else {\n\t\t\t\t\tCompareImagesDialog dialog = new CompareImagesDialog(multimediaPanel, selectedAnimalModel, animal1, animal2, animal3);\n\t\t\t\t\tdialog.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected Boolean doInBackground() throws Exception {\n\t\t\t\ttry {\n\t\t\t\t\tArrayList<AnimalModel> models;\n\n\t\t\t\t\tmodels = DataManager.getInstance().getThreeSimilarImages(selectedAnimalModel);\n\n\t\t\t\t\tif (models.size() > 0) {\n\t\t\t\t\t\tanimal1 = models.get(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 1) {\n\t\t\t\t\t\tanimal2 = models.get(1);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 2) {\n\t\t\t\t\t\tanimal3 = models.get(2);\n\t\t\t\t\t}\n\n\t\t\t\t} catch (DataManagerException e1) {\n\t\t\t\t\tLogger.createLog(Logger.ERROR_LOG, e1.getMessage());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tasyncTask.start();\n\n\t}",
"private ArrayList<ImageItem> getData() {\n final ArrayList<ImageItem> imageItems = new ArrayList<>();\n // TypedArray imgs = getResources().obtainTypedArray(R.array.image_ids);\n for (int i = 0; i < f.size(); i++) {\n Bitmap bitmap = imageLoader.loadImageSync(\"file://\" + f.get(i));;\n imageItems.add(new ImageItem(bitmap, \"Image#\" + i));\n }\n return imageItems;\n }",
"static void redactImageFileColoredInfoTypes(String projectId, String inputPath, String outputPath)\n throws IOException {\n try (DlpServiceClient dlp = DlpServiceClient.create()) {\n // Specify the content to be redacted.\n ByteString fileBytes = ByteString.readFrom(new FileInputStream(inputPath));\n ByteContentItem byteItem =\n ByteContentItem.newBuilder().setType(BytesType.IMAGE_JPEG).setData(fileBytes).build();\n\n // Define types of info to redact associate each one with a different color.\n // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types\n ImageRedactionConfig ssnRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"US_SOCIAL_SECURITY_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(.3f).setGreen(.1f).setBlue(.6f).build())\n .build();\n ImageRedactionConfig emailRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"EMAIL_ADDRESS\").build())\n .setRedactionColor(Color.newBuilder().setRed(.5f).setGreen(.5f).setBlue(1).build())\n .build();\n ImageRedactionConfig phoneRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"PHONE_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(1).setGreen(0).setBlue(.6f).build())\n .build();\n\n // Create collection of all redact configurations.\n List<ImageRedactionConfig> imageRedactionConfigs =\n Arrays.asList(ssnRedactionConfig, emailRedactionConfig, phoneRedactionConfig);\n\n // List types of info to search for.\n InspectConfig config =\n InspectConfig.newBuilder()\n .addAllInfoTypes(\n imageRedactionConfigs.stream()\n .map(ImageRedactionConfig::getInfoType)\n .collect(Collectors.toList()))\n .build();\n\n // Construct the Redact request to be sent by the client.\n RedactImageRequest request =\n RedactImageRequest.newBuilder()\n .setParent(LocationName.of(projectId, \"global\").toString())\n .setByteItem(byteItem)\n .addAllImageRedactionConfigs(imageRedactionConfigs)\n .setInspectConfig(config)\n .build();\n\n // Use the client to send the API request.\n RedactImageResponse response = dlp.redactImage(request);\n\n // Parse the response and process results.\n FileOutputStream redacted = new FileOutputStream(outputPath);\n redacted.write(response.getRedactedImage().toByteArray());\n redacted.close();\n System.out.println(\"Redacted image written to \" + outputPath);\n }\n }",
"@GET\n @Path(\"image\")\n @Produces(MediaType.TEXT_PLAIN)\n public Response voidImage() {\n return Response.status(Response.Status.NOT_FOUND).build();\n }",
"public List<Image> parseBestOfImagesResult(Document doc) {\n\n ArrayList<Image> bestOfImages = new ArrayList<>();\n Elements htmlImages = doc.select(CSS_BEST_OF_IMAGE_QUERY);\n Timber.i(\"Best OfImages: %s\", htmlImages.toString());\n String href;\n Image bestOfImage;\n for (Element image : htmlImages) {\n href = image.attr(\"src\");\n Timber.i(\"Image src: %s\", href);\n bestOfImage = new Image(href);\n bestOfImages.add(bestOfImage);\n }\n return bestOfImages;\n }",
"public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }",
"public Observable<MatchResponseInner> matchMethodAsync(String listId, Boolean cacheImage) {\n return matchMethodWithServiceResponseAsync(listId, cacheImage).map(new Func1<ServiceResponse<MatchResponseInner>, MatchResponseInner>() {\n @Override\n public MatchResponseInner call(ServiceResponse<MatchResponseInner> response) {\n return response.body();\n }\n });\n }",
"public Observable<ServiceResponse<MatchResponseInner>> matchFileInputWithServiceResponseAsync(byte[] imageStream, String listId, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n if (imageStream == null) {\n throw new IllegalArgumentException(\"Parameter imageStream is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n RequestBody imageStreamConverted = RequestBody.create(MediaType.parse(\"image/gif\"), imageStream);\n return service.matchFileInput(listId, cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {\n @Override\n public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<MatchResponseInner> clientResponse = matchFileInputDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }",
"public ImageFiles() {\n\t\tthis.listOne = new ArrayList<String>();\n\t\tthis.listTwo = new ArrayList<String>();\n\t\tthis.listThree = new ArrayList<String>();\n\t\tthis.seenImages = new ArrayList<String>();\n\t\tthis.unseenImages = new ArrayList<String>();\n\t}",
"public interface SearchService {\n List<String> siftSearch(MultipartFile image) throws IOException;\n}",
"@ApiModelProperty(value = \"An image to give an indication of what to expect when renting this vehicle.\")\n public List<Image> getImages() {\n return images;\n }",
"private void getImagesFromDatabase() {\n try {\n mCursor = mDbAccess.getPuzzleImages();\n\n if (mCursor.moveToNext()) {\n for (int i = 0; i < mCursor.getCount(); i++) {\n String imagetitle = mCursor.getString(mCursor.getColumnIndex(\"imagetitle\"));\n String imageurl = mCursor.getString(mCursor.getColumnIndex(\"imageurl\"));\n mImageModel.add(new CustomImageModel(imagetitle, imageurl));\n mCursor.moveToNext();\n }\n } else {\n Toast.makeText(getActivity(), \"databse not created...\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }",
"public yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesResponse list(yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListMethod(), getCallOptions(), request);\n }",
"public boolean displayedDepartmentEmployeeImageMatch(List<String> names, List<String> images) {\n List<String> nonMatchingRecords = new ArrayList<>();\n for (int i = 0; i < names.size(); i++) {\n\n String imageSource = images.get(i).toLowerCase();\n String imageFileName = createImageName(names.get(i).toLowerCase());\n\n if (!imageSource.contains(imageFileName)) {\n nonMatchingRecords.add(names.get(i));\n }\n }\n if (nonMatchingRecords.size() > 0) {\n Reporter.log(\"FAILURE: Names of employees with non matching images\" +\n \" or inconsistently named imageFiles: \" +\n Arrays.toString(nonMatchingRecords.toArray()), true);\n return false;\n }\n return true;\n }",
"public Detections recognizeImage(Image image, int rotation) {\n\n Bitmap rgbFrameBitmap = Transform.convertYUVtoRGB(image);\n\n\n if (image.getFormat() != ImageFormat.YUV_420_888) {\n // unsupported image format\n Logger.addln(\"\\nWARN YoloHTTP.recognizeImage() unsupported image format\");\n return new Detections();\n }\n //return recognize(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkMaxAreaRectangle(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkNineBoxes(Transform.yuvBytes(image), image.getWidth(),image.getHeight(),rotation, rgbFrameBitmap,image.getHeight()/3,image.getWidth()/3,image.getHeight()/3,image.getWidth()/3);\n //return frameworkQuadrant(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n return frameworkMaxAreaRectBD(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n\n }",
"public List<Recognition> recognizeImage(Mat img) {\n frameToCropTransform =\n ImageUtil.getTransformationMatrix(\n img.cols(), img.rows(),\n cropSize, cropSize,\n 0, MAINTAIN_ASPECT);\n cropToFrameTransform = new Matrix();\n frameToCropTransform.invert(cropToFrameTransform);\n Bitmap tBM = Bitmap.createBitmap(img.cols(), img.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(img, tBM);\n return recognizeImage(tBM);\n }",
"public BufferedImage GetImage(String name) { return ImageList.get(name); }",
"public static Long getAValidImageId() {\n\t\tLong id = getAId();\n\t\tif (id == null) {\n\n\t\t\tImage img = new Image(\"http://dummy.com/img.jpg\", (long)(Math.random()*10000), \"Description\", \"keyword\", new Date(0001L));\n\t\t\tIImageStore imageStore = StoreFactory.getImageStore();\n\t\t\timageStore.insert(img);\n\n\t\t\tid = getAId();\n\t\t\tif (id == null) {\n\t\t\t\tthrow new RuntimeException(\"There are no images in DB, and I can't insert one. Cannot run tests without.\");\n\t\t\t}\n\t\t}\n\t\treturn id;\n\t}",
"public void setImage(int imageId) {\n this.imageId=imageId;\n\t}",
"public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}",
"@GetMapping(path = \"/images\", produces = \"application/json; charset=UTF-8\")\n public @ResponseBody ArrayNode getImageList() {\n final ArrayNode nodes = mapper.createArrayNode();\n for (final Image image : imageRepository.findAllPublic())\n try {\n nodes.add(mapper.readTree(image.toString()));\n } catch (final JsonProcessingException e) {\n e.printStackTrace();\n }\n return nodes;\n }",
"String getItemImage();",
"java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByTransformOrBuilderList();",
"protected abstract void setupImages(Context context);",
"private int getPetImages() {\n int nUserPets = user.getPets().size();\n Drawable defaultDrawable = getResources().getDrawable(R.drawable.single_paw, null);\n Bitmap defaultBitmap = ((BitmapDrawable) defaultDrawable).getBitmap();\n countImagesNotFound = new int[nUserPets];\n Arrays.fill(countImagesNotFound, 0);\n\n ExecutorService executorService = Executors.newCachedThreadPool();\n startRunnable(nUserPets, executorService);\n executorService.shutdown();\n\n try {\n executorService.awaitTermination(3, TimeUnit.MINUTES);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return calculateImagesNotFound();\n }"
]
| [
"0.62700015",
"0.58897376",
"0.5767267",
"0.5759937",
"0.5743681",
"0.57321453",
"0.55112725",
"0.5501859",
"0.5500844",
"0.54522055",
"0.5323158",
"0.5255359",
"0.52542335",
"0.5196973",
"0.51814985",
"0.5180431",
"0.516952",
"0.5143571",
"0.5131655",
"0.5131056",
"0.51222026",
"0.51161176",
"0.50863135",
"0.50668687",
"0.5053183",
"0.5051782",
"0.50310975",
"0.50234324",
"0.5018788",
"0.5018751",
"0.50172436",
"0.49925357",
"0.49807724",
"0.4977542",
"0.49756175",
"0.49622637",
"0.49485126",
"0.49309447",
"0.49194676",
"0.49088565",
"0.49056503",
"0.49016201",
"0.49000394",
"0.4871608",
"0.48693073",
"0.48682657",
"0.4865315",
"0.4833981",
"0.48248002",
"0.4823654",
"0.48128608",
"0.4810085",
"0.47964203",
"0.47879833",
"0.47818094",
"0.47782964",
"0.47692186",
"0.47654974",
"0.47645363",
"0.47632653",
"0.4756919",
"0.47567043",
"0.47522405",
"0.47427997",
"0.47408277",
"0.47404814",
"0.47400996",
"0.47369072",
"0.47319108",
"0.47309214",
"0.47217515",
"0.4717419",
"0.471051",
"0.47084787",
"0.47084174",
"0.47079793",
"0.47001338",
"0.46950126",
"0.4687811",
"0.4677505",
"0.46661595",
"0.46644562",
"0.46642357",
"0.46638915",
"0.4662026",
"0.46470895",
"0.4643862",
"0.4643047",
"0.46386835",
"0.46365866",
"0.46335912",
"0.46299112",
"0.46289173",
"0.46215016",
"0.46199617",
"0.4615459",
"0.46071243",
"0.4604053",
"0.46024016",
"0.45984784",
"0.45841998"
]
| 0.0 | -1 |
Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using this API. Returns ID and tags of matching image. Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. | public Observable<ServiceResponse<MatchResponseInner>> matchUrlInputWithServiceResponseAsync(String contentType, BodyModelInner imageUrl, String listId, Boolean cacheImage) {
if (this.client.baseUrl() == null) {
throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null.");
}
if (contentType == null) {
throw new IllegalArgumentException("Parameter contentType is required and cannot be null.");
}
if (imageUrl == null) {
throw new IllegalArgumentException("Parameter imageUrl is required and cannot be null.");
}
Validator.validate(imageUrl);
String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl());
return service.matchUrlInput(listId, cacheImage, contentType, imageUrl, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {
@Override
public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<MatchResponseInner> clientResponse = matchUrlInputDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int match(ArrayList<ImageCell> images);",
"ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);",
"private void searchImage(String text){\n\n // Set toolbar title as query string\n toolbar.setTitle(text);\n\n Map<String, String> options = setSearchOptions(text, Constants.NEW_SEARCH);\n Call<SearchResponse> call = service.searchPhoto(options);\n\n call.enqueue(new Callback<SearchResponse>() {\n @Override\n public void onResponse(Response<SearchResponse> response, Retrofit retrofit) {\n SearchResponse result = response.body();\n if (result.getStat().equals(\"ok\")) {\n // Status is ok, add result to photo list\n if (photoList != null) {\n photoList.clear();\n photoList.addAll(result.getPhotos().getPhoto());\n imageAdapter.notifyDataSetChanged();\n pageCount = 2;\n }\n\n } else {\n // Display error if something wrong with result\n Toast.makeText(context, result.getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Display error here since request failed\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }\n });\n }",
"@ApiOperation(value = \"Return images matching supplied digest found in supplied repository\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in supplied repository with supplied digest\") })\n\t// Pass in digest only in specific registry, get images and tags back that match\n\t@RequestMapping(path = \"/{registry}/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAndRegistry(@PathVariable String registry,\n\t\t\t@PathVariable String id) {\n\t\tRegistryConnection localConnection;\n\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\ttry {\n\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(registry));\n\n\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t// Get all tags from specific repo\n\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\timage.setRegistryName(registry);\n\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\timages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Iterate through images and only add to new list, what digests are identical\n\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\tfor (DockerImageData image : images) {\n\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from \" + registry + \" matching image id \" + id,\n\t\t\t\t\tmatchingImages);\n\t\t} catch (RegistryNotFoundException e) {\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\"Failed to find Registry\");\n\t\t}\n\t}",
"public List<Result> recognize(IplImage image);",
"@SuppressWarnings({ \"unchecked\", \"null\" })\n public List<String> calcSimilarity(String imgPath) {\n\n FileInputStream imageFile;\n double minDistance = Double.MAX_VALUE;\n\n // 返回查询结果\n List<String> matchUrls = new ArrayList<String>();\n\n\n try {\n\n imageFile = new FileInputStream(imgPath);\n BufferedImage bufferImage;\n\n bufferImage = ImageIO.read(imageFile);\n LTxXORP.setRotaIvaPats();//设定旋转模式值\n\n //得到图片的纹理一维数组特征向量(各颜色分量频率(统计量))\n double[] lbpSourceFecture = LTxXORP.getLBPFeature(imgPath);\n\n // 提取数据库数据\n List<Object> list = DBHelper.fetchALLCloth();\n\n // long startTime = System.currentTimeMillis();\n\n // 把每个条数据的路径和最短距离特征提取出来并存储在lbpResultMap的键值对中。\n Map<String, Double> lbpResultMap = new HashMap<String, Double>();\n\n for (int i = 0; i < list.size(); i++) {\n\n Map<String, Object> map = (Map<String, Object>) list.get(i);\n\n Object candidatePath = map.get(\"path\");\n Object candidateLBP = map.get(\"lbpFeature\");\n\n // 从快速搜索中选取TOP N结果,继续进行纹理特征匹配\n //获取当前由颜色匹配相似度排序的结果并提取其LBP纹理特征\n\n double[] lbpTargetFeature = MatchUtil.jsonToArr((String) candidateLBP);\n double lbpDistance = textureStrategy.similarity(lbpTargetFeature, lbpSourceFecture);\n lbpResultMap.put((String) candidatePath, lbpDistance);\n\n // 判断衡量标准选取距离还是相似度\n if (lbpDistance < minDistance)\n minDistance = lbpDistance;\n\n }\n\n Map<String, Double> tempResultMap;\n\n System.out.println(\"Min Distance : \" + (float) minDistance);\n\n\n\n System.out.println(\"============== finish Texture =================\");\n\n Map<String, Double> finalResult = MatchUtil.sortByValueAsc(lbpResultMap);\n\n int counter = 0;\n for (Map.Entry<String, Double> map : finalResult.entrySet()) {\n if (counter >= Config.finalResultNumber)\n break;\n //matchUrls截取只存储finalResultNumber数量的查询结果\n matchUrls.add(map.getKey());\n counter ++;\n double TSimilarity=Math.pow(Math.E,-map.getValue());\n System.out.println(TSimilarity + \" 图片路径 \" + map.getKey());\n\n }\n\n System.out.println();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return matchUrls;\n }",
"public interface ImageSearchService {\n\n /**\n * Register an image into the search instance.\n *\n * @param imageData Image data in JPEG or PNG format.\n * @param imageType Image format.\n * @param uuid Unique identifier of the image.\n */\n void register(byte[] imageData, ObjectImageType imageType, String uuid);\n\n /**\n * Un-register an image from the search instance.\n *\n * @param uuid Unique identifier of the image.\n */\n void unregister(String uuid);\n\n /**\n * Find all images similar to the given one.\n *\n * @param imageData Image to match with registered ones in the search instance.\n * @param objectRegion object region to search.\n * @return Found images UUIDs and raw response.\n */\n ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);\n\n /**\n * Check the image search configuration is correct by making a fake search request.\n *\n * @param configuration Configuration to check.\n */\n void checkImageSearchConfiguration(Configuration configuration) throws InvalidConfigurationException;\n}",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByHandler(int index);",
"@ApiOperation(value = \"Return all images matching supplied digest in all configured registries\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in configured registries with supplied digest\") })\n\t// Pass in only digest, get images and tags back that much from all repos\n\t@RequestMapping(path = \"/registries/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAllRegistries(@PathVariable String id) {\n\t\t\t\tRegistryConnection localConnection;\n\t\t\t\t// List persists outside all registries\n\t\t\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\t\t\tList<RegistryItem> items = configs.getItems();\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\t// For each configured registry\n\t\t\t\t\tfor(RegistryItem item : items) {\n\t\t\t\t\t\t// Get connection to registry\n\t\t\t\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(item.getRegistryLabel()));\n\t\t\t\t\t\t\n\t\t\t\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\t\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t\t\t\t// Get all tags from specific repo\n\t\t\t\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\t\t\t\timage.setRegistryName(item.getRegistryLabel());\n\t\t\t\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\t\t\t\timages.add(image);\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// Iterate through images and only add to new list, what digests are identical\n\t\t\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\t\t\tfor (DockerImageData image : images) {\n\t\t\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from all configured registries \",\n\t\t\t\t\t\t\tmatchingImages);\n\t\t\t\t} catch (RegistryNotFoundException e) {\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\t\t\"Failed to find Registry\");\n\t\t\t\t}\n\t}",
"Receta getByIdWithImages(long id);",
"public int displayRandomImage() {\n\n int randomImageIndex;\n\n do\n { // making sure that the same images aren't repeated & images of the same car makes aren't shown together\n\n randomCarMake = allCarMakes[getRandomBreed()]; // get a random breed\n randomImageIndex = getRandomImage(); // get a random image of a particular breed\n\n randomImageOfChosenCarMake = displayRelevantImage(randomCarMake, randomImageIndex);\n\n } while (displayingCarMakes.contains(randomCarMake) || allDisplayedImages.contains(randomImageOfChosenCarMake));\n\n allDisplayedImages.add(randomImageOfChosenCarMake); // to make sure that the image isn't repeated\n displayingCarMakes.add(randomCarMake); // to make sure that images of the same breed aren't shown at once\n displayingImageIndexes.add(randomImageIndex); // to recall indexes when the device is rotated\n\n // return chosen random image\n return getResources().getIdentifier(randomImageOfChosenCarMake, \"drawable\", \"com.example.car_match_game_app\");\n }",
"@GET\n @Path(\"{factoryId}/image\")\n @Produces(\"image/*\")\n public Response getImage(@PathParam(\"factoryId\") String factoryId, @DefaultValue(\"\") @QueryParam(\"imgId\") String imageId)\n throws FactoryUrlException {\n Set<FactoryImage> factoryImages = factoryStore.getFactoryImages(factoryId, null);\n if (factoryImages == null) {\n LOG.warn(\"Factory URL with id {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Factory URL with id \" + factoryId + \" is not found.\");\n }\n if (imageId.isEmpty()) {\n if (factoryImages.size() > 0) {\n FactoryImage image = factoryImages.iterator().next();\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n } else {\n LOG.warn(\"Default image for factory {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(),\n \"Default image for factory \" + factoryId + \" is not found.\");\n }\n } else {\n for (FactoryImage image : factoryImages) {\n if (image.getName().equals(imageId)) {\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n }\n }\n }\n LOG.warn(\"Image with id {} is not found.\", imageId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Image with id \" + imageId + \" is not found.\");\n }",
"public void findGeoSurfSimilarPhotosWithTagStatistics(\r\n\t\t\tfinal Set<String> allCandidateWords,\r\n\t\t\tfinal Map<String, WordImage> relevantWordImages, boolean tagReq,\r\n\t\t\tboolean techTagReq, boolean compact) {\r\n\r\n\t\ttopImagesURLs = new HashMap<String, Double>();\r\n\t\ttopImagesNames = new HashMap<String, String>();\r\n\t\t// The list of all Photo objects\r\n\t\tphotoList = new HashMap<String, Photo>();\r\n\t\tphotoList = createGeoSimilarPhotoList(PANORAMIO_DEFUALT_NUM_ITERATIONS, tagReq,\r\n\t\t\t\ttechTagReq);\r\n\r\n\t\t// Word Image Relevance Dictionary\r\n\t\t// The statistics consider for each word the set of images annotated\r\n\t\t// with them and similar\r\n\t\t// to the input image and the those which are tagged with it and not\r\n\t\t// similar to the input image\r\n\t\t// Map<String, WordImage> relevantWordImages = new HashMap<String,\r\n\t\t// WordImage>();\r\n\r\n\t\t// Prepare the result output\r\n\r\n\t\tif (!compact) {\r\n\t\t\toutRel.println(\"Image URL , Score , Distance , Point Similarity, Common Keypoints , Iter Point Similariy, Title , Tags , distance, userid\");\r\n\t\t\t// An CSV file for the set of visually irrelevant images\r\n\t\t\toutIrrRel.println(\"Image URL , Title , Tags , distance, userid\");\r\n\t\t}\r\n\r\n\t\t// *** Extract SURF feature for the input image\r\n\r\n\t\tSurfMatcher surfMatcher = new SurfMatcher();\r\n\t\t// The SURF feature of the input image\r\n\t\tList<InterestPoint> ipts1 = surfMatcher.extractKeypoints(inputImageURL,\r\n\t\t\t\tsurfMatcher.p1);\r\n\r\n\t\t// inputImageInterstPoints = ipts1 ;\r\n\r\n\t\t// Add the photo with its interestpoint to the cache\r\n\t\t// this.photoInterestPoints.put(imageName, ipts1);\r\n\r\n\t\t// Find SURF correspondences in the geo-related images\r\n\t\ttotalNumberOfSimilarImages = 0; // R\r\n\r\n\t\tfor (String photoId : photoList.keySet()) {\r\n\r\n\t\t\tPhoto photo = photoList.get(photoId);\r\n\r\n\t\r\n\r\n\t\t\tString toMatchedPhotoURL = photo.getPhotoFileUrl();\r\n\t\t\t// The SURF feature of a geo close image\r\n\t\t\tList<InterestPoint> ipts2 = surfMatcher.extractKeypoints(\r\n\t\t\t\t\ttoMatchedPhotoURL, surfMatcher.p2);\r\n\r\n\t\t\t// this.photoInterestPoints.put(photo.getPhotoId(), ipts2);\r\n\t\t\t// this.cachedImageInterstPoint.put(photo.getPhotoId(), ipts2);\r\n\r\n\t\t\tMatchingResult surfResult = null;\r\n\r\n\t\t\tsurfResult = surfMatcher.matchKeypoints(inputImageURL, photoId,\r\n\t\t\t\t\tipts1, ipts2, MIN_COMMON_IP_COUNT);\r\n\r\n\t\t\tif (surfResult != null) { // the images are visually similar\r\n\r\n\t\t\t\ttopImagesURLs.put(toMatchedPhotoURL,\r\n\t\t\t\t\t\tsurfResult.getPiontSimilarity());\r\n\r\n\t\t\t\ttopImagesNames.put(toMatchedPhotoURL, photo.getPhotoId());\r\n\r\n\t\t\t\ttotalNumberOfSimilarImages += 1;\r\n\t\t\t\tif (!compact) {\r\n\r\n\t\t\t\t\toutRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getScore()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getAvgDistance()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getPiontSimilarity()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getCommonKeyPointsCount()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ \"null ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\tSystem.out.println(\"Downloading Similar Image\");\r\n\t\t\t\t\tString destFileName = similarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Generate Word Statistics\r\n\t\t\t\t// For the a certain word (tag) add image info to its list if\r\n\t\t\t\t// this image\r\n\t\t\t\t// is visually similar to the input image\r\n\t\t\t\tupdateWordRelatedImageList(allCandidateWords,\r\n\t\t\t\t\t\trelevantWordImages, photo, surfResult);\r\n\t\t\t} else {\r\n\r\n\t\t\t\tif (!compact) {\r\n\t\t\t\t\t// Images are visually not similar\r\n\t\t\t\t\toutIrrRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \" ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t// We also need to get some information if a certain word is\r\n\t\t\t\t\t// also used by visually not similar images\r\n\t\t\t\t\tSystem.out.println(\"Downloading Non Similar Image\");\r\n\t\t\t\t\tString destFileName = dissimilarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tupdateWordNotRelatedImageList(relevantWordImages, photo);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByHandlerList();",
"@GET(\"/tags/{query}/media/recent\" + CLIENT_ID)\n public void searchPhotos(@Path(\"query\") String query, Callback<WebResponse<ArrayList<InstagramPhoto>>> callback);",
"List<Bitmap> getFavoriteRecipeImgs();",
"private void processImages() throws MalformedURLException, IOException {\r\n\r\n\t\tNodeFilter imageFilter = new NodeClassFilter(ImageTag.class);\r\n\t\timageList = fullList.extractAllNodesThatMatch(imageFilter, true);\r\n\t\tthePageImages = new HashMap<String, byte[]>();\r\n\r\n\t\tfor (SimpleNodeIterator nodeIter = imageList.elements(); nodeIter\r\n\t\t\t\t.hasMoreNodes();) {\r\n\t\t\tImageTag tempNode = (ImageTag) nodeIter.nextNode();\r\n\t\t\tString tagText = tempNode.getText();\r\n\r\n\t\t\t// Populate imageUrlText String\r\n\t\t\tString imageUrlText = tempNode.getImageURL();\r\n\r\n\t\t\tif (imageUrlText != \"\") {\r\n\t\t\t\t// Print to console, to verify relative link processing\r\n\t\t\t\tSystem.out.println(\"ImageUrl to Retrieve:\" + imageUrlText);\r\n\r\n\t\t\t\tbyte[] imgArray = downloadBinaryData(imageUrlText);\r\n\r\n\t\t\t\tthePageImages.put(tagText, imgArray);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"@Override\n public FlickrResponse searchPhoto(String tags) throws IOException {\n return flickrService.searchPhoto(tags);\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByTransform(int index);",
"public void getImageResults(String tag){\n showProgressBar(true);\n HttpClient.get(\"rest/\", getRequestParams(tag), new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n String response = new String(responseBody, StandardCharsets.UTF_8);\n response = StringUtils.replace(response, \"jsonFlickrApi(\", \"\");\n response = StringUtils.removeEnd(response, \")\");\n Log.d(\"SERVICE RESPONSE\", response);\n Gson gson = new Gson();\n FlickrSearchResponse jsonResponse = gson.fromJson(response, FlickrSearchResponse.class);\n if(jsonResponse.getStat().equals(\"fail\")){\n //api returned an error\n searchHelperListener.onErrorResponseReceived(jsonResponse.getMessage());\n } else {\n //api returned data\n searchHelperListener.onSuccessResponseReceived(jsonResponse);\n }\n showProgressBar(false);\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n Log.d(\"SERVICE FAILURE\", error.getMessage());\n searchHelperListener.onErrorResponseReceived(error.getMessage());\n showProgressBar(false);\n }\n });\n\n }",
"public EC2DescribeImagesResponse describeImages(EC2DescribeImages request) {\n EC2DescribeImagesResponse images = new EC2DescribeImagesResponse();\n try {\n String[] templateIds = request.getImageSet();\n EC2ImageFilterSet ifs = request.getFilterSet();\n\n if (templateIds.length == 0) {\n images = listTemplates(null, images);\n } else {\n for (String s : templateIds) {\n images = listTemplates(s, images);\n }\n }\n if (ifs != null)\n return ifs.evaluate(images);\n } catch (Exception e) {\n logger.error(\"EC2 DescribeImages - \", e);\n handleException(e);\n }\n return images;\n }",
"GetImagesResult getImages(GetImagesRequest getImagesRequest);",
"int seachImage(Image img) {\r\n\t\treturn 1;\r\n\t}",
"public void searchImages(View view) {\n imageList.clear();\n adapter.clear();\n Log.d(\"DEBUG\", \"Search Images\");\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n Log.d(\"DEBUG\", getUrl(1).toString());\n retrieveImages(getUrl(1).toString());\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();",
"java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByTransformList();",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform();",
"FetchedImage getFujimiyaUrl(String query,int maxRankOfResult){\n try{\n //Get SearchResult\n Search search = getSearchResult(query, maxRankOfResult);\n List<Result> items = search.getItems();\n for(Result result: items){\n int i = items.indexOf(result);\n logger.log(Level.INFO,\"query: \" + query + \" URL: \"+result.getLink());\n logger.log(Level.INFO,\"page URL: \"+result.getImage().getContextLink());\n if(result.getImage().getWidth()+result.getImage().getHeight()<600){\n logger.log(Level.INFO,\"Result No.\"+i+\" is too small image. next.\");\n continue;\n }\n if(DBConnection.isInBlackList(result.getLink())){\n logger.log(Level.INFO,\"Result No.\"+i+\" is included in the blacklist. next.\");\n continue;\n }\n HttpURLConnection connection = (HttpURLConnection)(new URL(result.getLink())).openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setInstanceFollowRedirects(false);\n connection.connect();\n if(connection.getResponseCode()==200){\n return new FetchedImage(connection.getInputStream(),result.getLink());\n }else{\n logger.log(Level.INFO,\"Result No.\"+i+\" occurs error while fetching the image. next.\");\n continue;\n }\n }\n //If execution comes here, connection has failed 10 times.\n throw new ConnectException(\"Connection failed 10 times\");\n\n } catch (IOException e) {\n // TODO Auto-generated catch block\n logger.log(Level.SEVERE,e.toString());\n e.printStackTrace();\n }\n return null;\n}",
"@Override\n\tpublic String imageSearch(QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(IData.URL_SEARCH + param.toString());\n\t}",
"void loadImages(int id_image, HouseRepository.GetImageFromHouseCallback callback);",
"private void onImagePicked(@NonNull final byte[] imageBytes) {\n setBusy(true);\n\n // Make sure we don't show a list of old concepts while the image is being uploaded\n adapter.setData(Collections.<Concept>emptyList());\n\n new AsyncTask<Void, Void, ClarifaiResponse<List<ClarifaiOutput<Concept>>>>() {\n @Override protected ClarifaiResponse<List<ClarifaiOutput<Concept>>> doInBackground(Void... params) {\n // The default Clarifai model that identifies concepts in images\n final ConceptModel generalModel = App.get().clarifaiClient().getDefaultModels().foodModel();\n\n // Use this model to predict, with the image that the user just selected as the input\n return generalModel.predict()\n .withInputs(ClarifaiInput.forImage(ClarifaiImage.of(imageBytes)))\n .executeSync();\n }\n\n @Override protected void onPostExecute(ClarifaiResponse<List<ClarifaiOutput<Concept>>> response) {\n setBusy(false);\n if (!response.isSuccessful()) {\n showErrorSnackbar(R.string.error_while_contacting_api);\n return;\n }\n final List<ClarifaiOutput<Concept>> predictions = response.get();\n if (predictions.isEmpty()) {\n showErrorSnackbar(R.string.no_results_from_api);\n return;\n }\n adapter.setData(predictions.get(0).data());\n\n // INSERT METHOD FOR USER SELECTION OF FOOD\n\n // ADDED FOR DATABASE\n try {\n readCSVToMap(\"ABBREV_2.txt\");\n }\n catch (Exception e){\n Log.d(\"Failure\", \"CSV not read into database\");\n }\n String exampleResult = predictions.get(0).data().get(0).name();\n final List<String> list = listOfKeys(exampleResult);\n\n // change this line to take in user input\n final String key2 = list.get(0); // arbitrary selection of key\n\n final List<String> val = db.get(key2);\n final String message = String.valueOf(val.get(6)); //index 6 contains carb info\n Log.d(\"Output\", message);\n imageView.setImageBitmap(BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.length));\n }\n\n private void showErrorSnackbar(@StringRes int errorString) {\n Snackbar.make(\n root,\n errorString,\n Snackbar.LENGTH_INDEFINITE\n ).show();\n }\n }.execute();\n }",
"private void imageSearch(ArrayList<Html> src) {\n // loop through the Html objects\n for(Html page : src) {\n\n // Temp List for improved readability\n ArrayList<Image> images = page.getImages();\n\n // loop through the corresponding images\n for(Image i : images) {\n if(i.getName().equals(this.fileName)) {\n this.numPagesDisplayed++;\n this.pageList.add(page.getLocalPath());\n }\n }\n }\n }",
"@Override\n\tpublic String imageLists(String url, QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(url + param.toString());\n\t}",
"@Override\n\tpublic List<PersonalisationMediaModel> getImageByID(final String imageID)\n\t{\n\t\tfinal String query1 = \"Select {pk} from {PersonalisationMedia} Where {code}=?imageId and {user}=?user\";\n\t\t/**\n\t\t * select distinct {val:pk} from {PersonalisationMediaModel as val join MediaModel as media on\n\t\t * {media:PK}={val.image} join User as user on {user:pk}={val:user} and {media:code}=?imageId and {user:pk}=?user}\n\t\t */\n\t\tfinal UserModel user = getUserService().getCurrentUser();\n\t\tfinal FlexibleSearchQuery fQuery = new FlexibleSearchQuery(query1);\n\t\tfinal Map<String, Object> params = new HashMap<>();\n\t\tparams.put(\"imageId\", imageID);\n\t\tparams.put(\"user\", user);\n\t\tfQuery.addQueryParameters(params);\n\t\tLOG.info(\"getImageByID\" + fQuery);\n\t\tfinal SearchResult<PersonalisationMediaModel> searchResult = flexibleSearchService.search(fQuery);\n\t\treturn searchResult.getResult();\n\t}",
"public void findImages() {\n \t\tthis.mNoteItemModel.findImages(this.mNoteItemModel.getContent());\n \t}",
"public void notifyFinishGetSimilarArtist(ArtistInfo a, Image img, long id);",
"private void imgDetected(Matcher matcher) {\n String component;\n matcher.reset();\n\n // store src value if <img> exist\n while (matcher.find()) {\n Data.imagesSrc.add(matcher.group(1));\n }\n\n // separate if the paragraph contain img\n // replace <img> with -+-img-+- to indicate image position in the text\n component = matcher.replaceAll(\"-+-img-+-\");\n\n //split the delimiter to structure image position\n String[] imageStructure = component.split(\"-\\\\+-\");\n\n // start looping the structured text\n int imageFoundIndex = 0;\n for (String structure : imageStructure) {\n // continue if the current index is not empty string \"\"\n if (!structure.trim().equals(\"\")) {\n // create ImageView if current index value equeal to \"img\"\n if (structure.trim().equals(\"img\")) {\n createImageView();\n imageFoundIndex++;\n } else {\n // else create textView for the text\n generateView(structure);\n }\n }\n }\n }",
"List<IbeisImage> uploadImages(List<File> images) throws UnsupportedImageFileTypeException, IOException,\n MalformedHttpRequestException, UnsuccessfulHttpRequestException;",
"public DetectorMatchResponse findMatchingDetectorMappings(List<Map<String, String>> tagsList) {\n isTrue(tagsList.size() > 0, \"tagsList must not be empty\");\n\n val uri = baseUri + API_PATH_MATCHING_DETECTOR_BY_TAGS;\n Content content;\n try {\n String body = objectMapper.writeValueAsString(tagsList);\n content = httpClient.post(uri, body);\n } catch (IOException e) {\n val message = \"IOException while getting matching detectors for\" +\n \": tags=\" + tagsList +\n \", httpMethod=POST\" +\n \", uri=\" + uri;\n throw new DetectorMappingRetrievalException(message, e);\n }\n try {\n return objectMapper.readValue(content.asBytes(), DetectorMatchResponse.class);\n } catch (IOException e) {\n val message = \"IOException while deserializing detectorMatchResponse\" +\n \": tags=\" + tagsList;\n throw new DetectorMappingDeserializationException(message, e);\n }\n\n }",
"public Observable<ServiceResponse<MatchResponseInner>> matchMethodWithServiceResponseAsync(String listId, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.matchMethod(listId, cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {\n @Override\n public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<MatchResponseInner> clientResponse = matchMethodDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }",
"List<Bitmap> getRecipeImgSmall();",
"private static final byte[] xfuzzy_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -95, 0, 0, -1,\n\t\t\t\t-1, -1, -82, 69, 12, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77,\n\t\t\t\t97, 100, 101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0,\n\t\t\t\t33, -7, 4, 1, 10, 0, 0, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 2,\n\t\t\t\t36, -124, -113, -87, -101, -31, -33, 32, 120, 97, 57, 68, -93,\n\t\t\t\t-54, -26, 90, -24, 49, 84, -59, 116, -100, 88, -99, -102, 25,\n\t\t\t\t30, -19, 36, -103, -97, -89, -62, 117, -119, 51, 5, 0, 59 };\n\t\treturn data;\n\t}",
"private void getImagesFromServer() {\n trObtainAllPetImages.setUser(user);\n trObtainAllPetImages.execute();\n Map<String, byte[]> petImages = trObtainAllPetImages.getResult();\n Set<String> names = petImages.keySet();\n\n for (String petName : names) {\n byte[] bytes = petImages.get(petName);\n Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, Objects.requireNonNull(bytes).length);\n int index = user.getPets().indexOf(new Pet(petName));\n user.getPets().get(index).setProfileImage(bitmap);\n ImageManager.writeImage(ImageManager.PET_PROFILE_IMAGES_PATH, user.getUsername() + '_' + petName, bytes);\n }\n }",
"public RatingSearch explode() {\n Elements elements = doc.getElementsByTag(\"table\");\n IqdbMatch bestMatch = null;\n List<IqdbMatch> additionalMatches = new LinkedList<>();\n for (int i = 1; i < elements.size(); i++) {\n //iterating through all the table elements. First one is your uploaded image\n\n //Each table is one \"card\" on iqdb so only the second one will be the \"best match\"\n Element element = elements.get(i);\n IqdbElement iqdbElement = new IqdbElement(element);\n\n Elements noMatch = element.getElementsContainingText(\"No relevant matches\");\n if (noMatch.size() > 0) {\n log.warn(\"There was no relevant match for this document\");\n// break;\n return null;\n }\n// TODO I don't think we can determine if these are even relevant. So once we see 'No relevent matches' we can\n// just call it there. We won't need 'Possible Match' yet\n// Elements possibleMatchElement = element.getElementsContainingText(\"Possible match\");\n// if (possibleMatchElement.size() > 0) {\n// additionalMatches.add(iqdbElement.explode(IqdbMatchType.NO_RELEVANT_BUT_POSSIBLE));\n// }\n\n //Second element will provide all the information you need. going into the similarity and all that is a waste of time\n //Use the similarity search for Best Match to identify the element that is best match if you don't trust the 2nd.\n Elements bestMatchElement = element.getElementsContainingText(\"Best Match\");\n if (bestMatchElement.size() > 0) {\n bestMatch = iqdbElement.explode(IqdbMatchType.BEST);\n }\n\n //can similarly search for \"Additional match\" to find all teh additional matches. Anything beyond additional matches is a waste of time.\n Elements additionalMatchElements = element.getElementsContainingText(\"Additional match\");\n if (additionalMatchElements.size() > 0) {\n additionalMatches.add(iqdbElement.explode(IqdbMatchType.ADDITIONAL));\n }\n }\n\n if (bestMatch == null && !additionalMatches.isEmpty()) {\n log.warn(\"No Best Match found, taking first additionalMatch, does this ever happen?\");\n bestMatch = additionalMatches.remove(0);\n }\n\n return null;//new RatingSearch(bestMatch, additionalMatches);\n }",
"public static SearchResult getChampionImage(String championList, String championID) {\n try {\r\n JSONObject holder = new JSONObject(championList);\r\n JSONObject holderItems = holder.getJSONObject(\"data\");\r\n SearchResult champion = new SearchResult();\r\n\r\n for (Iterator<String> it = holderItems.keys(); it.hasNext(); ) { //iterate through champion json objects\r\n String key = it.next();\r\n JSONObject resultItem = holderItems.getJSONObject(key);\r\n\r\n if (resultItem.getString(\"key\").equals(championID)) {\r\n champion.championName = key; //the key for the json object is also the name of the champion\r\n break;\r\n }\r\n }\r\n\r\n String tempName = champion.championName + \".png\"; //construct string for champion image\r\n\r\n champion.championImage = Uri.parse(BASE_URL_CHAMPION_IMAGE + tempName).buildUpon().build().toString();\r\n\r\n return champion;\r\n } catch (JSONException e) {\r\n System.out.println(e);\r\n return null;\r\n }\r\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByHandlerOrBuilder();",
"private EC2DescribeImagesResponse listTemplates(String templateId, EC2DescribeImagesResponse images) throws Exception {\n try {\n List<CloudStackTemplate> result = new ArrayList<CloudStackTemplate>();\n\n if (templateId != null) {\n List<CloudStackTemplate> template = getApi().listTemplates(\"executable\", null, null, null, templateId, null, null, null);\n if (template != null) {\n result.addAll(template);\n }\n } else {\n List<CloudStackTemplate> selfExecutable = getApi().listTemplates(\"selfexecutable\", null, null, null, null, null, null, null);\n if (selfExecutable != null) {\n result.addAll(selfExecutable);\n }\n\n List<CloudStackTemplate> featured = getApi().listTemplates(\"featured\", null, null, null, null, null, null, null);\n if (featured != null) {\n result.addAll(featured);\n }\n\n List<CloudStackTemplate> sharedExecutable = getApi().listTemplates(\"sharedexecutable\", null, null, null, null, null, null, null);\n if (sharedExecutable != null) {\n result.addAll(sharedExecutable);\n }\n\n List<CloudStackTemplate> community = getApi().listTemplates(\"community\", null, null, null, null, null, null, null);\n if (community != null) {\n result.addAll(community);\n }\n }\n\n if (result != null && result.size() > 0) {\n for (CloudStackTemplate temp : result) {\n EC2Image ec2Image = new EC2Image();\n ec2Image.setId(temp.getId().toString());\n ec2Image.setAccountName(temp.getAccount());\n ec2Image.setName(temp.getName());\n ec2Image.setDescription(temp.getDisplayText());\n ec2Image.setOsTypeId(temp.getOsTypeId().toString());\n ec2Image.setIsPublic(temp.getIsPublic());\n ec2Image.setState(temp.getIsReady() ? \"available\" : \"pending\");\n ec2Image.setDomainId(temp.getDomainId());\n if (temp.getHyperVisor().equalsIgnoreCase(\"xenserver\"))\n ec2Image.setHypervisor(\"xen\");\n else if (temp.getHyperVisor().equalsIgnoreCase(\"ovm\"))\n ec2Image.setHypervisor(\"ovm\"); // valid values for hypervisor is 'ovm' and 'xen'\n else\n ec2Image.setHypervisor(\"\");\n if (temp.getDisplayText() == null)\n ec2Image.setArchitecture(\"\");\n else if (temp.getDisplayText().indexOf(\"x86_64\") != -1)\n ec2Image.setArchitecture(\"x86_64\");\n else if (temp.getDisplayText().indexOf(\"i386\") != -1)\n ec2Image.setArchitecture(\"i386\");\n else\n ec2Image.setArchitecture(\"\");\n List<CloudStackKeyValue> resourceTags = temp.getTags();\n for (CloudStackKeyValue resourceTag : resourceTags) {\n EC2TagKeyValue param = new EC2TagKeyValue();\n param.setKey(resourceTag.getKey());\n if (resourceTag.getValue() != null)\n param.setValue(resourceTag.getValue());\n ec2Image.addResourceTag(param);\n }\n images.addImage(ec2Image);\n }\n }\n return images;\n } catch (Exception e) {\n logger.error(\"List Templates - \", e);\n throw new Exception(e.getMessage() != null ? e.getMessage() : e.toString());\n }\n }",
"java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByHandlerOrBuilderList();",
"public interface ImageMetadataService {\n\n List<ArtistDTO> getArtistsByPrediction(String name, String name2, String surname);\n\n List<ImageTypeDTO> getImageTypesByPrediction(String name);\n\n UploadImageMetadataDTO saveMetadata(UploadImageMetadataDTO uploadImageMetadataDTO);\n\n List<ImageDTO> getTop10Images(String username, String title);\n\n List<ImageDTO> getAllUserImages(String username);\n\n List<ImageDTO> searchImagesByCriteria(SearchImageCriteriaDTO searchImageCriteriaDTO);\n\n ImageDTO updateImageMetadata(ImageDTO imageDTO);\n\n List<ImageDTO> getImagesTop50();\n\n void rateImage(RateImageDTO rateImageDTO);\n\n List<ImageDTO> getAllImages();\n}",
"public static List<PNMedia> discoveryFlickrImages(String[] tags) throws Exception{\r\n\t\tif(tags != null && tags.length > 0){\r\n\t\t\tList<PNMedia> flickrPhotosList = new ArrayList<PNMedia>();\r\n\t\t\t\t\r\n\t\t\tFlickr flickr = new Flickr(flickrApiKey, flickrSharedSecret, new REST());\r\n\t\t\tFlickr.debugStream = false;\r\n\t\t\t\r\n\t\t\tSearchParameters searchParams=new SearchParameters();\r\n\t\t searchParams.setSort(SearchParameters.INTERESTINGNESS_ASC);\r\n\t\t \r\n\t\t searchParams.setTags(tags);\r\n\t\t \r\n\t\t PhotosInterface photosInterface = flickr.getPhotosInterface();\r\n\t\t PhotoList<Photo> photoList = photosInterface.search(searchParams, 10, 1); // quantidade de fotos retornadas (5)\r\n\t\t \r\n\t\t if(photoList != null){\r\n\t\t for(int i=0; i<photoList.size(); i++){\r\n\t\t Photo photo = (Photo)photoList.get(i);\r\n\t\t PNMedia media = new PNMedia();\r\n\t\t \r\n\t\t String description = photo.getDescription();\r\n\t\t if(description == null)\r\n\t\t \t description = photo.getTitle();\r\n\t\t media.setMediaURL(photo.getLargeUrl()); media.setMediaURLAux(photo.getSmallSquareUrl()); media.setMediaCaption(photo.getTitle()); media.setMediaInfo(description);\r\n\t\t flickrPhotosList.add(media);\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t return flickrPhotosList;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tthrow new Exception(\"Null tags or tags is empty. \");\r\n\t\t}\r\n\t}",
"public interface Image {\n /**\n * @return the image ID\n */\n String getId();\n\n /**\n * @return the image ID, or null if not present\n */\n String getParentId();\n\n /**\n * @return Image create timestamp\n */\n long getCreated();\n\n /**\n * @return the image size\n */\n long getSize();\n\n /**\n * @return the image virtual size\n */\n long getVirtualSize();\n\n /**\n * @return the labels assigned to the image\n */\n Map<String, String> getLabels();\n\n /**\n * @return the names associated with the image (formatted as repository:tag)\n */\n List<String> getRepoTags();\n\n /**\n * @return the digests associated with the image (formatted as repository:tag@sha256:digest)\n */\n List<String> getRepoDigests();\n}",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage();",
"public void features() throws MalformedURLException, IOException {\n\t\tMBFImage query = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao01.jpg\"));\n\t\tMBFImage target = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao02.jpg\"));\n\n\t\tDoGSIFTEngine engine = new DoGSIFTEngine();\n\t\tLocalFeatureList<Keypoint> queryKeypoints = engine.findFeatures(query.flatten());\n\t\tLocalFeatureList<Keypoint> targetKeypoints = engine.findFeatures(target.flatten());\n\t\tLocalFeatureMatcher<Keypoint> matcher1 = new BasicMatcher<Keypoint>(80);\n\t\tLocalFeatureMatcher<Keypoint> matcher = new BasicTwoWayMatcher<Keypoint>();\n\t\t/*\n\t\t * matcher.setModelFeatures(queryKeypoints);\n\t\t * matcher.findMatches(targetKeypoints); MBFImage basicMatches =\n\t\t * MatchingUtilities.drawMatches(query, target, matcher.getMatches(),\n\t\t * RGBColour.RED); DisplayUtilities.display(basicMatches);\n\t\t */\n\t\tRobustAffineTransformEstimator modelFitter = new RobustAffineTransformEstimator(5.0, 1500,\n\t\t\t\tnew RANSAC.PercentageInliersStoppingCondition(0.5));\n\t\tmatcher = new ConsistentLocalFeatureMatcher2d<Keypoint>(new FastBasicKeypointMatcher<Keypoint>(8), modelFitter);\n\t\tmatcher.setModelFeatures(queryKeypoints);\n\t\tmatcher.findMatches(targetKeypoints);\n\t\tMBFImage consistentMatches = MatchingUtilities.drawMatches(query, target, matcher.getMatches(), RGBColour.RED);\n\t\tDisplayUtilities.display(consistentMatches);\n\t\ttarget.drawShape(query.getBounds().transform(modelFitter.getModel().getTransform().inverse()), 3,\n\t\t\t\tRGBColour.BLUE);\n\t\t// DisplayUtilities.display(target);\n\t}",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage(\n @QueryMap ListImage queryParameters);",
"private static void updateRelatedImageList(\r\n\t\t\tMap<String, WordImage> relevantWordImages, Photo photo,\r\n\t\t\tMatchingResult surfResult, String word) {\n\r\n\t\tString key = getRelevantKeyForRelevantImages(relevantWordImages, word);\r\n\r\n\t\tif (key != null) {\r\n\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImages().add(info);\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImagesMap()\r\n\t\t\t\t\t.put(info.getId(), info);\r\n\r\n\t\t\trelevantWordImages.get(key).addSimilarImageId(info.getId());\r\n\r\n\t\t}\r\n\r\n\t\telse {\r\n\r\n\t\t\tWordImage wi = new WordImage(word);\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\twi.addSimilarImage(info);\r\n\r\n\t\t\twi.addSimilarImage(photo.getPhotoId(), info);\r\n\r\n\t\t\trelevantWordImages.put(word, wi);\r\n\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic String searchimage(int cbid) throws Exception {\n\t\treturn dao.searchimage(cbid);\r\n\t}",
"public Point findImage(BufferedImage image, int index) {\n int smallWidth = image.getWidth();\n int smallHeight = image.getHeight();\n int[][] smallPixels = new int[smallWidth][smallHeight];\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n smallPixels[x][y] = image.getRGB(x, y);\n }\n }\n boolean good;\n int count = 0;\n for(int X = 0; X <= bigWidth - smallWidth; X++) {\n for(int Y = 0; Y <= bigHeight - smallHeight; Y++) {\n good = true;\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n if(smallPixels[x][y] != bigPixels[X + x][Y + y]) {\n good = false;\n break;\n }\n }\n if(!good) {\n break;\n }\n }\n if(good) {\n if(count == index) {\n return(new Point(X, Y));\n }\n count++;\n }\n }\n }\n return(null);\n }",
"public static String getImageId(WebElement image) {\n String imageUrl = image.getAttribute(\"src\");\n\n int indexComparisonStart = imageUrl.indexOf(START_TOKEN) + START_TOKEN.length();\n int indexComparisonFinish = imageUrl.substring(indexComparisonStart).indexOf(STOP_TOKEN);\n\n return imageUrl.substring(indexComparisonStart, indexComparisonStart + indexComparisonFinish);\n }",
"private void searchImages()\n {\n searchWeb = false;\n search();\n }",
"java.lang.String getHotelImageURLs(int index);",
"public void findBookDetails(AnnotateImageResponse imageResponse) throws IOException {\n\n String google = \"http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=\";\n String search = \"searchString\";\n String charset = \"UTF-8\";\n\n URL url = new URL(google + URLEncoder.encode(search, charset));\n Reader reader = new InputStreamReader(url.openStream(), charset);\n GoogleResults results = new Gson().fromJson(reader, GoogleResults.class);\n\n // Show title and URL of 1st result.\n System.out.println(results.getResponseData().getResults().get(0).getTitle());\n System.out.println(results.getResponseData().getResults().get(0).getUrl());\n }",
"@Override\n\tpublic List<Image> findAllImage() {\n\t\treturn new ImageDaoImpl().findAllImage();\n\t}",
"public interface IImageInputBoundary {\n\n List<ImageResponseModel> GetImagesByCategory(ImageRequestModel requestModel);\n List<ImageResponseModel> GetImagesByComposition(ImageRequestModel requestModel);\n}",
"@Test\n\tpublic void searchImageWithUpload() throws InterruptedException, Exception {\n\n\t\t// To click on Images link\n\t\thomePage.clickSearchByImage();\n\t\t\n\t\t// To verify if ui is navigated to Search by image page\n\t\tAssert.assertTrue(homePage.verifySearchByImageBox());\n\n\t\t// Upload an image from local machine\n\t\tsearchPage.uploadLocalImage(Settings.getLocalImage());\n\t\t// To verify upload status\n\t\tAssert.assertTrue(searchPage.verifyUploadStatus());\n\n\t\t// Find specified image on GUI\n\t\tWebElement webElement = searchPage.navigateToImage(Settings.getVisitRule());\n\n\t\t// Take a snapshot for expected visit page\n\t\tsearchPage.snapshotLastPage(webElement);\n\n\t\t// Download specified image by expected rule\n\t\tString fileName = Settings.getDownloadImage();\n\t\tboolean down = searchPage.downloadImagetoLocal(webElement, fileName);\n\t\tAssert.assertTrue(down);\n\n\t\t// verify two images match or not\n\t\tAssert.assertTrue(searchPage.verifyImageIsSame(Settings.getDownloadImage(), Settings.getLocalImage()));\n\n\t}",
"@Override\n\tpublic List<AddBookDto> findListimage(List<addBookBo> listBo) throws IOException {\n\n\t\tFile uploadFileDir, uploadImageDir;\n\n\t\tFileInputStream fileInputStream = null;\n\n\t\tList<AddBookDto> dtoList = new ArrayList<>();\n\n\t\tSet<Category> setCategory = new HashSet<>();\n\n\t\tSystem.out.println(\"UploadService.findListimage()\");\n\n\t\tfor (addBookBo bo : listBo) {\n\n\t\t\tAddBookDto dto = new AddBookDto();\n\n\t\t\tBeanUtils.copyProperties(bo, dto);\n\n\t\t\tSystem.out.println(\"UploadService.findListimage()-------\" + bo.getAuthor());\n\n\t\t\tuploadImageDir = new File(imageUploadpath + \"/\" + dto.getImageUrl() + \".jpg\");\n\n\t\t\tif (uploadImageDir.exists()) {\n\n\t\t\t\tbyte[] buffer = getBytesFromFile(uploadImageDir);\n\t\t\t\t// System.out.println(bo.getTitle()+\"====b===\" + buffer);\n\t\t\t\tdto.setImgeContent(buffer);\n\n\t\t\t}\n\n\t\t\tSystem.out.println(dto.getTitle() + \"====dto===\" + dto.getImgeContent());\n\t\t\tdtoList.add(dto);\n\n\t\t}\n\n\t\treturn dtoList;\n\t}",
"public Image getImageById(final String imageId)\n {\n GetImageByIdQuery getImageByIdQuery = new GetImageByIdQuery(imageId);\n List<Image> ImageList = super.queryResult(getImageByIdQuery);\n if (CollectionUtils.isEmpty(ImageList) || ImageList.size() > 1)\n {\n LOG.error(\"The Image cannot be found by this id:\" + imageId);\n return null;\n }\n return ImageList.get(0);\n }",
"@Override\n public void onSuccess(Uri uri) {\n if (!ImageListUrl.contains(uri.toString())) {\n ImageListUrl.add(uri.toString());\n\n /// add property if imageurl arraylist same with imagelist arraylist\n if (ImageListUrl.size() == ImageList.size()) {\n Toast.makeText(NewRecipe.this, ImageListUrl.toString(), Toast.LENGTH_SHORT).show();\n\n saveRecipe();\n\n }\n }\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByTransformOrBuilder();",
"private static final byte[] xfuzzyload_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, -82,\n\t\t\t\t69, 12, -128, -128, -128, -1, -1, -1, -64, -64, -64, -1, -1, 0,\n\t\t\t\t0, 0, 0, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100, 101,\n\t\t\t\t32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4, 1,\n\t\t\t\t10, 0, 6, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 3, 75, 8, -86,\n\t\t\t\t-42, 11, 45, -82, -24, 32, -83, -42, -80, 43, -39, -26, -35,\n\t\t\t\t22, -116, 1, -9, 24, -127, -96, 10, 101, 23, 44, 2, 49, -56,\n\t\t\t\t108, 21, 15, -53, -84, -105, 74, -86, -25, 50, -62, -117, 68,\n\t\t\t\t44, -54, 74, -87, -107, 82, 21, 40, 8, 81, -73, -96, 78, 86,\n\t\t\t\t24, 53, 82, -46, 108, -77, -27, -53, 78, -85, -111, -18, 116,\n\t\t\t\t87, 8, 23, -49, -123, 4, 0, 59 };\n\t\treturn data;\n\t}",
"public List<Recognition> recognizeImage(Bitmap bitmap) {\n Bitmap croppedBitmap = Bitmap.createScaledBitmap(bitmap, cropSize, cropSize, true);\n// Bitmap croppedBitmap = Bitmap.createBitmap(cropSize, cropSize, Bitmap.Config.ARGB_8888);\n// final Canvas canvas = new Canvas(croppedBitmap);\n// canvas.drawBitmap(bitmap, frameToCropTransform, null);\n final List<Recognition> ret = new LinkedList<>();\n List<Recognition> recognitions = detector.recognizeImage(croppedBitmap);\n// long before=System.currentTimeMillis();\n// for (int k=0; k<100; k++) {\n// recognitions = detector.recognizeImage(croppedBitmap);\n// int a = 0;\n// }\n// long after=System.currentTimeMillis();\n// String log = String.format(\"tensorflow takes %.03f s\\n\", ((float)(after-before)/1000/100));\n// Log.d(\"MATCH TEST\", log);\n for (Recognition r : recognitions) {\n if (r.getConfidence() < minConfidence)\n continue;\n// RectF location = r.getLocation();\n// cropToFrameTransform.mapRect(location);\n// r.setOriginalLoc(location);\n// Bitmap cropped = Bitmap.createBitmap(bitmap, (int)location.left, (int)location.top, (int)location.width(), (int)location.height());\n// r.setObjectImage(cropped);\n BoxPosition bp = r.getLocation();\n// r.rectF = new RectF(bp.getLeft(), bp.getTop(), bp.getRight(), bp.getBottom());\n// cropToFrameTransform.mapRect(r.rectF);\n ret.add(r);\n }\n\n return ret;\n }",
"public static ArrayList<Result> getCCVBasedSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.CCV));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t\t// create result object\n\t\t\t \tResult result = new Result();\n\t\t\t \tresult.mFilename = imageName;\n\t\t\t \tresult.mSimilarity = intersection;\n\t\t\t \t\n\t\t\t \t// store result\n\t\t\t \trv.add(result);\n\t\t\t\t} catch (Exception ex) {}\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}",
"public Map<String, Photo> createGeoSimilarPhotoList(int maxCycles,\r\n\t\t\tboolean tagReq, boolean techTagReq) {\r\n\r\n\t\tMap<String, Photo> photoList = new HashMap<String, Photo>();\r\n\r\n\t\tpFet.getPanoramioGeoSimilarPhotoList(maxCycles, tagReq, techTagReq,\r\n\t\t\t\tphotoList);\r\n\r\n\t\tint panoPhotoReturend = photoList.size();\r\n\r\n\t\tMap<String, Photo> flickrPhotoList = fFet\r\n\t\t\t\t.getFlickrGeoSimilarPhotoList();\r\n\r\n\t\tint flickrPhotoReturend = flickrPhotoList.size();\r\n\r\n\t\tphotoList.putAll(flickrPhotoList);\r\n\r\n\t\ttotalNumberOfImages = flickrPhotoReturend + panoPhotoReturend;\r\n\r\n\t\treturn photoList;\r\n\t}",
"List<IbeisImage> uploadImages(List<File> images, File pathToTemporaryZipFile) throws\n UnsupportedImageFileTypeException, IOException, MalformedHttpRequestException, UnsuccessfulHttpRequestException;",
"private void loadAndCacheImages(Node node, FileContext cachedImageFilesystem) throws Exception\n {\n String imagePathBase = \"/\" + node.getTypeCode() + \"/\" + node.getNid();\n ImagesReponse imagesReponse = this.queryRemoteApi(ImagesReponse.class, imagePathBase + ImagesReponse.PATH, null);\n if (imagesReponse != null && imagesReponse.getNodes() != null && imagesReponse.getNodes().getNode() != null) {\n for (Image i : imagesReponse.getNodes().getNode()) {\n node.addImage(i);\n\n URI imageUri = UriBuilder.fromUri(Settings.instance().getTpAccessApiBaseUrl())\n .path(BASE_PATH)\n .path(imagePathBase + \"/image/\" + i.getData().mediaObjectId + \"/original\")\n .replaceQueryParam(ACCESS_TOKEN_PARAM, this.getAccessToken())\n .replaceQueryParam(FORMAT_PARAM, FORMAT_JSON)\n .build();\n\n ClientConfig config = new ClientConfig();\n Client httpClient = ClientBuilder.newClient(config);\n Response response = httpClient.target(imageUri).request().get();\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n org.apache.hadoop.fs.Path nodeImages = new org.apache.hadoop.fs.Path(HDFS_CACHE_ROOT_PATH + node.getNid());\n if (!cachedImageFilesystem.util().exists(nodeImages)) {\n cachedImageFilesystem.mkdir(nodeImages, FsPermission.getDirDefault(), true);\n }\n org.apache.hadoop.fs.Path cachedImage = new org.apache.hadoop.fs.Path(nodeImages, i.getData().mediaObjectId);\n i.setCachedUrl(cachedImage.toUri());\n if (!cachedImageFilesystem.util().exists(cachedImage)) {\n try (OutputStream os = cachedImageFilesystem.create(cachedImage, EnumSet.of(CreateFlag.CREATE, CreateFlag.OVERWRITE))) {\n IOUtils.copy(response.readEntity(InputStream.class), os);\n }\n }\n }\n else {\n throw new IOException(\"Error status returned while fetching remote API data;\" + response);\n }\n\n }\n }\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImagesByHandlerOrBuilder(\n int index);",
"public static ArrayList<Result> getColorHistogramSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.HISTOGRAM));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t// create result object\n\t\t \tResult result = new Result();\n\t\t \tresult.mFilename = imageName;\n\t\t \tresult.mSimilarity = intersection;\n\t\t \t\n\t\t \t// store result\n\t\t \trv.add(result);\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}",
"public void compareImageAction() {\n\t\tif (selectedAnimalModel == null) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (selectedAnimalModel.getId() == 0L || isImageChangedFlag) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tAsyncTask asyncTask = new AsyncTask() {\n\t\t\tAnimalModel animal1 = null;\n\t\t\tAnimalModel animal2 = null;\n\t\t\tAnimalModel animal3 = null;\n\n\t\t\t@Override\n\t\t\tprotected void onDone(boolean success) {\n\t\t\t\tif (!success) {\n\t\t\t\t\tshowDialog(ERROR_MESSAGE, \"Cannot compare images.\");\n\t\t\t\t} else {\n\t\t\t\t\tCompareImagesDialog dialog = new CompareImagesDialog(multimediaPanel, selectedAnimalModel, animal1, animal2, animal3);\n\t\t\t\t\tdialog.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected Boolean doInBackground() throws Exception {\n\t\t\t\ttry {\n\t\t\t\t\tArrayList<AnimalModel> models;\n\n\t\t\t\t\tmodels = DataManager.getInstance().getThreeSimilarImages(selectedAnimalModel);\n\n\t\t\t\t\tif (models.size() > 0) {\n\t\t\t\t\t\tanimal1 = models.get(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 1) {\n\t\t\t\t\t\tanimal2 = models.get(1);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 2) {\n\t\t\t\t\t\tanimal3 = models.get(2);\n\t\t\t\t\t}\n\n\t\t\t\t} catch (DataManagerException e1) {\n\t\t\t\t\tLogger.createLog(Logger.ERROR_LOG, e1.getMessage());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tasyncTask.start();\n\n\t}",
"private ArrayList<ImageItem> getData() {\n final ArrayList<ImageItem> imageItems = new ArrayList<>();\n // TypedArray imgs = getResources().obtainTypedArray(R.array.image_ids);\n for (int i = 0; i < f.size(); i++) {\n Bitmap bitmap = imageLoader.loadImageSync(\"file://\" + f.get(i));;\n imageItems.add(new ImageItem(bitmap, \"Image#\" + i));\n }\n return imageItems;\n }",
"static void redactImageFileColoredInfoTypes(String projectId, String inputPath, String outputPath)\n throws IOException {\n try (DlpServiceClient dlp = DlpServiceClient.create()) {\n // Specify the content to be redacted.\n ByteString fileBytes = ByteString.readFrom(new FileInputStream(inputPath));\n ByteContentItem byteItem =\n ByteContentItem.newBuilder().setType(BytesType.IMAGE_JPEG).setData(fileBytes).build();\n\n // Define types of info to redact associate each one with a different color.\n // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types\n ImageRedactionConfig ssnRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"US_SOCIAL_SECURITY_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(.3f).setGreen(.1f).setBlue(.6f).build())\n .build();\n ImageRedactionConfig emailRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"EMAIL_ADDRESS\").build())\n .setRedactionColor(Color.newBuilder().setRed(.5f).setGreen(.5f).setBlue(1).build())\n .build();\n ImageRedactionConfig phoneRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"PHONE_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(1).setGreen(0).setBlue(.6f).build())\n .build();\n\n // Create collection of all redact configurations.\n List<ImageRedactionConfig> imageRedactionConfigs =\n Arrays.asList(ssnRedactionConfig, emailRedactionConfig, phoneRedactionConfig);\n\n // List types of info to search for.\n InspectConfig config =\n InspectConfig.newBuilder()\n .addAllInfoTypes(\n imageRedactionConfigs.stream()\n .map(ImageRedactionConfig::getInfoType)\n .collect(Collectors.toList()))\n .build();\n\n // Construct the Redact request to be sent by the client.\n RedactImageRequest request =\n RedactImageRequest.newBuilder()\n .setParent(LocationName.of(projectId, \"global\").toString())\n .setByteItem(byteItem)\n .addAllImageRedactionConfigs(imageRedactionConfigs)\n .setInspectConfig(config)\n .build();\n\n // Use the client to send the API request.\n RedactImageResponse response = dlp.redactImage(request);\n\n // Parse the response and process results.\n FileOutputStream redacted = new FileOutputStream(outputPath);\n redacted.write(response.getRedactedImage().toByteArray());\n redacted.close();\n System.out.println(\"Redacted image written to \" + outputPath);\n }\n }",
"@GET\n @Path(\"image\")\n @Produces(MediaType.TEXT_PLAIN)\n public Response voidImage() {\n return Response.status(Response.Status.NOT_FOUND).build();\n }",
"public List<Image> parseBestOfImagesResult(Document doc) {\n\n ArrayList<Image> bestOfImages = new ArrayList<>();\n Elements htmlImages = doc.select(CSS_BEST_OF_IMAGE_QUERY);\n Timber.i(\"Best OfImages: %s\", htmlImages.toString());\n String href;\n Image bestOfImage;\n for (Element image : htmlImages) {\n href = image.attr(\"src\");\n Timber.i(\"Image src: %s\", href);\n bestOfImage = new Image(href);\n bestOfImages.add(bestOfImage);\n }\n return bestOfImages;\n }",
"public Observable<MatchResponseInner> matchMethodAsync(String listId, Boolean cacheImage) {\n return matchMethodWithServiceResponseAsync(listId, cacheImage).map(new Func1<ServiceResponse<MatchResponseInner>, MatchResponseInner>() {\n @Override\n public MatchResponseInner call(ServiceResponse<MatchResponseInner> response) {\n return response.body();\n }\n });\n }",
"public Observable<ServiceResponse<MatchResponseInner>> matchFileInputWithServiceResponseAsync(byte[] imageStream, String listId, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n if (imageStream == null) {\n throw new IllegalArgumentException(\"Parameter imageStream is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n RequestBody imageStreamConverted = RequestBody.create(MediaType.parse(\"image/gif\"), imageStream);\n return service.matchFileInput(listId, cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {\n @Override\n public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<MatchResponseInner> clientResponse = matchFileInputDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }",
"public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }",
"public ImageFiles() {\n\t\tthis.listOne = new ArrayList<String>();\n\t\tthis.listTwo = new ArrayList<String>();\n\t\tthis.listThree = new ArrayList<String>();\n\t\tthis.seenImages = new ArrayList<String>();\n\t\tthis.unseenImages = new ArrayList<String>();\n\t}",
"public interface SearchService {\n List<String> siftSearch(MultipartFile image) throws IOException;\n}",
"@ApiModelProperty(value = \"An image to give an indication of what to expect when renting this vehicle.\")\n public List<Image> getImages() {\n return images;\n }",
"private void getImagesFromDatabase() {\n try {\n mCursor = mDbAccess.getPuzzleImages();\n\n if (mCursor.moveToNext()) {\n for (int i = 0; i < mCursor.getCount(); i++) {\n String imagetitle = mCursor.getString(mCursor.getColumnIndex(\"imagetitle\"));\n String imageurl = mCursor.getString(mCursor.getColumnIndex(\"imageurl\"));\n mImageModel.add(new CustomImageModel(imagetitle, imageurl));\n mCursor.moveToNext();\n }\n } else {\n Toast.makeText(getActivity(), \"databse not created...\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }",
"public yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesResponse list(yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListMethod(), getCallOptions(), request);\n }",
"public boolean displayedDepartmentEmployeeImageMatch(List<String> names, List<String> images) {\n List<String> nonMatchingRecords = new ArrayList<>();\n for (int i = 0; i < names.size(); i++) {\n\n String imageSource = images.get(i).toLowerCase();\n String imageFileName = createImageName(names.get(i).toLowerCase());\n\n if (!imageSource.contains(imageFileName)) {\n nonMatchingRecords.add(names.get(i));\n }\n }\n if (nonMatchingRecords.size() > 0) {\n Reporter.log(\"FAILURE: Names of employees with non matching images\" +\n \" or inconsistently named imageFiles: \" +\n Arrays.toString(nonMatchingRecords.toArray()), true);\n return false;\n }\n return true;\n }",
"public Detections recognizeImage(Image image, int rotation) {\n\n Bitmap rgbFrameBitmap = Transform.convertYUVtoRGB(image);\n\n\n if (image.getFormat() != ImageFormat.YUV_420_888) {\n // unsupported image format\n Logger.addln(\"\\nWARN YoloHTTP.recognizeImage() unsupported image format\");\n return new Detections();\n }\n //return recognize(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkMaxAreaRectangle(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkNineBoxes(Transform.yuvBytes(image), image.getWidth(),image.getHeight(),rotation, rgbFrameBitmap,image.getHeight()/3,image.getWidth()/3,image.getHeight()/3,image.getWidth()/3);\n //return frameworkQuadrant(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n return frameworkMaxAreaRectBD(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n\n }",
"public List<Recognition> recognizeImage(Mat img) {\n frameToCropTransform =\n ImageUtil.getTransformationMatrix(\n img.cols(), img.rows(),\n cropSize, cropSize,\n 0, MAINTAIN_ASPECT);\n cropToFrameTransform = new Matrix();\n frameToCropTransform.invert(cropToFrameTransform);\n Bitmap tBM = Bitmap.createBitmap(img.cols(), img.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(img, tBM);\n return recognizeImage(tBM);\n }",
"public BufferedImage GetImage(String name) { return ImageList.get(name); }",
"public void setImage(int imageId) {\n this.imageId=imageId;\n\t}",
"public static Long getAValidImageId() {\n\t\tLong id = getAId();\n\t\tif (id == null) {\n\n\t\t\tImage img = new Image(\"http://dummy.com/img.jpg\", (long)(Math.random()*10000), \"Description\", \"keyword\", new Date(0001L));\n\t\t\tIImageStore imageStore = StoreFactory.getImageStore();\n\t\t\timageStore.insert(img);\n\n\t\t\tid = getAId();\n\t\t\tif (id == null) {\n\t\t\t\tthrow new RuntimeException(\"There are no images in DB, and I can't insert one. Cannot run tests without.\");\n\t\t\t}\n\t\t}\n\t\treturn id;\n\t}",
"public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}",
"@GetMapping(path = \"/images\", produces = \"application/json; charset=UTF-8\")\n public @ResponseBody ArrayNode getImageList() {\n final ArrayNode nodes = mapper.createArrayNode();\n for (final Image image : imageRepository.findAllPublic())\n try {\n nodes.add(mapper.readTree(image.toString()));\n } catch (final JsonProcessingException e) {\n e.printStackTrace();\n }\n return nodes;\n }",
"String getItemImage();",
"java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByTransformOrBuilderList();",
"protected abstract void setupImages(Context context);",
"public AugmentedImageNode(Context context, String[] imageList, Integer augmentedImageIndex) {\n\n // we check if sushi is null\n // sushi is used in order to check if the renderables are null\n // because the renderables are built using the same block of code all at once, if sushi (or any other completable future) is null,\n // then they all are null\n if (sushi == null) {\n\n if (!(AugmentedImageFragment.imagePlaysVideoBooleanList[augmentedImageIndex])) {\n currentRenderable = renderableList.get(augmentedImageIndex);\n currentRenderable =\n // build the renderable using the image that is detected\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/\" + imageList[augmentedImageIndex] + \".sfb\"))\n .build();\n Log.d(\"modelrenderable\", (\"conditional is running! filepath: \" + Uri.parse(\"models/\" + imageList[augmentedImageIndex] + \".sfb\")));\n\n } else {\n\n frame_ul =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_upper_left.sfb\"))\n .build();\n Log.d(\"running\", (\"running\"));\n frame_ur =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_upper_right.sfb\"))\n .build();\n frame_ll =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_lower_left.sfb\"))\n .build();\n frame_lr =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_lower_right.sfb\"))\n .build();\n\n }\n\n\n }\n\n // Checks if videoRenderable is null, if it is, videoRenderable is loaded from models.\n // Will be used as the thing that the video is placed on.\n if (AugmentedImageActivity.videoRenderable == null) {\n AugmentedImageActivity.videoRenderable =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/chroma_key_video.sfb\"))\n .build();\n }\n }"
]
| [
"0.6269358",
"0.58894175",
"0.5767823",
"0.57581866",
"0.5743656",
"0.57329696",
"0.5511878",
"0.55023944",
"0.5499341",
"0.54513913",
"0.53242004",
"0.52565765",
"0.5252096",
"0.51959515",
"0.51806694",
"0.5179676",
"0.516937",
"0.51420456",
"0.51307625",
"0.5130238",
"0.51201755",
"0.5115933",
"0.5086581",
"0.5066521",
"0.5052614",
"0.5051037",
"0.503133",
"0.50229895",
"0.50200105",
"0.5018699",
"0.5017182",
"0.49932528",
"0.4980278",
"0.49779966",
"0.49757442",
"0.49613833",
"0.49499258",
"0.49310523",
"0.4917177",
"0.49092928",
"0.49044785",
"0.49008167",
"0.49007514",
"0.48709598",
"0.48693454",
"0.4868297",
"0.486439",
"0.48327476",
"0.4824767",
"0.48216105",
"0.48121452",
"0.48105243",
"0.47977334",
"0.47885716",
"0.47818112",
"0.47789094",
"0.47699574",
"0.4766071",
"0.47655237",
"0.4763522",
"0.47564504",
"0.47563508",
"0.47516552",
"0.47427645",
"0.4742108",
"0.47411898",
"0.4739934",
"0.47364616",
"0.47316936",
"0.47311017",
"0.47205627",
"0.4716423",
"0.47105074",
"0.47089097",
"0.47079867",
"0.47067878",
"0.46994454",
"0.4694525",
"0.46893325",
"0.4678342",
"0.46649662",
"0.466488",
"0.46646062",
"0.46630773",
"0.4662054",
"0.46478015",
"0.4644439",
"0.46423402",
"0.46374792",
"0.46361628",
"0.46341842",
"0.46304488",
"0.46291912",
"0.46212026",
"0.46210533",
"0.4616033",
"0.46065164",
"0.4605004",
"0.46003872",
"0.45990482",
"0.4584824"
]
| 0.0 | -1 |
Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using this API. Returns ID and tags of matching image. Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. | public Observable<MatchResponseInner> matchFileInputAsync(byte[] imageStream) {
return matchFileInputWithServiceResponseAsync(imageStream).map(new Func1<ServiceResponse<MatchResponseInner>, MatchResponseInner>() {
@Override
public MatchResponseInner call(ServiceResponse<MatchResponseInner> response) {
return response.body();
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int match(ArrayList<ImageCell> images);",
"ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);",
"private void searchImage(String text){\n\n // Set toolbar title as query string\n toolbar.setTitle(text);\n\n Map<String, String> options = setSearchOptions(text, Constants.NEW_SEARCH);\n Call<SearchResponse> call = service.searchPhoto(options);\n\n call.enqueue(new Callback<SearchResponse>() {\n @Override\n public void onResponse(Response<SearchResponse> response, Retrofit retrofit) {\n SearchResponse result = response.body();\n if (result.getStat().equals(\"ok\")) {\n // Status is ok, add result to photo list\n if (photoList != null) {\n photoList.clear();\n photoList.addAll(result.getPhotos().getPhoto());\n imageAdapter.notifyDataSetChanged();\n pageCount = 2;\n }\n\n } else {\n // Display error if something wrong with result\n Toast.makeText(context, result.getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Display error here since request failed\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }\n });\n }",
"@ApiOperation(value = \"Return images matching supplied digest found in supplied repository\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in supplied repository with supplied digest\") })\n\t// Pass in digest only in specific registry, get images and tags back that match\n\t@RequestMapping(path = \"/{registry}/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAndRegistry(@PathVariable String registry,\n\t\t\t@PathVariable String id) {\n\t\tRegistryConnection localConnection;\n\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\ttry {\n\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(registry));\n\n\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t// Get all tags from specific repo\n\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\timage.setRegistryName(registry);\n\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\timages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Iterate through images and only add to new list, what digests are identical\n\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\tfor (DockerImageData image : images) {\n\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from \" + registry + \" matching image id \" + id,\n\t\t\t\t\tmatchingImages);\n\t\t} catch (RegistryNotFoundException e) {\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\"Failed to find Registry\");\n\t\t}\n\t}",
"public List<Result> recognize(IplImage image);",
"@SuppressWarnings({ \"unchecked\", \"null\" })\n public List<String> calcSimilarity(String imgPath) {\n\n FileInputStream imageFile;\n double minDistance = Double.MAX_VALUE;\n\n // 返回查询结果\n List<String> matchUrls = new ArrayList<String>();\n\n\n try {\n\n imageFile = new FileInputStream(imgPath);\n BufferedImage bufferImage;\n\n bufferImage = ImageIO.read(imageFile);\n LTxXORP.setRotaIvaPats();//设定旋转模式值\n\n //得到图片的纹理一维数组特征向量(各颜色分量频率(统计量))\n double[] lbpSourceFecture = LTxXORP.getLBPFeature(imgPath);\n\n // 提取数据库数据\n List<Object> list = DBHelper.fetchALLCloth();\n\n // long startTime = System.currentTimeMillis();\n\n // 把每个条数据的路径和最短距离特征提取出来并存储在lbpResultMap的键值对中。\n Map<String, Double> lbpResultMap = new HashMap<String, Double>();\n\n for (int i = 0; i < list.size(); i++) {\n\n Map<String, Object> map = (Map<String, Object>) list.get(i);\n\n Object candidatePath = map.get(\"path\");\n Object candidateLBP = map.get(\"lbpFeature\");\n\n // 从快速搜索中选取TOP N结果,继续进行纹理特征匹配\n //获取当前由颜色匹配相似度排序的结果并提取其LBP纹理特征\n\n double[] lbpTargetFeature = MatchUtil.jsonToArr((String) candidateLBP);\n double lbpDistance = textureStrategy.similarity(lbpTargetFeature, lbpSourceFecture);\n lbpResultMap.put((String) candidatePath, lbpDistance);\n\n // 判断衡量标准选取距离还是相似度\n if (lbpDistance < minDistance)\n minDistance = lbpDistance;\n\n }\n\n Map<String, Double> tempResultMap;\n\n System.out.println(\"Min Distance : \" + (float) minDistance);\n\n\n\n System.out.println(\"============== finish Texture =================\");\n\n Map<String, Double> finalResult = MatchUtil.sortByValueAsc(lbpResultMap);\n\n int counter = 0;\n for (Map.Entry<String, Double> map : finalResult.entrySet()) {\n if (counter >= Config.finalResultNumber)\n break;\n //matchUrls截取只存储finalResultNumber数量的查询结果\n matchUrls.add(map.getKey());\n counter ++;\n double TSimilarity=Math.pow(Math.E,-map.getValue());\n System.out.println(TSimilarity + \" 图片路径 \" + map.getKey());\n\n }\n\n System.out.println();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return matchUrls;\n }",
"public interface ImageSearchService {\n\n /**\n * Register an image into the search instance.\n *\n * @param imageData Image data in JPEG or PNG format.\n * @param imageType Image format.\n * @param uuid Unique identifier of the image.\n */\n void register(byte[] imageData, ObjectImageType imageType, String uuid);\n\n /**\n * Un-register an image from the search instance.\n *\n * @param uuid Unique identifier of the image.\n */\n void unregister(String uuid);\n\n /**\n * Find all images similar to the given one.\n *\n * @param imageData Image to match with registered ones in the search instance.\n * @param objectRegion object region to search.\n * @return Found images UUIDs and raw response.\n */\n ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);\n\n /**\n * Check the image search configuration is correct by making a fake search request.\n *\n * @param configuration Configuration to check.\n */\n void checkImageSearchConfiguration(Configuration configuration) throws InvalidConfigurationException;\n}",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByHandler(int index);",
"@ApiOperation(value = \"Return all images matching supplied digest in all configured registries\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in configured registries with supplied digest\") })\n\t// Pass in only digest, get images and tags back that much from all repos\n\t@RequestMapping(path = \"/registries/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAllRegistries(@PathVariable String id) {\n\t\t\t\tRegistryConnection localConnection;\n\t\t\t\t// List persists outside all registries\n\t\t\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\t\t\tList<RegistryItem> items = configs.getItems();\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\t// For each configured registry\n\t\t\t\t\tfor(RegistryItem item : items) {\n\t\t\t\t\t\t// Get connection to registry\n\t\t\t\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(item.getRegistryLabel()));\n\t\t\t\t\t\t\n\t\t\t\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\t\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t\t\t\t// Get all tags from specific repo\n\t\t\t\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\t\t\t\timage.setRegistryName(item.getRegistryLabel());\n\t\t\t\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\t\t\t\timages.add(image);\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// Iterate through images and only add to new list, what digests are identical\n\t\t\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\t\t\tfor (DockerImageData image : images) {\n\t\t\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from all configured registries \",\n\t\t\t\t\t\t\tmatchingImages);\n\t\t\t\t} catch (RegistryNotFoundException e) {\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\t\t\"Failed to find Registry\");\n\t\t\t\t}\n\t}",
"Receta getByIdWithImages(long id);",
"public int displayRandomImage() {\n\n int randomImageIndex;\n\n do\n { // making sure that the same images aren't repeated & images of the same car makes aren't shown together\n\n randomCarMake = allCarMakes[getRandomBreed()]; // get a random breed\n randomImageIndex = getRandomImage(); // get a random image of a particular breed\n\n randomImageOfChosenCarMake = displayRelevantImage(randomCarMake, randomImageIndex);\n\n } while (displayingCarMakes.contains(randomCarMake) || allDisplayedImages.contains(randomImageOfChosenCarMake));\n\n allDisplayedImages.add(randomImageOfChosenCarMake); // to make sure that the image isn't repeated\n displayingCarMakes.add(randomCarMake); // to make sure that images of the same breed aren't shown at once\n displayingImageIndexes.add(randomImageIndex); // to recall indexes when the device is rotated\n\n // return chosen random image\n return getResources().getIdentifier(randomImageOfChosenCarMake, \"drawable\", \"com.example.car_match_game_app\");\n }",
"@GET\n @Path(\"{factoryId}/image\")\n @Produces(\"image/*\")\n public Response getImage(@PathParam(\"factoryId\") String factoryId, @DefaultValue(\"\") @QueryParam(\"imgId\") String imageId)\n throws FactoryUrlException {\n Set<FactoryImage> factoryImages = factoryStore.getFactoryImages(factoryId, null);\n if (factoryImages == null) {\n LOG.warn(\"Factory URL with id {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Factory URL with id \" + factoryId + \" is not found.\");\n }\n if (imageId.isEmpty()) {\n if (factoryImages.size() > 0) {\n FactoryImage image = factoryImages.iterator().next();\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n } else {\n LOG.warn(\"Default image for factory {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(),\n \"Default image for factory \" + factoryId + \" is not found.\");\n }\n } else {\n for (FactoryImage image : factoryImages) {\n if (image.getName().equals(imageId)) {\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n }\n }\n }\n LOG.warn(\"Image with id {} is not found.\", imageId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Image with id \" + imageId + \" is not found.\");\n }",
"public void findGeoSurfSimilarPhotosWithTagStatistics(\r\n\t\t\tfinal Set<String> allCandidateWords,\r\n\t\t\tfinal Map<String, WordImage> relevantWordImages, boolean tagReq,\r\n\t\t\tboolean techTagReq, boolean compact) {\r\n\r\n\t\ttopImagesURLs = new HashMap<String, Double>();\r\n\t\ttopImagesNames = new HashMap<String, String>();\r\n\t\t// The list of all Photo objects\r\n\t\tphotoList = new HashMap<String, Photo>();\r\n\t\tphotoList = createGeoSimilarPhotoList(PANORAMIO_DEFUALT_NUM_ITERATIONS, tagReq,\r\n\t\t\t\ttechTagReq);\r\n\r\n\t\t// Word Image Relevance Dictionary\r\n\t\t// The statistics consider for each word the set of images annotated\r\n\t\t// with them and similar\r\n\t\t// to the input image and the those which are tagged with it and not\r\n\t\t// similar to the input image\r\n\t\t// Map<String, WordImage> relevantWordImages = new HashMap<String,\r\n\t\t// WordImage>();\r\n\r\n\t\t// Prepare the result output\r\n\r\n\t\tif (!compact) {\r\n\t\t\toutRel.println(\"Image URL , Score , Distance , Point Similarity, Common Keypoints , Iter Point Similariy, Title , Tags , distance, userid\");\r\n\t\t\t// An CSV file for the set of visually irrelevant images\r\n\t\t\toutIrrRel.println(\"Image URL , Title , Tags , distance, userid\");\r\n\t\t}\r\n\r\n\t\t// *** Extract SURF feature for the input image\r\n\r\n\t\tSurfMatcher surfMatcher = new SurfMatcher();\r\n\t\t// The SURF feature of the input image\r\n\t\tList<InterestPoint> ipts1 = surfMatcher.extractKeypoints(inputImageURL,\r\n\t\t\t\tsurfMatcher.p1);\r\n\r\n\t\t// inputImageInterstPoints = ipts1 ;\r\n\r\n\t\t// Add the photo with its interestpoint to the cache\r\n\t\t// this.photoInterestPoints.put(imageName, ipts1);\r\n\r\n\t\t// Find SURF correspondences in the geo-related images\r\n\t\ttotalNumberOfSimilarImages = 0; // R\r\n\r\n\t\tfor (String photoId : photoList.keySet()) {\r\n\r\n\t\t\tPhoto photo = photoList.get(photoId);\r\n\r\n\t\r\n\r\n\t\t\tString toMatchedPhotoURL = photo.getPhotoFileUrl();\r\n\t\t\t// The SURF feature of a geo close image\r\n\t\t\tList<InterestPoint> ipts2 = surfMatcher.extractKeypoints(\r\n\t\t\t\t\ttoMatchedPhotoURL, surfMatcher.p2);\r\n\r\n\t\t\t// this.photoInterestPoints.put(photo.getPhotoId(), ipts2);\r\n\t\t\t// this.cachedImageInterstPoint.put(photo.getPhotoId(), ipts2);\r\n\r\n\t\t\tMatchingResult surfResult = null;\r\n\r\n\t\t\tsurfResult = surfMatcher.matchKeypoints(inputImageURL, photoId,\r\n\t\t\t\t\tipts1, ipts2, MIN_COMMON_IP_COUNT);\r\n\r\n\t\t\tif (surfResult != null) { // the images are visually similar\r\n\r\n\t\t\t\ttopImagesURLs.put(toMatchedPhotoURL,\r\n\t\t\t\t\t\tsurfResult.getPiontSimilarity());\r\n\r\n\t\t\t\ttopImagesNames.put(toMatchedPhotoURL, photo.getPhotoId());\r\n\r\n\t\t\t\ttotalNumberOfSimilarImages += 1;\r\n\t\t\t\tif (!compact) {\r\n\r\n\t\t\t\t\toutRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getScore()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getAvgDistance()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getPiontSimilarity()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getCommonKeyPointsCount()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ \"null ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\tSystem.out.println(\"Downloading Similar Image\");\r\n\t\t\t\t\tString destFileName = similarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Generate Word Statistics\r\n\t\t\t\t// For the a certain word (tag) add image info to its list if\r\n\t\t\t\t// this image\r\n\t\t\t\t// is visually similar to the input image\r\n\t\t\t\tupdateWordRelatedImageList(allCandidateWords,\r\n\t\t\t\t\t\trelevantWordImages, photo, surfResult);\r\n\t\t\t} else {\r\n\r\n\t\t\t\tif (!compact) {\r\n\t\t\t\t\t// Images are visually not similar\r\n\t\t\t\t\toutIrrRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \" ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t// We also need to get some information if a certain word is\r\n\t\t\t\t\t// also used by visually not similar images\r\n\t\t\t\t\tSystem.out.println(\"Downloading Non Similar Image\");\r\n\t\t\t\t\tString destFileName = dissimilarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tupdateWordNotRelatedImageList(relevantWordImages, photo);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByHandlerList();",
"@GET(\"/tags/{query}/media/recent\" + CLIENT_ID)\n public void searchPhotos(@Path(\"query\") String query, Callback<WebResponse<ArrayList<InstagramPhoto>>> callback);",
"List<Bitmap> getFavoriteRecipeImgs();",
"private void processImages() throws MalformedURLException, IOException {\r\n\r\n\t\tNodeFilter imageFilter = new NodeClassFilter(ImageTag.class);\r\n\t\timageList = fullList.extractAllNodesThatMatch(imageFilter, true);\r\n\t\tthePageImages = new HashMap<String, byte[]>();\r\n\r\n\t\tfor (SimpleNodeIterator nodeIter = imageList.elements(); nodeIter\r\n\t\t\t\t.hasMoreNodes();) {\r\n\t\t\tImageTag tempNode = (ImageTag) nodeIter.nextNode();\r\n\t\t\tString tagText = tempNode.getText();\r\n\r\n\t\t\t// Populate imageUrlText String\r\n\t\t\tString imageUrlText = tempNode.getImageURL();\r\n\r\n\t\t\tif (imageUrlText != \"\") {\r\n\t\t\t\t// Print to console, to verify relative link processing\r\n\t\t\t\tSystem.out.println(\"ImageUrl to Retrieve:\" + imageUrlText);\r\n\r\n\t\t\t\tbyte[] imgArray = downloadBinaryData(imageUrlText);\r\n\r\n\t\t\t\tthePageImages.put(tagText, imgArray);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"@Override\n public FlickrResponse searchPhoto(String tags) throws IOException {\n return flickrService.searchPhoto(tags);\n }",
"public void getImageResults(String tag){\n showProgressBar(true);\n HttpClient.get(\"rest/\", getRequestParams(tag), new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n String response = new String(responseBody, StandardCharsets.UTF_8);\n response = StringUtils.replace(response, \"jsonFlickrApi(\", \"\");\n response = StringUtils.removeEnd(response, \")\");\n Log.d(\"SERVICE RESPONSE\", response);\n Gson gson = new Gson();\n FlickrSearchResponse jsonResponse = gson.fromJson(response, FlickrSearchResponse.class);\n if(jsonResponse.getStat().equals(\"fail\")){\n //api returned an error\n searchHelperListener.onErrorResponseReceived(jsonResponse.getMessage());\n } else {\n //api returned data\n searchHelperListener.onSuccessResponseReceived(jsonResponse);\n }\n showProgressBar(false);\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n Log.d(\"SERVICE FAILURE\", error.getMessage());\n searchHelperListener.onErrorResponseReceived(error.getMessage());\n showProgressBar(false);\n }\n });\n\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByTransform(int index);",
"public EC2DescribeImagesResponse describeImages(EC2DescribeImages request) {\n EC2DescribeImagesResponse images = new EC2DescribeImagesResponse();\n try {\n String[] templateIds = request.getImageSet();\n EC2ImageFilterSet ifs = request.getFilterSet();\n\n if (templateIds.length == 0) {\n images = listTemplates(null, images);\n } else {\n for (String s : templateIds) {\n images = listTemplates(s, images);\n }\n }\n if (ifs != null)\n return ifs.evaluate(images);\n } catch (Exception e) {\n logger.error(\"EC2 DescribeImages - \", e);\n handleException(e);\n }\n return images;\n }",
"GetImagesResult getImages(GetImagesRequest getImagesRequest);",
"int seachImage(Image img) {\r\n\t\treturn 1;\r\n\t}",
"public void searchImages(View view) {\n imageList.clear();\n adapter.clear();\n Log.d(\"DEBUG\", \"Search Images\");\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n Log.d(\"DEBUG\", getUrl(1).toString());\n retrieveImages(getUrl(1).toString());\n }",
"java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByTransformList();",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform();",
"FetchedImage getFujimiyaUrl(String query,int maxRankOfResult){\n try{\n //Get SearchResult\n Search search = getSearchResult(query, maxRankOfResult);\n List<Result> items = search.getItems();\n for(Result result: items){\n int i = items.indexOf(result);\n logger.log(Level.INFO,\"query: \" + query + \" URL: \"+result.getLink());\n logger.log(Level.INFO,\"page URL: \"+result.getImage().getContextLink());\n if(result.getImage().getWidth()+result.getImage().getHeight()<600){\n logger.log(Level.INFO,\"Result No.\"+i+\" is too small image. next.\");\n continue;\n }\n if(DBConnection.isInBlackList(result.getLink())){\n logger.log(Level.INFO,\"Result No.\"+i+\" is included in the blacklist. next.\");\n continue;\n }\n HttpURLConnection connection = (HttpURLConnection)(new URL(result.getLink())).openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setInstanceFollowRedirects(false);\n connection.connect();\n if(connection.getResponseCode()==200){\n return new FetchedImage(connection.getInputStream(),result.getLink());\n }else{\n logger.log(Level.INFO,\"Result No.\"+i+\" occurs error while fetching the image. next.\");\n continue;\n }\n }\n //If execution comes here, connection has failed 10 times.\n throw new ConnectException(\"Connection failed 10 times\");\n\n } catch (IOException e) {\n // TODO Auto-generated catch block\n logger.log(Level.SEVERE,e.toString());\n e.printStackTrace();\n }\n return null;\n}",
"void loadImages(int id_image, HouseRepository.GetImageFromHouseCallback callback);",
"@Override\n\tpublic String imageSearch(QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(IData.URL_SEARCH + param.toString());\n\t}",
"private void onImagePicked(@NonNull final byte[] imageBytes) {\n setBusy(true);\n\n // Make sure we don't show a list of old concepts while the image is being uploaded\n adapter.setData(Collections.<Concept>emptyList());\n\n new AsyncTask<Void, Void, ClarifaiResponse<List<ClarifaiOutput<Concept>>>>() {\n @Override protected ClarifaiResponse<List<ClarifaiOutput<Concept>>> doInBackground(Void... params) {\n // The default Clarifai model that identifies concepts in images\n final ConceptModel generalModel = App.get().clarifaiClient().getDefaultModels().foodModel();\n\n // Use this model to predict, with the image that the user just selected as the input\n return generalModel.predict()\n .withInputs(ClarifaiInput.forImage(ClarifaiImage.of(imageBytes)))\n .executeSync();\n }\n\n @Override protected void onPostExecute(ClarifaiResponse<List<ClarifaiOutput<Concept>>> response) {\n setBusy(false);\n if (!response.isSuccessful()) {\n showErrorSnackbar(R.string.error_while_contacting_api);\n return;\n }\n final List<ClarifaiOutput<Concept>> predictions = response.get();\n if (predictions.isEmpty()) {\n showErrorSnackbar(R.string.no_results_from_api);\n return;\n }\n adapter.setData(predictions.get(0).data());\n\n // INSERT METHOD FOR USER SELECTION OF FOOD\n\n // ADDED FOR DATABASE\n try {\n readCSVToMap(\"ABBREV_2.txt\");\n }\n catch (Exception e){\n Log.d(\"Failure\", \"CSV not read into database\");\n }\n String exampleResult = predictions.get(0).data().get(0).name();\n final List<String> list = listOfKeys(exampleResult);\n\n // change this line to take in user input\n final String key2 = list.get(0); // arbitrary selection of key\n\n final List<String> val = db.get(key2);\n final String message = String.valueOf(val.get(6)); //index 6 contains carb info\n Log.d(\"Output\", message);\n imageView.setImageBitmap(BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.length));\n }\n\n private void showErrorSnackbar(@StringRes int errorString) {\n Snackbar.make(\n root,\n errorString,\n Snackbar.LENGTH_INDEFINITE\n ).show();\n }\n }.execute();\n }",
"private void imageSearch(ArrayList<Html> src) {\n // loop through the Html objects\n for(Html page : src) {\n\n // Temp List for improved readability\n ArrayList<Image> images = page.getImages();\n\n // loop through the corresponding images\n for(Image i : images) {\n if(i.getName().equals(this.fileName)) {\n this.numPagesDisplayed++;\n this.pageList.add(page.getLocalPath());\n }\n }\n }\n }",
"@Override\n\tpublic String imageLists(String url, QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(url + param.toString());\n\t}",
"@Override\n\tpublic List<PersonalisationMediaModel> getImageByID(final String imageID)\n\t{\n\t\tfinal String query1 = \"Select {pk} from {PersonalisationMedia} Where {code}=?imageId and {user}=?user\";\n\t\t/**\n\t\t * select distinct {val:pk} from {PersonalisationMediaModel as val join MediaModel as media on\n\t\t * {media:PK}={val.image} join User as user on {user:pk}={val:user} and {media:code}=?imageId and {user:pk}=?user}\n\t\t */\n\t\tfinal UserModel user = getUserService().getCurrentUser();\n\t\tfinal FlexibleSearchQuery fQuery = new FlexibleSearchQuery(query1);\n\t\tfinal Map<String, Object> params = new HashMap<>();\n\t\tparams.put(\"imageId\", imageID);\n\t\tparams.put(\"user\", user);\n\t\tfQuery.addQueryParameters(params);\n\t\tLOG.info(\"getImageByID\" + fQuery);\n\t\tfinal SearchResult<PersonalisationMediaModel> searchResult = flexibleSearchService.search(fQuery);\n\t\treturn searchResult.getResult();\n\t}",
"public void findImages() {\n \t\tthis.mNoteItemModel.findImages(this.mNoteItemModel.getContent());\n \t}",
"public void notifyFinishGetSimilarArtist(ArtistInfo a, Image img, long id);",
"private void imgDetected(Matcher matcher) {\n String component;\n matcher.reset();\n\n // store src value if <img> exist\n while (matcher.find()) {\n Data.imagesSrc.add(matcher.group(1));\n }\n\n // separate if the paragraph contain img\n // replace <img> with -+-img-+- to indicate image position in the text\n component = matcher.replaceAll(\"-+-img-+-\");\n\n //split the delimiter to structure image position\n String[] imageStructure = component.split(\"-\\\\+-\");\n\n // start looping the structured text\n int imageFoundIndex = 0;\n for (String structure : imageStructure) {\n // continue if the current index is not empty string \"\"\n if (!structure.trim().equals(\"\")) {\n // create ImageView if current index value equeal to \"img\"\n if (structure.trim().equals(\"img\")) {\n createImageView();\n imageFoundIndex++;\n } else {\n // else create textView for the text\n generateView(structure);\n }\n }\n }\n }",
"List<IbeisImage> uploadImages(List<File> images) throws UnsupportedImageFileTypeException, IOException,\n MalformedHttpRequestException, UnsuccessfulHttpRequestException;",
"public DetectorMatchResponse findMatchingDetectorMappings(List<Map<String, String>> tagsList) {\n isTrue(tagsList.size() > 0, \"tagsList must not be empty\");\n\n val uri = baseUri + API_PATH_MATCHING_DETECTOR_BY_TAGS;\n Content content;\n try {\n String body = objectMapper.writeValueAsString(tagsList);\n content = httpClient.post(uri, body);\n } catch (IOException e) {\n val message = \"IOException while getting matching detectors for\" +\n \": tags=\" + tagsList +\n \", httpMethod=POST\" +\n \", uri=\" + uri;\n throw new DetectorMappingRetrievalException(message, e);\n }\n try {\n return objectMapper.readValue(content.asBytes(), DetectorMatchResponse.class);\n } catch (IOException e) {\n val message = \"IOException while deserializing detectorMatchResponse\" +\n \": tags=\" + tagsList;\n throw new DetectorMappingDeserializationException(message, e);\n }\n\n }",
"public Observable<ServiceResponse<MatchResponseInner>> matchMethodWithServiceResponseAsync(String listId, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.matchMethod(listId, cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {\n @Override\n public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<MatchResponseInner> clientResponse = matchMethodDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }",
"List<Bitmap> getRecipeImgSmall();",
"private void getImagesFromServer() {\n trObtainAllPetImages.setUser(user);\n trObtainAllPetImages.execute();\n Map<String, byte[]> petImages = trObtainAllPetImages.getResult();\n Set<String> names = petImages.keySet();\n\n for (String petName : names) {\n byte[] bytes = petImages.get(petName);\n Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, Objects.requireNonNull(bytes).length);\n int index = user.getPets().indexOf(new Pet(petName));\n user.getPets().get(index).setProfileImage(bitmap);\n ImageManager.writeImage(ImageManager.PET_PROFILE_IMAGES_PATH, user.getUsername() + '_' + petName, bytes);\n }\n }",
"private static final byte[] xfuzzy_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -95, 0, 0, -1,\n\t\t\t\t-1, -1, -82, 69, 12, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77,\n\t\t\t\t97, 100, 101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0,\n\t\t\t\t33, -7, 4, 1, 10, 0, 0, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 2,\n\t\t\t\t36, -124, -113, -87, -101, -31, -33, 32, 120, 97, 57, 68, -93,\n\t\t\t\t-54, -26, 90, -24, 49, 84, -59, 116, -100, 88, -99, -102, 25,\n\t\t\t\t30, -19, 36, -103, -97, -89, -62, 117, -119, 51, 5, 0, 59 };\n\t\treturn data;\n\t}",
"public RatingSearch explode() {\n Elements elements = doc.getElementsByTag(\"table\");\n IqdbMatch bestMatch = null;\n List<IqdbMatch> additionalMatches = new LinkedList<>();\n for (int i = 1; i < elements.size(); i++) {\n //iterating through all the table elements. First one is your uploaded image\n\n //Each table is one \"card\" on iqdb so only the second one will be the \"best match\"\n Element element = elements.get(i);\n IqdbElement iqdbElement = new IqdbElement(element);\n\n Elements noMatch = element.getElementsContainingText(\"No relevant matches\");\n if (noMatch.size() > 0) {\n log.warn(\"There was no relevant match for this document\");\n// break;\n return null;\n }\n// TODO I don't think we can determine if these are even relevant. So once we see 'No relevent matches' we can\n// just call it there. We won't need 'Possible Match' yet\n// Elements possibleMatchElement = element.getElementsContainingText(\"Possible match\");\n// if (possibleMatchElement.size() > 0) {\n// additionalMatches.add(iqdbElement.explode(IqdbMatchType.NO_RELEVANT_BUT_POSSIBLE));\n// }\n\n //Second element will provide all the information you need. going into the similarity and all that is a waste of time\n //Use the similarity search for Best Match to identify the element that is best match if you don't trust the 2nd.\n Elements bestMatchElement = element.getElementsContainingText(\"Best Match\");\n if (bestMatchElement.size() > 0) {\n bestMatch = iqdbElement.explode(IqdbMatchType.BEST);\n }\n\n //can similarly search for \"Additional match\" to find all teh additional matches. Anything beyond additional matches is a waste of time.\n Elements additionalMatchElements = element.getElementsContainingText(\"Additional match\");\n if (additionalMatchElements.size() > 0) {\n additionalMatches.add(iqdbElement.explode(IqdbMatchType.ADDITIONAL));\n }\n }\n\n if (bestMatch == null && !additionalMatches.isEmpty()) {\n log.warn(\"No Best Match found, taking first additionalMatch, does this ever happen?\");\n bestMatch = additionalMatches.remove(0);\n }\n\n return null;//new RatingSearch(bestMatch, additionalMatches);\n }",
"public static SearchResult getChampionImage(String championList, String championID) {\n try {\r\n JSONObject holder = new JSONObject(championList);\r\n JSONObject holderItems = holder.getJSONObject(\"data\");\r\n SearchResult champion = new SearchResult();\r\n\r\n for (Iterator<String> it = holderItems.keys(); it.hasNext(); ) { //iterate through champion json objects\r\n String key = it.next();\r\n JSONObject resultItem = holderItems.getJSONObject(key);\r\n\r\n if (resultItem.getString(\"key\").equals(championID)) {\r\n champion.championName = key; //the key for the json object is also the name of the champion\r\n break;\r\n }\r\n }\r\n\r\n String tempName = champion.championName + \".png\"; //construct string for champion image\r\n\r\n champion.championImage = Uri.parse(BASE_URL_CHAMPION_IMAGE + tempName).buildUpon().build().toString();\r\n\r\n return champion;\r\n } catch (JSONException e) {\r\n System.out.println(e);\r\n return null;\r\n }\r\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByHandlerOrBuilder();",
"private EC2DescribeImagesResponse listTemplates(String templateId, EC2DescribeImagesResponse images) throws Exception {\n try {\n List<CloudStackTemplate> result = new ArrayList<CloudStackTemplate>();\n\n if (templateId != null) {\n List<CloudStackTemplate> template = getApi().listTemplates(\"executable\", null, null, null, templateId, null, null, null);\n if (template != null) {\n result.addAll(template);\n }\n } else {\n List<CloudStackTemplate> selfExecutable = getApi().listTemplates(\"selfexecutable\", null, null, null, null, null, null, null);\n if (selfExecutable != null) {\n result.addAll(selfExecutable);\n }\n\n List<CloudStackTemplate> featured = getApi().listTemplates(\"featured\", null, null, null, null, null, null, null);\n if (featured != null) {\n result.addAll(featured);\n }\n\n List<CloudStackTemplate> sharedExecutable = getApi().listTemplates(\"sharedexecutable\", null, null, null, null, null, null, null);\n if (sharedExecutable != null) {\n result.addAll(sharedExecutable);\n }\n\n List<CloudStackTemplate> community = getApi().listTemplates(\"community\", null, null, null, null, null, null, null);\n if (community != null) {\n result.addAll(community);\n }\n }\n\n if (result != null && result.size() > 0) {\n for (CloudStackTemplate temp : result) {\n EC2Image ec2Image = new EC2Image();\n ec2Image.setId(temp.getId().toString());\n ec2Image.setAccountName(temp.getAccount());\n ec2Image.setName(temp.getName());\n ec2Image.setDescription(temp.getDisplayText());\n ec2Image.setOsTypeId(temp.getOsTypeId().toString());\n ec2Image.setIsPublic(temp.getIsPublic());\n ec2Image.setState(temp.getIsReady() ? \"available\" : \"pending\");\n ec2Image.setDomainId(temp.getDomainId());\n if (temp.getHyperVisor().equalsIgnoreCase(\"xenserver\"))\n ec2Image.setHypervisor(\"xen\");\n else if (temp.getHyperVisor().equalsIgnoreCase(\"ovm\"))\n ec2Image.setHypervisor(\"ovm\"); // valid values for hypervisor is 'ovm' and 'xen'\n else\n ec2Image.setHypervisor(\"\");\n if (temp.getDisplayText() == null)\n ec2Image.setArchitecture(\"\");\n else if (temp.getDisplayText().indexOf(\"x86_64\") != -1)\n ec2Image.setArchitecture(\"x86_64\");\n else if (temp.getDisplayText().indexOf(\"i386\") != -1)\n ec2Image.setArchitecture(\"i386\");\n else\n ec2Image.setArchitecture(\"\");\n List<CloudStackKeyValue> resourceTags = temp.getTags();\n for (CloudStackKeyValue resourceTag : resourceTags) {\n EC2TagKeyValue param = new EC2TagKeyValue();\n param.setKey(resourceTag.getKey());\n if (resourceTag.getValue() != null)\n param.setValue(resourceTag.getValue());\n ec2Image.addResourceTag(param);\n }\n images.addImage(ec2Image);\n }\n }\n return images;\n } catch (Exception e) {\n logger.error(\"List Templates - \", e);\n throw new Exception(e.getMessage() != null ? e.getMessage() : e.toString());\n }\n }",
"java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByHandlerOrBuilderList();",
"public interface ImageMetadataService {\n\n List<ArtistDTO> getArtistsByPrediction(String name, String name2, String surname);\n\n List<ImageTypeDTO> getImageTypesByPrediction(String name);\n\n UploadImageMetadataDTO saveMetadata(UploadImageMetadataDTO uploadImageMetadataDTO);\n\n List<ImageDTO> getTop10Images(String username, String title);\n\n List<ImageDTO> getAllUserImages(String username);\n\n List<ImageDTO> searchImagesByCriteria(SearchImageCriteriaDTO searchImageCriteriaDTO);\n\n ImageDTO updateImageMetadata(ImageDTO imageDTO);\n\n List<ImageDTO> getImagesTop50();\n\n void rateImage(RateImageDTO rateImageDTO);\n\n List<ImageDTO> getAllImages();\n}",
"public static List<PNMedia> discoveryFlickrImages(String[] tags) throws Exception{\r\n\t\tif(tags != null && tags.length > 0){\r\n\t\t\tList<PNMedia> flickrPhotosList = new ArrayList<PNMedia>();\r\n\t\t\t\t\r\n\t\t\tFlickr flickr = new Flickr(flickrApiKey, flickrSharedSecret, new REST());\r\n\t\t\tFlickr.debugStream = false;\r\n\t\t\t\r\n\t\t\tSearchParameters searchParams=new SearchParameters();\r\n\t\t searchParams.setSort(SearchParameters.INTERESTINGNESS_ASC);\r\n\t\t \r\n\t\t searchParams.setTags(tags);\r\n\t\t \r\n\t\t PhotosInterface photosInterface = flickr.getPhotosInterface();\r\n\t\t PhotoList<Photo> photoList = photosInterface.search(searchParams, 10, 1); // quantidade de fotos retornadas (5)\r\n\t\t \r\n\t\t if(photoList != null){\r\n\t\t for(int i=0; i<photoList.size(); i++){\r\n\t\t Photo photo = (Photo)photoList.get(i);\r\n\t\t PNMedia media = new PNMedia();\r\n\t\t \r\n\t\t String description = photo.getDescription();\r\n\t\t if(description == null)\r\n\t\t \t description = photo.getTitle();\r\n\t\t media.setMediaURL(photo.getLargeUrl()); media.setMediaURLAux(photo.getSmallSquareUrl()); media.setMediaCaption(photo.getTitle()); media.setMediaInfo(description);\r\n\t\t flickrPhotosList.add(media);\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t return flickrPhotosList;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tthrow new Exception(\"Null tags or tags is empty. \");\r\n\t\t}\r\n\t}",
"public interface Image {\n /**\n * @return the image ID\n */\n String getId();\n\n /**\n * @return the image ID, or null if not present\n */\n String getParentId();\n\n /**\n * @return Image create timestamp\n */\n long getCreated();\n\n /**\n * @return the image size\n */\n long getSize();\n\n /**\n * @return the image virtual size\n */\n long getVirtualSize();\n\n /**\n * @return the labels assigned to the image\n */\n Map<String, String> getLabels();\n\n /**\n * @return the names associated with the image (formatted as repository:tag)\n */\n List<String> getRepoTags();\n\n /**\n * @return the digests associated with the image (formatted as repository:tag@sha256:digest)\n */\n List<String> getRepoDigests();\n}",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage();",
"public void features() throws MalformedURLException, IOException {\n\t\tMBFImage query = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao01.jpg\"));\n\t\tMBFImage target = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao02.jpg\"));\n\n\t\tDoGSIFTEngine engine = new DoGSIFTEngine();\n\t\tLocalFeatureList<Keypoint> queryKeypoints = engine.findFeatures(query.flatten());\n\t\tLocalFeatureList<Keypoint> targetKeypoints = engine.findFeatures(target.flatten());\n\t\tLocalFeatureMatcher<Keypoint> matcher1 = new BasicMatcher<Keypoint>(80);\n\t\tLocalFeatureMatcher<Keypoint> matcher = new BasicTwoWayMatcher<Keypoint>();\n\t\t/*\n\t\t * matcher.setModelFeatures(queryKeypoints);\n\t\t * matcher.findMatches(targetKeypoints); MBFImage basicMatches =\n\t\t * MatchingUtilities.drawMatches(query, target, matcher.getMatches(),\n\t\t * RGBColour.RED); DisplayUtilities.display(basicMatches);\n\t\t */\n\t\tRobustAffineTransformEstimator modelFitter = new RobustAffineTransformEstimator(5.0, 1500,\n\t\t\t\tnew RANSAC.PercentageInliersStoppingCondition(0.5));\n\t\tmatcher = new ConsistentLocalFeatureMatcher2d<Keypoint>(new FastBasicKeypointMatcher<Keypoint>(8), modelFitter);\n\t\tmatcher.setModelFeatures(queryKeypoints);\n\t\tmatcher.findMatches(targetKeypoints);\n\t\tMBFImage consistentMatches = MatchingUtilities.drawMatches(query, target, matcher.getMatches(), RGBColour.RED);\n\t\tDisplayUtilities.display(consistentMatches);\n\t\ttarget.drawShape(query.getBounds().transform(modelFitter.getModel().getTransform().inverse()), 3,\n\t\t\t\tRGBColour.BLUE);\n\t\t// DisplayUtilities.display(target);\n\t}",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage(\n @QueryMap ListImage queryParameters);",
"private static void updateRelatedImageList(\r\n\t\t\tMap<String, WordImage> relevantWordImages, Photo photo,\r\n\t\t\tMatchingResult surfResult, String word) {\n\r\n\t\tString key = getRelevantKeyForRelevantImages(relevantWordImages, word);\r\n\r\n\t\tif (key != null) {\r\n\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImages().add(info);\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImagesMap()\r\n\t\t\t\t\t.put(info.getId(), info);\r\n\r\n\t\t\trelevantWordImages.get(key).addSimilarImageId(info.getId());\r\n\r\n\t\t}\r\n\r\n\t\telse {\r\n\r\n\t\t\tWordImage wi = new WordImage(word);\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\twi.addSimilarImage(info);\r\n\r\n\t\t\twi.addSimilarImage(photo.getPhotoId(), info);\r\n\r\n\t\t\trelevantWordImages.put(word, wi);\r\n\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic String searchimage(int cbid) throws Exception {\n\t\treturn dao.searchimage(cbid);\r\n\t}",
"public Point findImage(BufferedImage image, int index) {\n int smallWidth = image.getWidth();\n int smallHeight = image.getHeight();\n int[][] smallPixels = new int[smallWidth][smallHeight];\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n smallPixels[x][y] = image.getRGB(x, y);\n }\n }\n boolean good;\n int count = 0;\n for(int X = 0; X <= bigWidth - smallWidth; X++) {\n for(int Y = 0; Y <= bigHeight - smallHeight; Y++) {\n good = true;\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n if(smallPixels[x][y] != bigPixels[X + x][Y + y]) {\n good = false;\n break;\n }\n }\n if(!good) {\n break;\n }\n }\n if(good) {\n if(count == index) {\n return(new Point(X, Y));\n }\n count++;\n }\n }\n }\n return(null);\n }",
"public static String getImageId(WebElement image) {\n String imageUrl = image.getAttribute(\"src\");\n\n int indexComparisonStart = imageUrl.indexOf(START_TOKEN) + START_TOKEN.length();\n int indexComparisonFinish = imageUrl.substring(indexComparisonStart).indexOf(STOP_TOKEN);\n\n return imageUrl.substring(indexComparisonStart, indexComparisonStart + indexComparisonFinish);\n }",
"private void searchImages()\n {\n searchWeb = false;\n search();\n }",
"java.lang.String getHotelImageURLs(int index);",
"public void findBookDetails(AnnotateImageResponse imageResponse) throws IOException {\n\n String google = \"http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=\";\n String search = \"searchString\";\n String charset = \"UTF-8\";\n\n URL url = new URL(google + URLEncoder.encode(search, charset));\n Reader reader = new InputStreamReader(url.openStream(), charset);\n GoogleResults results = new Gson().fromJson(reader, GoogleResults.class);\n\n // Show title and URL of 1st result.\n System.out.println(results.getResponseData().getResults().get(0).getTitle());\n System.out.println(results.getResponseData().getResults().get(0).getUrl());\n }",
"@Override\n\tpublic List<Image> findAllImage() {\n\t\treturn new ImageDaoImpl().findAllImage();\n\t}",
"public interface IImageInputBoundary {\n\n List<ImageResponseModel> GetImagesByCategory(ImageRequestModel requestModel);\n List<ImageResponseModel> GetImagesByComposition(ImageRequestModel requestModel);\n}",
"@Override\n\tpublic List<AddBookDto> findListimage(List<addBookBo> listBo) throws IOException {\n\n\t\tFile uploadFileDir, uploadImageDir;\n\n\t\tFileInputStream fileInputStream = null;\n\n\t\tList<AddBookDto> dtoList = new ArrayList<>();\n\n\t\tSet<Category> setCategory = new HashSet<>();\n\n\t\tSystem.out.println(\"UploadService.findListimage()\");\n\n\t\tfor (addBookBo bo : listBo) {\n\n\t\t\tAddBookDto dto = new AddBookDto();\n\n\t\t\tBeanUtils.copyProperties(bo, dto);\n\n\t\t\tSystem.out.println(\"UploadService.findListimage()-------\" + bo.getAuthor());\n\n\t\t\tuploadImageDir = new File(imageUploadpath + \"/\" + dto.getImageUrl() + \".jpg\");\n\n\t\t\tif (uploadImageDir.exists()) {\n\n\t\t\t\tbyte[] buffer = getBytesFromFile(uploadImageDir);\n\t\t\t\t// System.out.println(bo.getTitle()+\"====b===\" + buffer);\n\t\t\t\tdto.setImgeContent(buffer);\n\n\t\t\t}\n\n\t\t\tSystem.out.println(dto.getTitle() + \"====dto===\" + dto.getImgeContent());\n\t\t\tdtoList.add(dto);\n\n\t\t}\n\n\t\treturn dtoList;\n\t}",
"@Test\n\tpublic void searchImageWithUpload() throws InterruptedException, Exception {\n\n\t\t// To click on Images link\n\t\thomePage.clickSearchByImage();\n\t\t\n\t\t// To verify if ui is navigated to Search by image page\n\t\tAssert.assertTrue(homePage.verifySearchByImageBox());\n\n\t\t// Upload an image from local machine\n\t\tsearchPage.uploadLocalImage(Settings.getLocalImage());\n\t\t// To verify upload status\n\t\tAssert.assertTrue(searchPage.verifyUploadStatus());\n\n\t\t// Find specified image on GUI\n\t\tWebElement webElement = searchPage.navigateToImage(Settings.getVisitRule());\n\n\t\t// Take a snapshot for expected visit page\n\t\tsearchPage.snapshotLastPage(webElement);\n\n\t\t// Download specified image by expected rule\n\t\tString fileName = Settings.getDownloadImage();\n\t\tboolean down = searchPage.downloadImagetoLocal(webElement, fileName);\n\t\tAssert.assertTrue(down);\n\n\t\t// verify two images match or not\n\t\tAssert.assertTrue(searchPage.verifyImageIsSame(Settings.getDownloadImage(), Settings.getLocalImage()));\n\n\t}",
"public Image getImageById(final String imageId)\n {\n GetImageByIdQuery getImageByIdQuery = new GetImageByIdQuery(imageId);\n List<Image> ImageList = super.queryResult(getImageByIdQuery);\n if (CollectionUtils.isEmpty(ImageList) || ImageList.size() > 1)\n {\n LOG.error(\"The Image cannot be found by this id:\" + imageId);\n return null;\n }\n return ImageList.get(0);\n }",
"@Override\n public void onSuccess(Uri uri) {\n if (!ImageListUrl.contains(uri.toString())) {\n ImageListUrl.add(uri.toString());\n\n /// add property if imageurl arraylist same with imagelist arraylist\n if (ImageListUrl.size() == ImageList.size()) {\n Toast.makeText(NewRecipe.this, ImageListUrl.toString(), Toast.LENGTH_SHORT).show();\n\n saveRecipe();\n\n }\n }\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByTransformOrBuilder();",
"public List<Recognition> recognizeImage(Bitmap bitmap) {\n Bitmap croppedBitmap = Bitmap.createScaledBitmap(bitmap, cropSize, cropSize, true);\n// Bitmap croppedBitmap = Bitmap.createBitmap(cropSize, cropSize, Bitmap.Config.ARGB_8888);\n// final Canvas canvas = new Canvas(croppedBitmap);\n// canvas.drawBitmap(bitmap, frameToCropTransform, null);\n final List<Recognition> ret = new LinkedList<>();\n List<Recognition> recognitions = detector.recognizeImage(croppedBitmap);\n// long before=System.currentTimeMillis();\n// for (int k=0; k<100; k++) {\n// recognitions = detector.recognizeImage(croppedBitmap);\n// int a = 0;\n// }\n// long after=System.currentTimeMillis();\n// String log = String.format(\"tensorflow takes %.03f s\\n\", ((float)(after-before)/1000/100));\n// Log.d(\"MATCH TEST\", log);\n for (Recognition r : recognitions) {\n if (r.getConfidence() < minConfidence)\n continue;\n// RectF location = r.getLocation();\n// cropToFrameTransform.mapRect(location);\n// r.setOriginalLoc(location);\n// Bitmap cropped = Bitmap.createBitmap(bitmap, (int)location.left, (int)location.top, (int)location.width(), (int)location.height());\n// r.setObjectImage(cropped);\n BoxPosition bp = r.getLocation();\n// r.rectF = new RectF(bp.getLeft(), bp.getTop(), bp.getRight(), bp.getBottom());\n// cropToFrameTransform.mapRect(r.rectF);\n ret.add(r);\n }\n\n return ret;\n }",
"private static final byte[] xfuzzyload_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, -82,\n\t\t\t\t69, 12, -128, -128, -128, -1, -1, -1, -64, -64, -64, -1, -1, 0,\n\t\t\t\t0, 0, 0, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100, 101,\n\t\t\t\t32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4, 1,\n\t\t\t\t10, 0, 6, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 3, 75, 8, -86,\n\t\t\t\t-42, 11, 45, -82, -24, 32, -83, -42, -80, 43, -39, -26, -35,\n\t\t\t\t22, -116, 1, -9, 24, -127, -96, 10, 101, 23, 44, 2, 49, -56,\n\t\t\t\t108, 21, 15, -53, -84, -105, 74, -86, -25, 50, -62, -117, 68,\n\t\t\t\t44, -54, 74, -87, -107, 82, 21, 40, 8, 81, -73, -96, 78, 86,\n\t\t\t\t24, 53, 82, -46, 108, -77, -27, -53, 78, -85, -111, -18, 116,\n\t\t\t\t87, 8, 23, -49, -123, 4, 0, 59 };\n\t\treturn data;\n\t}",
"public static ArrayList<Result> getCCVBasedSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.CCV));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t\t// create result object\n\t\t\t \tResult result = new Result();\n\t\t\t \tresult.mFilename = imageName;\n\t\t\t \tresult.mSimilarity = intersection;\n\t\t\t \t\n\t\t\t \t// store result\n\t\t\t \trv.add(result);\n\t\t\t\t} catch (Exception ex) {}\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}",
"public Map<String, Photo> createGeoSimilarPhotoList(int maxCycles,\r\n\t\t\tboolean tagReq, boolean techTagReq) {\r\n\r\n\t\tMap<String, Photo> photoList = new HashMap<String, Photo>();\r\n\r\n\t\tpFet.getPanoramioGeoSimilarPhotoList(maxCycles, tagReq, techTagReq,\r\n\t\t\t\tphotoList);\r\n\r\n\t\tint panoPhotoReturend = photoList.size();\r\n\r\n\t\tMap<String, Photo> flickrPhotoList = fFet\r\n\t\t\t\t.getFlickrGeoSimilarPhotoList();\r\n\r\n\t\tint flickrPhotoReturend = flickrPhotoList.size();\r\n\r\n\t\tphotoList.putAll(flickrPhotoList);\r\n\r\n\t\ttotalNumberOfImages = flickrPhotoReturend + panoPhotoReturend;\r\n\r\n\t\treturn photoList;\r\n\t}",
"List<IbeisImage> uploadImages(List<File> images, File pathToTemporaryZipFile) throws\n UnsupportedImageFileTypeException, IOException, MalformedHttpRequestException, UnsuccessfulHttpRequestException;",
"public static ArrayList<Result> getColorHistogramSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.HISTOGRAM));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t// create result object\n\t\t \tResult result = new Result();\n\t\t \tresult.mFilename = imageName;\n\t\t \tresult.mSimilarity = intersection;\n\t\t \t\n\t\t \t// store result\n\t\t \trv.add(result);\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImagesByHandlerOrBuilder(\n int index);",
"private void loadAndCacheImages(Node node, FileContext cachedImageFilesystem) throws Exception\n {\n String imagePathBase = \"/\" + node.getTypeCode() + \"/\" + node.getNid();\n ImagesReponse imagesReponse = this.queryRemoteApi(ImagesReponse.class, imagePathBase + ImagesReponse.PATH, null);\n if (imagesReponse != null && imagesReponse.getNodes() != null && imagesReponse.getNodes().getNode() != null) {\n for (Image i : imagesReponse.getNodes().getNode()) {\n node.addImage(i);\n\n URI imageUri = UriBuilder.fromUri(Settings.instance().getTpAccessApiBaseUrl())\n .path(BASE_PATH)\n .path(imagePathBase + \"/image/\" + i.getData().mediaObjectId + \"/original\")\n .replaceQueryParam(ACCESS_TOKEN_PARAM, this.getAccessToken())\n .replaceQueryParam(FORMAT_PARAM, FORMAT_JSON)\n .build();\n\n ClientConfig config = new ClientConfig();\n Client httpClient = ClientBuilder.newClient(config);\n Response response = httpClient.target(imageUri).request().get();\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n org.apache.hadoop.fs.Path nodeImages = new org.apache.hadoop.fs.Path(HDFS_CACHE_ROOT_PATH + node.getNid());\n if (!cachedImageFilesystem.util().exists(nodeImages)) {\n cachedImageFilesystem.mkdir(nodeImages, FsPermission.getDirDefault(), true);\n }\n org.apache.hadoop.fs.Path cachedImage = new org.apache.hadoop.fs.Path(nodeImages, i.getData().mediaObjectId);\n i.setCachedUrl(cachedImage.toUri());\n if (!cachedImageFilesystem.util().exists(cachedImage)) {\n try (OutputStream os = cachedImageFilesystem.create(cachedImage, EnumSet.of(CreateFlag.CREATE, CreateFlag.OVERWRITE))) {\n IOUtils.copy(response.readEntity(InputStream.class), os);\n }\n }\n }\n else {\n throw new IOException(\"Error status returned while fetching remote API data;\" + response);\n }\n\n }\n }\n }",
"public void compareImageAction() {\n\t\tif (selectedAnimalModel == null) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (selectedAnimalModel.getId() == 0L || isImageChangedFlag) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tAsyncTask asyncTask = new AsyncTask() {\n\t\t\tAnimalModel animal1 = null;\n\t\t\tAnimalModel animal2 = null;\n\t\t\tAnimalModel animal3 = null;\n\n\t\t\t@Override\n\t\t\tprotected void onDone(boolean success) {\n\t\t\t\tif (!success) {\n\t\t\t\t\tshowDialog(ERROR_MESSAGE, \"Cannot compare images.\");\n\t\t\t\t} else {\n\t\t\t\t\tCompareImagesDialog dialog = new CompareImagesDialog(multimediaPanel, selectedAnimalModel, animal1, animal2, animal3);\n\t\t\t\t\tdialog.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected Boolean doInBackground() throws Exception {\n\t\t\t\ttry {\n\t\t\t\t\tArrayList<AnimalModel> models;\n\n\t\t\t\t\tmodels = DataManager.getInstance().getThreeSimilarImages(selectedAnimalModel);\n\n\t\t\t\t\tif (models.size() > 0) {\n\t\t\t\t\t\tanimal1 = models.get(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 1) {\n\t\t\t\t\t\tanimal2 = models.get(1);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 2) {\n\t\t\t\t\t\tanimal3 = models.get(2);\n\t\t\t\t\t}\n\n\t\t\t\t} catch (DataManagerException e1) {\n\t\t\t\t\tLogger.createLog(Logger.ERROR_LOG, e1.getMessage());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tasyncTask.start();\n\n\t}",
"private ArrayList<ImageItem> getData() {\n final ArrayList<ImageItem> imageItems = new ArrayList<>();\n // TypedArray imgs = getResources().obtainTypedArray(R.array.image_ids);\n for (int i = 0; i < f.size(); i++) {\n Bitmap bitmap = imageLoader.loadImageSync(\"file://\" + f.get(i));;\n imageItems.add(new ImageItem(bitmap, \"Image#\" + i));\n }\n return imageItems;\n }",
"static void redactImageFileColoredInfoTypes(String projectId, String inputPath, String outputPath)\n throws IOException {\n try (DlpServiceClient dlp = DlpServiceClient.create()) {\n // Specify the content to be redacted.\n ByteString fileBytes = ByteString.readFrom(new FileInputStream(inputPath));\n ByteContentItem byteItem =\n ByteContentItem.newBuilder().setType(BytesType.IMAGE_JPEG).setData(fileBytes).build();\n\n // Define types of info to redact associate each one with a different color.\n // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types\n ImageRedactionConfig ssnRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"US_SOCIAL_SECURITY_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(.3f).setGreen(.1f).setBlue(.6f).build())\n .build();\n ImageRedactionConfig emailRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"EMAIL_ADDRESS\").build())\n .setRedactionColor(Color.newBuilder().setRed(.5f).setGreen(.5f).setBlue(1).build())\n .build();\n ImageRedactionConfig phoneRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"PHONE_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(1).setGreen(0).setBlue(.6f).build())\n .build();\n\n // Create collection of all redact configurations.\n List<ImageRedactionConfig> imageRedactionConfigs =\n Arrays.asList(ssnRedactionConfig, emailRedactionConfig, phoneRedactionConfig);\n\n // List types of info to search for.\n InspectConfig config =\n InspectConfig.newBuilder()\n .addAllInfoTypes(\n imageRedactionConfigs.stream()\n .map(ImageRedactionConfig::getInfoType)\n .collect(Collectors.toList()))\n .build();\n\n // Construct the Redact request to be sent by the client.\n RedactImageRequest request =\n RedactImageRequest.newBuilder()\n .setParent(LocationName.of(projectId, \"global\").toString())\n .setByteItem(byteItem)\n .addAllImageRedactionConfigs(imageRedactionConfigs)\n .setInspectConfig(config)\n .build();\n\n // Use the client to send the API request.\n RedactImageResponse response = dlp.redactImage(request);\n\n // Parse the response and process results.\n FileOutputStream redacted = new FileOutputStream(outputPath);\n redacted.write(response.getRedactedImage().toByteArray());\n redacted.close();\n System.out.println(\"Redacted image written to \" + outputPath);\n }\n }",
"@GET\n @Path(\"image\")\n @Produces(MediaType.TEXT_PLAIN)\n public Response voidImage() {\n return Response.status(Response.Status.NOT_FOUND).build();\n }",
"public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }",
"public List<Image> parseBestOfImagesResult(Document doc) {\n\n ArrayList<Image> bestOfImages = new ArrayList<>();\n Elements htmlImages = doc.select(CSS_BEST_OF_IMAGE_QUERY);\n Timber.i(\"Best OfImages: %s\", htmlImages.toString());\n String href;\n Image bestOfImage;\n for (Element image : htmlImages) {\n href = image.attr(\"src\");\n Timber.i(\"Image src: %s\", href);\n bestOfImage = new Image(href);\n bestOfImages.add(bestOfImage);\n }\n return bestOfImages;\n }",
"public Observable<MatchResponseInner> matchMethodAsync(String listId, Boolean cacheImage) {\n return matchMethodWithServiceResponseAsync(listId, cacheImage).map(new Func1<ServiceResponse<MatchResponseInner>, MatchResponseInner>() {\n @Override\n public MatchResponseInner call(ServiceResponse<MatchResponseInner> response) {\n return response.body();\n }\n });\n }",
"public Observable<ServiceResponse<MatchResponseInner>> matchFileInputWithServiceResponseAsync(byte[] imageStream, String listId, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n if (imageStream == null) {\n throw new IllegalArgumentException(\"Parameter imageStream is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n RequestBody imageStreamConverted = RequestBody.create(MediaType.parse(\"image/gif\"), imageStream);\n return service.matchFileInput(listId, cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {\n @Override\n public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<MatchResponseInner> clientResponse = matchFileInputDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }",
"public ImageFiles() {\n\t\tthis.listOne = new ArrayList<String>();\n\t\tthis.listTwo = new ArrayList<String>();\n\t\tthis.listThree = new ArrayList<String>();\n\t\tthis.seenImages = new ArrayList<String>();\n\t\tthis.unseenImages = new ArrayList<String>();\n\t}",
"public interface SearchService {\n List<String> siftSearch(MultipartFile image) throws IOException;\n}",
"@ApiModelProperty(value = \"An image to give an indication of what to expect when renting this vehicle.\")\n public List<Image> getImages() {\n return images;\n }",
"private void getImagesFromDatabase() {\n try {\n mCursor = mDbAccess.getPuzzleImages();\n\n if (mCursor.moveToNext()) {\n for (int i = 0; i < mCursor.getCount(); i++) {\n String imagetitle = mCursor.getString(mCursor.getColumnIndex(\"imagetitle\"));\n String imageurl = mCursor.getString(mCursor.getColumnIndex(\"imageurl\"));\n mImageModel.add(new CustomImageModel(imagetitle, imageurl));\n mCursor.moveToNext();\n }\n } else {\n Toast.makeText(getActivity(), \"databse not created...\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }",
"public yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesResponse list(yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListMethod(), getCallOptions(), request);\n }",
"public boolean displayedDepartmentEmployeeImageMatch(List<String> names, List<String> images) {\n List<String> nonMatchingRecords = new ArrayList<>();\n for (int i = 0; i < names.size(); i++) {\n\n String imageSource = images.get(i).toLowerCase();\n String imageFileName = createImageName(names.get(i).toLowerCase());\n\n if (!imageSource.contains(imageFileName)) {\n nonMatchingRecords.add(names.get(i));\n }\n }\n if (nonMatchingRecords.size() > 0) {\n Reporter.log(\"FAILURE: Names of employees with non matching images\" +\n \" or inconsistently named imageFiles: \" +\n Arrays.toString(nonMatchingRecords.toArray()), true);\n return false;\n }\n return true;\n }",
"public Detections recognizeImage(Image image, int rotation) {\n\n Bitmap rgbFrameBitmap = Transform.convertYUVtoRGB(image);\n\n\n if (image.getFormat() != ImageFormat.YUV_420_888) {\n // unsupported image format\n Logger.addln(\"\\nWARN YoloHTTP.recognizeImage() unsupported image format\");\n return new Detections();\n }\n //return recognize(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkMaxAreaRectangle(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkNineBoxes(Transform.yuvBytes(image), image.getWidth(),image.getHeight(),rotation, rgbFrameBitmap,image.getHeight()/3,image.getWidth()/3,image.getHeight()/3,image.getWidth()/3);\n //return frameworkQuadrant(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n return frameworkMaxAreaRectBD(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n\n }",
"public List<Recognition> recognizeImage(Mat img) {\n frameToCropTransform =\n ImageUtil.getTransformationMatrix(\n img.cols(), img.rows(),\n cropSize, cropSize,\n 0, MAINTAIN_ASPECT);\n cropToFrameTransform = new Matrix();\n frameToCropTransform.invert(cropToFrameTransform);\n Bitmap tBM = Bitmap.createBitmap(img.cols(), img.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(img, tBM);\n return recognizeImage(tBM);\n }",
"public BufferedImage GetImage(String name) { return ImageList.get(name); }",
"public void setImage(int imageId) {\n this.imageId=imageId;\n\t}",
"public static Long getAValidImageId() {\n\t\tLong id = getAId();\n\t\tif (id == null) {\n\n\t\t\tImage img = new Image(\"http://dummy.com/img.jpg\", (long)(Math.random()*10000), \"Description\", \"keyword\", new Date(0001L));\n\t\t\tIImageStore imageStore = StoreFactory.getImageStore();\n\t\t\timageStore.insert(img);\n\n\t\t\tid = getAId();\n\t\t\tif (id == null) {\n\t\t\t\tthrow new RuntimeException(\"There are no images in DB, and I can't insert one. Cannot run tests without.\");\n\t\t\t}\n\t\t}\n\t\treturn id;\n\t}",
"public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}",
"@GetMapping(path = \"/images\", produces = \"application/json; charset=UTF-8\")\n public @ResponseBody ArrayNode getImageList() {\n final ArrayNode nodes = mapper.createArrayNode();\n for (final Image image : imageRepository.findAllPublic())\n try {\n nodes.add(mapper.readTree(image.toString()));\n } catch (final JsonProcessingException e) {\n e.printStackTrace();\n }\n return nodes;\n }",
"String getItemImage();",
"java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByTransformOrBuilderList();",
"protected abstract void setupImages(Context context);",
"public AugmentedImageNode(Context context, String[] imageList, Integer augmentedImageIndex) {\n\n // we check if sushi is null\n // sushi is used in order to check if the renderables are null\n // because the renderables are built using the same block of code all at once, if sushi (or any other completable future) is null,\n // then they all are null\n if (sushi == null) {\n\n if (!(AugmentedImageFragment.imagePlaysVideoBooleanList[augmentedImageIndex])) {\n currentRenderable = renderableList.get(augmentedImageIndex);\n currentRenderable =\n // build the renderable using the image that is detected\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/\" + imageList[augmentedImageIndex] + \".sfb\"))\n .build();\n Log.d(\"modelrenderable\", (\"conditional is running! filepath: \" + Uri.parse(\"models/\" + imageList[augmentedImageIndex] + \".sfb\")));\n\n } else {\n\n frame_ul =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_upper_left.sfb\"))\n .build();\n Log.d(\"running\", (\"running\"));\n frame_ur =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_upper_right.sfb\"))\n .build();\n frame_ll =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_lower_left.sfb\"))\n .build();\n frame_lr =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_lower_right.sfb\"))\n .build();\n\n }\n\n\n }\n\n // Checks if videoRenderable is null, if it is, videoRenderable is loaded from models.\n // Will be used as the thing that the video is placed on.\n if (AugmentedImageActivity.videoRenderable == null) {\n AugmentedImageActivity.videoRenderable =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/chroma_key_video.sfb\"))\n .build();\n }\n }"
]
| [
"0.6268177",
"0.5889108",
"0.57670414",
"0.57589924",
"0.57436514",
"0.5731581",
"0.5511194",
"0.5501659",
"0.550006",
"0.5452095",
"0.53226525",
"0.525605",
"0.5253426",
"0.5196022",
"0.51808035",
"0.5179484",
"0.516819",
"0.5141495",
"0.51305956",
"0.51303494",
"0.512022",
"0.5114837",
"0.5085196",
"0.50661075",
"0.5051815",
"0.5051217",
"0.50302094",
"0.502194",
"0.5019136",
"0.50189114",
"0.50175506",
"0.49923682",
"0.49802214",
"0.4977202",
"0.49740383",
"0.4962518",
"0.49486563",
"0.49302784",
"0.49177086",
"0.49086106",
"0.490474",
"0.4900562",
"0.49002978",
"0.487019",
"0.4868976",
"0.4867385",
"0.48648655",
"0.48331422",
"0.4825292",
"0.48212713",
"0.4812381",
"0.48099214",
"0.47965372",
"0.4787633",
"0.47812676",
"0.477861",
"0.4768132",
"0.4766136",
"0.4763595",
"0.47626832",
"0.47560656",
"0.47553316",
"0.475151",
"0.47421148",
"0.47407493",
"0.4739602",
"0.4738623",
"0.47357088",
"0.47315642",
"0.47315082",
"0.47211283",
"0.47166783",
"0.47096226",
"0.47077644",
"0.47077018",
"0.4707549",
"0.469874",
"0.46948472",
"0.4687398",
"0.46773568",
"0.46640363",
"0.46639773",
"0.46639344",
"0.46632206",
"0.4662197",
"0.46473208",
"0.46431518",
"0.4641886",
"0.4637323",
"0.4635154",
"0.46329367",
"0.46304187",
"0.46277556",
"0.4621483",
"0.46211785",
"0.46151412",
"0.46061975",
"0.46035555",
"0.46011278",
"0.45994547",
"0.4583557"
]
| 0.0 | -1 |
Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using this API. Returns ID and tags of matching image. Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. | public Observable<ServiceResponse<MatchResponseInner>> matchFileInputWithServiceResponseAsync(byte[] imageStream) {
if (this.client.baseUrl() == null) {
throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null.");
}
if (imageStream == null) {
throw new IllegalArgumentException("Parameter imageStream is required and cannot be null.");
}
final String listId = null;
final Boolean cacheImage = null;
String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl());
RequestBody imageStreamConverted = RequestBody.create(MediaType.parse("image/gif"), imageStream);
return service.matchFileInput(listId, cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {
@Override
public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<MatchResponseInner> clientResponse = matchFileInputDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int match(ArrayList<ImageCell> images);",
"ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);",
"private void searchImage(String text){\n\n // Set toolbar title as query string\n toolbar.setTitle(text);\n\n Map<String, String> options = setSearchOptions(text, Constants.NEW_SEARCH);\n Call<SearchResponse> call = service.searchPhoto(options);\n\n call.enqueue(new Callback<SearchResponse>() {\n @Override\n public void onResponse(Response<SearchResponse> response, Retrofit retrofit) {\n SearchResponse result = response.body();\n if (result.getStat().equals(\"ok\")) {\n // Status is ok, add result to photo list\n if (photoList != null) {\n photoList.clear();\n photoList.addAll(result.getPhotos().getPhoto());\n imageAdapter.notifyDataSetChanged();\n pageCount = 2;\n }\n\n } else {\n // Display error if something wrong with result\n Toast.makeText(context, result.getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Display error here since request failed\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }\n });\n }",
"@ApiOperation(value = \"Return images matching supplied digest found in supplied repository\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in supplied repository with supplied digest\") })\n\t// Pass in digest only in specific registry, get images and tags back that match\n\t@RequestMapping(path = \"/{registry}/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAndRegistry(@PathVariable String registry,\n\t\t\t@PathVariable String id) {\n\t\tRegistryConnection localConnection;\n\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\ttry {\n\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(registry));\n\n\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t// Get all tags from specific repo\n\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\timage.setRegistryName(registry);\n\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\timages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Iterate through images and only add to new list, what digests are identical\n\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\tfor (DockerImageData image : images) {\n\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from \" + registry + \" matching image id \" + id,\n\t\t\t\t\tmatchingImages);\n\t\t} catch (RegistryNotFoundException e) {\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\"Failed to find Registry\");\n\t\t}\n\t}",
"public List<Result> recognize(IplImage image);",
"@SuppressWarnings({ \"unchecked\", \"null\" })\n public List<String> calcSimilarity(String imgPath) {\n\n FileInputStream imageFile;\n double minDistance = Double.MAX_VALUE;\n\n // 返回查询结果\n List<String> matchUrls = new ArrayList<String>();\n\n\n try {\n\n imageFile = new FileInputStream(imgPath);\n BufferedImage bufferImage;\n\n bufferImage = ImageIO.read(imageFile);\n LTxXORP.setRotaIvaPats();//设定旋转模式值\n\n //得到图片的纹理一维数组特征向量(各颜色分量频率(统计量))\n double[] lbpSourceFecture = LTxXORP.getLBPFeature(imgPath);\n\n // 提取数据库数据\n List<Object> list = DBHelper.fetchALLCloth();\n\n // long startTime = System.currentTimeMillis();\n\n // 把每个条数据的路径和最短距离特征提取出来并存储在lbpResultMap的键值对中。\n Map<String, Double> lbpResultMap = new HashMap<String, Double>();\n\n for (int i = 0; i < list.size(); i++) {\n\n Map<String, Object> map = (Map<String, Object>) list.get(i);\n\n Object candidatePath = map.get(\"path\");\n Object candidateLBP = map.get(\"lbpFeature\");\n\n // 从快速搜索中选取TOP N结果,继续进行纹理特征匹配\n //获取当前由颜色匹配相似度排序的结果并提取其LBP纹理特征\n\n double[] lbpTargetFeature = MatchUtil.jsonToArr((String) candidateLBP);\n double lbpDistance = textureStrategy.similarity(lbpTargetFeature, lbpSourceFecture);\n lbpResultMap.put((String) candidatePath, lbpDistance);\n\n // 判断衡量标准选取距离还是相似度\n if (lbpDistance < minDistance)\n minDistance = lbpDistance;\n\n }\n\n Map<String, Double> tempResultMap;\n\n System.out.println(\"Min Distance : \" + (float) minDistance);\n\n\n\n System.out.println(\"============== finish Texture =================\");\n\n Map<String, Double> finalResult = MatchUtil.sortByValueAsc(lbpResultMap);\n\n int counter = 0;\n for (Map.Entry<String, Double> map : finalResult.entrySet()) {\n if (counter >= Config.finalResultNumber)\n break;\n //matchUrls截取只存储finalResultNumber数量的查询结果\n matchUrls.add(map.getKey());\n counter ++;\n double TSimilarity=Math.pow(Math.E,-map.getValue());\n System.out.println(TSimilarity + \" 图片路径 \" + map.getKey());\n\n }\n\n System.out.println();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return matchUrls;\n }",
"public interface ImageSearchService {\n\n /**\n * Register an image into the search instance.\n *\n * @param imageData Image data in JPEG or PNG format.\n * @param imageType Image format.\n * @param uuid Unique identifier of the image.\n */\n void register(byte[] imageData, ObjectImageType imageType, String uuid);\n\n /**\n * Un-register an image from the search instance.\n *\n * @param uuid Unique identifier of the image.\n */\n void unregister(String uuid);\n\n /**\n * Find all images similar to the given one.\n *\n * @param imageData Image to match with registered ones in the search instance.\n * @param objectRegion object region to search.\n * @return Found images UUIDs and raw response.\n */\n ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);\n\n /**\n * Check the image search configuration is correct by making a fake search request.\n *\n * @param configuration Configuration to check.\n */\n void checkImageSearchConfiguration(Configuration configuration) throws InvalidConfigurationException;\n}",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByHandler(int index);",
"@ApiOperation(value = \"Return all images matching supplied digest in all configured registries\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in configured registries with supplied digest\") })\n\t// Pass in only digest, get images and tags back that much from all repos\n\t@RequestMapping(path = \"/registries/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAllRegistries(@PathVariable String id) {\n\t\t\t\tRegistryConnection localConnection;\n\t\t\t\t// List persists outside all registries\n\t\t\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\t\t\tList<RegistryItem> items = configs.getItems();\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\t// For each configured registry\n\t\t\t\t\tfor(RegistryItem item : items) {\n\t\t\t\t\t\t// Get connection to registry\n\t\t\t\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(item.getRegistryLabel()));\n\t\t\t\t\t\t\n\t\t\t\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\t\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t\t\t\t// Get all tags from specific repo\n\t\t\t\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\t\t\t\timage.setRegistryName(item.getRegistryLabel());\n\t\t\t\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\t\t\t\timages.add(image);\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// Iterate through images and only add to new list, what digests are identical\n\t\t\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\t\t\tfor (DockerImageData image : images) {\n\t\t\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from all configured registries \",\n\t\t\t\t\t\t\tmatchingImages);\n\t\t\t\t} catch (RegistryNotFoundException e) {\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\t\t\"Failed to find Registry\");\n\t\t\t\t}\n\t}",
"Receta getByIdWithImages(long id);",
"public int displayRandomImage() {\n\n int randomImageIndex;\n\n do\n { // making sure that the same images aren't repeated & images of the same car makes aren't shown together\n\n randomCarMake = allCarMakes[getRandomBreed()]; // get a random breed\n randomImageIndex = getRandomImage(); // get a random image of a particular breed\n\n randomImageOfChosenCarMake = displayRelevantImage(randomCarMake, randomImageIndex);\n\n } while (displayingCarMakes.contains(randomCarMake) || allDisplayedImages.contains(randomImageOfChosenCarMake));\n\n allDisplayedImages.add(randomImageOfChosenCarMake); // to make sure that the image isn't repeated\n displayingCarMakes.add(randomCarMake); // to make sure that images of the same breed aren't shown at once\n displayingImageIndexes.add(randomImageIndex); // to recall indexes when the device is rotated\n\n // return chosen random image\n return getResources().getIdentifier(randomImageOfChosenCarMake, \"drawable\", \"com.example.car_match_game_app\");\n }",
"@GET\n @Path(\"{factoryId}/image\")\n @Produces(\"image/*\")\n public Response getImage(@PathParam(\"factoryId\") String factoryId, @DefaultValue(\"\") @QueryParam(\"imgId\") String imageId)\n throws FactoryUrlException {\n Set<FactoryImage> factoryImages = factoryStore.getFactoryImages(factoryId, null);\n if (factoryImages == null) {\n LOG.warn(\"Factory URL with id {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Factory URL with id \" + factoryId + \" is not found.\");\n }\n if (imageId.isEmpty()) {\n if (factoryImages.size() > 0) {\n FactoryImage image = factoryImages.iterator().next();\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n } else {\n LOG.warn(\"Default image for factory {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(),\n \"Default image for factory \" + factoryId + \" is not found.\");\n }\n } else {\n for (FactoryImage image : factoryImages) {\n if (image.getName().equals(imageId)) {\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n }\n }\n }\n LOG.warn(\"Image with id {} is not found.\", imageId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Image with id \" + imageId + \" is not found.\");\n }",
"public void findGeoSurfSimilarPhotosWithTagStatistics(\r\n\t\t\tfinal Set<String> allCandidateWords,\r\n\t\t\tfinal Map<String, WordImage> relevantWordImages, boolean tagReq,\r\n\t\t\tboolean techTagReq, boolean compact) {\r\n\r\n\t\ttopImagesURLs = new HashMap<String, Double>();\r\n\t\ttopImagesNames = new HashMap<String, String>();\r\n\t\t// The list of all Photo objects\r\n\t\tphotoList = new HashMap<String, Photo>();\r\n\t\tphotoList = createGeoSimilarPhotoList(PANORAMIO_DEFUALT_NUM_ITERATIONS, tagReq,\r\n\t\t\t\ttechTagReq);\r\n\r\n\t\t// Word Image Relevance Dictionary\r\n\t\t// The statistics consider for each word the set of images annotated\r\n\t\t// with them and similar\r\n\t\t// to the input image and the those which are tagged with it and not\r\n\t\t// similar to the input image\r\n\t\t// Map<String, WordImage> relevantWordImages = new HashMap<String,\r\n\t\t// WordImage>();\r\n\r\n\t\t// Prepare the result output\r\n\r\n\t\tif (!compact) {\r\n\t\t\toutRel.println(\"Image URL , Score , Distance , Point Similarity, Common Keypoints , Iter Point Similariy, Title , Tags , distance, userid\");\r\n\t\t\t// An CSV file for the set of visually irrelevant images\r\n\t\t\toutIrrRel.println(\"Image URL , Title , Tags , distance, userid\");\r\n\t\t}\r\n\r\n\t\t// *** Extract SURF feature for the input image\r\n\r\n\t\tSurfMatcher surfMatcher = new SurfMatcher();\r\n\t\t// The SURF feature of the input image\r\n\t\tList<InterestPoint> ipts1 = surfMatcher.extractKeypoints(inputImageURL,\r\n\t\t\t\tsurfMatcher.p1);\r\n\r\n\t\t// inputImageInterstPoints = ipts1 ;\r\n\r\n\t\t// Add the photo with its interestpoint to the cache\r\n\t\t// this.photoInterestPoints.put(imageName, ipts1);\r\n\r\n\t\t// Find SURF correspondences in the geo-related images\r\n\t\ttotalNumberOfSimilarImages = 0; // R\r\n\r\n\t\tfor (String photoId : photoList.keySet()) {\r\n\r\n\t\t\tPhoto photo = photoList.get(photoId);\r\n\r\n\t\r\n\r\n\t\t\tString toMatchedPhotoURL = photo.getPhotoFileUrl();\r\n\t\t\t// The SURF feature of a geo close image\r\n\t\t\tList<InterestPoint> ipts2 = surfMatcher.extractKeypoints(\r\n\t\t\t\t\ttoMatchedPhotoURL, surfMatcher.p2);\r\n\r\n\t\t\t// this.photoInterestPoints.put(photo.getPhotoId(), ipts2);\r\n\t\t\t// this.cachedImageInterstPoint.put(photo.getPhotoId(), ipts2);\r\n\r\n\t\t\tMatchingResult surfResult = null;\r\n\r\n\t\t\tsurfResult = surfMatcher.matchKeypoints(inputImageURL, photoId,\r\n\t\t\t\t\tipts1, ipts2, MIN_COMMON_IP_COUNT);\r\n\r\n\t\t\tif (surfResult != null) { // the images are visually similar\r\n\r\n\t\t\t\ttopImagesURLs.put(toMatchedPhotoURL,\r\n\t\t\t\t\t\tsurfResult.getPiontSimilarity());\r\n\r\n\t\t\t\ttopImagesNames.put(toMatchedPhotoURL, photo.getPhotoId());\r\n\r\n\t\t\t\ttotalNumberOfSimilarImages += 1;\r\n\t\t\t\tif (!compact) {\r\n\r\n\t\t\t\t\toutRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getScore()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getAvgDistance()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getPiontSimilarity()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getCommonKeyPointsCount()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ \"null ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\tSystem.out.println(\"Downloading Similar Image\");\r\n\t\t\t\t\tString destFileName = similarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Generate Word Statistics\r\n\t\t\t\t// For the a certain word (tag) add image info to its list if\r\n\t\t\t\t// this image\r\n\t\t\t\t// is visually similar to the input image\r\n\t\t\t\tupdateWordRelatedImageList(allCandidateWords,\r\n\t\t\t\t\t\trelevantWordImages, photo, surfResult);\r\n\t\t\t} else {\r\n\r\n\t\t\t\tif (!compact) {\r\n\t\t\t\t\t// Images are visually not similar\r\n\t\t\t\t\toutIrrRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \" ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t// We also need to get some information if a certain word is\r\n\t\t\t\t\t// also used by visually not similar images\r\n\t\t\t\t\tSystem.out.println(\"Downloading Non Similar Image\");\r\n\t\t\t\t\tString destFileName = dissimilarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tupdateWordNotRelatedImageList(relevantWordImages, photo);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByHandlerList();",
"@GET(\"/tags/{query}/media/recent\" + CLIENT_ID)\n public void searchPhotos(@Path(\"query\") String query, Callback<WebResponse<ArrayList<InstagramPhoto>>> callback);",
"List<Bitmap> getFavoriteRecipeImgs();",
"private void processImages() throws MalformedURLException, IOException {\r\n\r\n\t\tNodeFilter imageFilter = new NodeClassFilter(ImageTag.class);\r\n\t\timageList = fullList.extractAllNodesThatMatch(imageFilter, true);\r\n\t\tthePageImages = new HashMap<String, byte[]>();\r\n\r\n\t\tfor (SimpleNodeIterator nodeIter = imageList.elements(); nodeIter\r\n\t\t\t\t.hasMoreNodes();) {\r\n\t\t\tImageTag tempNode = (ImageTag) nodeIter.nextNode();\r\n\t\t\tString tagText = tempNode.getText();\r\n\r\n\t\t\t// Populate imageUrlText String\r\n\t\t\tString imageUrlText = tempNode.getImageURL();\r\n\r\n\t\t\tif (imageUrlText != \"\") {\r\n\t\t\t\t// Print to console, to verify relative link processing\r\n\t\t\t\tSystem.out.println(\"ImageUrl to Retrieve:\" + imageUrlText);\r\n\r\n\t\t\t\tbyte[] imgArray = downloadBinaryData(imageUrlText);\r\n\r\n\t\t\t\tthePageImages.put(tagText, imgArray);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"@Override\n public FlickrResponse searchPhoto(String tags) throws IOException {\n return flickrService.searchPhoto(tags);\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByTransform(int index);",
"public void getImageResults(String tag){\n showProgressBar(true);\n HttpClient.get(\"rest/\", getRequestParams(tag), new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n String response = new String(responseBody, StandardCharsets.UTF_8);\n response = StringUtils.replace(response, \"jsonFlickrApi(\", \"\");\n response = StringUtils.removeEnd(response, \")\");\n Log.d(\"SERVICE RESPONSE\", response);\n Gson gson = new Gson();\n FlickrSearchResponse jsonResponse = gson.fromJson(response, FlickrSearchResponse.class);\n if(jsonResponse.getStat().equals(\"fail\")){\n //api returned an error\n searchHelperListener.onErrorResponseReceived(jsonResponse.getMessage());\n } else {\n //api returned data\n searchHelperListener.onSuccessResponseReceived(jsonResponse);\n }\n showProgressBar(false);\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n Log.d(\"SERVICE FAILURE\", error.getMessage());\n searchHelperListener.onErrorResponseReceived(error.getMessage());\n showProgressBar(false);\n }\n });\n\n }",
"public EC2DescribeImagesResponse describeImages(EC2DescribeImages request) {\n EC2DescribeImagesResponse images = new EC2DescribeImagesResponse();\n try {\n String[] templateIds = request.getImageSet();\n EC2ImageFilterSet ifs = request.getFilterSet();\n\n if (templateIds.length == 0) {\n images = listTemplates(null, images);\n } else {\n for (String s : templateIds) {\n images = listTemplates(s, images);\n }\n }\n if (ifs != null)\n return ifs.evaluate(images);\n } catch (Exception e) {\n logger.error(\"EC2 DescribeImages - \", e);\n handleException(e);\n }\n return images;\n }",
"GetImagesResult getImages(GetImagesRequest getImagesRequest);",
"int seachImage(Image img) {\r\n\t\treturn 1;\r\n\t}",
"public void searchImages(View view) {\n imageList.clear();\n adapter.clear();\n Log.d(\"DEBUG\", \"Search Images\");\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n Log.d(\"DEBUG\", getUrl(1).toString());\n retrieveImages(getUrl(1).toString());\n }",
"java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByTransformList();",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform();",
"FetchedImage getFujimiyaUrl(String query,int maxRankOfResult){\n try{\n //Get SearchResult\n Search search = getSearchResult(query, maxRankOfResult);\n List<Result> items = search.getItems();\n for(Result result: items){\n int i = items.indexOf(result);\n logger.log(Level.INFO,\"query: \" + query + \" URL: \"+result.getLink());\n logger.log(Level.INFO,\"page URL: \"+result.getImage().getContextLink());\n if(result.getImage().getWidth()+result.getImage().getHeight()<600){\n logger.log(Level.INFO,\"Result No.\"+i+\" is too small image. next.\");\n continue;\n }\n if(DBConnection.isInBlackList(result.getLink())){\n logger.log(Level.INFO,\"Result No.\"+i+\" is included in the blacklist. next.\");\n continue;\n }\n HttpURLConnection connection = (HttpURLConnection)(new URL(result.getLink())).openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setInstanceFollowRedirects(false);\n connection.connect();\n if(connection.getResponseCode()==200){\n return new FetchedImage(connection.getInputStream(),result.getLink());\n }else{\n logger.log(Level.INFO,\"Result No.\"+i+\" occurs error while fetching the image. next.\");\n continue;\n }\n }\n //If execution comes here, connection has failed 10 times.\n throw new ConnectException(\"Connection failed 10 times\");\n\n } catch (IOException e) {\n // TODO Auto-generated catch block\n logger.log(Level.SEVERE,e.toString());\n e.printStackTrace();\n }\n return null;\n}",
"void loadImages(int id_image, HouseRepository.GetImageFromHouseCallback callback);",
"@Override\n\tpublic String imageSearch(QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(IData.URL_SEARCH + param.toString());\n\t}",
"private void onImagePicked(@NonNull final byte[] imageBytes) {\n setBusy(true);\n\n // Make sure we don't show a list of old concepts while the image is being uploaded\n adapter.setData(Collections.<Concept>emptyList());\n\n new AsyncTask<Void, Void, ClarifaiResponse<List<ClarifaiOutput<Concept>>>>() {\n @Override protected ClarifaiResponse<List<ClarifaiOutput<Concept>>> doInBackground(Void... params) {\n // The default Clarifai model that identifies concepts in images\n final ConceptModel generalModel = App.get().clarifaiClient().getDefaultModels().foodModel();\n\n // Use this model to predict, with the image that the user just selected as the input\n return generalModel.predict()\n .withInputs(ClarifaiInput.forImage(ClarifaiImage.of(imageBytes)))\n .executeSync();\n }\n\n @Override protected void onPostExecute(ClarifaiResponse<List<ClarifaiOutput<Concept>>> response) {\n setBusy(false);\n if (!response.isSuccessful()) {\n showErrorSnackbar(R.string.error_while_contacting_api);\n return;\n }\n final List<ClarifaiOutput<Concept>> predictions = response.get();\n if (predictions.isEmpty()) {\n showErrorSnackbar(R.string.no_results_from_api);\n return;\n }\n adapter.setData(predictions.get(0).data());\n\n // INSERT METHOD FOR USER SELECTION OF FOOD\n\n // ADDED FOR DATABASE\n try {\n readCSVToMap(\"ABBREV_2.txt\");\n }\n catch (Exception e){\n Log.d(\"Failure\", \"CSV not read into database\");\n }\n String exampleResult = predictions.get(0).data().get(0).name();\n final List<String> list = listOfKeys(exampleResult);\n\n // change this line to take in user input\n final String key2 = list.get(0); // arbitrary selection of key\n\n final List<String> val = db.get(key2);\n final String message = String.valueOf(val.get(6)); //index 6 contains carb info\n Log.d(\"Output\", message);\n imageView.setImageBitmap(BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.length));\n }\n\n private void showErrorSnackbar(@StringRes int errorString) {\n Snackbar.make(\n root,\n errorString,\n Snackbar.LENGTH_INDEFINITE\n ).show();\n }\n }.execute();\n }",
"private void imageSearch(ArrayList<Html> src) {\n // loop through the Html objects\n for(Html page : src) {\n\n // Temp List for improved readability\n ArrayList<Image> images = page.getImages();\n\n // loop through the corresponding images\n for(Image i : images) {\n if(i.getName().equals(this.fileName)) {\n this.numPagesDisplayed++;\n this.pageList.add(page.getLocalPath());\n }\n }\n }\n }",
"@Override\n\tpublic String imageLists(String url, QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(url + param.toString());\n\t}",
"@Override\n\tpublic List<PersonalisationMediaModel> getImageByID(final String imageID)\n\t{\n\t\tfinal String query1 = \"Select {pk} from {PersonalisationMedia} Where {code}=?imageId and {user}=?user\";\n\t\t/**\n\t\t * select distinct {val:pk} from {PersonalisationMediaModel as val join MediaModel as media on\n\t\t * {media:PK}={val.image} join User as user on {user:pk}={val:user} and {media:code}=?imageId and {user:pk}=?user}\n\t\t */\n\t\tfinal UserModel user = getUserService().getCurrentUser();\n\t\tfinal FlexibleSearchQuery fQuery = new FlexibleSearchQuery(query1);\n\t\tfinal Map<String, Object> params = new HashMap<>();\n\t\tparams.put(\"imageId\", imageID);\n\t\tparams.put(\"user\", user);\n\t\tfQuery.addQueryParameters(params);\n\t\tLOG.info(\"getImageByID\" + fQuery);\n\t\tfinal SearchResult<PersonalisationMediaModel> searchResult = flexibleSearchService.search(fQuery);\n\t\treturn searchResult.getResult();\n\t}",
"public void findImages() {\n \t\tthis.mNoteItemModel.findImages(this.mNoteItemModel.getContent());\n \t}",
"public void notifyFinishGetSimilarArtist(ArtistInfo a, Image img, long id);",
"private void imgDetected(Matcher matcher) {\n String component;\n matcher.reset();\n\n // store src value if <img> exist\n while (matcher.find()) {\n Data.imagesSrc.add(matcher.group(1));\n }\n\n // separate if the paragraph contain img\n // replace <img> with -+-img-+- to indicate image position in the text\n component = matcher.replaceAll(\"-+-img-+-\");\n\n //split the delimiter to structure image position\n String[] imageStructure = component.split(\"-\\\\+-\");\n\n // start looping the structured text\n int imageFoundIndex = 0;\n for (String structure : imageStructure) {\n // continue if the current index is not empty string \"\"\n if (!structure.trim().equals(\"\")) {\n // create ImageView if current index value equeal to \"img\"\n if (structure.trim().equals(\"img\")) {\n createImageView();\n imageFoundIndex++;\n } else {\n // else create textView for the text\n generateView(structure);\n }\n }\n }\n }",
"List<IbeisImage> uploadImages(List<File> images) throws UnsupportedImageFileTypeException, IOException,\n MalformedHttpRequestException, UnsuccessfulHttpRequestException;",
"public DetectorMatchResponse findMatchingDetectorMappings(List<Map<String, String>> tagsList) {\n isTrue(tagsList.size() > 0, \"tagsList must not be empty\");\n\n val uri = baseUri + API_PATH_MATCHING_DETECTOR_BY_TAGS;\n Content content;\n try {\n String body = objectMapper.writeValueAsString(tagsList);\n content = httpClient.post(uri, body);\n } catch (IOException e) {\n val message = \"IOException while getting matching detectors for\" +\n \": tags=\" + tagsList +\n \", httpMethod=POST\" +\n \", uri=\" + uri;\n throw new DetectorMappingRetrievalException(message, e);\n }\n try {\n return objectMapper.readValue(content.asBytes(), DetectorMatchResponse.class);\n } catch (IOException e) {\n val message = \"IOException while deserializing detectorMatchResponse\" +\n \": tags=\" + tagsList;\n throw new DetectorMappingDeserializationException(message, e);\n }\n\n }",
"public Observable<ServiceResponse<MatchResponseInner>> matchMethodWithServiceResponseAsync(String listId, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.matchMethod(listId, cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {\n @Override\n public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<MatchResponseInner> clientResponse = matchMethodDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }",
"List<Bitmap> getRecipeImgSmall();",
"private void getImagesFromServer() {\n trObtainAllPetImages.setUser(user);\n trObtainAllPetImages.execute();\n Map<String, byte[]> petImages = trObtainAllPetImages.getResult();\n Set<String> names = petImages.keySet();\n\n for (String petName : names) {\n byte[] bytes = petImages.get(petName);\n Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, Objects.requireNonNull(bytes).length);\n int index = user.getPets().indexOf(new Pet(petName));\n user.getPets().get(index).setProfileImage(bitmap);\n ImageManager.writeImage(ImageManager.PET_PROFILE_IMAGES_PATH, user.getUsername() + '_' + petName, bytes);\n }\n }",
"private static final byte[] xfuzzy_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -95, 0, 0, -1,\n\t\t\t\t-1, -1, -82, 69, 12, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77,\n\t\t\t\t97, 100, 101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0,\n\t\t\t\t33, -7, 4, 1, 10, 0, 0, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 2,\n\t\t\t\t36, -124, -113, -87, -101, -31, -33, 32, 120, 97, 57, 68, -93,\n\t\t\t\t-54, -26, 90, -24, 49, 84, -59, 116, -100, 88, -99, -102, 25,\n\t\t\t\t30, -19, 36, -103, -97, -89, -62, 117, -119, 51, 5, 0, 59 };\n\t\treturn data;\n\t}",
"public RatingSearch explode() {\n Elements elements = doc.getElementsByTag(\"table\");\n IqdbMatch bestMatch = null;\n List<IqdbMatch> additionalMatches = new LinkedList<>();\n for (int i = 1; i < elements.size(); i++) {\n //iterating through all the table elements. First one is your uploaded image\n\n //Each table is one \"card\" on iqdb so only the second one will be the \"best match\"\n Element element = elements.get(i);\n IqdbElement iqdbElement = new IqdbElement(element);\n\n Elements noMatch = element.getElementsContainingText(\"No relevant matches\");\n if (noMatch.size() > 0) {\n log.warn(\"There was no relevant match for this document\");\n// break;\n return null;\n }\n// TODO I don't think we can determine if these are even relevant. So once we see 'No relevent matches' we can\n// just call it there. We won't need 'Possible Match' yet\n// Elements possibleMatchElement = element.getElementsContainingText(\"Possible match\");\n// if (possibleMatchElement.size() > 0) {\n// additionalMatches.add(iqdbElement.explode(IqdbMatchType.NO_RELEVANT_BUT_POSSIBLE));\n// }\n\n //Second element will provide all the information you need. going into the similarity and all that is a waste of time\n //Use the similarity search for Best Match to identify the element that is best match if you don't trust the 2nd.\n Elements bestMatchElement = element.getElementsContainingText(\"Best Match\");\n if (bestMatchElement.size() > 0) {\n bestMatch = iqdbElement.explode(IqdbMatchType.BEST);\n }\n\n //can similarly search for \"Additional match\" to find all teh additional matches. Anything beyond additional matches is a waste of time.\n Elements additionalMatchElements = element.getElementsContainingText(\"Additional match\");\n if (additionalMatchElements.size() > 0) {\n additionalMatches.add(iqdbElement.explode(IqdbMatchType.ADDITIONAL));\n }\n }\n\n if (bestMatch == null && !additionalMatches.isEmpty()) {\n log.warn(\"No Best Match found, taking first additionalMatch, does this ever happen?\");\n bestMatch = additionalMatches.remove(0);\n }\n\n return null;//new RatingSearch(bestMatch, additionalMatches);\n }",
"public static SearchResult getChampionImage(String championList, String championID) {\n try {\r\n JSONObject holder = new JSONObject(championList);\r\n JSONObject holderItems = holder.getJSONObject(\"data\");\r\n SearchResult champion = new SearchResult();\r\n\r\n for (Iterator<String> it = holderItems.keys(); it.hasNext(); ) { //iterate through champion json objects\r\n String key = it.next();\r\n JSONObject resultItem = holderItems.getJSONObject(key);\r\n\r\n if (resultItem.getString(\"key\").equals(championID)) {\r\n champion.championName = key; //the key for the json object is also the name of the champion\r\n break;\r\n }\r\n }\r\n\r\n String tempName = champion.championName + \".png\"; //construct string for champion image\r\n\r\n champion.championImage = Uri.parse(BASE_URL_CHAMPION_IMAGE + tempName).buildUpon().build().toString();\r\n\r\n return champion;\r\n } catch (JSONException e) {\r\n System.out.println(e);\r\n return null;\r\n }\r\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByHandlerOrBuilder();",
"private EC2DescribeImagesResponse listTemplates(String templateId, EC2DescribeImagesResponse images) throws Exception {\n try {\n List<CloudStackTemplate> result = new ArrayList<CloudStackTemplate>();\n\n if (templateId != null) {\n List<CloudStackTemplate> template = getApi().listTemplates(\"executable\", null, null, null, templateId, null, null, null);\n if (template != null) {\n result.addAll(template);\n }\n } else {\n List<CloudStackTemplate> selfExecutable = getApi().listTemplates(\"selfexecutable\", null, null, null, null, null, null, null);\n if (selfExecutable != null) {\n result.addAll(selfExecutable);\n }\n\n List<CloudStackTemplate> featured = getApi().listTemplates(\"featured\", null, null, null, null, null, null, null);\n if (featured != null) {\n result.addAll(featured);\n }\n\n List<CloudStackTemplate> sharedExecutable = getApi().listTemplates(\"sharedexecutable\", null, null, null, null, null, null, null);\n if (sharedExecutable != null) {\n result.addAll(sharedExecutable);\n }\n\n List<CloudStackTemplate> community = getApi().listTemplates(\"community\", null, null, null, null, null, null, null);\n if (community != null) {\n result.addAll(community);\n }\n }\n\n if (result != null && result.size() > 0) {\n for (CloudStackTemplate temp : result) {\n EC2Image ec2Image = new EC2Image();\n ec2Image.setId(temp.getId().toString());\n ec2Image.setAccountName(temp.getAccount());\n ec2Image.setName(temp.getName());\n ec2Image.setDescription(temp.getDisplayText());\n ec2Image.setOsTypeId(temp.getOsTypeId().toString());\n ec2Image.setIsPublic(temp.getIsPublic());\n ec2Image.setState(temp.getIsReady() ? \"available\" : \"pending\");\n ec2Image.setDomainId(temp.getDomainId());\n if (temp.getHyperVisor().equalsIgnoreCase(\"xenserver\"))\n ec2Image.setHypervisor(\"xen\");\n else if (temp.getHyperVisor().equalsIgnoreCase(\"ovm\"))\n ec2Image.setHypervisor(\"ovm\"); // valid values for hypervisor is 'ovm' and 'xen'\n else\n ec2Image.setHypervisor(\"\");\n if (temp.getDisplayText() == null)\n ec2Image.setArchitecture(\"\");\n else if (temp.getDisplayText().indexOf(\"x86_64\") != -1)\n ec2Image.setArchitecture(\"x86_64\");\n else if (temp.getDisplayText().indexOf(\"i386\") != -1)\n ec2Image.setArchitecture(\"i386\");\n else\n ec2Image.setArchitecture(\"\");\n List<CloudStackKeyValue> resourceTags = temp.getTags();\n for (CloudStackKeyValue resourceTag : resourceTags) {\n EC2TagKeyValue param = new EC2TagKeyValue();\n param.setKey(resourceTag.getKey());\n if (resourceTag.getValue() != null)\n param.setValue(resourceTag.getValue());\n ec2Image.addResourceTag(param);\n }\n images.addImage(ec2Image);\n }\n }\n return images;\n } catch (Exception e) {\n logger.error(\"List Templates - \", e);\n throw new Exception(e.getMessage() != null ? e.getMessage() : e.toString());\n }\n }",
"java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByHandlerOrBuilderList();",
"public interface ImageMetadataService {\n\n List<ArtistDTO> getArtistsByPrediction(String name, String name2, String surname);\n\n List<ImageTypeDTO> getImageTypesByPrediction(String name);\n\n UploadImageMetadataDTO saveMetadata(UploadImageMetadataDTO uploadImageMetadataDTO);\n\n List<ImageDTO> getTop10Images(String username, String title);\n\n List<ImageDTO> getAllUserImages(String username);\n\n List<ImageDTO> searchImagesByCriteria(SearchImageCriteriaDTO searchImageCriteriaDTO);\n\n ImageDTO updateImageMetadata(ImageDTO imageDTO);\n\n List<ImageDTO> getImagesTop50();\n\n void rateImage(RateImageDTO rateImageDTO);\n\n List<ImageDTO> getAllImages();\n}",
"public static List<PNMedia> discoveryFlickrImages(String[] tags) throws Exception{\r\n\t\tif(tags != null && tags.length > 0){\r\n\t\t\tList<PNMedia> flickrPhotosList = new ArrayList<PNMedia>();\r\n\t\t\t\t\r\n\t\t\tFlickr flickr = new Flickr(flickrApiKey, flickrSharedSecret, new REST());\r\n\t\t\tFlickr.debugStream = false;\r\n\t\t\t\r\n\t\t\tSearchParameters searchParams=new SearchParameters();\r\n\t\t searchParams.setSort(SearchParameters.INTERESTINGNESS_ASC);\r\n\t\t \r\n\t\t searchParams.setTags(tags);\r\n\t\t \r\n\t\t PhotosInterface photosInterface = flickr.getPhotosInterface();\r\n\t\t PhotoList<Photo> photoList = photosInterface.search(searchParams, 10, 1); // quantidade de fotos retornadas (5)\r\n\t\t \r\n\t\t if(photoList != null){\r\n\t\t for(int i=0; i<photoList.size(); i++){\r\n\t\t Photo photo = (Photo)photoList.get(i);\r\n\t\t PNMedia media = new PNMedia();\r\n\t\t \r\n\t\t String description = photo.getDescription();\r\n\t\t if(description == null)\r\n\t\t \t description = photo.getTitle();\r\n\t\t media.setMediaURL(photo.getLargeUrl()); media.setMediaURLAux(photo.getSmallSquareUrl()); media.setMediaCaption(photo.getTitle()); media.setMediaInfo(description);\r\n\t\t flickrPhotosList.add(media);\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t return flickrPhotosList;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tthrow new Exception(\"Null tags or tags is empty. \");\r\n\t\t}\r\n\t}",
"public interface Image {\n /**\n * @return the image ID\n */\n String getId();\n\n /**\n * @return the image ID, or null if not present\n */\n String getParentId();\n\n /**\n * @return Image create timestamp\n */\n long getCreated();\n\n /**\n * @return the image size\n */\n long getSize();\n\n /**\n * @return the image virtual size\n */\n long getVirtualSize();\n\n /**\n * @return the labels assigned to the image\n */\n Map<String, String> getLabels();\n\n /**\n * @return the names associated with the image (formatted as repository:tag)\n */\n List<String> getRepoTags();\n\n /**\n * @return the digests associated with the image (formatted as repository:tag@sha256:digest)\n */\n List<String> getRepoDigests();\n}",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage();",
"public void features() throws MalformedURLException, IOException {\n\t\tMBFImage query = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao01.jpg\"));\n\t\tMBFImage target = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao02.jpg\"));\n\n\t\tDoGSIFTEngine engine = new DoGSIFTEngine();\n\t\tLocalFeatureList<Keypoint> queryKeypoints = engine.findFeatures(query.flatten());\n\t\tLocalFeatureList<Keypoint> targetKeypoints = engine.findFeatures(target.flatten());\n\t\tLocalFeatureMatcher<Keypoint> matcher1 = new BasicMatcher<Keypoint>(80);\n\t\tLocalFeatureMatcher<Keypoint> matcher = new BasicTwoWayMatcher<Keypoint>();\n\t\t/*\n\t\t * matcher.setModelFeatures(queryKeypoints);\n\t\t * matcher.findMatches(targetKeypoints); MBFImage basicMatches =\n\t\t * MatchingUtilities.drawMatches(query, target, matcher.getMatches(),\n\t\t * RGBColour.RED); DisplayUtilities.display(basicMatches);\n\t\t */\n\t\tRobustAffineTransformEstimator modelFitter = new RobustAffineTransformEstimator(5.0, 1500,\n\t\t\t\tnew RANSAC.PercentageInliersStoppingCondition(0.5));\n\t\tmatcher = new ConsistentLocalFeatureMatcher2d<Keypoint>(new FastBasicKeypointMatcher<Keypoint>(8), modelFitter);\n\t\tmatcher.setModelFeatures(queryKeypoints);\n\t\tmatcher.findMatches(targetKeypoints);\n\t\tMBFImage consistentMatches = MatchingUtilities.drawMatches(query, target, matcher.getMatches(), RGBColour.RED);\n\t\tDisplayUtilities.display(consistentMatches);\n\t\ttarget.drawShape(query.getBounds().transform(modelFitter.getModel().getTransform().inverse()), 3,\n\t\t\t\tRGBColour.BLUE);\n\t\t// DisplayUtilities.display(target);\n\t}",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage(\n @QueryMap ListImage queryParameters);",
"private static void updateRelatedImageList(\r\n\t\t\tMap<String, WordImage> relevantWordImages, Photo photo,\r\n\t\t\tMatchingResult surfResult, String word) {\n\r\n\t\tString key = getRelevantKeyForRelevantImages(relevantWordImages, word);\r\n\r\n\t\tif (key != null) {\r\n\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImages().add(info);\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImagesMap()\r\n\t\t\t\t\t.put(info.getId(), info);\r\n\r\n\t\t\trelevantWordImages.get(key).addSimilarImageId(info.getId());\r\n\r\n\t\t}\r\n\r\n\t\telse {\r\n\r\n\t\t\tWordImage wi = new WordImage(word);\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\twi.addSimilarImage(info);\r\n\r\n\t\t\twi.addSimilarImage(photo.getPhotoId(), info);\r\n\r\n\t\t\trelevantWordImages.put(word, wi);\r\n\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic String searchimage(int cbid) throws Exception {\n\t\treturn dao.searchimage(cbid);\r\n\t}",
"public Point findImage(BufferedImage image, int index) {\n int smallWidth = image.getWidth();\n int smallHeight = image.getHeight();\n int[][] smallPixels = new int[smallWidth][smallHeight];\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n smallPixels[x][y] = image.getRGB(x, y);\n }\n }\n boolean good;\n int count = 0;\n for(int X = 0; X <= bigWidth - smallWidth; X++) {\n for(int Y = 0; Y <= bigHeight - smallHeight; Y++) {\n good = true;\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n if(smallPixels[x][y] != bigPixels[X + x][Y + y]) {\n good = false;\n break;\n }\n }\n if(!good) {\n break;\n }\n }\n if(good) {\n if(count == index) {\n return(new Point(X, Y));\n }\n count++;\n }\n }\n }\n return(null);\n }",
"public static String getImageId(WebElement image) {\n String imageUrl = image.getAttribute(\"src\");\n\n int indexComparisonStart = imageUrl.indexOf(START_TOKEN) + START_TOKEN.length();\n int indexComparisonFinish = imageUrl.substring(indexComparisonStart).indexOf(STOP_TOKEN);\n\n return imageUrl.substring(indexComparisonStart, indexComparisonStart + indexComparisonFinish);\n }",
"private void searchImages()\n {\n searchWeb = false;\n search();\n }",
"java.lang.String getHotelImageURLs(int index);",
"@Override\n\tpublic List<Image> findAllImage() {\n\t\treturn new ImageDaoImpl().findAllImage();\n\t}",
"public void findBookDetails(AnnotateImageResponse imageResponse) throws IOException {\n\n String google = \"http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=\";\n String search = \"searchString\";\n String charset = \"UTF-8\";\n\n URL url = new URL(google + URLEncoder.encode(search, charset));\n Reader reader = new InputStreamReader(url.openStream(), charset);\n GoogleResults results = new Gson().fromJson(reader, GoogleResults.class);\n\n // Show title and URL of 1st result.\n System.out.println(results.getResponseData().getResults().get(0).getTitle());\n System.out.println(results.getResponseData().getResults().get(0).getUrl());\n }",
"public interface IImageInputBoundary {\n\n List<ImageResponseModel> GetImagesByCategory(ImageRequestModel requestModel);\n List<ImageResponseModel> GetImagesByComposition(ImageRequestModel requestModel);\n}",
"@Override\n\tpublic List<AddBookDto> findListimage(List<addBookBo> listBo) throws IOException {\n\n\t\tFile uploadFileDir, uploadImageDir;\n\n\t\tFileInputStream fileInputStream = null;\n\n\t\tList<AddBookDto> dtoList = new ArrayList<>();\n\n\t\tSet<Category> setCategory = new HashSet<>();\n\n\t\tSystem.out.println(\"UploadService.findListimage()\");\n\n\t\tfor (addBookBo bo : listBo) {\n\n\t\t\tAddBookDto dto = new AddBookDto();\n\n\t\t\tBeanUtils.copyProperties(bo, dto);\n\n\t\t\tSystem.out.println(\"UploadService.findListimage()-------\" + bo.getAuthor());\n\n\t\t\tuploadImageDir = new File(imageUploadpath + \"/\" + dto.getImageUrl() + \".jpg\");\n\n\t\t\tif (uploadImageDir.exists()) {\n\n\t\t\t\tbyte[] buffer = getBytesFromFile(uploadImageDir);\n\t\t\t\t// System.out.println(bo.getTitle()+\"====b===\" + buffer);\n\t\t\t\tdto.setImgeContent(buffer);\n\n\t\t\t}\n\n\t\t\tSystem.out.println(dto.getTitle() + \"====dto===\" + dto.getImgeContent());\n\t\t\tdtoList.add(dto);\n\n\t\t}\n\n\t\treturn dtoList;\n\t}",
"public Image getImageById(final String imageId)\n {\n GetImageByIdQuery getImageByIdQuery = new GetImageByIdQuery(imageId);\n List<Image> ImageList = super.queryResult(getImageByIdQuery);\n if (CollectionUtils.isEmpty(ImageList) || ImageList.size() > 1)\n {\n LOG.error(\"The Image cannot be found by this id:\" + imageId);\n return null;\n }\n return ImageList.get(0);\n }",
"@Test\n\tpublic void searchImageWithUpload() throws InterruptedException, Exception {\n\n\t\t// To click on Images link\n\t\thomePage.clickSearchByImage();\n\t\t\n\t\t// To verify if ui is navigated to Search by image page\n\t\tAssert.assertTrue(homePage.verifySearchByImageBox());\n\n\t\t// Upload an image from local machine\n\t\tsearchPage.uploadLocalImage(Settings.getLocalImage());\n\t\t// To verify upload status\n\t\tAssert.assertTrue(searchPage.verifyUploadStatus());\n\n\t\t// Find specified image on GUI\n\t\tWebElement webElement = searchPage.navigateToImage(Settings.getVisitRule());\n\n\t\t// Take a snapshot for expected visit page\n\t\tsearchPage.snapshotLastPage(webElement);\n\n\t\t// Download specified image by expected rule\n\t\tString fileName = Settings.getDownloadImage();\n\t\tboolean down = searchPage.downloadImagetoLocal(webElement, fileName);\n\t\tAssert.assertTrue(down);\n\n\t\t// verify two images match or not\n\t\tAssert.assertTrue(searchPage.verifyImageIsSame(Settings.getDownloadImage(), Settings.getLocalImage()));\n\n\t}",
"@Override\n public void onSuccess(Uri uri) {\n if (!ImageListUrl.contains(uri.toString())) {\n ImageListUrl.add(uri.toString());\n\n /// add property if imageurl arraylist same with imagelist arraylist\n if (ImageListUrl.size() == ImageList.size()) {\n Toast.makeText(NewRecipe.this, ImageListUrl.toString(), Toast.LENGTH_SHORT).show();\n\n saveRecipe();\n\n }\n }\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByTransformOrBuilder();",
"private static final byte[] xfuzzyload_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, -82,\n\t\t\t\t69, 12, -128, -128, -128, -1, -1, -1, -64, -64, -64, -1, -1, 0,\n\t\t\t\t0, 0, 0, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100, 101,\n\t\t\t\t32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4, 1,\n\t\t\t\t10, 0, 6, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 3, 75, 8, -86,\n\t\t\t\t-42, 11, 45, -82, -24, 32, -83, -42, -80, 43, -39, -26, -35,\n\t\t\t\t22, -116, 1, -9, 24, -127, -96, 10, 101, 23, 44, 2, 49, -56,\n\t\t\t\t108, 21, 15, -53, -84, -105, 74, -86, -25, 50, -62, -117, 68,\n\t\t\t\t44, -54, 74, -87, -107, 82, 21, 40, 8, 81, -73, -96, 78, 86,\n\t\t\t\t24, 53, 82, -46, 108, -77, -27, -53, 78, -85, -111, -18, 116,\n\t\t\t\t87, 8, 23, -49, -123, 4, 0, 59 };\n\t\treturn data;\n\t}",
"public List<Recognition> recognizeImage(Bitmap bitmap) {\n Bitmap croppedBitmap = Bitmap.createScaledBitmap(bitmap, cropSize, cropSize, true);\n// Bitmap croppedBitmap = Bitmap.createBitmap(cropSize, cropSize, Bitmap.Config.ARGB_8888);\n// final Canvas canvas = new Canvas(croppedBitmap);\n// canvas.drawBitmap(bitmap, frameToCropTransform, null);\n final List<Recognition> ret = new LinkedList<>();\n List<Recognition> recognitions = detector.recognizeImage(croppedBitmap);\n// long before=System.currentTimeMillis();\n// for (int k=0; k<100; k++) {\n// recognitions = detector.recognizeImage(croppedBitmap);\n// int a = 0;\n// }\n// long after=System.currentTimeMillis();\n// String log = String.format(\"tensorflow takes %.03f s\\n\", ((float)(after-before)/1000/100));\n// Log.d(\"MATCH TEST\", log);\n for (Recognition r : recognitions) {\n if (r.getConfidence() < minConfidence)\n continue;\n// RectF location = r.getLocation();\n// cropToFrameTransform.mapRect(location);\n// r.setOriginalLoc(location);\n// Bitmap cropped = Bitmap.createBitmap(bitmap, (int)location.left, (int)location.top, (int)location.width(), (int)location.height());\n// r.setObjectImage(cropped);\n BoxPosition bp = r.getLocation();\n// r.rectF = new RectF(bp.getLeft(), bp.getTop(), bp.getRight(), bp.getBottom());\n// cropToFrameTransform.mapRect(r.rectF);\n ret.add(r);\n }\n\n return ret;\n }",
"public static ArrayList<Result> getCCVBasedSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.CCV));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t\t// create result object\n\t\t\t \tResult result = new Result();\n\t\t\t \tresult.mFilename = imageName;\n\t\t\t \tresult.mSimilarity = intersection;\n\t\t\t \t\n\t\t\t \t// store result\n\t\t\t \trv.add(result);\n\t\t\t\t} catch (Exception ex) {}\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}",
"public Map<String, Photo> createGeoSimilarPhotoList(int maxCycles,\r\n\t\t\tboolean tagReq, boolean techTagReq) {\r\n\r\n\t\tMap<String, Photo> photoList = new HashMap<String, Photo>();\r\n\r\n\t\tpFet.getPanoramioGeoSimilarPhotoList(maxCycles, tagReq, techTagReq,\r\n\t\t\t\tphotoList);\r\n\r\n\t\tint panoPhotoReturend = photoList.size();\r\n\r\n\t\tMap<String, Photo> flickrPhotoList = fFet\r\n\t\t\t\t.getFlickrGeoSimilarPhotoList();\r\n\r\n\t\tint flickrPhotoReturend = flickrPhotoList.size();\r\n\r\n\t\tphotoList.putAll(flickrPhotoList);\r\n\r\n\t\ttotalNumberOfImages = flickrPhotoReturend + panoPhotoReturend;\r\n\r\n\t\treturn photoList;\r\n\t}",
"List<IbeisImage> uploadImages(List<File> images, File pathToTemporaryZipFile) throws\n UnsupportedImageFileTypeException, IOException, MalformedHttpRequestException, UnsuccessfulHttpRequestException;",
"private void loadAndCacheImages(Node node, FileContext cachedImageFilesystem) throws Exception\n {\n String imagePathBase = \"/\" + node.getTypeCode() + \"/\" + node.getNid();\n ImagesReponse imagesReponse = this.queryRemoteApi(ImagesReponse.class, imagePathBase + ImagesReponse.PATH, null);\n if (imagesReponse != null && imagesReponse.getNodes() != null && imagesReponse.getNodes().getNode() != null) {\n for (Image i : imagesReponse.getNodes().getNode()) {\n node.addImage(i);\n\n URI imageUri = UriBuilder.fromUri(Settings.instance().getTpAccessApiBaseUrl())\n .path(BASE_PATH)\n .path(imagePathBase + \"/image/\" + i.getData().mediaObjectId + \"/original\")\n .replaceQueryParam(ACCESS_TOKEN_PARAM, this.getAccessToken())\n .replaceQueryParam(FORMAT_PARAM, FORMAT_JSON)\n .build();\n\n ClientConfig config = new ClientConfig();\n Client httpClient = ClientBuilder.newClient(config);\n Response response = httpClient.target(imageUri).request().get();\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n org.apache.hadoop.fs.Path nodeImages = new org.apache.hadoop.fs.Path(HDFS_CACHE_ROOT_PATH + node.getNid());\n if (!cachedImageFilesystem.util().exists(nodeImages)) {\n cachedImageFilesystem.mkdir(nodeImages, FsPermission.getDirDefault(), true);\n }\n org.apache.hadoop.fs.Path cachedImage = new org.apache.hadoop.fs.Path(nodeImages, i.getData().mediaObjectId);\n i.setCachedUrl(cachedImage.toUri());\n if (!cachedImageFilesystem.util().exists(cachedImage)) {\n try (OutputStream os = cachedImageFilesystem.create(cachedImage, EnumSet.of(CreateFlag.CREATE, CreateFlag.OVERWRITE))) {\n IOUtils.copy(response.readEntity(InputStream.class), os);\n }\n }\n }\n else {\n throw new IOException(\"Error status returned while fetching remote API data;\" + response);\n }\n\n }\n }\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImagesByHandlerOrBuilder(\n int index);",
"public static ArrayList<Result> getColorHistogramSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.HISTOGRAM));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t// create result object\n\t\t \tResult result = new Result();\n\t\t \tresult.mFilename = imageName;\n\t\t \tresult.mSimilarity = intersection;\n\t\t \t\n\t\t \t// store result\n\t\t \trv.add(result);\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}",
"public void compareImageAction() {\n\t\tif (selectedAnimalModel == null) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (selectedAnimalModel.getId() == 0L || isImageChangedFlag) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tAsyncTask asyncTask = new AsyncTask() {\n\t\t\tAnimalModel animal1 = null;\n\t\t\tAnimalModel animal2 = null;\n\t\t\tAnimalModel animal3 = null;\n\n\t\t\t@Override\n\t\t\tprotected void onDone(boolean success) {\n\t\t\t\tif (!success) {\n\t\t\t\t\tshowDialog(ERROR_MESSAGE, \"Cannot compare images.\");\n\t\t\t\t} else {\n\t\t\t\t\tCompareImagesDialog dialog = new CompareImagesDialog(multimediaPanel, selectedAnimalModel, animal1, animal2, animal3);\n\t\t\t\t\tdialog.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected Boolean doInBackground() throws Exception {\n\t\t\t\ttry {\n\t\t\t\t\tArrayList<AnimalModel> models;\n\n\t\t\t\t\tmodels = DataManager.getInstance().getThreeSimilarImages(selectedAnimalModel);\n\n\t\t\t\t\tif (models.size() > 0) {\n\t\t\t\t\t\tanimal1 = models.get(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 1) {\n\t\t\t\t\t\tanimal2 = models.get(1);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 2) {\n\t\t\t\t\t\tanimal3 = models.get(2);\n\t\t\t\t\t}\n\n\t\t\t\t} catch (DataManagerException e1) {\n\t\t\t\t\tLogger.createLog(Logger.ERROR_LOG, e1.getMessage());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tasyncTask.start();\n\n\t}",
"private ArrayList<ImageItem> getData() {\n final ArrayList<ImageItem> imageItems = new ArrayList<>();\n // TypedArray imgs = getResources().obtainTypedArray(R.array.image_ids);\n for (int i = 0; i < f.size(); i++) {\n Bitmap bitmap = imageLoader.loadImageSync(\"file://\" + f.get(i));;\n imageItems.add(new ImageItem(bitmap, \"Image#\" + i));\n }\n return imageItems;\n }",
"static void redactImageFileColoredInfoTypes(String projectId, String inputPath, String outputPath)\n throws IOException {\n try (DlpServiceClient dlp = DlpServiceClient.create()) {\n // Specify the content to be redacted.\n ByteString fileBytes = ByteString.readFrom(new FileInputStream(inputPath));\n ByteContentItem byteItem =\n ByteContentItem.newBuilder().setType(BytesType.IMAGE_JPEG).setData(fileBytes).build();\n\n // Define types of info to redact associate each one with a different color.\n // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types\n ImageRedactionConfig ssnRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"US_SOCIAL_SECURITY_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(.3f).setGreen(.1f).setBlue(.6f).build())\n .build();\n ImageRedactionConfig emailRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"EMAIL_ADDRESS\").build())\n .setRedactionColor(Color.newBuilder().setRed(.5f).setGreen(.5f).setBlue(1).build())\n .build();\n ImageRedactionConfig phoneRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"PHONE_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(1).setGreen(0).setBlue(.6f).build())\n .build();\n\n // Create collection of all redact configurations.\n List<ImageRedactionConfig> imageRedactionConfigs =\n Arrays.asList(ssnRedactionConfig, emailRedactionConfig, phoneRedactionConfig);\n\n // List types of info to search for.\n InspectConfig config =\n InspectConfig.newBuilder()\n .addAllInfoTypes(\n imageRedactionConfigs.stream()\n .map(ImageRedactionConfig::getInfoType)\n .collect(Collectors.toList()))\n .build();\n\n // Construct the Redact request to be sent by the client.\n RedactImageRequest request =\n RedactImageRequest.newBuilder()\n .setParent(LocationName.of(projectId, \"global\").toString())\n .setByteItem(byteItem)\n .addAllImageRedactionConfigs(imageRedactionConfigs)\n .setInspectConfig(config)\n .build();\n\n // Use the client to send the API request.\n RedactImageResponse response = dlp.redactImage(request);\n\n // Parse the response and process results.\n FileOutputStream redacted = new FileOutputStream(outputPath);\n redacted.write(response.getRedactedImage().toByteArray());\n redacted.close();\n System.out.println(\"Redacted image written to \" + outputPath);\n }\n }",
"@GET\n @Path(\"image\")\n @Produces(MediaType.TEXT_PLAIN)\n public Response voidImage() {\n return Response.status(Response.Status.NOT_FOUND).build();\n }",
"public List<Image> parseBestOfImagesResult(Document doc) {\n\n ArrayList<Image> bestOfImages = new ArrayList<>();\n Elements htmlImages = doc.select(CSS_BEST_OF_IMAGE_QUERY);\n Timber.i(\"Best OfImages: %s\", htmlImages.toString());\n String href;\n Image bestOfImage;\n for (Element image : htmlImages) {\n href = image.attr(\"src\");\n Timber.i(\"Image src: %s\", href);\n bestOfImage = new Image(href);\n bestOfImages.add(bestOfImage);\n }\n return bestOfImages;\n }",
"public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }",
"public Observable<MatchResponseInner> matchMethodAsync(String listId, Boolean cacheImage) {\n return matchMethodWithServiceResponseAsync(listId, cacheImage).map(new Func1<ServiceResponse<MatchResponseInner>, MatchResponseInner>() {\n @Override\n public MatchResponseInner call(ServiceResponse<MatchResponseInner> response) {\n return response.body();\n }\n });\n }",
"public Observable<ServiceResponse<MatchResponseInner>> matchFileInputWithServiceResponseAsync(byte[] imageStream, String listId, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n if (imageStream == null) {\n throw new IllegalArgumentException(\"Parameter imageStream is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n RequestBody imageStreamConverted = RequestBody.create(MediaType.parse(\"image/gif\"), imageStream);\n return service.matchFileInput(listId, cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {\n @Override\n public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<MatchResponseInner> clientResponse = matchFileInputDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }",
"public ImageFiles() {\n\t\tthis.listOne = new ArrayList<String>();\n\t\tthis.listTwo = new ArrayList<String>();\n\t\tthis.listThree = new ArrayList<String>();\n\t\tthis.seenImages = new ArrayList<String>();\n\t\tthis.unseenImages = new ArrayList<String>();\n\t}",
"public interface SearchService {\n List<String> siftSearch(MultipartFile image) throws IOException;\n}",
"@ApiModelProperty(value = \"An image to give an indication of what to expect when renting this vehicle.\")\n public List<Image> getImages() {\n return images;\n }",
"private void getImagesFromDatabase() {\n try {\n mCursor = mDbAccess.getPuzzleImages();\n\n if (mCursor.moveToNext()) {\n for (int i = 0; i < mCursor.getCount(); i++) {\n String imagetitle = mCursor.getString(mCursor.getColumnIndex(\"imagetitle\"));\n String imageurl = mCursor.getString(mCursor.getColumnIndex(\"imageurl\"));\n mImageModel.add(new CustomImageModel(imagetitle, imageurl));\n mCursor.moveToNext();\n }\n } else {\n Toast.makeText(getActivity(), \"databse not created...\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }",
"public yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesResponse list(yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListMethod(), getCallOptions(), request);\n }",
"public boolean displayedDepartmentEmployeeImageMatch(List<String> names, List<String> images) {\n List<String> nonMatchingRecords = new ArrayList<>();\n for (int i = 0; i < names.size(); i++) {\n\n String imageSource = images.get(i).toLowerCase();\n String imageFileName = createImageName(names.get(i).toLowerCase());\n\n if (!imageSource.contains(imageFileName)) {\n nonMatchingRecords.add(names.get(i));\n }\n }\n if (nonMatchingRecords.size() > 0) {\n Reporter.log(\"FAILURE: Names of employees with non matching images\" +\n \" or inconsistently named imageFiles: \" +\n Arrays.toString(nonMatchingRecords.toArray()), true);\n return false;\n }\n return true;\n }",
"public Detections recognizeImage(Image image, int rotation) {\n\n Bitmap rgbFrameBitmap = Transform.convertYUVtoRGB(image);\n\n\n if (image.getFormat() != ImageFormat.YUV_420_888) {\n // unsupported image format\n Logger.addln(\"\\nWARN YoloHTTP.recognizeImage() unsupported image format\");\n return new Detections();\n }\n //return recognize(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkMaxAreaRectangle(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkNineBoxes(Transform.yuvBytes(image), image.getWidth(),image.getHeight(),rotation, rgbFrameBitmap,image.getHeight()/3,image.getWidth()/3,image.getHeight()/3,image.getWidth()/3);\n //return frameworkQuadrant(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n return frameworkMaxAreaRectBD(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n\n }",
"public List<Recognition> recognizeImage(Mat img) {\n frameToCropTransform =\n ImageUtil.getTransformationMatrix(\n img.cols(), img.rows(),\n cropSize, cropSize,\n 0, MAINTAIN_ASPECT);\n cropToFrameTransform = new Matrix();\n frameToCropTransform.invert(cropToFrameTransform);\n Bitmap tBM = Bitmap.createBitmap(img.cols(), img.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(img, tBM);\n return recognizeImage(tBM);\n }",
"public BufferedImage GetImage(String name) { return ImageList.get(name); }",
"public static Long getAValidImageId() {\n\t\tLong id = getAId();\n\t\tif (id == null) {\n\n\t\t\tImage img = new Image(\"http://dummy.com/img.jpg\", (long)(Math.random()*10000), \"Description\", \"keyword\", new Date(0001L));\n\t\t\tIImageStore imageStore = StoreFactory.getImageStore();\n\t\t\timageStore.insert(img);\n\n\t\t\tid = getAId();\n\t\t\tif (id == null) {\n\t\t\t\tthrow new RuntimeException(\"There are no images in DB, and I can't insert one. Cannot run tests without.\");\n\t\t\t}\n\t\t}\n\t\treturn id;\n\t}",
"public void setImage(int imageId) {\n this.imageId=imageId;\n\t}",
"public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}",
"@GetMapping(path = \"/images\", produces = \"application/json; charset=UTF-8\")\n public @ResponseBody ArrayNode getImageList() {\n final ArrayNode nodes = mapper.createArrayNode();\n for (final Image image : imageRepository.findAllPublic())\n try {\n nodes.add(mapper.readTree(image.toString()));\n } catch (final JsonProcessingException e) {\n e.printStackTrace();\n }\n return nodes;\n }",
"String getItemImage();",
"java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByTransformOrBuilderList();",
"protected abstract void setupImages(Context context);",
"public AugmentedImageNode(Context context, String[] imageList, Integer augmentedImageIndex) {\n\n // we check if sushi is null\n // sushi is used in order to check if the renderables are null\n // because the renderables are built using the same block of code all at once, if sushi (or any other completable future) is null,\n // then they all are null\n if (sushi == null) {\n\n if (!(AugmentedImageFragment.imagePlaysVideoBooleanList[augmentedImageIndex])) {\n currentRenderable = renderableList.get(augmentedImageIndex);\n currentRenderable =\n // build the renderable using the image that is detected\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/\" + imageList[augmentedImageIndex] + \".sfb\"))\n .build();\n Log.d(\"modelrenderable\", (\"conditional is running! filepath: \" + Uri.parse(\"models/\" + imageList[augmentedImageIndex] + \".sfb\")));\n\n } else {\n\n frame_ul =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_upper_left.sfb\"))\n .build();\n Log.d(\"running\", (\"running\"));\n frame_ur =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_upper_right.sfb\"))\n .build();\n frame_ll =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_lower_left.sfb\"))\n .build();\n frame_lr =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_lower_right.sfb\"))\n .build();\n\n }\n\n\n }\n\n // Checks if videoRenderable is null, if it is, videoRenderable is loaded from models.\n // Will be used as the thing that the video is placed on.\n if (AugmentedImageActivity.videoRenderable == null) {\n AugmentedImageActivity.videoRenderable =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/chroma_key_video.sfb\"))\n .build();\n }\n }"
]
| [
"0.6268827",
"0.58894795",
"0.57677805",
"0.57601416",
"0.5745048",
"0.57317436",
"0.55123144",
"0.5503459",
"0.55010366",
"0.54535496",
"0.53231597",
"0.52577794",
"0.5252809",
"0.5197598",
"0.51810634",
"0.5180938",
"0.5170541",
"0.5143361",
"0.5132484",
"0.51319265",
"0.51224333",
"0.5117683",
"0.5087638",
"0.5067504",
"0.50536203",
"0.5053161",
"0.5032371",
"0.50230694",
"0.5020064",
"0.50197476",
"0.5017497",
"0.49934095",
"0.4982133",
"0.49786833",
"0.4976476",
"0.49622747",
"0.49486583",
"0.49327984",
"0.4917589",
"0.4908509",
"0.4905867",
"0.49023446",
"0.4901031",
"0.48701972",
"0.48697302",
"0.48693508",
"0.4865608",
"0.48344868",
"0.4826242",
"0.4823214",
"0.48141134",
"0.48121142",
"0.47974515",
"0.47896698",
"0.47813424",
"0.47794077",
"0.4770224",
"0.47676432",
"0.4765288",
"0.47643593",
"0.4757827",
"0.4757143",
"0.47531438",
"0.47432348",
"0.4742203",
"0.47421885",
"0.4740627",
"0.4737963",
"0.4731806",
"0.47313228",
"0.47210446",
"0.47168025",
"0.47118372",
"0.4709293",
"0.47092316",
"0.47077367",
"0.4699514",
"0.4696686",
"0.46891865",
"0.46795154",
"0.46656293",
"0.46641228",
"0.46640646",
"0.4663976",
"0.4662889",
"0.46480772",
"0.4645193",
"0.4644105",
"0.46395627",
"0.4636299",
"0.46341047",
"0.4631616",
"0.46303436",
"0.46229544",
"0.4621968",
"0.46167204",
"0.46087825",
"0.4605549",
"0.46027145",
"0.45995033",
"0.45839757"
]
| 0.0 | -1 |
Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using this API. Returns ID and tags of matching image. Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. | public Observable<MatchResponseInner> matchFileInputAsync(byte[] imageStream, String listId, Boolean cacheImage) {
return matchFileInputWithServiceResponseAsync(imageStream, listId, cacheImage).map(new Func1<ServiceResponse<MatchResponseInner>, MatchResponseInner>() {
@Override
public MatchResponseInner call(ServiceResponse<MatchResponseInner> response) {
return response.body();
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int match(ArrayList<ImageCell> images);",
"ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);",
"private void searchImage(String text){\n\n // Set toolbar title as query string\n toolbar.setTitle(text);\n\n Map<String, String> options = setSearchOptions(text, Constants.NEW_SEARCH);\n Call<SearchResponse> call = service.searchPhoto(options);\n\n call.enqueue(new Callback<SearchResponse>() {\n @Override\n public void onResponse(Response<SearchResponse> response, Retrofit retrofit) {\n SearchResponse result = response.body();\n if (result.getStat().equals(\"ok\")) {\n // Status is ok, add result to photo list\n if (photoList != null) {\n photoList.clear();\n photoList.addAll(result.getPhotos().getPhoto());\n imageAdapter.notifyDataSetChanged();\n pageCount = 2;\n }\n\n } else {\n // Display error if something wrong with result\n Toast.makeText(context, result.getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Display error here since request failed\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }\n });\n }",
"@ApiOperation(value = \"Return images matching supplied digest found in supplied repository\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in supplied repository with supplied digest\") })\n\t// Pass in digest only in specific registry, get images and tags back that match\n\t@RequestMapping(path = \"/{registry}/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAndRegistry(@PathVariable String registry,\n\t\t\t@PathVariable String id) {\n\t\tRegistryConnection localConnection;\n\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\ttry {\n\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(registry));\n\n\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t// Get all tags from specific repo\n\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\timage.setRegistryName(registry);\n\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\timages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Iterate through images and only add to new list, what digests are identical\n\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\tfor (DockerImageData image : images) {\n\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from \" + registry + \" matching image id \" + id,\n\t\t\t\t\tmatchingImages);\n\t\t} catch (RegistryNotFoundException e) {\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\"Failed to find Registry\");\n\t\t}\n\t}",
"public List<Result> recognize(IplImage image);",
"@SuppressWarnings({ \"unchecked\", \"null\" })\n public List<String> calcSimilarity(String imgPath) {\n\n FileInputStream imageFile;\n double minDistance = Double.MAX_VALUE;\n\n // 返回查询结果\n List<String> matchUrls = new ArrayList<String>();\n\n\n try {\n\n imageFile = new FileInputStream(imgPath);\n BufferedImage bufferImage;\n\n bufferImage = ImageIO.read(imageFile);\n LTxXORP.setRotaIvaPats();//设定旋转模式值\n\n //得到图片的纹理一维数组特征向量(各颜色分量频率(统计量))\n double[] lbpSourceFecture = LTxXORP.getLBPFeature(imgPath);\n\n // 提取数据库数据\n List<Object> list = DBHelper.fetchALLCloth();\n\n // long startTime = System.currentTimeMillis();\n\n // 把每个条数据的路径和最短距离特征提取出来并存储在lbpResultMap的键值对中。\n Map<String, Double> lbpResultMap = new HashMap<String, Double>();\n\n for (int i = 0; i < list.size(); i++) {\n\n Map<String, Object> map = (Map<String, Object>) list.get(i);\n\n Object candidatePath = map.get(\"path\");\n Object candidateLBP = map.get(\"lbpFeature\");\n\n // 从快速搜索中选取TOP N结果,继续进行纹理特征匹配\n //获取当前由颜色匹配相似度排序的结果并提取其LBP纹理特征\n\n double[] lbpTargetFeature = MatchUtil.jsonToArr((String) candidateLBP);\n double lbpDistance = textureStrategy.similarity(lbpTargetFeature, lbpSourceFecture);\n lbpResultMap.put((String) candidatePath, lbpDistance);\n\n // 判断衡量标准选取距离还是相似度\n if (lbpDistance < minDistance)\n minDistance = lbpDistance;\n\n }\n\n Map<String, Double> tempResultMap;\n\n System.out.println(\"Min Distance : \" + (float) minDistance);\n\n\n\n System.out.println(\"============== finish Texture =================\");\n\n Map<String, Double> finalResult = MatchUtil.sortByValueAsc(lbpResultMap);\n\n int counter = 0;\n for (Map.Entry<String, Double> map : finalResult.entrySet()) {\n if (counter >= Config.finalResultNumber)\n break;\n //matchUrls截取只存储finalResultNumber数量的查询结果\n matchUrls.add(map.getKey());\n counter ++;\n double TSimilarity=Math.pow(Math.E,-map.getValue());\n System.out.println(TSimilarity + \" 图片路径 \" + map.getKey());\n\n }\n\n System.out.println();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return matchUrls;\n }",
"public interface ImageSearchService {\n\n /**\n * Register an image into the search instance.\n *\n * @param imageData Image data in JPEG or PNG format.\n * @param imageType Image format.\n * @param uuid Unique identifier of the image.\n */\n void register(byte[] imageData, ObjectImageType imageType, String uuid);\n\n /**\n * Un-register an image from the search instance.\n *\n * @param uuid Unique identifier of the image.\n */\n void unregister(String uuid);\n\n /**\n * Find all images similar to the given one.\n *\n * @param imageData Image to match with registered ones in the search instance.\n * @param objectRegion object region to search.\n * @return Found images UUIDs and raw response.\n */\n ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);\n\n /**\n * Check the image search configuration is correct by making a fake search request.\n *\n * @param configuration Configuration to check.\n */\n void checkImageSearchConfiguration(Configuration configuration) throws InvalidConfigurationException;\n}",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByHandler(int index);",
"@ApiOperation(value = \"Return all images matching supplied digest in all configured registries\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in configured registries with supplied digest\") })\n\t// Pass in only digest, get images and tags back that much from all repos\n\t@RequestMapping(path = \"/registries/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAllRegistries(@PathVariable String id) {\n\t\t\t\tRegistryConnection localConnection;\n\t\t\t\t// List persists outside all registries\n\t\t\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\t\t\tList<RegistryItem> items = configs.getItems();\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\t// For each configured registry\n\t\t\t\t\tfor(RegistryItem item : items) {\n\t\t\t\t\t\t// Get connection to registry\n\t\t\t\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(item.getRegistryLabel()));\n\t\t\t\t\t\t\n\t\t\t\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\t\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t\t\t\t// Get all tags from specific repo\n\t\t\t\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\t\t\t\timage.setRegistryName(item.getRegistryLabel());\n\t\t\t\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\t\t\t\timages.add(image);\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// Iterate through images and only add to new list, what digests are identical\n\t\t\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\t\t\tfor (DockerImageData image : images) {\n\t\t\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from all configured registries \",\n\t\t\t\t\t\t\tmatchingImages);\n\t\t\t\t} catch (RegistryNotFoundException e) {\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\t\t\"Failed to find Registry\");\n\t\t\t\t}\n\t}",
"Receta getByIdWithImages(long id);",
"public int displayRandomImage() {\n\n int randomImageIndex;\n\n do\n { // making sure that the same images aren't repeated & images of the same car makes aren't shown together\n\n randomCarMake = allCarMakes[getRandomBreed()]; // get a random breed\n randomImageIndex = getRandomImage(); // get a random image of a particular breed\n\n randomImageOfChosenCarMake = displayRelevantImage(randomCarMake, randomImageIndex);\n\n } while (displayingCarMakes.contains(randomCarMake) || allDisplayedImages.contains(randomImageOfChosenCarMake));\n\n allDisplayedImages.add(randomImageOfChosenCarMake); // to make sure that the image isn't repeated\n displayingCarMakes.add(randomCarMake); // to make sure that images of the same breed aren't shown at once\n displayingImageIndexes.add(randomImageIndex); // to recall indexes when the device is rotated\n\n // return chosen random image\n return getResources().getIdentifier(randomImageOfChosenCarMake, \"drawable\", \"com.example.car_match_game_app\");\n }",
"@GET\n @Path(\"{factoryId}/image\")\n @Produces(\"image/*\")\n public Response getImage(@PathParam(\"factoryId\") String factoryId, @DefaultValue(\"\") @QueryParam(\"imgId\") String imageId)\n throws FactoryUrlException {\n Set<FactoryImage> factoryImages = factoryStore.getFactoryImages(factoryId, null);\n if (factoryImages == null) {\n LOG.warn(\"Factory URL with id {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Factory URL with id \" + factoryId + \" is not found.\");\n }\n if (imageId.isEmpty()) {\n if (factoryImages.size() > 0) {\n FactoryImage image = factoryImages.iterator().next();\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n } else {\n LOG.warn(\"Default image for factory {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(),\n \"Default image for factory \" + factoryId + \" is not found.\");\n }\n } else {\n for (FactoryImage image : factoryImages) {\n if (image.getName().equals(imageId)) {\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n }\n }\n }\n LOG.warn(\"Image with id {} is not found.\", imageId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Image with id \" + imageId + \" is not found.\");\n }",
"public void findGeoSurfSimilarPhotosWithTagStatistics(\r\n\t\t\tfinal Set<String> allCandidateWords,\r\n\t\t\tfinal Map<String, WordImage> relevantWordImages, boolean tagReq,\r\n\t\t\tboolean techTagReq, boolean compact) {\r\n\r\n\t\ttopImagesURLs = new HashMap<String, Double>();\r\n\t\ttopImagesNames = new HashMap<String, String>();\r\n\t\t// The list of all Photo objects\r\n\t\tphotoList = new HashMap<String, Photo>();\r\n\t\tphotoList = createGeoSimilarPhotoList(PANORAMIO_DEFUALT_NUM_ITERATIONS, tagReq,\r\n\t\t\t\ttechTagReq);\r\n\r\n\t\t// Word Image Relevance Dictionary\r\n\t\t// The statistics consider for each word the set of images annotated\r\n\t\t// with them and similar\r\n\t\t// to the input image and the those which are tagged with it and not\r\n\t\t// similar to the input image\r\n\t\t// Map<String, WordImage> relevantWordImages = new HashMap<String,\r\n\t\t// WordImage>();\r\n\r\n\t\t// Prepare the result output\r\n\r\n\t\tif (!compact) {\r\n\t\t\toutRel.println(\"Image URL , Score , Distance , Point Similarity, Common Keypoints , Iter Point Similariy, Title , Tags , distance, userid\");\r\n\t\t\t// An CSV file for the set of visually irrelevant images\r\n\t\t\toutIrrRel.println(\"Image URL , Title , Tags , distance, userid\");\r\n\t\t}\r\n\r\n\t\t// *** Extract SURF feature for the input image\r\n\r\n\t\tSurfMatcher surfMatcher = new SurfMatcher();\r\n\t\t// The SURF feature of the input image\r\n\t\tList<InterestPoint> ipts1 = surfMatcher.extractKeypoints(inputImageURL,\r\n\t\t\t\tsurfMatcher.p1);\r\n\r\n\t\t// inputImageInterstPoints = ipts1 ;\r\n\r\n\t\t// Add the photo with its interestpoint to the cache\r\n\t\t// this.photoInterestPoints.put(imageName, ipts1);\r\n\r\n\t\t// Find SURF correspondences in the geo-related images\r\n\t\ttotalNumberOfSimilarImages = 0; // R\r\n\r\n\t\tfor (String photoId : photoList.keySet()) {\r\n\r\n\t\t\tPhoto photo = photoList.get(photoId);\r\n\r\n\t\r\n\r\n\t\t\tString toMatchedPhotoURL = photo.getPhotoFileUrl();\r\n\t\t\t// The SURF feature of a geo close image\r\n\t\t\tList<InterestPoint> ipts2 = surfMatcher.extractKeypoints(\r\n\t\t\t\t\ttoMatchedPhotoURL, surfMatcher.p2);\r\n\r\n\t\t\t// this.photoInterestPoints.put(photo.getPhotoId(), ipts2);\r\n\t\t\t// this.cachedImageInterstPoint.put(photo.getPhotoId(), ipts2);\r\n\r\n\t\t\tMatchingResult surfResult = null;\r\n\r\n\t\t\tsurfResult = surfMatcher.matchKeypoints(inputImageURL, photoId,\r\n\t\t\t\t\tipts1, ipts2, MIN_COMMON_IP_COUNT);\r\n\r\n\t\t\tif (surfResult != null) { // the images are visually similar\r\n\r\n\t\t\t\ttopImagesURLs.put(toMatchedPhotoURL,\r\n\t\t\t\t\t\tsurfResult.getPiontSimilarity());\r\n\r\n\t\t\t\ttopImagesNames.put(toMatchedPhotoURL, photo.getPhotoId());\r\n\r\n\t\t\t\ttotalNumberOfSimilarImages += 1;\r\n\t\t\t\tif (!compact) {\r\n\r\n\t\t\t\t\toutRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getScore()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getAvgDistance()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getPiontSimilarity()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getCommonKeyPointsCount()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ \"null ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\tSystem.out.println(\"Downloading Similar Image\");\r\n\t\t\t\t\tString destFileName = similarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Generate Word Statistics\r\n\t\t\t\t// For the a certain word (tag) add image info to its list if\r\n\t\t\t\t// this image\r\n\t\t\t\t// is visually similar to the input image\r\n\t\t\t\tupdateWordRelatedImageList(allCandidateWords,\r\n\t\t\t\t\t\trelevantWordImages, photo, surfResult);\r\n\t\t\t} else {\r\n\r\n\t\t\t\tif (!compact) {\r\n\t\t\t\t\t// Images are visually not similar\r\n\t\t\t\t\toutIrrRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \" ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t// We also need to get some information if a certain word is\r\n\t\t\t\t\t// also used by visually not similar images\r\n\t\t\t\t\tSystem.out.println(\"Downloading Non Similar Image\");\r\n\t\t\t\t\tString destFileName = dissimilarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tupdateWordNotRelatedImageList(relevantWordImages, photo);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByHandlerList();",
"@GET(\"/tags/{query}/media/recent\" + CLIENT_ID)\n public void searchPhotos(@Path(\"query\") String query, Callback<WebResponse<ArrayList<InstagramPhoto>>> callback);",
"List<Bitmap> getFavoriteRecipeImgs();",
"private void processImages() throws MalformedURLException, IOException {\r\n\r\n\t\tNodeFilter imageFilter = new NodeClassFilter(ImageTag.class);\r\n\t\timageList = fullList.extractAllNodesThatMatch(imageFilter, true);\r\n\t\tthePageImages = new HashMap<String, byte[]>();\r\n\r\n\t\tfor (SimpleNodeIterator nodeIter = imageList.elements(); nodeIter\r\n\t\t\t\t.hasMoreNodes();) {\r\n\t\t\tImageTag tempNode = (ImageTag) nodeIter.nextNode();\r\n\t\t\tString tagText = tempNode.getText();\r\n\r\n\t\t\t// Populate imageUrlText String\r\n\t\t\tString imageUrlText = tempNode.getImageURL();\r\n\r\n\t\t\tif (imageUrlText != \"\") {\r\n\t\t\t\t// Print to console, to verify relative link processing\r\n\t\t\t\tSystem.out.println(\"ImageUrl to Retrieve:\" + imageUrlText);\r\n\r\n\t\t\t\tbyte[] imgArray = downloadBinaryData(imageUrlText);\r\n\r\n\t\t\t\tthePageImages.put(tagText, imgArray);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"@Override\n public FlickrResponse searchPhoto(String tags) throws IOException {\n return flickrService.searchPhoto(tags);\n }",
"public void getImageResults(String tag){\n showProgressBar(true);\n HttpClient.get(\"rest/\", getRequestParams(tag), new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n String response = new String(responseBody, StandardCharsets.UTF_8);\n response = StringUtils.replace(response, \"jsonFlickrApi(\", \"\");\n response = StringUtils.removeEnd(response, \")\");\n Log.d(\"SERVICE RESPONSE\", response);\n Gson gson = new Gson();\n FlickrSearchResponse jsonResponse = gson.fromJson(response, FlickrSearchResponse.class);\n if(jsonResponse.getStat().equals(\"fail\")){\n //api returned an error\n searchHelperListener.onErrorResponseReceived(jsonResponse.getMessage());\n } else {\n //api returned data\n searchHelperListener.onSuccessResponseReceived(jsonResponse);\n }\n showProgressBar(false);\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n Log.d(\"SERVICE FAILURE\", error.getMessage());\n searchHelperListener.onErrorResponseReceived(error.getMessage());\n showProgressBar(false);\n }\n });\n\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByTransform(int index);",
"public EC2DescribeImagesResponse describeImages(EC2DescribeImages request) {\n EC2DescribeImagesResponse images = new EC2DescribeImagesResponse();\n try {\n String[] templateIds = request.getImageSet();\n EC2ImageFilterSet ifs = request.getFilterSet();\n\n if (templateIds.length == 0) {\n images = listTemplates(null, images);\n } else {\n for (String s : templateIds) {\n images = listTemplates(s, images);\n }\n }\n if (ifs != null)\n return ifs.evaluate(images);\n } catch (Exception e) {\n logger.error(\"EC2 DescribeImages - \", e);\n handleException(e);\n }\n return images;\n }",
"GetImagesResult getImages(GetImagesRequest getImagesRequest);",
"int seachImage(Image img) {\r\n\t\treturn 1;\r\n\t}",
"public void searchImages(View view) {\n imageList.clear();\n adapter.clear();\n Log.d(\"DEBUG\", \"Search Images\");\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n Log.d(\"DEBUG\", getUrl(1).toString());\n retrieveImages(getUrl(1).toString());\n }",
"java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByTransformList();",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform();",
"FetchedImage getFujimiyaUrl(String query,int maxRankOfResult){\n try{\n //Get SearchResult\n Search search = getSearchResult(query, maxRankOfResult);\n List<Result> items = search.getItems();\n for(Result result: items){\n int i = items.indexOf(result);\n logger.log(Level.INFO,\"query: \" + query + \" URL: \"+result.getLink());\n logger.log(Level.INFO,\"page URL: \"+result.getImage().getContextLink());\n if(result.getImage().getWidth()+result.getImage().getHeight()<600){\n logger.log(Level.INFO,\"Result No.\"+i+\" is too small image. next.\");\n continue;\n }\n if(DBConnection.isInBlackList(result.getLink())){\n logger.log(Level.INFO,\"Result No.\"+i+\" is included in the blacklist. next.\");\n continue;\n }\n HttpURLConnection connection = (HttpURLConnection)(new URL(result.getLink())).openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setInstanceFollowRedirects(false);\n connection.connect();\n if(connection.getResponseCode()==200){\n return new FetchedImage(connection.getInputStream(),result.getLink());\n }else{\n logger.log(Level.INFO,\"Result No.\"+i+\" occurs error while fetching the image. next.\");\n continue;\n }\n }\n //If execution comes here, connection has failed 10 times.\n throw new ConnectException(\"Connection failed 10 times\");\n\n } catch (IOException e) {\n // TODO Auto-generated catch block\n logger.log(Level.SEVERE,e.toString());\n e.printStackTrace();\n }\n return null;\n}",
"@Override\n\tpublic String imageSearch(QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(IData.URL_SEARCH + param.toString());\n\t}",
"void loadImages(int id_image, HouseRepository.GetImageFromHouseCallback callback);",
"private void onImagePicked(@NonNull final byte[] imageBytes) {\n setBusy(true);\n\n // Make sure we don't show a list of old concepts while the image is being uploaded\n adapter.setData(Collections.<Concept>emptyList());\n\n new AsyncTask<Void, Void, ClarifaiResponse<List<ClarifaiOutput<Concept>>>>() {\n @Override protected ClarifaiResponse<List<ClarifaiOutput<Concept>>> doInBackground(Void... params) {\n // The default Clarifai model that identifies concepts in images\n final ConceptModel generalModel = App.get().clarifaiClient().getDefaultModels().foodModel();\n\n // Use this model to predict, with the image that the user just selected as the input\n return generalModel.predict()\n .withInputs(ClarifaiInput.forImage(ClarifaiImage.of(imageBytes)))\n .executeSync();\n }\n\n @Override protected void onPostExecute(ClarifaiResponse<List<ClarifaiOutput<Concept>>> response) {\n setBusy(false);\n if (!response.isSuccessful()) {\n showErrorSnackbar(R.string.error_while_contacting_api);\n return;\n }\n final List<ClarifaiOutput<Concept>> predictions = response.get();\n if (predictions.isEmpty()) {\n showErrorSnackbar(R.string.no_results_from_api);\n return;\n }\n adapter.setData(predictions.get(0).data());\n\n // INSERT METHOD FOR USER SELECTION OF FOOD\n\n // ADDED FOR DATABASE\n try {\n readCSVToMap(\"ABBREV_2.txt\");\n }\n catch (Exception e){\n Log.d(\"Failure\", \"CSV not read into database\");\n }\n String exampleResult = predictions.get(0).data().get(0).name();\n final List<String> list = listOfKeys(exampleResult);\n\n // change this line to take in user input\n final String key2 = list.get(0); // arbitrary selection of key\n\n final List<String> val = db.get(key2);\n final String message = String.valueOf(val.get(6)); //index 6 contains carb info\n Log.d(\"Output\", message);\n imageView.setImageBitmap(BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.length));\n }\n\n private void showErrorSnackbar(@StringRes int errorString) {\n Snackbar.make(\n root,\n errorString,\n Snackbar.LENGTH_INDEFINITE\n ).show();\n }\n }.execute();\n }",
"private void imageSearch(ArrayList<Html> src) {\n // loop through the Html objects\n for(Html page : src) {\n\n // Temp List for improved readability\n ArrayList<Image> images = page.getImages();\n\n // loop through the corresponding images\n for(Image i : images) {\n if(i.getName().equals(this.fileName)) {\n this.numPagesDisplayed++;\n this.pageList.add(page.getLocalPath());\n }\n }\n }\n }",
"@Override\n\tpublic String imageLists(String url, QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(url + param.toString());\n\t}",
"@Override\n\tpublic List<PersonalisationMediaModel> getImageByID(final String imageID)\n\t{\n\t\tfinal String query1 = \"Select {pk} from {PersonalisationMedia} Where {code}=?imageId and {user}=?user\";\n\t\t/**\n\t\t * select distinct {val:pk} from {PersonalisationMediaModel as val join MediaModel as media on\n\t\t * {media:PK}={val.image} join User as user on {user:pk}={val:user} and {media:code}=?imageId and {user:pk}=?user}\n\t\t */\n\t\tfinal UserModel user = getUserService().getCurrentUser();\n\t\tfinal FlexibleSearchQuery fQuery = new FlexibleSearchQuery(query1);\n\t\tfinal Map<String, Object> params = new HashMap<>();\n\t\tparams.put(\"imageId\", imageID);\n\t\tparams.put(\"user\", user);\n\t\tfQuery.addQueryParameters(params);\n\t\tLOG.info(\"getImageByID\" + fQuery);\n\t\tfinal SearchResult<PersonalisationMediaModel> searchResult = flexibleSearchService.search(fQuery);\n\t\treturn searchResult.getResult();\n\t}",
"public void findImages() {\n \t\tthis.mNoteItemModel.findImages(this.mNoteItemModel.getContent());\n \t}",
"public void notifyFinishGetSimilarArtist(ArtistInfo a, Image img, long id);",
"private void imgDetected(Matcher matcher) {\n String component;\n matcher.reset();\n\n // store src value if <img> exist\n while (matcher.find()) {\n Data.imagesSrc.add(matcher.group(1));\n }\n\n // separate if the paragraph contain img\n // replace <img> with -+-img-+- to indicate image position in the text\n component = matcher.replaceAll(\"-+-img-+-\");\n\n //split the delimiter to structure image position\n String[] imageStructure = component.split(\"-\\\\+-\");\n\n // start looping the structured text\n int imageFoundIndex = 0;\n for (String structure : imageStructure) {\n // continue if the current index is not empty string \"\"\n if (!structure.trim().equals(\"\")) {\n // create ImageView if current index value equeal to \"img\"\n if (structure.trim().equals(\"img\")) {\n createImageView();\n imageFoundIndex++;\n } else {\n // else create textView for the text\n generateView(structure);\n }\n }\n }\n }",
"List<IbeisImage> uploadImages(List<File> images) throws UnsupportedImageFileTypeException, IOException,\n MalformedHttpRequestException, UnsuccessfulHttpRequestException;",
"public DetectorMatchResponse findMatchingDetectorMappings(List<Map<String, String>> tagsList) {\n isTrue(tagsList.size() > 0, \"tagsList must not be empty\");\n\n val uri = baseUri + API_PATH_MATCHING_DETECTOR_BY_TAGS;\n Content content;\n try {\n String body = objectMapper.writeValueAsString(tagsList);\n content = httpClient.post(uri, body);\n } catch (IOException e) {\n val message = \"IOException while getting matching detectors for\" +\n \": tags=\" + tagsList +\n \", httpMethod=POST\" +\n \", uri=\" + uri;\n throw new DetectorMappingRetrievalException(message, e);\n }\n try {\n return objectMapper.readValue(content.asBytes(), DetectorMatchResponse.class);\n } catch (IOException e) {\n val message = \"IOException while deserializing detectorMatchResponse\" +\n \": tags=\" + tagsList;\n throw new DetectorMappingDeserializationException(message, e);\n }\n\n }",
"public Observable<ServiceResponse<MatchResponseInner>> matchMethodWithServiceResponseAsync(String listId, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.matchMethod(listId, cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {\n @Override\n public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<MatchResponseInner> clientResponse = matchMethodDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }",
"List<Bitmap> getRecipeImgSmall();",
"private void getImagesFromServer() {\n trObtainAllPetImages.setUser(user);\n trObtainAllPetImages.execute();\n Map<String, byte[]> petImages = trObtainAllPetImages.getResult();\n Set<String> names = petImages.keySet();\n\n for (String petName : names) {\n byte[] bytes = petImages.get(petName);\n Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, Objects.requireNonNull(bytes).length);\n int index = user.getPets().indexOf(new Pet(petName));\n user.getPets().get(index).setProfileImage(bitmap);\n ImageManager.writeImage(ImageManager.PET_PROFILE_IMAGES_PATH, user.getUsername() + '_' + petName, bytes);\n }\n }",
"private static final byte[] xfuzzy_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -95, 0, 0, -1,\n\t\t\t\t-1, -1, -82, 69, 12, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77,\n\t\t\t\t97, 100, 101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0,\n\t\t\t\t33, -7, 4, 1, 10, 0, 0, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 2,\n\t\t\t\t36, -124, -113, -87, -101, -31, -33, 32, 120, 97, 57, 68, -93,\n\t\t\t\t-54, -26, 90, -24, 49, 84, -59, 116, -100, 88, -99, -102, 25,\n\t\t\t\t30, -19, 36, -103, -97, -89, -62, 117, -119, 51, 5, 0, 59 };\n\t\treturn data;\n\t}",
"public RatingSearch explode() {\n Elements elements = doc.getElementsByTag(\"table\");\n IqdbMatch bestMatch = null;\n List<IqdbMatch> additionalMatches = new LinkedList<>();\n for (int i = 1; i < elements.size(); i++) {\n //iterating through all the table elements. First one is your uploaded image\n\n //Each table is one \"card\" on iqdb so only the second one will be the \"best match\"\n Element element = elements.get(i);\n IqdbElement iqdbElement = new IqdbElement(element);\n\n Elements noMatch = element.getElementsContainingText(\"No relevant matches\");\n if (noMatch.size() > 0) {\n log.warn(\"There was no relevant match for this document\");\n// break;\n return null;\n }\n// TODO I don't think we can determine if these are even relevant. So once we see 'No relevent matches' we can\n// just call it there. We won't need 'Possible Match' yet\n// Elements possibleMatchElement = element.getElementsContainingText(\"Possible match\");\n// if (possibleMatchElement.size() > 0) {\n// additionalMatches.add(iqdbElement.explode(IqdbMatchType.NO_RELEVANT_BUT_POSSIBLE));\n// }\n\n //Second element will provide all the information you need. going into the similarity and all that is a waste of time\n //Use the similarity search for Best Match to identify the element that is best match if you don't trust the 2nd.\n Elements bestMatchElement = element.getElementsContainingText(\"Best Match\");\n if (bestMatchElement.size() > 0) {\n bestMatch = iqdbElement.explode(IqdbMatchType.BEST);\n }\n\n //can similarly search for \"Additional match\" to find all teh additional matches. Anything beyond additional matches is a waste of time.\n Elements additionalMatchElements = element.getElementsContainingText(\"Additional match\");\n if (additionalMatchElements.size() > 0) {\n additionalMatches.add(iqdbElement.explode(IqdbMatchType.ADDITIONAL));\n }\n }\n\n if (bestMatch == null && !additionalMatches.isEmpty()) {\n log.warn(\"No Best Match found, taking first additionalMatch, does this ever happen?\");\n bestMatch = additionalMatches.remove(0);\n }\n\n return null;//new RatingSearch(bestMatch, additionalMatches);\n }",
"public static SearchResult getChampionImage(String championList, String championID) {\n try {\r\n JSONObject holder = new JSONObject(championList);\r\n JSONObject holderItems = holder.getJSONObject(\"data\");\r\n SearchResult champion = new SearchResult();\r\n\r\n for (Iterator<String> it = holderItems.keys(); it.hasNext(); ) { //iterate through champion json objects\r\n String key = it.next();\r\n JSONObject resultItem = holderItems.getJSONObject(key);\r\n\r\n if (resultItem.getString(\"key\").equals(championID)) {\r\n champion.championName = key; //the key for the json object is also the name of the champion\r\n break;\r\n }\r\n }\r\n\r\n String tempName = champion.championName + \".png\"; //construct string for champion image\r\n\r\n champion.championImage = Uri.parse(BASE_URL_CHAMPION_IMAGE + tempName).buildUpon().build().toString();\r\n\r\n return champion;\r\n } catch (JSONException e) {\r\n System.out.println(e);\r\n return null;\r\n }\r\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByHandlerOrBuilder();",
"private EC2DescribeImagesResponse listTemplates(String templateId, EC2DescribeImagesResponse images) throws Exception {\n try {\n List<CloudStackTemplate> result = new ArrayList<CloudStackTemplate>();\n\n if (templateId != null) {\n List<CloudStackTemplate> template = getApi().listTemplates(\"executable\", null, null, null, templateId, null, null, null);\n if (template != null) {\n result.addAll(template);\n }\n } else {\n List<CloudStackTemplate> selfExecutable = getApi().listTemplates(\"selfexecutable\", null, null, null, null, null, null, null);\n if (selfExecutable != null) {\n result.addAll(selfExecutable);\n }\n\n List<CloudStackTemplate> featured = getApi().listTemplates(\"featured\", null, null, null, null, null, null, null);\n if (featured != null) {\n result.addAll(featured);\n }\n\n List<CloudStackTemplate> sharedExecutable = getApi().listTemplates(\"sharedexecutable\", null, null, null, null, null, null, null);\n if (sharedExecutable != null) {\n result.addAll(sharedExecutable);\n }\n\n List<CloudStackTemplate> community = getApi().listTemplates(\"community\", null, null, null, null, null, null, null);\n if (community != null) {\n result.addAll(community);\n }\n }\n\n if (result != null && result.size() > 0) {\n for (CloudStackTemplate temp : result) {\n EC2Image ec2Image = new EC2Image();\n ec2Image.setId(temp.getId().toString());\n ec2Image.setAccountName(temp.getAccount());\n ec2Image.setName(temp.getName());\n ec2Image.setDescription(temp.getDisplayText());\n ec2Image.setOsTypeId(temp.getOsTypeId().toString());\n ec2Image.setIsPublic(temp.getIsPublic());\n ec2Image.setState(temp.getIsReady() ? \"available\" : \"pending\");\n ec2Image.setDomainId(temp.getDomainId());\n if (temp.getHyperVisor().equalsIgnoreCase(\"xenserver\"))\n ec2Image.setHypervisor(\"xen\");\n else if (temp.getHyperVisor().equalsIgnoreCase(\"ovm\"))\n ec2Image.setHypervisor(\"ovm\"); // valid values for hypervisor is 'ovm' and 'xen'\n else\n ec2Image.setHypervisor(\"\");\n if (temp.getDisplayText() == null)\n ec2Image.setArchitecture(\"\");\n else if (temp.getDisplayText().indexOf(\"x86_64\") != -1)\n ec2Image.setArchitecture(\"x86_64\");\n else if (temp.getDisplayText().indexOf(\"i386\") != -1)\n ec2Image.setArchitecture(\"i386\");\n else\n ec2Image.setArchitecture(\"\");\n List<CloudStackKeyValue> resourceTags = temp.getTags();\n for (CloudStackKeyValue resourceTag : resourceTags) {\n EC2TagKeyValue param = new EC2TagKeyValue();\n param.setKey(resourceTag.getKey());\n if (resourceTag.getValue() != null)\n param.setValue(resourceTag.getValue());\n ec2Image.addResourceTag(param);\n }\n images.addImage(ec2Image);\n }\n }\n return images;\n } catch (Exception e) {\n logger.error(\"List Templates - \", e);\n throw new Exception(e.getMessage() != null ? e.getMessage() : e.toString());\n }\n }",
"java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByHandlerOrBuilderList();",
"public interface ImageMetadataService {\n\n List<ArtistDTO> getArtistsByPrediction(String name, String name2, String surname);\n\n List<ImageTypeDTO> getImageTypesByPrediction(String name);\n\n UploadImageMetadataDTO saveMetadata(UploadImageMetadataDTO uploadImageMetadataDTO);\n\n List<ImageDTO> getTop10Images(String username, String title);\n\n List<ImageDTO> getAllUserImages(String username);\n\n List<ImageDTO> searchImagesByCriteria(SearchImageCriteriaDTO searchImageCriteriaDTO);\n\n ImageDTO updateImageMetadata(ImageDTO imageDTO);\n\n List<ImageDTO> getImagesTop50();\n\n void rateImage(RateImageDTO rateImageDTO);\n\n List<ImageDTO> getAllImages();\n}",
"public static List<PNMedia> discoveryFlickrImages(String[] tags) throws Exception{\r\n\t\tif(tags != null && tags.length > 0){\r\n\t\t\tList<PNMedia> flickrPhotosList = new ArrayList<PNMedia>();\r\n\t\t\t\t\r\n\t\t\tFlickr flickr = new Flickr(flickrApiKey, flickrSharedSecret, new REST());\r\n\t\t\tFlickr.debugStream = false;\r\n\t\t\t\r\n\t\t\tSearchParameters searchParams=new SearchParameters();\r\n\t\t searchParams.setSort(SearchParameters.INTERESTINGNESS_ASC);\r\n\t\t \r\n\t\t searchParams.setTags(tags);\r\n\t\t \r\n\t\t PhotosInterface photosInterface = flickr.getPhotosInterface();\r\n\t\t PhotoList<Photo> photoList = photosInterface.search(searchParams, 10, 1); // quantidade de fotos retornadas (5)\r\n\t\t \r\n\t\t if(photoList != null){\r\n\t\t for(int i=0; i<photoList.size(); i++){\r\n\t\t Photo photo = (Photo)photoList.get(i);\r\n\t\t PNMedia media = new PNMedia();\r\n\t\t \r\n\t\t String description = photo.getDescription();\r\n\t\t if(description == null)\r\n\t\t \t description = photo.getTitle();\r\n\t\t media.setMediaURL(photo.getLargeUrl()); media.setMediaURLAux(photo.getSmallSquareUrl()); media.setMediaCaption(photo.getTitle()); media.setMediaInfo(description);\r\n\t\t flickrPhotosList.add(media);\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t return flickrPhotosList;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tthrow new Exception(\"Null tags or tags is empty. \");\r\n\t\t}\r\n\t}",
"public interface Image {\n /**\n * @return the image ID\n */\n String getId();\n\n /**\n * @return the image ID, or null if not present\n */\n String getParentId();\n\n /**\n * @return Image create timestamp\n */\n long getCreated();\n\n /**\n * @return the image size\n */\n long getSize();\n\n /**\n * @return the image virtual size\n */\n long getVirtualSize();\n\n /**\n * @return the labels assigned to the image\n */\n Map<String, String> getLabels();\n\n /**\n * @return the names associated with the image (formatted as repository:tag)\n */\n List<String> getRepoTags();\n\n /**\n * @return the digests associated with the image (formatted as repository:tag@sha256:digest)\n */\n List<String> getRepoDigests();\n}",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage();",
"public void features() throws MalformedURLException, IOException {\n\t\tMBFImage query = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao01.jpg\"));\n\t\tMBFImage target = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao02.jpg\"));\n\n\t\tDoGSIFTEngine engine = new DoGSIFTEngine();\n\t\tLocalFeatureList<Keypoint> queryKeypoints = engine.findFeatures(query.flatten());\n\t\tLocalFeatureList<Keypoint> targetKeypoints = engine.findFeatures(target.flatten());\n\t\tLocalFeatureMatcher<Keypoint> matcher1 = new BasicMatcher<Keypoint>(80);\n\t\tLocalFeatureMatcher<Keypoint> matcher = new BasicTwoWayMatcher<Keypoint>();\n\t\t/*\n\t\t * matcher.setModelFeatures(queryKeypoints);\n\t\t * matcher.findMatches(targetKeypoints); MBFImage basicMatches =\n\t\t * MatchingUtilities.drawMatches(query, target, matcher.getMatches(),\n\t\t * RGBColour.RED); DisplayUtilities.display(basicMatches);\n\t\t */\n\t\tRobustAffineTransformEstimator modelFitter = new RobustAffineTransformEstimator(5.0, 1500,\n\t\t\t\tnew RANSAC.PercentageInliersStoppingCondition(0.5));\n\t\tmatcher = new ConsistentLocalFeatureMatcher2d<Keypoint>(new FastBasicKeypointMatcher<Keypoint>(8), modelFitter);\n\t\tmatcher.setModelFeatures(queryKeypoints);\n\t\tmatcher.findMatches(targetKeypoints);\n\t\tMBFImage consistentMatches = MatchingUtilities.drawMatches(query, target, matcher.getMatches(), RGBColour.RED);\n\t\tDisplayUtilities.display(consistentMatches);\n\t\ttarget.drawShape(query.getBounds().transform(modelFitter.getModel().getTransform().inverse()), 3,\n\t\t\t\tRGBColour.BLUE);\n\t\t// DisplayUtilities.display(target);\n\t}",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage(\n @QueryMap ListImage queryParameters);",
"private static void updateRelatedImageList(\r\n\t\t\tMap<String, WordImage> relevantWordImages, Photo photo,\r\n\t\t\tMatchingResult surfResult, String word) {\n\r\n\t\tString key = getRelevantKeyForRelevantImages(relevantWordImages, word);\r\n\r\n\t\tif (key != null) {\r\n\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImages().add(info);\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImagesMap()\r\n\t\t\t\t\t.put(info.getId(), info);\r\n\r\n\t\t\trelevantWordImages.get(key).addSimilarImageId(info.getId());\r\n\r\n\t\t}\r\n\r\n\t\telse {\r\n\r\n\t\t\tWordImage wi = new WordImage(word);\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\twi.addSimilarImage(info);\r\n\r\n\t\t\twi.addSimilarImage(photo.getPhotoId(), info);\r\n\r\n\t\t\trelevantWordImages.put(word, wi);\r\n\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic String searchimage(int cbid) throws Exception {\n\t\treturn dao.searchimage(cbid);\r\n\t}",
"public Point findImage(BufferedImage image, int index) {\n int smallWidth = image.getWidth();\n int smallHeight = image.getHeight();\n int[][] smallPixels = new int[smallWidth][smallHeight];\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n smallPixels[x][y] = image.getRGB(x, y);\n }\n }\n boolean good;\n int count = 0;\n for(int X = 0; X <= bigWidth - smallWidth; X++) {\n for(int Y = 0; Y <= bigHeight - smallHeight; Y++) {\n good = true;\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n if(smallPixels[x][y] != bigPixels[X + x][Y + y]) {\n good = false;\n break;\n }\n }\n if(!good) {\n break;\n }\n }\n if(good) {\n if(count == index) {\n return(new Point(X, Y));\n }\n count++;\n }\n }\n }\n return(null);\n }",
"public static String getImageId(WebElement image) {\n String imageUrl = image.getAttribute(\"src\");\n\n int indexComparisonStart = imageUrl.indexOf(START_TOKEN) + START_TOKEN.length();\n int indexComparisonFinish = imageUrl.substring(indexComparisonStart).indexOf(STOP_TOKEN);\n\n return imageUrl.substring(indexComparisonStart, indexComparisonStart + indexComparisonFinish);\n }",
"private void searchImages()\n {\n searchWeb = false;\n search();\n }",
"java.lang.String getHotelImageURLs(int index);",
"public void findBookDetails(AnnotateImageResponse imageResponse) throws IOException {\n\n String google = \"http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=\";\n String search = \"searchString\";\n String charset = \"UTF-8\";\n\n URL url = new URL(google + URLEncoder.encode(search, charset));\n Reader reader = new InputStreamReader(url.openStream(), charset);\n GoogleResults results = new Gson().fromJson(reader, GoogleResults.class);\n\n // Show title and URL of 1st result.\n System.out.println(results.getResponseData().getResults().get(0).getTitle());\n System.out.println(results.getResponseData().getResults().get(0).getUrl());\n }",
"@Override\n\tpublic List<Image> findAllImage() {\n\t\treturn new ImageDaoImpl().findAllImage();\n\t}",
"public interface IImageInputBoundary {\n\n List<ImageResponseModel> GetImagesByCategory(ImageRequestModel requestModel);\n List<ImageResponseModel> GetImagesByComposition(ImageRequestModel requestModel);\n}",
"@Override\n\tpublic List<AddBookDto> findListimage(List<addBookBo> listBo) throws IOException {\n\n\t\tFile uploadFileDir, uploadImageDir;\n\n\t\tFileInputStream fileInputStream = null;\n\n\t\tList<AddBookDto> dtoList = new ArrayList<>();\n\n\t\tSet<Category> setCategory = new HashSet<>();\n\n\t\tSystem.out.println(\"UploadService.findListimage()\");\n\n\t\tfor (addBookBo bo : listBo) {\n\n\t\t\tAddBookDto dto = new AddBookDto();\n\n\t\t\tBeanUtils.copyProperties(bo, dto);\n\n\t\t\tSystem.out.println(\"UploadService.findListimage()-------\" + bo.getAuthor());\n\n\t\t\tuploadImageDir = new File(imageUploadpath + \"/\" + dto.getImageUrl() + \".jpg\");\n\n\t\t\tif (uploadImageDir.exists()) {\n\n\t\t\t\tbyte[] buffer = getBytesFromFile(uploadImageDir);\n\t\t\t\t// System.out.println(bo.getTitle()+\"====b===\" + buffer);\n\t\t\t\tdto.setImgeContent(buffer);\n\n\t\t\t}\n\n\t\t\tSystem.out.println(dto.getTitle() + \"====dto===\" + dto.getImgeContent());\n\t\t\tdtoList.add(dto);\n\n\t\t}\n\n\t\treturn dtoList;\n\t}",
"public Image getImageById(final String imageId)\n {\n GetImageByIdQuery getImageByIdQuery = new GetImageByIdQuery(imageId);\n List<Image> ImageList = super.queryResult(getImageByIdQuery);\n if (CollectionUtils.isEmpty(ImageList) || ImageList.size() > 1)\n {\n LOG.error(\"The Image cannot be found by this id:\" + imageId);\n return null;\n }\n return ImageList.get(0);\n }",
"@Test\n\tpublic void searchImageWithUpload() throws InterruptedException, Exception {\n\n\t\t// To click on Images link\n\t\thomePage.clickSearchByImage();\n\t\t\n\t\t// To verify if ui is navigated to Search by image page\n\t\tAssert.assertTrue(homePage.verifySearchByImageBox());\n\n\t\t// Upload an image from local machine\n\t\tsearchPage.uploadLocalImage(Settings.getLocalImage());\n\t\t// To verify upload status\n\t\tAssert.assertTrue(searchPage.verifyUploadStatus());\n\n\t\t// Find specified image on GUI\n\t\tWebElement webElement = searchPage.navigateToImage(Settings.getVisitRule());\n\n\t\t// Take a snapshot for expected visit page\n\t\tsearchPage.snapshotLastPage(webElement);\n\n\t\t// Download specified image by expected rule\n\t\tString fileName = Settings.getDownloadImage();\n\t\tboolean down = searchPage.downloadImagetoLocal(webElement, fileName);\n\t\tAssert.assertTrue(down);\n\n\t\t// verify two images match or not\n\t\tAssert.assertTrue(searchPage.verifyImageIsSame(Settings.getDownloadImage(), Settings.getLocalImage()));\n\n\t}",
"@Override\n public void onSuccess(Uri uri) {\n if (!ImageListUrl.contains(uri.toString())) {\n ImageListUrl.add(uri.toString());\n\n /// add property if imageurl arraylist same with imagelist arraylist\n if (ImageListUrl.size() == ImageList.size()) {\n Toast.makeText(NewRecipe.this, ImageListUrl.toString(), Toast.LENGTH_SHORT).show();\n\n saveRecipe();\n\n }\n }\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByTransformOrBuilder();",
"public List<Recognition> recognizeImage(Bitmap bitmap) {\n Bitmap croppedBitmap = Bitmap.createScaledBitmap(bitmap, cropSize, cropSize, true);\n// Bitmap croppedBitmap = Bitmap.createBitmap(cropSize, cropSize, Bitmap.Config.ARGB_8888);\n// final Canvas canvas = new Canvas(croppedBitmap);\n// canvas.drawBitmap(bitmap, frameToCropTransform, null);\n final List<Recognition> ret = new LinkedList<>();\n List<Recognition> recognitions = detector.recognizeImage(croppedBitmap);\n// long before=System.currentTimeMillis();\n// for (int k=0; k<100; k++) {\n// recognitions = detector.recognizeImage(croppedBitmap);\n// int a = 0;\n// }\n// long after=System.currentTimeMillis();\n// String log = String.format(\"tensorflow takes %.03f s\\n\", ((float)(after-before)/1000/100));\n// Log.d(\"MATCH TEST\", log);\n for (Recognition r : recognitions) {\n if (r.getConfidence() < minConfidence)\n continue;\n// RectF location = r.getLocation();\n// cropToFrameTransform.mapRect(location);\n// r.setOriginalLoc(location);\n// Bitmap cropped = Bitmap.createBitmap(bitmap, (int)location.left, (int)location.top, (int)location.width(), (int)location.height());\n// r.setObjectImage(cropped);\n BoxPosition bp = r.getLocation();\n// r.rectF = new RectF(bp.getLeft(), bp.getTop(), bp.getRight(), bp.getBottom());\n// cropToFrameTransform.mapRect(r.rectF);\n ret.add(r);\n }\n\n return ret;\n }",
"private static final byte[] xfuzzyload_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, -82,\n\t\t\t\t69, 12, -128, -128, -128, -1, -1, -1, -64, -64, -64, -1, -1, 0,\n\t\t\t\t0, 0, 0, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100, 101,\n\t\t\t\t32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4, 1,\n\t\t\t\t10, 0, 6, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 3, 75, 8, -86,\n\t\t\t\t-42, 11, 45, -82, -24, 32, -83, -42, -80, 43, -39, -26, -35,\n\t\t\t\t22, -116, 1, -9, 24, -127, -96, 10, 101, 23, 44, 2, 49, -56,\n\t\t\t\t108, 21, 15, -53, -84, -105, 74, -86, -25, 50, -62, -117, 68,\n\t\t\t\t44, -54, 74, -87, -107, 82, 21, 40, 8, 81, -73, -96, 78, 86,\n\t\t\t\t24, 53, 82, -46, 108, -77, -27, -53, 78, -85, -111, -18, 116,\n\t\t\t\t87, 8, 23, -49, -123, 4, 0, 59 };\n\t\treturn data;\n\t}",
"public static ArrayList<Result> getCCVBasedSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.CCV));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t\t// create result object\n\t\t\t \tResult result = new Result();\n\t\t\t \tresult.mFilename = imageName;\n\t\t\t \tresult.mSimilarity = intersection;\n\t\t\t \t\n\t\t\t \t// store result\n\t\t\t \trv.add(result);\n\t\t\t\t} catch (Exception ex) {}\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}",
"public Map<String, Photo> createGeoSimilarPhotoList(int maxCycles,\r\n\t\t\tboolean tagReq, boolean techTagReq) {\r\n\r\n\t\tMap<String, Photo> photoList = new HashMap<String, Photo>();\r\n\r\n\t\tpFet.getPanoramioGeoSimilarPhotoList(maxCycles, tagReq, techTagReq,\r\n\t\t\t\tphotoList);\r\n\r\n\t\tint panoPhotoReturend = photoList.size();\r\n\r\n\t\tMap<String, Photo> flickrPhotoList = fFet\r\n\t\t\t\t.getFlickrGeoSimilarPhotoList();\r\n\r\n\t\tint flickrPhotoReturend = flickrPhotoList.size();\r\n\r\n\t\tphotoList.putAll(flickrPhotoList);\r\n\r\n\t\ttotalNumberOfImages = flickrPhotoReturend + panoPhotoReturend;\r\n\r\n\t\treturn photoList;\r\n\t}",
"List<IbeisImage> uploadImages(List<File> images, File pathToTemporaryZipFile) throws\n UnsupportedImageFileTypeException, IOException, MalformedHttpRequestException, UnsuccessfulHttpRequestException;",
"private void loadAndCacheImages(Node node, FileContext cachedImageFilesystem) throws Exception\n {\n String imagePathBase = \"/\" + node.getTypeCode() + \"/\" + node.getNid();\n ImagesReponse imagesReponse = this.queryRemoteApi(ImagesReponse.class, imagePathBase + ImagesReponse.PATH, null);\n if (imagesReponse != null && imagesReponse.getNodes() != null && imagesReponse.getNodes().getNode() != null) {\n for (Image i : imagesReponse.getNodes().getNode()) {\n node.addImage(i);\n\n URI imageUri = UriBuilder.fromUri(Settings.instance().getTpAccessApiBaseUrl())\n .path(BASE_PATH)\n .path(imagePathBase + \"/image/\" + i.getData().mediaObjectId + \"/original\")\n .replaceQueryParam(ACCESS_TOKEN_PARAM, this.getAccessToken())\n .replaceQueryParam(FORMAT_PARAM, FORMAT_JSON)\n .build();\n\n ClientConfig config = new ClientConfig();\n Client httpClient = ClientBuilder.newClient(config);\n Response response = httpClient.target(imageUri).request().get();\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n org.apache.hadoop.fs.Path nodeImages = new org.apache.hadoop.fs.Path(HDFS_CACHE_ROOT_PATH + node.getNid());\n if (!cachedImageFilesystem.util().exists(nodeImages)) {\n cachedImageFilesystem.mkdir(nodeImages, FsPermission.getDirDefault(), true);\n }\n org.apache.hadoop.fs.Path cachedImage = new org.apache.hadoop.fs.Path(nodeImages, i.getData().mediaObjectId);\n i.setCachedUrl(cachedImage.toUri());\n if (!cachedImageFilesystem.util().exists(cachedImage)) {\n try (OutputStream os = cachedImageFilesystem.create(cachedImage, EnumSet.of(CreateFlag.CREATE, CreateFlag.OVERWRITE))) {\n IOUtils.copy(response.readEntity(InputStream.class), os);\n }\n }\n }\n else {\n throw new IOException(\"Error status returned while fetching remote API data;\" + response);\n }\n\n }\n }\n }",
"public static ArrayList<Result> getColorHistogramSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.HISTOGRAM));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t// create result object\n\t\t \tResult result = new Result();\n\t\t \tresult.mFilename = imageName;\n\t\t \tresult.mSimilarity = intersection;\n\t\t \t\n\t\t \t// store result\n\t\t \trv.add(result);\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImagesByHandlerOrBuilder(\n int index);",
"public void compareImageAction() {\n\t\tif (selectedAnimalModel == null) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (selectedAnimalModel.getId() == 0L || isImageChangedFlag) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tAsyncTask asyncTask = new AsyncTask() {\n\t\t\tAnimalModel animal1 = null;\n\t\t\tAnimalModel animal2 = null;\n\t\t\tAnimalModel animal3 = null;\n\n\t\t\t@Override\n\t\t\tprotected void onDone(boolean success) {\n\t\t\t\tif (!success) {\n\t\t\t\t\tshowDialog(ERROR_MESSAGE, \"Cannot compare images.\");\n\t\t\t\t} else {\n\t\t\t\t\tCompareImagesDialog dialog = new CompareImagesDialog(multimediaPanel, selectedAnimalModel, animal1, animal2, animal3);\n\t\t\t\t\tdialog.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected Boolean doInBackground() throws Exception {\n\t\t\t\ttry {\n\t\t\t\t\tArrayList<AnimalModel> models;\n\n\t\t\t\t\tmodels = DataManager.getInstance().getThreeSimilarImages(selectedAnimalModel);\n\n\t\t\t\t\tif (models.size() > 0) {\n\t\t\t\t\t\tanimal1 = models.get(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 1) {\n\t\t\t\t\t\tanimal2 = models.get(1);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 2) {\n\t\t\t\t\t\tanimal3 = models.get(2);\n\t\t\t\t\t}\n\n\t\t\t\t} catch (DataManagerException e1) {\n\t\t\t\t\tLogger.createLog(Logger.ERROR_LOG, e1.getMessage());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tasyncTask.start();\n\n\t}",
"private ArrayList<ImageItem> getData() {\n final ArrayList<ImageItem> imageItems = new ArrayList<>();\n // TypedArray imgs = getResources().obtainTypedArray(R.array.image_ids);\n for (int i = 0; i < f.size(); i++) {\n Bitmap bitmap = imageLoader.loadImageSync(\"file://\" + f.get(i));;\n imageItems.add(new ImageItem(bitmap, \"Image#\" + i));\n }\n return imageItems;\n }",
"static void redactImageFileColoredInfoTypes(String projectId, String inputPath, String outputPath)\n throws IOException {\n try (DlpServiceClient dlp = DlpServiceClient.create()) {\n // Specify the content to be redacted.\n ByteString fileBytes = ByteString.readFrom(new FileInputStream(inputPath));\n ByteContentItem byteItem =\n ByteContentItem.newBuilder().setType(BytesType.IMAGE_JPEG).setData(fileBytes).build();\n\n // Define types of info to redact associate each one with a different color.\n // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types\n ImageRedactionConfig ssnRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"US_SOCIAL_SECURITY_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(.3f).setGreen(.1f).setBlue(.6f).build())\n .build();\n ImageRedactionConfig emailRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"EMAIL_ADDRESS\").build())\n .setRedactionColor(Color.newBuilder().setRed(.5f).setGreen(.5f).setBlue(1).build())\n .build();\n ImageRedactionConfig phoneRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"PHONE_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(1).setGreen(0).setBlue(.6f).build())\n .build();\n\n // Create collection of all redact configurations.\n List<ImageRedactionConfig> imageRedactionConfigs =\n Arrays.asList(ssnRedactionConfig, emailRedactionConfig, phoneRedactionConfig);\n\n // List types of info to search for.\n InspectConfig config =\n InspectConfig.newBuilder()\n .addAllInfoTypes(\n imageRedactionConfigs.stream()\n .map(ImageRedactionConfig::getInfoType)\n .collect(Collectors.toList()))\n .build();\n\n // Construct the Redact request to be sent by the client.\n RedactImageRequest request =\n RedactImageRequest.newBuilder()\n .setParent(LocationName.of(projectId, \"global\").toString())\n .setByteItem(byteItem)\n .addAllImageRedactionConfigs(imageRedactionConfigs)\n .setInspectConfig(config)\n .build();\n\n // Use the client to send the API request.\n RedactImageResponse response = dlp.redactImage(request);\n\n // Parse the response and process results.\n FileOutputStream redacted = new FileOutputStream(outputPath);\n redacted.write(response.getRedactedImage().toByteArray());\n redacted.close();\n System.out.println(\"Redacted image written to \" + outputPath);\n }\n }",
"@GET\n @Path(\"image\")\n @Produces(MediaType.TEXT_PLAIN)\n public Response voidImage() {\n return Response.status(Response.Status.NOT_FOUND).build();\n }",
"public List<Image> parseBestOfImagesResult(Document doc) {\n\n ArrayList<Image> bestOfImages = new ArrayList<>();\n Elements htmlImages = doc.select(CSS_BEST_OF_IMAGE_QUERY);\n Timber.i(\"Best OfImages: %s\", htmlImages.toString());\n String href;\n Image bestOfImage;\n for (Element image : htmlImages) {\n href = image.attr(\"src\");\n Timber.i(\"Image src: %s\", href);\n bestOfImage = new Image(href);\n bestOfImages.add(bestOfImage);\n }\n return bestOfImages;\n }",
"public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }",
"public Observable<MatchResponseInner> matchMethodAsync(String listId, Boolean cacheImage) {\n return matchMethodWithServiceResponseAsync(listId, cacheImage).map(new Func1<ServiceResponse<MatchResponseInner>, MatchResponseInner>() {\n @Override\n public MatchResponseInner call(ServiceResponse<MatchResponseInner> response) {\n return response.body();\n }\n });\n }",
"public Observable<ServiceResponse<MatchResponseInner>> matchFileInputWithServiceResponseAsync(byte[] imageStream, String listId, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n if (imageStream == null) {\n throw new IllegalArgumentException(\"Parameter imageStream is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n RequestBody imageStreamConverted = RequestBody.create(MediaType.parse(\"image/gif\"), imageStream);\n return service.matchFileInput(listId, cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {\n @Override\n public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<MatchResponseInner> clientResponse = matchFileInputDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }",
"public ImageFiles() {\n\t\tthis.listOne = new ArrayList<String>();\n\t\tthis.listTwo = new ArrayList<String>();\n\t\tthis.listThree = new ArrayList<String>();\n\t\tthis.seenImages = new ArrayList<String>();\n\t\tthis.unseenImages = new ArrayList<String>();\n\t}",
"public interface SearchService {\n List<String> siftSearch(MultipartFile image) throws IOException;\n}",
"@ApiModelProperty(value = \"An image to give an indication of what to expect when renting this vehicle.\")\n public List<Image> getImages() {\n return images;\n }",
"private void getImagesFromDatabase() {\n try {\n mCursor = mDbAccess.getPuzzleImages();\n\n if (mCursor.moveToNext()) {\n for (int i = 0; i < mCursor.getCount(); i++) {\n String imagetitle = mCursor.getString(mCursor.getColumnIndex(\"imagetitle\"));\n String imageurl = mCursor.getString(mCursor.getColumnIndex(\"imageurl\"));\n mImageModel.add(new CustomImageModel(imagetitle, imageurl));\n mCursor.moveToNext();\n }\n } else {\n Toast.makeText(getActivity(), \"databse not created...\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }",
"public yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesResponse list(yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListMethod(), getCallOptions(), request);\n }",
"public boolean displayedDepartmentEmployeeImageMatch(List<String> names, List<String> images) {\n List<String> nonMatchingRecords = new ArrayList<>();\n for (int i = 0; i < names.size(); i++) {\n\n String imageSource = images.get(i).toLowerCase();\n String imageFileName = createImageName(names.get(i).toLowerCase());\n\n if (!imageSource.contains(imageFileName)) {\n nonMatchingRecords.add(names.get(i));\n }\n }\n if (nonMatchingRecords.size() > 0) {\n Reporter.log(\"FAILURE: Names of employees with non matching images\" +\n \" or inconsistently named imageFiles: \" +\n Arrays.toString(nonMatchingRecords.toArray()), true);\n return false;\n }\n return true;\n }",
"public Detections recognizeImage(Image image, int rotation) {\n\n Bitmap rgbFrameBitmap = Transform.convertYUVtoRGB(image);\n\n\n if (image.getFormat() != ImageFormat.YUV_420_888) {\n // unsupported image format\n Logger.addln(\"\\nWARN YoloHTTP.recognizeImage() unsupported image format\");\n return new Detections();\n }\n //return recognize(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkMaxAreaRectangle(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkNineBoxes(Transform.yuvBytes(image), image.getWidth(),image.getHeight(),rotation, rgbFrameBitmap,image.getHeight()/3,image.getWidth()/3,image.getHeight()/3,image.getWidth()/3);\n //return frameworkQuadrant(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n return frameworkMaxAreaRectBD(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n\n }",
"public List<Recognition> recognizeImage(Mat img) {\n frameToCropTransform =\n ImageUtil.getTransformationMatrix(\n img.cols(), img.rows(),\n cropSize, cropSize,\n 0, MAINTAIN_ASPECT);\n cropToFrameTransform = new Matrix();\n frameToCropTransform.invert(cropToFrameTransform);\n Bitmap tBM = Bitmap.createBitmap(img.cols(), img.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(img, tBM);\n return recognizeImage(tBM);\n }",
"public BufferedImage GetImage(String name) { return ImageList.get(name); }",
"public static Long getAValidImageId() {\n\t\tLong id = getAId();\n\t\tif (id == null) {\n\n\t\t\tImage img = new Image(\"http://dummy.com/img.jpg\", (long)(Math.random()*10000), \"Description\", \"keyword\", new Date(0001L));\n\t\t\tIImageStore imageStore = StoreFactory.getImageStore();\n\t\t\timageStore.insert(img);\n\n\t\t\tid = getAId();\n\t\t\tif (id == null) {\n\t\t\t\tthrow new RuntimeException(\"There are no images in DB, and I can't insert one. Cannot run tests without.\");\n\t\t\t}\n\t\t}\n\t\treturn id;\n\t}",
"public void setImage(int imageId) {\n this.imageId=imageId;\n\t}",
"public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}",
"@GetMapping(path = \"/images\", produces = \"application/json; charset=UTF-8\")\n public @ResponseBody ArrayNode getImageList() {\n final ArrayNode nodes = mapper.createArrayNode();\n for (final Image image : imageRepository.findAllPublic())\n try {\n nodes.add(mapper.readTree(image.toString()));\n } catch (final JsonProcessingException e) {\n e.printStackTrace();\n }\n return nodes;\n }",
"String getItemImage();",
"java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByTransformOrBuilderList();",
"protected abstract void setupImages(Context context);",
"private int getPetImages() {\n int nUserPets = user.getPets().size();\n Drawable defaultDrawable = getResources().getDrawable(R.drawable.single_paw, null);\n Bitmap defaultBitmap = ((BitmapDrawable) defaultDrawable).getBitmap();\n countImagesNotFound = new int[nUserPets];\n Arrays.fill(countImagesNotFound, 0);\n\n ExecutorService executorService = Executors.newCachedThreadPool();\n startRunnable(nUserPets, executorService);\n executorService.shutdown();\n\n try {\n executorService.awaitTermination(3, TimeUnit.MINUTES);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return calculateImagesNotFound();\n }"
]
| [
"0.62700015",
"0.58897376",
"0.5767267",
"0.5759937",
"0.5743681",
"0.57321453",
"0.55112725",
"0.5501859",
"0.5500844",
"0.54522055",
"0.5323158",
"0.5255359",
"0.52542335",
"0.5196973",
"0.51814985",
"0.5180431",
"0.516952",
"0.5143571",
"0.5131655",
"0.5131056",
"0.51222026",
"0.51161176",
"0.50863135",
"0.50668687",
"0.5053183",
"0.5051782",
"0.50310975",
"0.50234324",
"0.5018788",
"0.5018751",
"0.50172436",
"0.49925357",
"0.49807724",
"0.4977542",
"0.49756175",
"0.49622637",
"0.49485126",
"0.49309447",
"0.49194676",
"0.49088565",
"0.49056503",
"0.49016201",
"0.49000394",
"0.4871608",
"0.48693073",
"0.48682657",
"0.4865315",
"0.4833981",
"0.48248002",
"0.4823654",
"0.48128608",
"0.4810085",
"0.47964203",
"0.47879833",
"0.47818094",
"0.47782964",
"0.47692186",
"0.47654974",
"0.47645363",
"0.47632653",
"0.4756919",
"0.47567043",
"0.47522405",
"0.47427997",
"0.47408277",
"0.47404814",
"0.47400996",
"0.47369072",
"0.47319108",
"0.47309214",
"0.47217515",
"0.4717419",
"0.471051",
"0.47084787",
"0.47084174",
"0.47079793",
"0.47001338",
"0.46950126",
"0.4687811",
"0.4677505",
"0.46661595",
"0.46644562",
"0.46642357",
"0.46638915",
"0.4662026",
"0.46470895",
"0.4643862",
"0.4643047",
"0.46386835",
"0.46365866",
"0.46335912",
"0.46299112",
"0.46289173",
"0.46215016",
"0.46199617",
"0.4615459",
"0.46071243",
"0.4604053",
"0.46024016",
"0.45984784",
"0.45841998"
]
| 0.0 | -1 |
Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using this API. Returns ID and tags of matching image. Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. | public Observable<ServiceResponse<MatchResponseInner>> matchFileInputWithServiceResponseAsync(byte[] imageStream, String listId, Boolean cacheImage) {
if (this.client.baseUrl() == null) {
throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null.");
}
if (imageStream == null) {
throw new IllegalArgumentException("Parameter imageStream is required and cannot be null.");
}
String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl());
RequestBody imageStreamConverted = RequestBody.create(MediaType.parse("image/gif"), imageStream);
return service.matchFileInput(listId, cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {
@Override
public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<MatchResponseInner> clientResponse = matchFileInputDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int match(ArrayList<ImageCell> images);",
"ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);",
"private void searchImage(String text){\n\n // Set toolbar title as query string\n toolbar.setTitle(text);\n\n Map<String, String> options = setSearchOptions(text, Constants.NEW_SEARCH);\n Call<SearchResponse> call = service.searchPhoto(options);\n\n call.enqueue(new Callback<SearchResponse>() {\n @Override\n public void onResponse(Response<SearchResponse> response, Retrofit retrofit) {\n SearchResponse result = response.body();\n if (result.getStat().equals(\"ok\")) {\n // Status is ok, add result to photo list\n if (photoList != null) {\n photoList.clear();\n photoList.addAll(result.getPhotos().getPhoto());\n imageAdapter.notifyDataSetChanged();\n pageCount = 2;\n }\n\n } else {\n // Display error if something wrong with result\n Toast.makeText(context, result.getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Display error here since request failed\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }\n });\n }",
"@ApiOperation(value = \"Return images matching supplied digest found in supplied repository\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in supplied repository with supplied digest\") })\n\t// Pass in digest only in specific registry, get images and tags back that match\n\t@RequestMapping(path = \"/{registry}/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAndRegistry(@PathVariable String registry,\n\t\t\t@PathVariable String id) {\n\t\tRegistryConnection localConnection;\n\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\ttry {\n\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(registry));\n\n\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t// Get all tags from specific repo\n\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\timage.setRegistryName(registry);\n\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\timages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Iterate through images and only add to new list, what digests are identical\n\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\tfor (DockerImageData image : images) {\n\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from \" + registry + \" matching image id \" + id,\n\t\t\t\t\tmatchingImages);\n\t\t} catch (RegistryNotFoundException e) {\n\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\"Failed to find Registry\");\n\t\t}\n\t}",
"public List<Result> recognize(IplImage image);",
"@SuppressWarnings({ \"unchecked\", \"null\" })\n public List<String> calcSimilarity(String imgPath) {\n\n FileInputStream imageFile;\n double minDistance = Double.MAX_VALUE;\n\n // 返回查询结果\n List<String> matchUrls = new ArrayList<String>();\n\n\n try {\n\n imageFile = new FileInputStream(imgPath);\n BufferedImage bufferImage;\n\n bufferImage = ImageIO.read(imageFile);\n LTxXORP.setRotaIvaPats();//设定旋转模式值\n\n //得到图片的纹理一维数组特征向量(各颜色分量频率(统计量))\n double[] lbpSourceFecture = LTxXORP.getLBPFeature(imgPath);\n\n // 提取数据库数据\n List<Object> list = DBHelper.fetchALLCloth();\n\n // long startTime = System.currentTimeMillis();\n\n // 把每个条数据的路径和最短距离特征提取出来并存储在lbpResultMap的键值对中。\n Map<String, Double> lbpResultMap = new HashMap<String, Double>();\n\n for (int i = 0; i < list.size(); i++) {\n\n Map<String, Object> map = (Map<String, Object>) list.get(i);\n\n Object candidatePath = map.get(\"path\");\n Object candidateLBP = map.get(\"lbpFeature\");\n\n // 从快速搜索中选取TOP N结果,继续进行纹理特征匹配\n //获取当前由颜色匹配相似度排序的结果并提取其LBP纹理特征\n\n double[] lbpTargetFeature = MatchUtil.jsonToArr((String) candidateLBP);\n double lbpDistance = textureStrategy.similarity(lbpTargetFeature, lbpSourceFecture);\n lbpResultMap.put((String) candidatePath, lbpDistance);\n\n // 判断衡量标准选取距离还是相似度\n if (lbpDistance < minDistance)\n minDistance = lbpDistance;\n\n }\n\n Map<String, Double> tempResultMap;\n\n System.out.println(\"Min Distance : \" + (float) minDistance);\n\n\n\n System.out.println(\"============== finish Texture =================\");\n\n Map<String, Double> finalResult = MatchUtil.sortByValueAsc(lbpResultMap);\n\n int counter = 0;\n for (Map.Entry<String, Double> map : finalResult.entrySet()) {\n if (counter >= Config.finalResultNumber)\n break;\n //matchUrls截取只存储finalResultNumber数量的查询结果\n matchUrls.add(map.getKey());\n counter ++;\n double TSimilarity=Math.pow(Math.E,-map.getValue());\n System.out.println(TSimilarity + \" 图片路径 \" + map.getKey());\n\n }\n\n System.out.println();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return matchUrls;\n }",
"public interface ImageSearchService {\n\n /**\n * Register an image into the search instance.\n *\n * @param imageData Image data in JPEG or PNG format.\n * @param imageType Image format.\n * @param uuid Unique identifier of the image.\n */\n void register(byte[] imageData, ObjectImageType imageType, String uuid);\n\n /**\n * Un-register an image from the search instance.\n *\n * @param uuid Unique identifier of the image.\n */\n void unregister(String uuid);\n\n /**\n * Find all images similar to the given one.\n *\n * @param imageData Image to match with registered ones in the search instance.\n * @param objectRegion object region to search.\n * @return Found images UUIDs and raw response.\n */\n ImageSearchResponse findAllBySimilarImage(byte[] imageData, ImageRegion objectRegion);\n\n /**\n * Check the image search configuration is correct by making a fake search request.\n *\n * @param configuration Configuration to check.\n */\n void checkImageSearchConfiguration(Configuration configuration) throws InvalidConfigurationException;\n}",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByHandler(int index);",
"@ApiOperation(value = \"Return all images matching supplied digest in all configured registries\", response = DockerImageDataListResponse.class, produces = \"application/json\")\n\t@ApiResponses(value = { @ApiResponse(code = 200, message = \"Successfully retrieved matching objects\"),\n\t\t\t@ApiResponse(code = 400, message = \"Matched images not found in configured registries with supplied digest\") })\n\t// Pass in only digest, get images and tags back that much from all repos\n\t@RequestMapping(path = \"/registries/{id}/matches\", method = RequestMethod.GET)\n\tpublic @ResponseBody DockerImageDataListResponse getMatchingImagesFromIDAllRegistries(@PathVariable String id) {\n\t\t\t\tRegistryConnection localConnection;\n\t\t\t\t// List persists outside all registries\n\t\t\t\tList<DockerImageData> images = new LinkedList<DockerImageData>();\n\t\t\t\tList<RegistryItem> items = configs.getItems();\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\t// For each configured registry\n\t\t\t\t\tfor(RegistryItem item : items) {\n\t\t\t\t\t\t// Get connection to registry\n\t\t\t\t\t\tlocalConnection = new RegistryConnection(configs.getURLFromName(item.getRegistryLabel()));\n\t\t\t\t\t\t\n\t\t\t\t\t\tRegistryCatalog repos = localConnection.getRegistryCatalog();\n\t\t\t\t\t\t// Iterate over repos to build out DockerImageData objects\n\t\t\t\t\t\tfor (String repo : repos.getRepositories()) {\n\t\t\t\t\t\t\t// Get all tags from specific repo\n\t\t\t\t\t\t\tImageTags tags = localConnection.getTagsByRepoName(repo);\n\n\t\t\t\t\t\t\t// For each tag, get the digest and create the object based on looping values\n\t\t\t\t\t\t\tfor (String tag : tags.getTags()) {\n\t\t\t\t\t\t\t\tDockerImageData image = new DockerImageData();\n\t\t\t\t\t\t\t\timage.setRegistryName(item.getRegistryLabel());\n\t\t\t\t\t\t\t\timage.setImageName(repo);\n\t\t\t\t\t\t\t\timage.setTag(tag);\n\t\t\t\t\t\t\t\timage.setDigest(new ImageDigest(localConnection.getImageID(repo, tag)));\n\t\t\t\t\t\t\t\timages.add(image);\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// Iterate through images and only add to new list, what digests are identical\n\t\t\t\t\tList<DockerImageData> matchingImages = new LinkedList<DockerImageData>();\n\t\t\t\t\tfor (DockerImageData image : images) {\n\t\t\t\t\t\tif (image.getDigest().getContents().equals(id)) {\n\t\t\t\t\t\t\tmatchingImages.add(image);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_OK,\n\t\t\t\t\t\t\t\"Successfully pulled all matching image:tag pairs from all configured registries \",\n\t\t\t\t\t\t\tmatchingImages);\n\t\t\t\t} catch (RegistryNotFoundException e) {\n\t\t\t\t\treturn new DockerImageDataListResponse(HttpServletResponse.SC_BAD_REQUEST,\n\t\t\t\t\t\t\t\"Failed to find Registry\");\n\t\t\t\t}\n\t}",
"Receta getByIdWithImages(long id);",
"public int displayRandomImage() {\n\n int randomImageIndex;\n\n do\n { // making sure that the same images aren't repeated & images of the same car makes aren't shown together\n\n randomCarMake = allCarMakes[getRandomBreed()]; // get a random breed\n randomImageIndex = getRandomImage(); // get a random image of a particular breed\n\n randomImageOfChosenCarMake = displayRelevantImage(randomCarMake, randomImageIndex);\n\n } while (displayingCarMakes.contains(randomCarMake) || allDisplayedImages.contains(randomImageOfChosenCarMake));\n\n allDisplayedImages.add(randomImageOfChosenCarMake); // to make sure that the image isn't repeated\n displayingCarMakes.add(randomCarMake); // to make sure that images of the same breed aren't shown at once\n displayingImageIndexes.add(randomImageIndex); // to recall indexes when the device is rotated\n\n // return chosen random image\n return getResources().getIdentifier(randomImageOfChosenCarMake, \"drawable\", \"com.example.car_match_game_app\");\n }",
"@GET\n @Path(\"{factoryId}/image\")\n @Produces(\"image/*\")\n public Response getImage(@PathParam(\"factoryId\") String factoryId, @DefaultValue(\"\") @QueryParam(\"imgId\") String imageId)\n throws FactoryUrlException {\n Set<FactoryImage> factoryImages = factoryStore.getFactoryImages(factoryId, null);\n if (factoryImages == null) {\n LOG.warn(\"Factory URL with id {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Factory URL with id \" + factoryId + \" is not found.\");\n }\n if (imageId.isEmpty()) {\n if (factoryImages.size() > 0) {\n FactoryImage image = factoryImages.iterator().next();\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n } else {\n LOG.warn(\"Default image for factory {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(),\n \"Default image for factory \" + factoryId + \" is not found.\");\n }\n } else {\n for (FactoryImage image : factoryImages) {\n if (image.getName().equals(imageId)) {\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n }\n }\n }\n LOG.warn(\"Image with id {} is not found.\", imageId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Image with id \" + imageId + \" is not found.\");\n }",
"public void findGeoSurfSimilarPhotosWithTagStatistics(\r\n\t\t\tfinal Set<String> allCandidateWords,\r\n\t\t\tfinal Map<String, WordImage> relevantWordImages, boolean tagReq,\r\n\t\t\tboolean techTagReq, boolean compact) {\r\n\r\n\t\ttopImagesURLs = new HashMap<String, Double>();\r\n\t\ttopImagesNames = new HashMap<String, String>();\r\n\t\t// The list of all Photo objects\r\n\t\tphotoList = new HashMap<String, Photo>();\r\n\t\tphotoList = createGeoSimilarPhotoList(PANORAMIO_DEFUALT_NUM_ITERATIONS, tagReq,\r\n\t\t\t\ttechTagReq);\r\n\r\n\t\t// Word Image Relevance Dictionary\r\n\t\t// The statistics consider for each word the set of images annotated\r\n\t\t// with them and similar\r\n\t\t// to the input image and the those which are tagged with it and not\r\n\t\t// similar to the input image\r\n\t\t// Map<String, WordImage> relevantWordImages = new HashMap<String,\r\n\t\t// WordImage>();\r\n\r\n\t\t// Prepare the result output\r\n\r\n\t\tif (!compact) {\r\n\t\t\toutRel.println(\"Image URL , Score , Distance , Point Similarity, Common Keypoints , Iter Point Similariy, Title , Tags , distance, userid\");\r\n\t\t\t// An CSV file for the set of visually irrelevant images\r\n\t\t\toutIrrRel.println(\"Image URL , Title , Tags , distance, userid\");\r\n\t\t}\r\n\r\n\t\t// *** Extract SURF feature for the input image\r\n\r\n\t\tSurfMatcher surfMatcher = new SurfMatcher();\r\n\t\t// The SURF feature of the input image\r\n\t\tList<InterestPoint> ipts1 = surfMatcher.extractKeypoints(inputImageURL,\r\n\t\t\t\tsurfMatcher.p1);\r\n\r\n\t\t// inputImageInterstPoints = ipts1 ;\r\n\r\n\t\t// Add the photo with its interestpoint to the cache\r\n\t\t// this.photoInterestPoints.put(imageName, ipts1);\r\n\r\n\t\t// Find SURF correspondences in the geo-related images\r\n\t\ttotalNumberOfSimilarImages = 0; // R\r\n\r\n\t\tfor (String photoId : photoList.keySet()) {\r\n\r\n\t\t\tPhoto photo = photoList.get(photoId);\r\n\r\n\t\r\n\r\n\t\t\tString toMatchedPhotoURL = photo.getPhotoFileUrl();\r\n\t\t\t// The SURF feature of a geo close image\r\n\t\t\tList<InterestPoint> ipts2 = surfMatcher.extractKeypoints(\r\n\t\t\t\t\ttoMatchedPhotoURL, surfMatcher.p2);\r\n\r\n\t\t\t// this.photoInterestPoints.put(photo.getPhotoId(), ipts2);\r\n\t\t\t// this.cachedImageInterstPoint.put(photo.getPhotoId(), ipts2);\r\n\r\n\t\t\tMatchingResult surfResult = null;\r\n\r\n\t\t\tsurfResult = surfMatcher.matchKeypoints(inputImageURL, photoId,\r\n\t\t\t\t\tipts1, ipts2, MIN_COMMON_IP_COUNT);\r\n\r\n\t\t\tif (surfResult != null) { // the images are visually similar\r\n\r\n\t\t\t\ttopImagesURLs.put(toMatchedPhotoURL,\r\n\t\t\t\t\t\tsurfResult.getPiontSimilarity());\r\n\r\n\t\t\t\ttopImagesNames.put(toMatchedPhotoURL, photo.getPhotoId());\r\n\r\n\t\t\t\ttotalNumberOfSimilarImages += 1;\r\n\t\t\t\tif (!compact) {\r\n\r\n\t\t\t\t\toutRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getScore()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getAvgDistance()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getPiontSimilarity()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ surfResult.getCommonKeyPointsCount()\r\n\t\t\t\t\t\t\t+ \",\"\r\n\t\t\t\t\t\t\t+ \"null ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\tSystem.out.println(\"Downloading Similar Image\");\r\n\t\t\t\t\tString destFileName = similarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Generate Word Statistics\r\n\t\t\t\t// For the a certain word (tag) add image info to its list if\r\n\t\t\t\t// this image\r\n\t\t\t\t// is visually similar to the input image\r\n\t\t\t\tupdateWordRelatedImageList(allCandidateWords,\r\n\t\t\t\t\t\trelevantWordImages, photo, surfResult);\r\n\t\t\t} else {\r\n\r\n\t\t\t\tif (!compact) {\r\n\t\t\t\t\t// Images are visually not similar\r\n\t\t\t\t\toutIrrRel.println(photo.getPhotoUrl()\r\n\t\t\t\t\t\t\t+ \" ,\"\r\n\t\t\t\t\t\t\t+ photo.getPhotoTitle().toString()\r\n\t\t\t\t\t\t\t\t\t.replace(\",\", \" \") + \",\"\r\n\t\t\t\t\t\t\t+ photo.getTags().toString().replace(\",\", \" ; \")\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t// We also need to get some information if a certain word is\r\n\t\t\t\t\t// also used by visually not similar images\r\n\t\t\t\t\tSystem.out.println(\"Downloading Non Similar Image\");\r\n\t\t\t\t\tString destFileName = dissimilarImagesDir + \"/\" + photoId\r\n\t\t\t\t\t\t\t+ \".jpg\";\r\n\t\t\t\t\tImageUtil.downloadImage(photo.getPhotoFileUrl(), destFileName);\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tupdateWordNotRelatedImageList(relevantWordImages, photo);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByHandlerList();",
"@GET(\"/tags/{query}/media/recent\" + CLIENT_ID)\n public void searchPhotos(@Path(\"query\") String query, Callback<WebResponse<ArrayList<InstagramPhoto>>> callback);",
"List<Bitmap> getFavoriteRecipeImgs();",
"private void processImages() throws MalformedURLException, IOException {\r\n\r\n\t\tNodeFilter imageFilter = new NodeClassFilter(ImageTag.class);\r\n\t\timageList = fullList.extractAllNodesThatMatch(imageFilter, true);\r\n\t\tthePageImages = new HashMap<String, byte[]>();\r\n\r\n\t\tfor (SimpleNodeIterator nodeIter = imageList.elements(); nodeIter\r\n\t\t\t\t.hasMoreNodes();) {\r\n\t\t\tImageTag tempNode = (ImageTag) nodeIter.nextNode();\r\n\t\t\tString tagText = tempNode.getText();\r\n\r\n\t\t\t// Populate imageUrlText String\r\n\t\t\tString imageUrlText = tempNode.getImageURL();\r\n\r\n\t\t\tif (imageUrlText != \"\") {\r\n\t\t\t\t// Print to console, to verify relative link processing\r\n\t\t\t\tSystem.out.println(\"ImageUrl to Retrieve:\" + imageUrlText);\r\n\r\n\t\t\t\tbyte[] imgArray = downloadBinaryData(imageUrlText);\r\n\r\n\t\t\t\tthePageImages.put(tagText, imgArray);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"@Override\n public FlickrResponse searchPhoto(String tags) throws IOException {\n return flickrService.searchPhoto(tags);\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImagesByTransform(int index);",
"public void getImageResults(String tag){\n showProgressBar(true);\n HttpClient.get(\"rest/\", getRequestParams(tag), new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n String response = new String(responseBody, StandardCharsets.UTF_8);\n response = StringUtils.replace(response, \"jsonFlickrApi(\", \"\");\n response = StringUtils.removeEnd(response, \")\");\n Log.d(\"SERVICE RESPONSE\", response);\n Gson gson = new Gson();\n FlickrSearchResponse jsonResponse = gson.fromJson(response, FlickrSearchResponse.class);\n if(jsonResponse.getStat().equals(\"fail\")){\n //api returned an error\n searchHelperListener.onErrorResponseReceived(jsonResponse.getMessage());\n } else {\n //api returned data\n searchHelperListener.onSuccessResponseReceived(jsonResponse);\n }\n showProgressBar(false);\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n Log.d(\"SERVICE FAILURE\", error.getMessage());\n searchHelperListener.onErrorResponseReceived(error.getMessage());\n showProgressBar(false);\n }\n });\n\n }",
"public EC2DescribeImagesResponse describeImages(EC2DescribeImages request) {\n EC2DescribeImagesResponse images = new EC2DescribeImagesResponse();\n try {\n String[] templateIds = request.getImageSet();\n EC2ImageFilterSet ifs = request.getFilterSet();\n\n if (templateIds.length == 0) {\n images = listTemplates(null, images);\n } else {\n for (String s : templateIds) {\n images = listTemplates(s, images);\n }\n }\n if (ifs != null)\n return ifs.evaluate(images);\n } catch (Exception e) {\n logger.error(\"EC2 DescribeImages - \", e);\n handleException(e);\n }\n return images;\n }",
"GetImagesResult getImages(GetImagesRequest getImagesRequest);",
"int seachImage(Image img) {\r\n\t\treturn 1;\r\n\t}",
"public void searchImages(View view) {\n imageList.clear();\n adapter.clear();\n Log.d(\"DEBUG\", \"Search Images\");\n\n AsyncHttpClient client = new AsyncHttpClient();\n\n Log.d(\"DEBUG\", getUrl(1).toString());\n retrieveImages(getUrl(1).toString());\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();",
"java.util.List<com.yahoo.xpathproto.TransformTestProtos.ContentImage> \n getImagesByTransformList();",
"com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform();",
"FetchedImage getFujimiyaUrl(String query,int maxRankOfResult){\n try{\n //Get SearchResult\n Search search = getSearchResult(query, maxRankOfResult);\n List<Result> items = search.getItems();\n for(Result result: items){\n int i = items.indexOf(result);\n logger.log(Level.INFO,\"query: \" + query + \" URL: \"+result.getLink());\n logger.log(Level.INFO,\"page URL: \"+result.getImage().getContextLink());\n if(result.getImage().getWidth()+result.getImage().getHeight()<600){\n logger.log(Level.INFO,\"Result No.\"+i+\" is too small image. next.\");\n continue;\n }\n if(DBConnection.isInBlackList(result.getLink())){\n logger.log(Level.INFO,\"Result No.\"+i+\" is included in the blacklist. next.\");\n continue;\n }\n HttpURLConnection connection = (HttpURLConnection)(new URL(result.getLink())).openConnection();\n connection.setRequestMethod(\"GET\");\n connection.setInstanceFollowRedirects(false);\n connection.connect();\n if(connection.getResponseCode()==200){\n return new FetchedImage(connection.getInputStream(),result.getLink());\n }else{\n logger.log(Level.INFO,\"Result No.\"+i+\" occurs error while fetching the image. next.\");\n continue;\n }\n }\n //If execution comes here, connection has failed 10 times.\n throw new ConnectException(\"Connection failed 10 times\");\n\n } catch (IOException e) {\n // TODO Auto-generated catch block\n logger.log(Level.SEVERE,e.toString());\n e.printStackTrace();\n }\n return null;\n}",
"@Override\n\tpublic String imageSearch(QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(IData.URL_SEARCH + param.toString());\n\t}",
"void loadImages(int id_image, HouseRepository.GetImageFromHouseCallback callback);",
"private void onImagePicked(@NonNull final byte[] imageBytes) {\n setBusy(true);\n\n // Make sure we don't show a list of old concepts while the image is being uploaded\n adapter.setData(Collections.<Concept>emptyList());\n\n new AsyncTask<Void, Void, ClarifaiResponse<List<ClarifaiOutput<Concept>>>>() {\n @Override protected ClarifaiResponse<List<ClarifaiOutput<Concept>>> doInBackground(Void... params) {\n // The default Clarifai model that identifies concepts in images\n final ConceptModel generalModel = App.get().clarifaiClient().getDefaultModels().foodModel();\n\n // Use this model to predict, with the image that the user just selected as the input\n return generalModel.predict()\n .withInputs(ClarifaiInput.forImage(ClarifaiImage.of(imageBytes)))\n .executeSync();\n }\n\n @Override protected void onPostExecute(ClarifaiResponse<List<ClarifaiOutput<Concept>>> response) {\n setBusy(false);\n if (!response.isSuccessful()) {\n showErrorSnackbar(R.string.error_while_contacting_api);\n return;\n }\n final List<ClarifaiOutput<Concept>> predictions = response.get();\n if (predictions.isEmpty()) {\n showErrorSnackbar(R.string.no_results_from_api);\n return;\n }\n adapter.setData(predictions.get(0).data());\n\n // INSERT METHOD FOR USER SELECTION OF FOOD\n\n // ADDED FOR DATABASE\n try {\n readCSVToMap(\"ABBREV_2.txt\");\n }\n catch (Exception e){\n Log.d(\"Failure\", \"CSV not read into database\");\n }\n String exampleResult = predictions.get(0).data().get(0).name();\n final List<String> list = listOfKeys(exampleResult);\n\n // change this line to take in user input\n final String key2 = list.get(0); // arbitrary selection of key\n\n final List<String> val = db.get(key2);\n final String message = String.valueOf(val.get(6)); //index 6 contains carb info\n Log.d(\"Output\", message);\n imageView.setImageBitmap(BitmapFactory.decodeByteArray(imageBytes, 0, imageBytes.length));\n }\n\n private void showErrorSnackbar(@StringRes int errorString) {\n Snackbar.make(\n root,\n errorString,\n Snackbar.LENGTH_INDEFINITE\n ).show();\n }\n }.execute();\n }",
"private void imageSearch(ArrayList<Html> src) {\n // loop through the Html objects\n for(Html page : src) {\n\n // Temp List for improved readability\n ArrayList<Image> images = page.getImages();\n\n // loop through the corresponding images\n for(Image i : images) {\n if(i.getName().equals(this.fileName)) {\n this.numPagesDisplayed++;\n this.pageList.add(page.getLocalPath());\n }\n }\n }\n }",
"@Override\n\tpublic String imageLists(String url, QueryBean param) throws IOException {\n\t\treturn new HttpUtil().getHttp(url + param.toString());\n\t}",
"@Override\n\tpublic List<PersonalisationMediaModel> getImageByID(final String imageID)\n\t{\n\t\tfinal String query1 = \"Select {pk} from {PersonalisationMedia} Where {code}=?imageId and {user}=?user\";\n\t\t/**\n\t\t * select distinct {val:pk} from {PersonalisationMediaModel as val join MediaModel as media on\n\t\t * {media:PK}={val.image} join User as user on {user:pk}={val:user} and {media:code}=?imageId and {user:pk}=?user}\n\t\t */\n\t\tfinal UserModel user = getUserService().getCurrentUser();\n\t\tfinal FlexibleSearchQuery fQuery = new FlexibleSearchQuery(query1);\n\t\tfinal Map<String, Object> params = new HashMap<>();\n\t\tparams.put(\"imageId\", imageID);\n\t\tparams.put(\"user\", user);\n\t\tfQuery.addQueryParameters(params);\n\t\tLOG.info(\"getImageByID\" + fQuery);\n\t\tfinal SearchResult<PersonalisationMediaModel> searchResult = flexibleSearchService.search(fQuery);\n\t\treturn searchResult.getResult();\n\t}",
"public void findImages() {\n \t\tthis.mNoteItemModel.findImages(this.mNoteItemModel.getContent());\n \t}",
"public void notifyFinishGetSimilarArtist(ArtistInfo a, Image img, long id);",
"private void imgDetected(Matcher matcher) {\n String component;\n matcher.reset();\n\n // store src value if <img> exist\n while (matcher.find()) {\n Data.imagesSrc.add(matcher.group(1));\n }\n\n // separate if the paragraph contain img\n // replace <img> with -+-img-+- to indicate image position in the text\n component = matcher.replaceAll(\"-+-img-+-\");\n\n //split the delimiter to structure image position\n String[] imageStructure = component.split(\"-\\\\+-\");\n\n // start looping the structured text\n int imageFoundIndex = 0;\n for (String structure : imageStructure) {\n // continue if the current index is not empty string \"\"\n if (!structure.trim().equals(\"\")) {\n // create ImageView if current index value equeal to \"img\"\n if (structure.trim().equals(\"img\")) {\n createImageView();\n imageFoundIndex++;\n } else {\n // else create textView for the text\n generateView(structure);\n }\n }\n }\n }",
"List<IbeisImage> uploadImages(List<File> images) throws UnsupportedImageFileTypeException, IOException,\n MalformedHttpRequestException, UnsuccessfulHttpRequestException;",
"public DetectorMatchResponse findMatchingDetectorMappings(List<Map<String, String>> tagsList) {\n isTrue(tagsList.size() > 0, \"tagsList must not be empty\");\n\n val uri = baseUri + API_PATH_MATCHING_DETECTOR_BY_TAGS;\n Content content;\n try {\n String body = objectMapper.writeValueAsString(tagsList);\n content = httpClient.post(uri, body);\n } catch (IOException e) {\n val message = \"IOException while getting matching detectors for\" +\n \": tags=\" + tagsList +\n \", httpMethod=POST\" +\n \", uri=\" + uri;\n throw new DetectorMappingRetrievalException(message, e);\n }\n try {\n return objectMapper.readValue(content.asBytes(), DetectorMatchResponse.class);\n } catch (IOException e) {\n val message = \"IOException while deserializing detectorMatchResponse\" +\n \": tags=\" + tagsList;\n throw new DetectorMappingDeserializationException(message, e);\n }\n\n }",
"public Observable<ServiceResponse<MatchResponseInner>> matchMethodWithServiceResponseAsync(String listId, Boolean cacheImage) {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.matchMethod(listId, cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MatchResponseInner>>>() {\n @Override\n public Observable<ServiceResponse<MatchResponseInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<MatchResponseInner> clientResponse = matchMethodDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }",
"List<Bitmap> getRecipeImgSmall();",
"private static final byte[] xfuzzy_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -95, 0, 0, -1,\n\t\t\t\t-1, -1, -82, 69, 12, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77,\n\t\t\t\t97, 100, 101, 32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0,\n\t\t\t\t33, -7, 4, 1, 10, 0, 0, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 2,\n\t\t\t\t36, -124, -113, -87, -101, -31, -33, 32, 120, 97, 57, 68, -93,\n\t\t\t\t-54, -26, 90, -24, 49, 84, -59, 116, -100, 88, -99, -102, 25,\n\t\t\t\t30, -19, 36, -103, -97, -89, -62, 117, -119, 51, 5, 0, 59 };\n\t\treturn data;\n\t}",
"private void getImagesFromServer() {\n trObtainAllPetImages.setUser(user);\n trObtainAllPetImages.execute();\n Map<String, byte[]> petImages = trObtainAllPetImages.getResult();\n Set<String> names = petImages.keySet();\n\n for (String petName : names) {\n byte[] bytes = petImages.get(petName);\n Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, Objects.requireNonNull(bytes).length);\n int index = user.getPets().indexOf(new Pet(petName));\n user.getPets().get(index).setProfileImage(bitmap);\n ImageManager.writeImage(ImageManager.PET_PROFILE_IMAGES_PATH, user.getUsername() + '_' + petName, bytes);\n }\n }",
"public RatingSearch explode() {\n Elements elements = doc.getElementsByTag(\"table\");\n IqdbMatch bestMatch = null;\n List<IqdbMatch> additionalMatches = new LinkedList<>();\n for (int i = 1; i < elements.size(); i++) {\n //iterating through all the table elements. First one is your uploaded image\n\n //Each table is one \"card\" on iqdb so only the second one will be the \"best match\"\n Element element = elements.get(i);\n IqdbElement iqdbElement = new IqdbElement(element);\n\n Elements noMatch = element.getElementsContainingText(\"No relevant matches\");\n if (noMatch.size() > 0) {\n log.warn(\"There was no relevant match for this document\");\n// break;\n return null;\n }\n// TODO I don't think we can determine if these are even relevant. So once we see 'No relevent matches' we can\n// just call it there. We won't need 'Possible Match' yet\n// Elements possibleMatchElement = element.getElementsContainingText(\"Possible match\");\n// if (possibleMatchElement.size() > 0) {\n// additionalMatches.add(iqdbElement.explode(IqdbMatchType.NO_RELEVANT_BUT_POSSIBLE));\n// }\n\n //Second element will provide all the information you need. going into the similarity and all that is a waste of time\n //Use the similarity search for Best Match to identify the element that is best match if you don't trust the 2nd.\n Elements bestMatchElement = element.getElementsContainingText(\"Best Match\");\n if (bestMatchElement.size() > 0) {\n bestMatch = iqdbElement.explode(IqdbMatchType.BEST);\n }\n\n //can similarly search for \"Additional match\" to find all teh additional matches. Anything beyond additional matches is a waste of time.\n Elements additionalMatchElements = element.getElementsContainingText(\"Additional match\");\n if (additionalMatchElements.size() > 0) {\n additionalMatches.add(iqdbElement.explode(IqdbMatchType.ADDITIONAL));\n }\n }\n\n if (bestMatch == null && !additionalMatches.isEmpty()) {\n log.warn(\"No Best Match found, taking first additionalMatch, does this ever happen?\");\n bestMatch = additionalMatches.remove(0);\n }\n\n return null;//new RatingSearch(bestMatch, additionalMatches);\n }",
"public static SearchResult getChampionImage(String championList, String championID) {\n try {\r\n JSONObject holder = new JSONObject(championList);\r\n JSONObject holderItems = holder.getJSONObject(\"data\");\r\n SearchResult champion = new SearchResult();\r\n\r\n for (Iterator<String> it = holderItems.keys(); it.hasNext(); ) { //iterate through champion json objects\r\n String key = it.next();\r\n JSONObject resultItem = holderItems.getJSONObject(key);\r\n\r\n if (resultItem.getString(\"key\").equals(championID)) {\r\n champion.championName = key; //the key for the json object is also the name of the champion\r\n break;\r\n }\r\n }\r\n\r\n String tempName = champion.championName + \".png\"; //construct string for champion image\r\n\r\n champion.championImage = Uri.parse(BASE_URL_CHAMPION_IMAGE + tempName).buildUpon().build().toString();\r\n\r\n return champion;\r\n } catch (JSONException e) {\r\n System.out.println(e);\r\n return null;\r\n }\r\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByHandlerOrBuilder();",
"private EC2DescribeImagesResponse listTemplates(String templateId, EC2DescribeImagesResponse images) throws Exception {\n try {\n List<CloudStackTemplate> result = new ArrayList<CloudStackTemplate>();\n\n if (templateId != null) {\n List<CloudStackTemplate> template = getApi().listTemplates(\"executable\", null, null, null, templateId, null, null, null);\n if (template != null) {\n result.addAll(template);\n }\n } else {\n List<CloudStackTemplate> selfExecutable = getApi().listTemplates(\"selfexecutable\", null, null, null, null, null, null, null);\n if (selfExecutable != null) {\n result.addAll(selfExecutable);\n }\n\n List<CloudStackTemplate> featured = getApi().listTemplates(\"featured\", null, null, null, null, null, null, null);\n if (featured != null) {\n result.addAll(featured);\n }\n\n List<CloudStackTemplate> sharedExecutable = getApi().listTemplates(\"sharedexecutable\", null, null, null, null, null, null, null);\n if (sharedExecutable != null) {\n result.addAll(sharedExecutable);\n }\n\n List<CloudStackTemplate> community = getApi().listTemplates(\"community\", null, null, null, null, null, null, null);\n if (community != null) {\n result.addAll(community);\n }\n }\n\n if (result != null && result.size() > 0) {\n for (CloudStackTemplate temp : result) {\n EC2Image ec2Image = new EC2Image();\n ec2Image.setId(temp.getId().toString());\n ec2Image.setAccountName(temp.getAccount());\n ec2Image.setName(temp.getName());\n ec2Image.setDescription(temp.getDisplayText());\n ec2Image.setOsTypeId(temp.getOsTypeId().toString());\n ec2Image.setIsPublic(temp.getIsPublic());\n ec2Image.setState(temp.getIsReady() ? \"available\" : \"pending\");\n ec2Image.setDomainId(temp.getDomainId());\n if (temp.getHyperVisor().equalsIgnoreCase(\"xenserver\"))\n ec2Image.setHypervisor(\"xen\");\n else if (temp.getHyperVisor().equalsIgnoreCase(\"ovm\"))\n ec2Image.setHypervisor(\"ovm\"); // valid values for hypervisor is 'ovm' and 'xen'\n else\n ec2Image.setHypervisor(\"\");\n if (temp.getDisplayText() == null)\n ec2Image.setArchitecture(\"\");\n else if (temp.getDisplayText().indexOf(\"x86_64\") != -1)\n ec2Image.setArchitecture(\"x86_64\");\n else if (temp.getDisplayText().indexOf(\"i386\") != -1)\n ec2Image.setArchitecture(\"i386\");\n else\n ec2Image.setArchitecture(\"\");\n List<CloudStackKeyValue> resourceTags = temp.getTags();\n for (CloudStackKeyValue resourceTag : resourceTags) {\n EC2TagKeyValue param = new EC2TagKeyValue();\n param.setKey(resourceTag.getKey());\n if (resourceTag.getValue() != null)\n param.setValue(resourceTag.getValue());\n ec2Image.addResourceTag(param);\n }\n images.addImage(ec2Image);\n }\n }\n return images;\n } catch (Exception e) {\n logger.error(\"List Templates - \", e);\n throw new Exception(e.getMessage() != null ? e.getMessage() : e.toString());\n }\n }",
"java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByHandlerOrBuilderList();",
"public interface ImageMetadataService {\n\n List<ArtistDTO> getArtistsByPrediction(String name, String name2, String surname);\n\n List<ImageTypeDTO> getImageTypesByPrediction(String name);\n\n UploadImageMetadataDTO saveMetadata(UploadImageMetadataDTO uploadImageMetadataDTO);\n\n List<ImageDTO> getTop10Images(String username, String title);\n\n List<ImageDTO> getAllUserImages(String username);\n\n List<ImageDTO> searchImagesByCriteria(SearchImageCriteriaDTO searchImageCriteriaDTO);\n\n ImageDTO updateImageMetadata(ImageDTO imageDTO);\n\n List<ImageDTO> getImagesTop50();\n\n void rateImage(RateImageDTO rateImageDTO);\n\n List<ImageDTO> getAllImages();\n}",
"public static List<PNMedia> discoveryFlickrImages(String[] tags) throws Exception{\r\n\t\tif(tags != null && tags.length > 0){\r\n\t\t\tList<PNMedia> flickrPhotosList = new ArrayList<PNMedia>();\r\n\t\t\t\t\r\n\t\t\tFlickr flickr = new Flickr(flickrApiKey, flickrSharedSecret, new REST());\r\n\t\t\tFlickr.debugStream = false;\r\n\t\t\t\r\n\t\t\tSearchParameters searchParams=new SearchParameters();\r\n\t\t searchParams.setSort(SearchParameters.INTERESTINGNESS_ASC);\r\n\t\t \r\n\t\t searchParams.setTags(tags);\r\n\t\t \r\n\t\t PhotosInterface photosInterface = flickr.getPhotosInterface();\r\n\t\t PhotoList<Photo> photoList = photosInterface.search(searchParams, 10, 1); // quantidade de fotos retornadas (5)\r\n\t\t \r\n\t\t if(photoList != null){\r\n\t\t for(int i=0; i<photoList.size(); i++){\r\n\t\t Photo photo = (Photo)photoList.get(i);\r\n\t\t PNMedia media = new PNMedia();\r\n\t\t \r\n\t\t String description = photo.getDescription();\r\n\t\t if(description == null)\r\n\t\t \t description = photo.getTitle();\r\n\t\t media.setMediaURL(photo.getLargeUrl()); media.setMediaURLAux(photo.getSmallSquareUrl()); media.setMediaCaption(photo.getTitle()); media.setMediaInfo(description);\r\n\t\t flickrPhotosList.add(media);\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t return flickrPhotosList;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tthrow new Exception(\"Null tags or tags is empty. \");\r\n\t\t}\r\n\t}",
"public interface Image {\n /**\n * @return the image ID\n */\n String getId();\n\n /**\n * @return the image ID, or null if not present\n */\n String getParentId();\n\n /**\n * @return Image create timestamp\n */\n long getCreated();\n\n /**\n * @return the image size\n */\n long getSize();\n\n /**\n * @return the image virtual size\n */\n long getVirtualSize();\n\n /**\n * @return the labels assigned to the image\n */\n Map<String, String> getLabels();\n\n /**\n * @return the names associated with the image (formatted as repository:tag)\n */\n List<String> getRepoTags();\n\n /**\n * @return the digests associated with the image (formatted as repository:tag@sha256:digest)\n */\n List<String> getRepoDigests();\n}",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage();",
"public void features() throws MalformedURLException, IOException {\n\t\tMBFImage query = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao01.jpg\"));\n\t\tMBFImage target = ImageUtilities.readMBF(new File(\"/home/marcus/eclipse_new/images/aviao02.jpg\"));\n\n\t\tDoGSIFTEngine engine = new DoGSIFTEngine();\n\t\tLocalFeatureList<Keypoint> queryKeypoints = engine.findFeatures(query.flatten());\n\t\tLocalFeatureList<Keypoint> targetKeypoints = engine.findFeatures(target.flatten());\n\t\tLocalFeatureMatcher<Keypoint> matcher1 = new BasicMatcher<Keypoint>(80);\n\t\tLocalFeatureMatcher<Keypoint> matcher = new BasicTwoWayMatcher<Keypoint>();\n\t\t/*\n\t\t * matcher.setModelFeatures(queryKeypoints);\n\t\t * matcher.findMatches(targetKeypoints); MBFImage basicMatches =\n\t\t * MatchingUtilities.drawMatches(query, target, matcher.getMatches(),\n\t\t * RGBColour.RED); DisplayUtilities.display(basicMatches);\n\t\t */\n\t\tRobustAffineTransformEstimator modelFitter = new RobustAffineTransformEstimator(5.0, 1500,\n\t\t\t\tnew RANSAC.PercentageInliersStoppingCondition(0.5));\n\t\tmatcher = new ConsistentLocalFeatureMatcher2d<Keypoint>(new FastBasicKeypointMatcher<Keypoint>(8), modelFitter);\n\t\tmatcher.setModelFeatures(queryKeypoints);\n\t\tmatcher.findMatches(targetKeypoints);\n\t\tMBFImage consistentMatches = MatchingUtilities.drawMatches(query, target, matcher.getMatches(), RGBColour.RED);\n\t\tDisplayUtilities.display(consistentMatches);\n\t\ttarget.drawShape(query.getBounds().transform(modelFitter.getModel().getTransform().inverse()), 3,\n\t\t\t\tRGBColour.BLUE);\n\t\t// DisplayUtilities.display(target);\n\t}",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/images\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ImageList, Image> listImage(\n @QueryMap ListImage queryParameters);",
"private static void updateRelatedImageList(\r\n\t\t\tMap<String, WordImage> relevantWordImages, Photo photo,\r\n\t\t\tMatchingResult surfResult, String word) {\n\r\n\t\tString key = getRelevantKeyForRelevantImages(relevantWordImages, word);\r\n\r\n\t\tif (key != null) {\r\n\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImages().add(info);\r\n\r\n\t\t\trelevantWordImages.get(key).getSimlarImagesMap()\r\n\t\t\t\t\t.put(info.getId(), info);\r\n\r\n\t\t\trelevantWordImages.get(key).addSimilarImageId(info.getId());\r\n\r\n\t\t}\r\n\r\n\t\telse {\r\n\r\n\t\t\tWordImage wi = new WordImage(word);\r\n\t\t\tSimilarImageInfo info = new SimilarImageInfo(photo.getPhotoId(),\r\n\t\t\t\t\tsurfResult.getScore(), surfResult.getPiontSimilarity(),\r\n\t\t\t\t\tsurfResult.getCommonIPCount());\r\n\r\n\t\t\twi.addSimilarImage(info);\r\n\r\n\t\t\twi.addSimilarImage(photo.getPhotoId(), info);\r\n\r\n\t\t\trelevantWordImages.put(word, wi);\r\n\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic String searchimage(int cbid) throws Exception {\n\t\treturn dao.searchimage(cbid);\r\n\t}",
"public Point findImage(BufferedImage image, int index) {\n int smallWidth = image.getWidth();\n int smallHeight = image.getHeight();\n int[][] smallPixels = new int[smallWidth][smallHeight];\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n smallPixels[x][y] = image.getRGB(x, y);\n }\n }\n boolean good;\n int count = 0;\n for(int X = 0; X <= bigWidth - smallWidth; X++) {\n for(int Y = 0; Y <= bigHeight - smallHeight; Y++) {\n good = true;\n for(int x = 0; x < smallWidth; x++) {\n for(int y = 0; y < smallHeight; y++) {\n if(smallPixels[x][y] != bigPixels[X + x][Y + y]) {\n good = false;\n break;\n }\n }\n if(!good) {\n break;\n }\n }\n if(good) {\n if(count == index) {\n return(new Point(X, Y));\n }\n count++;\n }\n }\n }\n return(null);\n }",
"public static String getImageId(WebElement image) {\n String imageUrl = image.getAttribute(\"src\");\n\n int indexComparisonStart = imageUrl.indexOf(START_TOKEN) + START_TOKEN.length();\n int indexComparisonFinish = imageUrl.substring(indexComparisonStart).indexOf(STOP_TOKEN);\n\n return imageUrl.substring(indexComparisonStart, indexComparisonStart + indexComparisonFinish);\n }",
"private void searchImages()\n {\n searchWeb = false;\n search();\n }",
"java.lang.String getHotelImageURLs(int index);",
"public void findBookDetails(AnnotateImageResponse imageResponse) throws IOException {\n\n String google = \"http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=\";\n String search = \"searchString\";\n String charset = \"UTF-8\";\n\n URL url = new URL(google + URLEncoder.encode(search, charset));\n Reader reader = new InputStreamReader(url.openStream(), charset);\n GoogleResults results = new Gson().fromJson(reader, GoogleResults.class);\n\n // Show title and URL of 1st result.\n System.out.println(results.getResponseData().getResults().get(0).getTitle());\n System.out.println(results.getResponseData().getResults().get(0).getUrl());\n }",
"@Override\n\tpublic List<Image> findAllImage() {\n\t\treturn new ImageDaoImpl().findAllImage();\n\t}",
"public interface IImageInputBoundary {\n\n List<ImageResponseModel> GetImagesByCategory(ImageRequestModel requestModel);\n List<ImageResponseModel> GetImagesByComposition(ImageRequestModel requestModel);\n}",
"@Test\n\tpublic void searchImageWithUpload() throws InterruptedException, Exception {\n\n\t\t// To click on Images link\n\t\thomePage.clickSearchByImage();\n\t\t\n\t\t// To verify if ui is navigated to Search by image page\n\t\tAssert.assertTrue(homePage.verifySearchByImageBox());\n\n\t\t// Upload an image from local machine\n\t\tsearchPage.uploadLocalImage(Settings.getLocalImage());\n\t\t// To verify upload status\n\t\tAssert.assertTrue(searchPage.verifyUploadStatus());\n\n\t\t// Find specified image on GUI\n\t\tWebElement webElement = searchPage.navigateToImage(Settings.getVisitRule());\n\n\t\t// Take a snapshot for expected visit page\n\t\tsearchPage.snapshotLastPage(webElement);\n\n\t\t// Download specified image by expected rule\n\t\tString fileName = Settings.getDownloadImage();\n\t\tboolean down = searchPage.downloadImagetoLocal(webElement, fileName);\n\t\tAssert.assertTrue(down);\n\n\t\t// verify two images match or not\n\t\tAssert.assertTrue(searchPage.verifyImageIsSame(Settings.getDownloadImage(), Settings.getLocalImage()));\n\n\t}",
"@Override\n\tpublic List<AddBookDto> findListimage(List<addBookBo> listBo) throws IOException {\n\n\t\tFile uploadFileDir, uploadImageDir;\n\n\t\tFileInputStream fileInputStream = null;\n\n\t\tList<AddBookDto> dtoList = new ArrayList<>();\n\n\t\tSet<Category> setCategory = new HashSet<>();\n\n\t\tSystem.out.println(\"UploadService.findListimage()\");\n\n\t\tfor (addBookBo bo : listBo) {\n\n\t\t\tAddBookDto dto = new AddBookDto();\n\n\t\t\tBeanUtils.copyProperties(bo, dto);\n\n\t\t\tSystem.out.println(\"UploadService.findListimage()-------\" + bo.getAuthor());\n\n\t\t\tuploadImageDir = new File(imageUploadpath + \"/\" + dto.getImageUrl() + \".jpg\");\n\n\t\t\tif (uploadImageDir.exists()) {\n\n\t\t\t\tbyte[] buffer = getBytesFromFile(uploadImageDir);\n\t\t\t\t// System.out.println(bo.getTitle()+\"====b===\" + buffer);\n\t\t\t\tdto.setImgeContent(buffer);\n\n\t\t\t}\n\n\t\t\tSystem.out.println(dto.getTitle() + \"====dto===\" + dto.getImgeContent());\n\t\t\tdtoList.add(dto);\n\n\t\t}\n\n\t\treturn dtoList;\n\t}",
"public Image getImageById(final String imageId)\n {\n GetImageByIdQuery getImageByIdQuery = new GetImageByIdQuery(imageId);\n List<Image> ImageList = super.queryResult(getImageByIdQuery);\n if (CollectionUtils.isEmpty(ImageList) || ImageList.size() > 1)\n {\n LOG.error(\"The Image cannot be found by this id:\" + imageId);\n return null;\n }\n return ImageList.get(0);\n }",
"@Override\n public void onSuccess(Uri uri) {\n if (!ImageListUrl.contains(uri.toString())) {\n ImageListUrl.add(uri.toString());\n\n /// add property if imageurl arraylist same with imagelist arraylist\n if (ImageListUrl.size() == ImageList.size()) {\n Toast.makeText(NewRecipe.this, ImageListUrl.toString(), Toast.LENGTH_SHORT).show();\n\n saveRecipe();\n\n }\n }\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImageByTransformOrBuilder();",
"private static final byte[] xfuzzyload_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, -82,\n\t\t\t\t69, 12, -128, -128, -128, -1, -1, -1, -64, -64, -64, -1, -1, 0,\n\t\t\t\t0, 0, 0, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100, 101,\n\t\t\t\t32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4, 1,\n\t\t\t\t10, 0, 6, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 3, 75, 8, -86,\n\t\t\t\t-42, 11, 45, -82, -24, 32, -83, -42, -80, 43, -39, -26, -35,\n\t\t\t\t22, -116, 1, -9, 24, -127, -96, 10, 101, 23, 44, 2, 49, -56,\n\t\t\t\t108, 21, 15, -53, -84, -105, 74, -86, -25, 50, -62, -117, 68,\n\t\t\t\t44, -54, 74, -87, -107, 82, 21, 40, 8, 81, -73, -96, 78, 86,\n\t\t\t\t24, 53, 82, -46, 108, -77, -27, -53, 78, -85, -111, -18, 116,\n\t\t\t\t87, 8, 23, -49, -123, 4, 0, 59 };\n\t\treturn data;\n\t}",
"public List<Recognition> recognizeImage(Bitmap bitmap) {\n Bitmap croppedBitmap = Bitmap.createScaledBitmap(bitmap, cropSize, cropSize, true);\n// Bitmap croppedBitmap = Bitmap.createBitmap(cropSize, cropSize, Bitmap.Config.ARGB_8888);\n// final Canvas canvas = new Canvas(croppedBitmap);\n// canvas.drawBitmap(bitmap, frameToCropTransform, null);\n final List<Recognition> ret = new LinkedList<>();\n List<Recognition> recognitions = detector.recognizeImage(croppedBitmap);\n// long before=System.currentTimeMillis();\n// for (int k=0; k<100; k++) {\n// recognitions = detector.recognizeImage(croppedBitmap);\n// int a = 0;\n// }\n// long after=System.currentTimeMillis();\n// String log = String.format(\"tensorflow takes %.03f s\\n\", ((float)(after-before)/1000/100));\n// Log.d(\"MATCH TEST\", log);\n for (Recognition r : recognitions) {\n if (r.getConfidence() < minConfidence)\n continue;\n// RectF location = r.getLocation();\n// cropToFrameTransform.mapRect(location);\n// r.setOriginalLoc(location);\n// Bitmap cropped = Bitmap.createBitmap(bitmap, (int)location.left, (int)location.top, (int)location.width(), (int)location.height());\n// r.setObjectImage(cropped);\n BoxPosition bp = r.getLocation();\n// r.rectF = new RectF(bp.getLeft(), bp.getTop(), bp.getRight(), bp.getBottom());\n// cropToFrameTransform.mapRect(r.rectF);\n ret.add(r);\n }\n\n return ret;\n }",
"public static ArrayList<Result> getCCVBasedSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.CCV));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t\t// create result object\n\t\t\t \tResult result = new Result();\n\t\t\t \tresult.mFilename = imageName;\n\t\t\t \tresult.mSimilarity = intersection;\n\t\t\t \t\n\t\t\t \t// store result\n\t\t\t \trv.add(result);\n\t\t\t\t} catch (Exception ex) {}\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}",
"public Map<String, Photo> createGeoSimilarPhotoList(int maxCycles,\r\n\t\t\tboolean tagReq, boolean techTagReq) {\r\n\r\n\t\tMap<String, Photo> photoList = new HashMap<String, Photo>();\r\n\r\n\t\tpFet.getPanoramioGeoSimilarPhotoList(maxCycles, tagReq, techTagReq,\r\n\t\t\t\tphotoList);\r\n\r\n\t\tint panoPhotoReturend = photoList.size();\r\n\r\n\t\tMap<String, Photo> flickrPhotoList = fFet\r\n\t\t\t\t.getFlickrGeoSimilarPhotoList();\r\n\r\n\t\tint flickrPhotoReturend = flickrPhotoList.size();\r\n\r\n\t\tphotoList.putAll(flickrPhotoList);\r\n\r\n\t\ttotalNumberOfImages = flickrPhotoReturend + panoPhotoReturend;\r\n\r\n\t\treturn photoList;\r\n\t}",
"List<IbeisImage> uploadImages(List<File> images, File pathToTemporaryZipFile) throws\n UnsupportedImageFileTypeException, IOException, MalformedHttpRequestException, UnsuccessfulHttpRequestException;",
"private void loadAndCacheImages(Node node, FileContext cachedImageFilesystem) throws Exception\n {\n String imagePathBase = \"/\" + node.getTypeCode() + \"/\" + node.getNid();\n ImagesReponse imagesReponse = this.queryRemoteApi(ImagesReponse.class, imagePathBase + ImagesReponse.PATH, null);\n if (imagesReponse != null && imagesReponse.getNodes() != null && imagesReponse.getNodes().getNode() != null) {\n for (Image i : imagesReponse.getNodes().getNode()) {\n node.addImage(i);\n\n URI imageUri = UriBuilder.fromUri(Settings.instance().getTpAccessApiBaseUrl())\n .path(BASE_PATH)\n .path(imagePathBase + \"/image/\" + i.getData().mediaObjectId + \"/original\")\n .replaceQueryParam(ACCESS_TOKEN_PARAM, this.getAccessToken())\n .replaceQueryParam(FORMAT_PARAM, FORMAT_JSON)\n .build();\n\n ClientConfig config = new ClientConfig();\n Client httpClient = ClientBuilder.newClient(config);\n Response response = httpClient.target(imageUri).request().get();\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n org.apache.hadoop.fs.Path nodeImages = new org.apache.hadoop.fs.Path(HDFS_CACHE_ROOT_PATH + node.getNid());\n if (!cachedImageFilesystem.util().exists(nodeImages)) {\n cachedImageFilesystem.mkdir(nodeImages, FsPermission.getDirDefault(), true);\n }\n org.apache.hadoop.fs.Path cachedImage = new org.apache.hadoop.fs.Path(nodeImages, i.getData().mediaObjectId);\n i.setCachedUrl(cachedImage.toUri());\n if (!cachedImageFilesystem.util().exists(cachedImage)) {\n try (OutputStream os = cachedImageFilesystem.create(cachedImage, EnumSet.of(CreateFlag.CREATE, CreateFlag.OVERWRITE))) {\n IOUtils.copy(response.readEntity(InputStream.class), os);\n }\n }\n }\n else {\n throw new IOException(\"Error status returned while fetching remote API data;\" + response);\n }\n\n }\n }\n }",
"com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder getImagesByHandlerOrBuilder(\n int index);",
"public static ArrayList<Result> getColorHistogramSimilarity(Context context, int[] queryImageHist) throws FileNotFoundException {\n\t\tArrayList<Result> rv = new ArrayList<Result>();\n\t\t\n\t\tCursor cursor = context.getContentResolver().query(SearchProvider.ContentUri.IMAGEDATA\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null\n\t\t\t\t, null);\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tString line = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.HISTOGRAM));\n\t\t\t\tString[] data = line.split(\",\");\n\t\t\t\t// parse data\n\t\t\t\tString imageName = cursor.getString(cursor.getColumnIndex(SearchProvider.ImageData.NAME));\n\t\t\t\tint[] valueArray = new int[data.length];\n\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\tvalueArray[i] = Integer.parseInt(data[i]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble intersection = Histogram.Intersection(valueArray, queryImageHist);\n\t\t\t\t\n\t\t\t\t// create result object\n\t\t \tResult result = new Result();\n\t\t \tresult.mFilename = imageName;\n\t\t \tresult.mSimilarity = intersection;\n\t\t \t\n\t\t \t// store result\n\t\t \trv.add(result);\n\t\t \tcursor.moveToNext();\n\t\t\t}\n\t\t}\n\t\treturn rv;\n\t}",
"public void compareImageAction() {\n\t\tif (selectedAnimalModel == null) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (selectedAnimalModel.getId() == 0L || isImageChangedFlag) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Animal needs to be saved first.\");\n\t\t\treturn;\n\t\t}\n\n\t\tAsyncTask asyncTask = new AsyncTask() {\n\t\t\tAnimalModel animal1 = null;\n\t\t\tAnimalModel animal2 = null;\n\t\t\tAnimalModel animal3 = null;\n\n\t\t\t@Override\n\t\t\tprotected void onDone(boolean success) {\n\t\t\t\tif (!success) {\n\t\t\t\t\tshowDialog(ERROR_MESSAGE, \"Cannot compare images.\");\n\t\t\t\t} else {\n\t\t\t\t\tCompareImagesDialog dialog = new CompareImagesDialog(multimediaPanel, selectedAnimalModel, animal1, animal2, animal3);\n\t\t\t\t\tdialog.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected Boolean doInBackground() throws Exception {\n\t\t\t\ttry {\n\t\t\t\t\tArrayList<AnimalModel> models;\n\n\t\t\t\t\tmodels = DataManager.getInstance().getThreeSimilarImages(selectedAnimalModel);\n\n\t\t\t\t\tif (models.size() > 0) {\n\t\t\t\t\t\tanimal1 = models.get(0);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 1) {\n\t\t\t\t\t\tanimal2 = models.get(1);\n\t\t\t\t\t}\n\t\t\t\t\tif (models.size() > 2) {\n\t\t\t\t\t\tanimal3 = models.get(2);\n\t\t\t\t\t}\n\n\t\t\t\t} catch (DataManagerException e1) {\n\t\t\t\t\tLogger.createLog(Logger.ERROR_LOG, e1.getMessage());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tasyncTask.start();\n\n\t}",
"private ArrayList<ImageItem> getData() {\n final ArrayList<ImageItem> imageItems = new ArrayList<>();\n // TypedArray imgs = getResources().obtainTypedArray(R.array.image_ids);\n for (int i = 0; i < f.size(); i++) {\n Bitmap bitmap = imageLoader.loadImageSync(\"file://\" + f.get(i));;\n imageItems.add(new ImageItem(bitmap, \"Image#\" + i));\n }\n return imageItems;\n }",
"static void redactImageFileColoredInfoTypes(String projectId, String inputPath, String outputPath)\n throws IOException {\n try (DlpServiceClient dlp = DlpServiceClient.create()) {\n // Specify the content to be redacted.\n ByteString fileBytes = ByteString.readFrom(new FileInputStream(inputPath));\n ByteContentItem byteItem =\n ByteContentItem.newBuilder().setType(BytesType.IMAGE_JPEG).setData(fileBytes).build();\n\n // Define types of info to redact associate each one with a different color.\n // See https://cloud.google.com/dlp/docs/infotypes-reference for complete list of info types\n ImageRedactionConfig ssnRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"US_SOCIAL_SECURITY_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(.3f).setGreen(.1f).setBlue(.6f).build())\n .build();\n ImageRedactionConfig emailRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"EMAIL_ADDRESS\").build())\n .setRedactionColor(Color.newBuilder().setRed(.5f).setGreen(.5f).setBlue(1).build())\n .build();\n ImageRedactionConfig phoneRedactionConfig =\n ImageRedactionConfig.newBuilder()\n .setInfoType(InfoType.newBuilder().setName(\"PHONE_NUMBER\").build())\n .setRedactionColor(Color.newBuilder().setRed(1).setGreen(0).setBlue(.6f).build())\n .build();\n\n // Create collection of all redact configurations.\n List<ImageRedactionConfig> imageRedactionConfigs =\n Arrays.asList(ssnRedactionConfig, emailRedactionConfig, phoneRedactionConfig);\n\n // List types of info to search for.\n InspectConfig config =\n InspectConfig.newBuilder()\n .addAllInfoTypes(\n imageRedactionConfigs.stream()\n .map(ImageRedactionConfig::getInfoType)\n .collect(Collectors.toList()))\n .build();\n\n // Construct the Redact request to be sent by the client.\n RedactImageRequest request =\n RedactImageRequest.newBuilder()\n .setParent(LocationName.of(projectId, \"global\").toString())\n .setByteItem(byteItem)\n .addAllImageRedactionConfigs(imageRedactionConfigs)\n .setInspectConfig(config)\n .build();\n\n // Use the client to send the API request.\n RedactImageResponse response = dlp.redactImage(request);\n\n // Parse the response and process results.\n FileOutputStream redacted = new FileOutputStream(outputPath);\n redacted.write(response.getRedactedImage().toByteArray());\n redacted.close();\n System.out.println(\"Redacted image written to \" + outputPath);\n }\n }",
"@GET\n @Path(\"image\")\n @Produces(MediaType.TEXT_PLAIN)\n public Response voidImage() {\n return Response.status(Response.Status.NOT_FOUND).build();\n }",
"public List<Image> parseBestOfImagesResult(Document doc) {\n\n ArrayList<Image> bestOfImages = new ArrayList<>();\n Elements htmlImages = doc.select(CSS_BEST_OF_IMAGE_QUERY);\n Timber.i(\"Best OfImages: %s\", htmlImages.toString());\n String href;\n Image bestOfImage;\n for (Element image : htmlImages) {\n href = image.attr(\"src\");\n Timber.i(\"Image src: %s\", href);\n bestOfImage = new Image(href);\n bestOfImages.add(bestOfImage);\n }\n return bestOfImages;\n }",
"public Observable<MatchResponseInner> matchMethodAsync(String listId, Boolean cacheImage) {\n return matchMethodWithServiceResponseAsync(listId, cacheImage).map(new Func1<ServiceResponse<MatchResponseInner>, MatchResponseInner>() {\n @Override\n public MatchResponseInner call(ServiceResponse<MatchResponseInner> response) {\n return response.body();\n }\n });\n }",
"public float testAll(){\n List<Long> allIdsToTest = new ArrayList<>();\n allIdsToTest = idsToTest;\n //allIdsToTest.add(Long.valueOf(11));\n //allIdsToTest.add(Long.valueOf(12));\n //allIdsToTest.add(Long.valueOf(13));\n\n float totalTested = 0;\n float totalCorrect = 0;\n float totalUnrecognized = 0;\n\n for(Long currentID : allIdsToTest) {\n String pathToPhoto = \"photo\\\\testing\\\\\" + currentID.toString();\n File currentPhotosFile = new File(pathToPhoto);\n\n if(currentPhotosFile.exists() && currentPhotosFile.isDirectory()) {\n\n File[] listFiles = currentPhotosFile.listFiles();\n\n for(File file : listFiles){\n if (!file.getName().endsWith(\".pgm\")) { //search how to convert all image to .pgm\n throw new IllegalArgumentException(\"The file of the student \" + currentID + \" contains other files than '.pgm'.\");\n }\n else{\n Mat photoToTest = Imgcodecs.imread(pathToPhoto + \"\\\\\" + file.getName(), Imgcodecs.IMREAD_GRAYSCALE);\n try {\n RecognitionResult testResult = recognize(photoToTest);\n\n if(testResult.label[0] == currentID){\n totalCorrect++;\n }\n }\n catch (IllegalArgumentException e){\n System.out.println(\"One face unrecognized!\");\n totalUnrecognized++;\n }\n\n totalTested++;\n }\n }\n }\n }\n\n System.out.println(totalUnrecognized + \" face unrecognized!\");\n\n System.out.println(totalCorrect + \" face correct!\");\n System.out.println(totalTested + \" face tested!\");\n\n float percentCorrect = totalCorrect / totalTested;\n return percentCorrect;\n }",
"public ImageFiles() {\n\t\tthis.listOne = new ArrayList<String>();\n\t\tthis.listTwo = new ArrayList<String>();\n\t\tthis.listThree = new ArrayList<String>();\n\t\tthis.seenImages = new ArrayList<String>();\n\t\tthis.unseenImages = new ArrayList<String>();\n\t}",
"public interface SearchService {\n List<String> siftSearch(MultipartFile image) throws IOException;\n}",
"@ApiModelProperty(value = \"An image to give an indication of what to expect when renting this vehicle.\")\n public List<Image> getImages() {\n return images;\n }",
"private void getImagesFromDatabase() {\n try {\n mCursor = mDbAccess.getPuzzleImages();\n\n if (mCursor.moveToNext()) {\n for (int i = 0; i < mCursor.getCount(); i++) {\n String imagetitle = mCursor.getString(mCursor.getColumnIndex(\"imagetitle\"));\n String imageurl = mCursor.getString(mCursor.getColumnIndex(\"imageurl\"));\n mImageModel.add(new CustomImageModel(imagetitle, imageurl));\n mCursor.moveToNext();\n }\n } else {\n Toast.makeText(getActivity(), \"databse not created...\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }",
"public yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesResponse list(yandex.cloud.api.containerregistry.v1.ImageServiceOuterClass.ListImagesRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListMethod(), getCallOptions(), request);\n }",
"public boolean displayedDepartmentEmployeeImageMatch(List<String> names, List<String> images) {\n List<String> nonMatchingRecords = new ArrayList<>();\n for (int i = 0; i < names.size(); i++) {\n\n String imageSource = images.get(i).toLowerCase();\n String imageFileName = createImageName(names.get(i).toLowerCase());\n\n if (!imageSource.contains(imageFileName)) {\n nonMatchingRecords.add(names.get(i));\n }\n }\n if (nonMatchingRecords.size() > 0) {\n Reporter.log(\"FAILURE: Names of employees with non matching images\" +\n \" or inconsistently named imageFiles: \" +\n Arrays.toString(nonMatchingRecords.toArray()), true);\n return false;\n }\n return true;\n }",
"public Detections recognizeImage(Image image, int rotation) {\n\n Bitmap rgbFrameBitmap = Transform.convertYUVtoRGB(image);\n\n\n if (image.getFormat() != ImageFormat.YUV_420_888) {\n // unsupported image format\n Logger.addln(\"\\nWARN YoloHTTP.recognizeImage() unsupported image format\");\n return new Detections();\n }\n //return recognize(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkMaxAreaRectangle(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n //return frameworkNineBoxes(Transform.yuvBytes(image), image.getWidth(),image.getHeight(),rotation, rgbFrameBitmap,image.getHeight()/3,image.getWidth()/3,image.getHeight()/3,image.getWidth()/3);\n //return frameworkQuadrant(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n return frameworkMaxAreaRectBD(Transform.yuvBytes(image), image.getWidth(),image.getHeight(), rotation, rgbFrameBitmap);\n\n }",
"public List<Recognition> recognizeImage(Mat img) {\n frameToCropTransform =\n ImageUtil.getTransformationMatrix(\n img.cols(), img.rows(),\n cropSize, cropSize,\n 0, MAINTAIN_ASPECT);\n cropToFrameTransform = new Matrix();\n frameToCropTransform.invert(cropToFrameTransform);\n Bitmap tBM = Bitmap.createBitmap(img.cols(), img.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(img, tBM);\n return recognizeImage(tBM);\n }",
"public BufferedImage GetImage(String name) { return ImageList.get(name); }",
"public void setImage(int imageId) {\n this.imageId=imageId;\n\t}",
"public static Long getAValidImageId() {\n\t\tLong id = getAId();\n\t\tif (id == null) {\n\n\t\t\tImage img = new Image(\"http://dummy.com/img.jpg\", (long)(Math.random()*10000), \"Description\", \"keyword\", new Date(0001L));\n\t\t\tIImageStore imageStore = StoreFactory.getImageStore();\n\t\t\timageStore.insert(img);\n\n\t\t\tid = getAId();\n\t\t\tif (id == null) {\n\t\t\t\tthrow new RuntimeException(\"There are no images in DB, and I can't insert one. Cannot run tests without.\");\n\t\t\t}\n\t\t}\n\t\treturn id;\n\t}",
"public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}",
"@GetMapping(path = \"/images\", produces = \"application/json; charset=UTF-8\")\n public @ResponseBody ArrayNode getImageList() {\n final ArrayNode nodes = mapper.createArrayNode();\n for (final Image image : imageRepository.findAllPublic())\n try {\n nodes.add(mapper.readTree(image.toString()));\n } catch (final JsonProcessingException e) {\n e.printStackTrace();\n }\n return nodes;\n }",
"String getItemImage();",
"java.util.List<? extends com.yahoo.xpathproto.TransformTestProtos.ContentImageOrBuilder> \n getImagesByTransformOrBuilderList();",
"protected abstract void setupImages(Context context);",
"public AugmentedImageNode(Context context, String[] imageList, Integer augmentedImageIndex) {\n\n // we check if sushi is null\n // sushi is used in order to check if the renderables are null\n // because the renderables are built using the same block of code all at once, if sushi (or any other completable future) is null,\n // then they all are null\n if (sushi == null) {\n\n if (!(AugmentedImageFragment.imagePlaysVideoBooleanList[augmentedImageIndex])) {\n currentRenderable = renderableList.get(augmentedImageIndex);\n currentRenderable =\n // build the renderable using the image that is detected\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/\" + imageList[augmentedImageIndex] + \".sfb\"))\n .build();\n Log.d(\"modelrenderable\", (\"conditional is running! filepath: \" + Uri.parse(\"models/\" + imageList[augmentedImageIndex] + \".sfb\")));\n\n } else {\n\n frame_ul =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_upper_left.sfb\"))\n .build();\n Log.d(\"running\", (\"running\"));\n frame_ur =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_upper_right.sfb\"))\n .build();\n frame_ll =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_lower_left.sfb\"))\n .build();\n frame_lr =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/frame_lower_right.sfb\"))\n .build();\n\n }\n\n\n }\n\n // Checks if videoRenderable is null, if it is, videoRenderable is loaded from models.\n // Will be used as the thing that the video is placed on.\n if (AugmentedImageActivity.videoRenderable == null) {\n AugmentedImageActivity.videoRenderable =\n ModelRenderable.builder()\n .setSource(context, Uri.parse(\"models/chroma_key_video.sfb\"))\n .build();\n }\n }"
]
| [
"0.6269358",
"0.58894175",
"0.5767823",
"0.57581866",
"0.5743656",
"0.57329696",
"0.5511878",
"0.55023944",
"0.5499341",
"0.54513913",
"0.53242004",
"0.52565765",
"0.5252096",
"0.51959515",
"0.51806694",
"0.5179676",
"0.516937",
"0.51420456",
"0.51307625",
"0.5130238",
"0.51201755",
"0.5115933",
"0.5086581",
"0.5066521",
"0.5052614",
"0.5051037",
"0.503133",
"0.50229895",
"0.50200105",
"0.5018699",
"0.5017182",
"0.49932528",
"0.4980278",
"0.49779966",
"0.49757442",
"0.49613833",
"0.49499258",
"0.49310523",
"0.4917177",
"0.49092928",
"0.49044785",
"0.49008167",
"0.49007514",
"0.48709598",
"0.48693454",
"0.4868297",
"0.486439",
"0.48327476",
"0.4824767",
"0.48216105",
"0.48121452",
"0.48105243",
"0.47977334",
"0.47885716",
"0.47818112",
"0.47789094",
"0.47699574",
"0.4766071",
"0.47655237",
"0.4763522",
"0.47564504",
"0.47563508",
"0.47516552",
"0.47427645",
"0.4742108",
"0.47411898",
"0.4739934",
"0.47364616",
"0.47316936",
"0.47311017",
"0.47205627",
"0.4716423",
"0.47105074",
"0.47089097",
"0.47079867",
"0.47067878",
"0.46994454",
"0.4694525",
"0.46893325",
"0.4678342",
"0.46649662",
"0.466488",
"0.46630773",
"0.4662054",
"0.46478015",
"0.4644439",
"0.46423402",
"0.46374792",
"0.46361628",
"0.46341842",
"0.46304488",
"0.46291912",
"0.46212026",
"0.46210533",
"0.4616033",
"0.46065164",
"0.4605004",
"0.46003872",
"0.45990482",
"0.4584824"
]
| 0.46646062 | 82 |
This method will be called if something went wrong. | public void onApiRequestFailed(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\t\t\t\t\t\tpublic void error(Exception e) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}",
"public void inquiryError() {\n\t\t\n\t}",
"@Override\n public void onCancelled(CancelledException arg0) {\n\n }",
"@Override\n public void onCancelled(CancelledException arg0) {\n\n }",
"@Override\n public void onCancelled(CancelledException arg0) {\n }",
"@Override\n public void onCancelled(CancelledException arg0) {\n }",
"@Override\n boolean isFailed() {\n return false;\n }",
"public void estiloError() {\r\n /**Bea y Jose**/\r\n\t}",
"protected void onConnectionError() {\n\t}",
"@Override\n public void uploadFailed() {\n }",
"public void onConnectionError()\n\t\t{\n\t\t}",
"@Override\n\t\t\tpublic void onNetworkError() {\n\n\t\t\t}",
"private void correctError()\r\n\t{\r\n\t\t\r\n\t}",
"@Override\n\t\tpublic void loadError() {\n\t\t}",
"@Override\r\n\tprotected void processError() {\n\t\tsuper.processError();\r\n\t\tshowToast(error_generico_process);\r\n\t}",
"@Override\n public void onFailure(@NonNull Exception exception) {\n Log.i(\"update\", \"failed\");\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n e.printStackTrace();\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getApplicationContext(),\"Uh-oh! something went wrong, please try again.\",Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n }",
"@Override\n\t\t\t\tpublic void doFail() {\n\t\t\t\t}",
"@Override\n public void onFailure() {\n }",
"private void inizia() throws Exception {\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n }",
"private void onLoadingError() {\n AppSession.showDataLoadError(\"conexus\");\n finish();\n }",
"protected void errorIfStarted() {\r\n if (HasStarted) {\r\n throw new Error(\"Cannot change settings, algorithm has started.\");\r\n }\r\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n }",
"@Override\n\t\t\t\t\t\tpublic void failed() {\n\t\t\t\t\t\t\tSystem.out.println(\"下载失败\");\n\t\t\t\t\t\t}",
"@Override\n public void onFailure(@NonNull Exception e) {\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n\t\t\t\tpublic void onException(Exception e) {\n\t\t\t\t\tLog.d(\"SD_TRACE\", \"load api exception\" + e.toString());\n\t\t\t\t\tmLoadSuccess = false;\n\t\t\t\t}",
"public void error() {\n throw new RuntimeException(getClass().getName() + \" error\");\n }",
"public boolean proceedOnErrors() {\n return false;\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onError() {\n\n }",
"protected void failed()\r\n {\r\n //overwrite\r\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n\n }",
"@Override\n\t\t\tpublic void onFail(int code) {\n\t\t\t\t\t\n\t\t\t}",
"@Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n Log.d(\"Error log\", \"Couldn't read from database\");\n }",
"public void checkError() throws IOException{\n if (transactionFailure == null) {\n FacesContext.getCurrentInstance().getExternalContext().\n redirect(\"converter.xhtml\");\n }\n }",
"@Override\r\n\t\t\t\tpublic void onFail(String desc) {\n\t\t\t\t Log.e(\"upload\",desc);\t\r\n\t\t\t\t}",
"@Override\n\t\t\tpublic void onFail(int code) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onAddFail() {\n\t\t\t\t\t\tMZLog.e(\"J\", \"同步到购物车失败\");\n\t\t\t\t\t}",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(Call<ModelBase> call, Throwable e) {\n Log.e(\"onError\", \"yes \");\n e.printStackTrace();\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n }",
"@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onRequestFail() {\n\n\t\t\t\t\t\t\t\t\t\t}",
"@Override\r\n public void onCancelled(@NonNull DatabaseError databaseError) {\r\n\r\n }",
"@Override\n\t\t\tpublic void onFailure(int arg0, String arg1) {\n\t\t\t\tToast.makeText(MainActivity.this, \"submit failure\", Toast.LENGTH_LONG).show();\n\t\t\t}",
"@Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }",
"@Override\n\t\t\tpublic void onException(Exception arg0) {\n\n\t\t\t}",
"@Override\n public void onCancelled(@NonNull DatabaseError error) {\n }",
"@Override\n public void errorReceived(Exception ex) {\n }",
"@Override\n public void errorReceived(Exception ex) {\n }",
"@Override\n public void failed() {\n Log.d(\"elomelo\",\"not saved\");\n }",
"@Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onCancelled(DatabaseError databaseError) {\n Log.e(TAG, \"Database error occurred\", databaseError.toException());\n }",
"@Override\r\n\tpublic void 태생() {\n\t\tSystem.out.println(\"새끼를 낳는다.\");\r\n\t}",
"public void errorFileEscenario() {\n\t\tvisorEscenario.errorFileEscenario();\t\n\t}",
"private void inizia() throws Exception {\n }",
"private void inizia() throws Exception {\n }",
"private void inizia() throws Exception {\n }",
"private void inizia() throws Exception {\n }",
"private void inizia() throws Exception {\n }",
"@Override\n\t\t\tpublic void onError(int httpcode) {\n\t\t\t\t\n\t\t\t}",
"private void throwsError() throws OBException {\n }",
"@Override\n public void onError() {\n Toast.makeText(getApplicationContext(), \"아이디랑 비밀번호를 확인해 주세요.\", Toast.LENGTH_LONG).show();\n }",
"@Override\n\t\t\t\tpublic void onNetworkError(Request request, IOException e) {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n\t\t\t\t\t\t\tpublic void onIOException(IOException e, Object state) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}",
"public void checkError() {\n if (this.threadError != null) {\n throw new EncogError(this.threadError);\n }\n }",
"@Override\n public void onError(Exception e) {\n\n }",
"@Override\n\tpublic void setWrongError() {\n\t\t\n\t}",
"public void mo1534c() {\n C2201w.m8373a(\"Photo TransferData failed!\", 1);\n }",
"private void error() {\n this.error = true;\n this.clients[0].error();\n this.clients[1].error();\n }",
"@Override\n public void onResponceError(final ErrorCode errorCode) {\n }",
"@Override\n\tpublic void onNetWorkError() {\n\t\t\n\t}",
"@Override\r\n\tpublic boolean hasError() {\n\t\treturn false;\r\n\t}",
"@Override\n\tpublic void onAdError(String arg0) {\n\t\t\n\t}"
]
| [
"0.6606133",
"0.65999043",
"0.6549771",
"0.6547335",
"0.6516471",
"0.6516471",
"0.6480911",
"0.6361746",
"0.63163763",
"0.62915814",
"0.6242045",
"0.62385476",
"0.6206463",
"0.6190697",
"0.6180534",
"0.6173799",
"0.61507386",
"0.614829",
"0.61395526",
"0.6138102",
"0.6117772",
"0.61010325",
"0.6098151",
"0.6098151",
"0.60977966",
"0.6095298",
"0.60795426",
"0.60795426",
"0.6066324",
"0.60378885",
"0.60378885",
"0.60378885",
"0.60378885",
"0.60378885",
"0.60347944",
"0.60347944",
"0.6032943",
"0.6029427",
"0.60277575",
"0.6019679",
"0.6019679",
"0.6001731",
"0.5985948",
"0.59852976",
"0.5968994",
"0.59679455",
"0.59628934",
"0.5960011",
"0.5946426",
"0.5945618",
"0.59452885",
"0.59452885",
"0.59452885",
"0.59452885",
"0.59361106",
"0.5932115",
"0.5932115",
"0.5932115",
"0.5932115",
"0.5932115",
"0.5932115",
"0.5932115",
"0.5932115",
"0.5932115",
"0.5932115",
"0.59229946",
"0.59154254",
"0.5913655",
"0.5913457",
"0.5913148",
"0.5902692",
"0.58717483",
"0.5865625",
"0.5847802",
"0.5847802",
"0.58422107",
"0.5828087",
"0.5826625",
"0.5826625",
"0.581171",
"0.5802588",
"0.5798891",
"0.57937145",
"0.57937145",
"0.57937145",
"0.57937145",
"0.57937145",
"0.579001",
"0.57894063",
"0.578278",
"0.57746",
"0.57744074",
"0.57742417",
"0.57705045",
"0.57702726",
"0.575833",
"0.57571816",
"0.5756923",
"0.5752576",
"0.57494813",
"0.5732821"
]
| 0.0 | -1 |
This method will be called when we got a response from the api. | public void onApiRequestSuccess(T result); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onResponse(String response) {\n }",
"@Override\n public void onResponse(String response) {\n Utils.logApiResponseTime(calendar, tag + \" \" + url);\n mHandleSuccessResponse(tag, response);\n\n }",
"@Override\n public void onResponse(String response)\n {\n\n }",
"@Override\n public void onResponse(String response) {\n }",
"@Override\n public void onResponse(String response) {\n }",
"@Override\n public void onResponse(String response) {\n }",
"@Override\n public void onResponse(String response) {\n }",
"@Override\n public void onResponse(Response response) throws IOException {\n }",
"private CallResponse() {\n initFields();\n }",
"@Override\n public void onResponse(String response) {\n }",
"@Override\n\t\t\t\t\tpublic void onResponse(String response) {\n\n\t\t\t\t\t}",
"@Override\n\tpublic void handleResponse() {\n\t\t\n\t}",
"@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }",
"@Override\n public void onResponse(Call<Response> call, retrofit2.Response<Response> response) {\n }",
"@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }",
"@Override\n\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void onResponseSuccess(final String resp) {\n }",
"@Override\n public void onResponse(String response) {\n System.out.println(\"Recieved Response: \" + response);\n }",
"@Override\n public void onResponse(String response) {\n try {\n JSONObject obj = new JSONObject(response);\n String content = obj.getString(\"content\");\n getAPI.setText(\"Response is: \" + content);\n } catch (JSONException error) {\n getAPI.setText(\"That didn't work!\");\n error.printStackTrace();\n }\n }",
"@Override\n public void onResponse(String response) {\n opprettListe(response);\n }",
"@Override\n public void onResponse(String response) {\n Log.d(DEBUG_TAG, \"Response is: \"+ response);\n }",
"public void onResponse(Response response) throws Exception;",
"@Override\n\t\t\t\t\t\tpublic void onResponse(String response) {\n\t\t\t\t\t\t\tparseRespense(response);\n\t\t\t\t\t\t}",
"private void getResponse() {\n response = new Response();\n\n getResponseCode();\n getResponseMessage();\n getResponseBody();\n\n LOG.info(\"--- RESPONSE ---\");\n LOG.info(\"Code: \" + response.getResponseCode());\n LOG.info(\"Message: \" + response.getResponseMessage());\n LOG.info(\"Body: \" + response.getResponseBody());\n LOG.info(\"*************************************\");\n }",
"@Override\n public void onResponse(ArrayList<DummyObject> dummyObjectArrayList) {\n onApiResponse(dummyObjectArrayList);\n }",
"@Override\n public void onResponse(Call<Response> call, retrofit2.Response<Response> response) {\n }",
"@Override\n public void onResponse(String response) {\n finalData(response);\n }",
"public void parseResponse();",
"@Override\n public void onCompleted() {\n responseObserver.onCompleted();\n }",
"@Override\n public void onResponse(String response) {\n parseData(url, response);\n }",
"@Override\r\n\t\t\t\t\tpublic void onResponse(HttpResponse resp) {\n\t\t\t\t\t\tLog.i(\"HttpPost\", \"Success\");\r\n\r\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onResponse(String s) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\n public void onResponse(String response, int id) {\n processData(response);\n\n }",
"@Override\n\tpublic void processResponse(Response response)\n\t{\n\t\t\n\t}",
"@Override\n public void processResult(HttpResponseMessage response) {\n }",
"@Override\n public void onResponse(JSONArray response) {\n parseData(response);\n }",
"@Override\n public void onResponse(String response) {\n System.out.println(response.toString());\n }",
"@Override\n public void onResponse(Response response) throws IOException {\n if (!response.isSuccessful()) {\n //Here our reponse is UnSucessfull so we inform the user\n // about the same as before\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n return;\n }\n //If Response is sucessfull we move forward and convert the\n // reponse which is in JSON format to String\n String respFromApi = response.body().string();\n\n //We will Log this LogCat in order to view the Raw Format recieved\n //you can open the log cat go in debug section and type RawData you\n // will be able to observe data there\n Log.d(\"RawData\", respFromApi);\n\n //Now We will call Extract Data Function which will retrieve the\n // woied and name of each city from the response\n try {\n extractData(respFromApi);\n } catch (Exception e) {\n //Informing Data is Not in JSON Format\n Toast.makeText(MainActivity.this, \"Response Not in JSON Format\", Toast.LENGTH_SHORT).show();\n }\n ;\n }",
"private Response() {\n initFields();\n }",
"@Override\n public void onResponse(JSONArray response) {\n ;\n }",
"@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }",
"@Override\n public void onResponse(String response) {\n mTextView.setText(\"Response is: \" + response);\n }",
"@Override\n public void onResponse(JSONObject jsonObject)\n {\n }",
"@Override\r\n\t\t\t\t\tpublic void onResponse(String arg0) {\n\t\t\t\t\t\tlistonResponse(arg0);\r\n\t\t\t\t\t\trefreshView.onRefreshComplete();\r\n\t\t\t\t\t}",
"@Override\n public void onResponse(String json) {\n parseRefreshResponse(json);\n }",
"@Override\n\t\t\tpublic void onResponse(Response response) throws IOException {\n Log.i(\"info\",response.body().string());\n\t\t\t}",
"@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }",
"@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }",
"@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }",
"@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }",
"@Override\n public void onResponse(JSONObject response) {\n hideCustomLoadingView();\n try {\n String status = response.getString(\"status\");\n if (status.equals(\"1\")) {\n mUser = LoganSquare.parse(response.getString(\"barber\"), User.class);\n if (mUser == null || TextUtils.isEmpty(mUser.userid)) {\n gotoLogin();\n return;\n }\n\n saveKeyValue(\"me\", response.getString(\"barber\"));\n mCustomers = new ArrayList<>();\n mCustomers = LoganSquare.parseList(response.getString(\"customers\"), User.class);\n String total = response.getString(\"total_count\");\n //totalCountTV.setText(\"Total \" + total);\n int avg = response.getInt(\"average_cutting_time\");\n timePerCutTV.setText(\" \" + (avg / 60) + \"min\");\n queueCountTV.setText(\"(\" + mCustomers.size() + \")\");\n showUserInfo();\n setCustomers();\n } else if (status.equals(\"false\")) {\n showToast(\"Fail\");\n } else {\n showToast(\"Network Error!\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n showToast(\"Network Error!\");\n }\n }",
"@Override\n\t\t\t\t\t\t\tpublic void onComplete(String response, Object state) {\n\t\t\t\t\t\t\t\tString json = response;\n\t\t\t\t\t\t\t\tLog.d(\"arv\", \"arv\"+json);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}",
"@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }",
"@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }",
"@Override\n public void onResponse(JSONObject response) {\n hideCustomLoadingView();\n try {\n String status = response.getString(\"status\");\n if (status.equals(\"1\")) {\n mCustomers = new ArrayList<>();\n mCustomers = LoganSquare.parseList(response.getString(\"customers\"), User.class);\n queueCountTV.setText(\"(\" + mCustomers.size() + \")\");\n setCustomers();\n } else if (status.equals(\"false\")) {\n showToast(\"Fail\");\n } else {\n showToast(\"Network Error!\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n showToast(\"Network Error!\");\n }\n }",
"@Override\r\n\tprotected void processRespond() {\n\r\n\t}",
"@Override\r\n\tprotected void processRespond() {\n\r\n\t}",
"public abstract String getResponse();",
"java.lang.String getResponse();",
"@Override\n public void onResponse(String response) {\n Example videos = new Gson().fromJson(response, Example.class);\n\n setAdapter(videos.getItems());\n }",
"public void onRequestResponse(Response response) { }",
"@Override\r\n public void onResponse(JSONArray response) {\n parseData(response, requestCount);\r\n }",
"@Override\n\t\t\t\tpublic void finished(Response response) {\n\t\t\t\t\tLog.w(\"myApp\", response.getResult() + \" \" + response.getError());\n\t\t\t\t}",
"@Override\n \t\t\t\tpublic void finished(Response response) {\n \t\t\t\t\tLog.w(\"myApp\", response.getResult() + \" \" + response.getError());\n \t\t\t\t}",
"@Override\n \t\t\t\tpublic void finished(Response response) {\n \t\t\t\t\tLog.w(\"myApp\", response.getResult() + \" \" + response.getError());\n \t\t\t\t}",
"@Override\n public void onResponse(String response) {\n if(null != listener){\n listener.onComplete(mRespHandler.parse(response));\n }\n }",
"@Override\n public void onResponse(JSONObject response) {\n hideCustomLoadingView();\n try {\n String status = response.getString(\"status\");\n if (status.equals(\"1\")) {\n showToast(\"Started\");\n setCustomers();\n } else if (status.equals(\"false\")) {\n showToast(\"Fail\");\n } else {\n showToast(\"Network Error!\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n showToast(\"Network Error!\");\n }\n }",
"@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }",
"@Override\n public void onResponse(String response) {\n\n if (response.equals(update_success)) {\n return;\n }\n if (response.equals(update_fail)) {\n return;\n }\n if (response.equals(non_value)) {\n return;\n }\n if (response.equals(wrong_query)) {\n return;\n }\n if (response.equals(non_post)) {\n\n }\n }",
"@Override\r\n\t\tpublic void onComplete(String response, Object state) {\n\t\t\t\r\n\t\t}",
"@Override\n public void onResponse(Object response) {\n activity.gotHelper(\"Succes!\");\n }",
"@Override\n public void onResponse(String response) {\n // try/catch block for returned JSON data\n // see API's documentation for returned format\n try {\n JSONObject result = new JSONObject(response);\n JSONArray resultList = result.getJSONArray(\"outputs\");\n JSONObject inner = resultList.getJSONObject(0);\n String out = inner.getString(\"output\");\n output.setText(\" \"+out);\n\n // catch for the JSON parsing error\n } catch (JSONException e) {\n Toast.makeText(MainActivity.this, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n protected void deliverResponse(JSONObject response) {\n listener.onResponse(response);\n System.out.println(\"response \"+response);\n }",
"@Override\r\n public void onResponse(String response) {\n button.setText(\"Response is: \" + response);\r\n Log.i(NAME, response);\r\n }",
"public Object getResponse ()\r\n {\r\n\r\n return response_;\r\n }",
"@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }",
"@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response.toString());\n displayGraphResult(response);\n }",
"@Override\n public void onResponse(String response) {\n try {\n //Convert response to a json\n JSONObject jsonObject = new JSONObject(response.toString());\n String result = jsonObject.getString(\"result\");\n eventArray = new JSONArray(result);\n createListData(eventArray);\n } catch (JSONException e) {\n Log.d(\"TimelineLog\", \"json conversion didn't work\");\n e.printStackTrace();\n }\n }",
"@Override\n public void onResponse(final JSONObject response) {\n Log.d(\"Response from FatSecret\", response.toString());\n try{\n JSONObject res = new JSONObject(response.getJSONObject(\"foods\").getJSONArray(\"food\").get(0).toString());\n saveFoodID.setText(res.getString(\"food_id\"));\n mainFoodName = res.getString(\"food_name\");\n foodIDView.setText(getString(R.string.food_display, res.getString(\"food_name\"), res.getString(\"food_id\")));\n requestFinished(true);\n }\n catch (Exception e){}\n }",
"void faild_response();",
"public int getResponse() {return response;}",
"@Override\n\t\t\tprotected void deliverResponse(String response) {\n\n\t\t\t}",
"@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif (WebApi.isRespSuccess(response)){\r\n\t\t\t\tString str = WebApi.getRespMsg(response);\r\n\t\t\t\tif (str != WebApi.API_RESP_MSG_NULL){\r\n\t\t\t\t\tupdateApkState(str);\r\n\t\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_UPDATED);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}",
"@Override\n public void onResponse(String response) {\n Toast.makeText(Details.this, \"\" + response, Toast.LENGTH_LONG).show();\n }",
"@Override\n public void onResponse(String response) { //when listener is activated\n Log.i(\"volley\", response);\n Converter converter = Converter.getInstance();\n Log.i(\"res\", response);\n // HashMap<String, Object> data = converter.JSONToHashMap(response);\n try {\n //if((boolean) data.get(\"status\"))\n //{\n ranking0.setText(response);\n //}\n } catch (Exception e) {\n Log.i(\"scoreboard error\", e.toString());\n }\n }",
"@Override\n public void onResponse(JSONObject response) {\n Log.e(\"tag\", \"request\");\n movieAdapter.setMovieList(parseRequest(response));\n }",
"@Override\n public Boolean onCompleted(Response response) throws Exception {\n System.out.println(response.getResponseBody());\n Type type = new TypeToken<Map<String, String>>() {\n }.getType();\n Map<String, String> jsonMap = jsonSeralizer.fromJson(response.getResponseBody(), type);\n //System.out.println(\"Results of Permssions set: \"+jsonMap);\n if (!jsonMap.get(\"success\").equals(1)) {\n System.out.println(\"File has been made available.\");\n return true;\n } else {\n System.out.println(jsonMap.get(\"error_message\"));\n return false;\n\n }\n }",
"@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }",
"@Override\r\n public void onResponse(String response) {\n Log.i(\"MyQuestion\", response);\r\n try {\r\n \r\n Gson gson = new Gson();\r\n MyQuestionBean resultUser = gson.fromJson(response, MyQuestionBean.class);\r\n if (resultUser.getStatus() == 1) {\r\n if (resultUser.getData().isEmpty()) {\r\n empty_layout.setVisibility(View.VISIBLE);\r\n myQuestionListView.setVisibility(View.INVISIBLE);\r\n } else {\r\n adapter = new MyQuestionListViewAdapter(resultUser.getData(), MyQuestionActivity.this);\r\n myQuestionListView.setAdapter(adapter);\r\n }\r\n }\r\n } catch (Exception e) {\r\n Toast.makeText(MyQuestionActivity.this, \"网络请求失败\", Toast.LENGTH_SHORT).show();\r\n }\r\n }",
"@Override\n public void onResponse(String response) {\n listTeams(response);\n\n }",
"@Override\n protected void deliverResponse(WeatherPOJO response) {\n this.listener.onResponse(response);\n }",
"public void onCompleted(GraphResponse response) {\n response.getRequest();\n }",
"private void getHttpResponse() {\n String url = \"https://api.openweathermap.org/data/2.5/weather?id=\"+city.getId()+\"&units=metric&appid=77078c41435ef3379462eb28afbdf417\";\n\n Request request = new Request.Builder()\n .url(url)\n .header(\"Accept\", \"application/json\")\n .header(\"Content-Type\", \"application/json\")\n .build();\n\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n String message = e.getMessage();\n System.out.println(message);\n }\n\n /**\n * Update the UI with the information\n * @param call\n * @param response\n * @throws IOException\n */\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n String body = response.body().string();\n\n Gson gson = new Gson();\n CityInfoDto cityInfo = gson.fromJson(body, CityInfoDto.class);\n\n setNewValues(Math.round(cityInfo.main.temp), cityInfo.weather[0].main);\n setBackground();\n }\n });\n }",
"@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif(WebApi.isRespSuccess(response)){\r\n\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_SYNC);\r\n\t\t\t\tBundle bundle = new Bundle();\r\n\t\t\t\tbundle.putInt(HANDLER_DATA_APK_INDEX, this.getApkIndex());\r\n\t\t\t\tMessage msg =new Message();\r\n\t\t\t\tmsg.setData(bundle);\r\n\t\t\t\tmsg.what = HANDLER_MSG_APK_ADD;\r\n\t\t\t\thandler.sendMessage(msg);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tString resp_msg = WebApi.getRespMsg(response);\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.what = HANDLER_MSG_TOAST;\r\n\t\t\tBundle bundle = new Bundle();\r\n\t\t\tbundle.putString(HANDLER_DATA_TOAST_TEXT, resp_msg);\r\n\t\t\tmsg.setData(bundle);\r\n\t\t\thandler.sendMessage(msg);\r\n\t\t}",
"@Override\n public void onResponse(String response) {\n if (type == 1) {\n DiaLogUtil.dismissDiaLog();\n } else {\n //刷新成功\n smartRefreshLayout.finishRefresh(true);\n }\n try {\n HomeBean homeBeanlist = (HomeBean) JsonUtils.stringToObject(response, HomeBean.class);\n Message msg = new Message();\n msg.what = 1;\n msg.obj = homeBeanlist;\n handler.sendMessage(msg);\n\n } catch (Exception e) {\n e.printStackTrace();\n setLogin();\n }\n }",
"@Override\n public void onResponse(String response) {\n Gson g = new Gson();\n CurrencyRates rates = g.fromJson(response, CurrencyRates.class);\n setRates(rates);\n }",
"public TrackResponse() {\n\t\tsuper();\n\t}",
"public String receiveResponse()\n\t{\n\t\t\n\t}",
"@Override\n public void onResponse(String response) {\n Gson gson = new Gson();\n ServerResponse serverResponse = gson.fromJson(response, ServerResponse.class);//Parse do json segundo o modelo SeverResponse\n\n if (serverResponse.isSuccess()) {\n ModalidadeArray modalidadeArray = gson.fromJson(serverResponse.getResponse(), ModalidadeArray.class);\n ArrayList<Modalidade> modalidades = new ArrayList<Modalidade>(Arrays.asList(modalidadeArray.getModalidades()));\n DataHolder.getInstance().setModalidade(modalidades.get(0));\n\n Intent intent = new Intent(Constants.kGetModalidadesDone);\n context.sendBroadcast(intent);\n\n } else {\n Toast.makeText(context, serverResponse.getMessage(),\n Toast.LENGTH_LONG).show();\n }\n }"
]
| [
"0.7414735",
"0.7407986",
"0.73767227",
"0.7360284",
"0.7360284",
"0.7360284",
"0.7329669",
"0.732496",
"0.7321417",
"0.73199826",
"0.7242337",
"0.7182039",
"0.71565616",
"0.71195847",
"0.71094024",
"0.70511407",
"0.7038773",
"0.70341253",
"0.70286316",
"0.6990841",
"0.6967647",
"0.69415474",
"0.6938114",
"0.69350994",
"0.692542",
"0.6922327",
"0.6884415",
"0.6850737",
"0.68337005",
"0.682165",
"0.6814911",
"0.67979246",
"0.6795182",
"0.6792881",
"0.67850035",
"0.67683303",
"0.67510223",
"0.6750716",
"0.6747251",
"0.6744257",
"0.6714568",
"0.6713809",
"0.66959953",
"0.66955036",
"0.66474396",
"0.66412437",
"0.6633365",
"0.662727",
"0.6626584",
"0.66074437",
"0.6586393",
"0.65814793",
"0.6574601",
"0.6569491",
"0.6567746",
"0.65572506",
"0.65536964",
"0.65536964",
"0.65375495",
"0.6528049",
"0.6509083",
"0.6494143",
"0.6492114",
"0.6491413",
"0.6476446",
"0.6476446",
"0.6448191",
"0.6444899",
"0.6441158",
"0.644077",
"0.64403874",
"0.6437031",
"0.6436256",
"0.64348334",
"0.64217675",
"0.64162403",
"0.64127207",
"0.6401369",
"0.63980633",
"0.63951015",
"0.63866043",
"0.63737637",
"0.63652956",
"0.63530135",
"0.6342418",
"0.63234484",
"0.6308009",
"0.6300239",
"0.6296837",
"0.62952775",
"0.62842613",
"0.628124",
"0.6254746",
"0.6254098",
"0.6253098",
"0.6249338",
"0.62350965",
"0.6232498",
"0.62287",
"0.622023"
]
| 0.62303895 | 98 |
Gets a Data object from a ResultSet. | private String getStringFromResultSet(ResultSet rs) throws SQLException, UnsupportedEncodingException {
ResultSetMetaData meta = rs.getMetaData();
StringBuilder sb = new StringBuilder();
int numColumns = meta.getColumnCount();
for (int i = 1; i <= numColumns; i++) {
sb.append(meta.getColumnLabel(i));
if (i == numColumns) {
sb.append('\n');
} else {
sb.append('\t');
}
}
JMeterVariables jmvars = getThreadContext().getVariables();
String varnames[] = getVariableNames().split(COMMA);
String resultVariable = getResultVariable().trim();
List<Map<String, Object>> results = null;
if (resultVariable.length() > 0) {
results = new ArrayList<Map<String, Object>>();
jmvars.putObject(resultVariable, results);
}
int j = 0;
while (rs.next()) {
Map<String, Object> row = null;
j++;
for (int i = 1; i <= numColumns; i++) {
Object o = rs.getObject(i);
if (results != null) {
if (row == null) {
row = new HashMap<String, Object>(numColumns);
results.add(row);
}
row.put(meta.getColumnLabel(i), o);
}
if (o instanceof byte[]) {
o = new String((byte[]) o, ENCODING);
}
sb.append(o);
if (i == numColumns) {
sb.append('\n');
} else {
sb.append('\t');
}
if (i <= varnames.length) { // i starts at 1
String name = varnames[i - 1].trim();
if (name.length() > 0) { // Save the value in the variable if present
jmvars.put(name + UNDERSCORE + j, o == null ? null : o.toString());
}
}
}
if (NumberUtils.isNumber(getResultSetReadDelay())) {
try {
Thread.sleep(Long.valueOf(getResultSetReadDelay()));
} catch (InterruptedException e) {
log.warn("Result set read delay caused InterruptedException.", e);
}
}
}
// Remove any additional values from previous sample
for (int i = 0; i < varnames.length; i++) {
String name = varnames[i].trim();
if (name.length() > 0 && jmvars != null) {
final String varCount = name + "_#"; // $NON-NLS-1$
// Get the previous count
String prevCount = jmvars.get(varCount);
if (prevCount != null) {
int prev = Integer.parseInt(prevCount);
for (int n = j + 1; n <= prev; n++) {
jmvars.remove(name + UNDERSCORE + n);
}
}
jmvars.put(varCount, Integer.toString(j)); // save the current count
}
}
return sb.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@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}",
"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}",
"protected ResultSet getResultSet ()\n throws SQLException\n {\n if ( this.refId == Id.UNDEFINED )\n return this.dbHelper.queryData(this.type, this.id, this.getDbColumns());\n else\n return this.dbHelper.queryDataOfRefTarget\n (this.fromDocType, this.type, this.refId, this.getDbColumns());\n }",
"public static ResultSet getData(String tableName) throws SQLException, ClassNotFoundException {\n Connection connection = OracleConnector.getConnection();\n Statement statement = connection.createStatement();\n String query = \"SELECT * FROM \" + tableName;\n\n return statement.executeQuery(query);\n }",
"public Object getResult(ResultSet rs, String columnName) throws SQLException;",
"private Item fromResultSet(ResultSet resultSet) throws SQLException {\n String name = resultSet.getString(\"Name\");\n String description = resultSet.getString(\"Description\");\n int dollars = resultSet.getInt(\"PriceDollars\");\n int cents = resultSet.getInt(\"PriceCents\");\n Item i = new Item(name, description, dollars, cents);\n\t dao.setId(i, resultSet.getInt(\"id\"));\n\t return i;\n }",
"public Object get(ResultSet rs, String name) throws HibernateException, SQLException {\n Reader charReader = rs.getCharacterStream(name);\n\n // if the corresponding SQL value is NULL, the reader we got is NULL as well\n if (charReader == null || rs.wasNull()) return null;\n\n // Fetch Reader content up to the end - and put characters in a StringBuffer\n StringBuffer sbuf = new StringBuffer();\n try {\n char[] cbuf = new char[1024];\n for (int amountRead; (amountRead = charReader.read(cbuf)) != -1;) {\n sbuf.append(cbuf, 0, amountRead);\n }\n }\n catch (IOException ioe) {\n throw new HibernateException(\"IOException occurred reading text\", ioe);\n }\n finally {\n try {\n charReader.close();\n }\n catch (IOException e) {\n throw new HibernateException(\"IOException occurred closing stream\", e);\n }\n }\n\n // Return StringBuffer content as a large String\n return sbuf.toString();\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 ResultSet selectData(String sql) throws java.sql.SQLException {\n\t\treturn selectData(sql, -1);\n\t}",
"public BikeData getBikeDataFromRS(ResultSet rs){\n try{\n int bikeId = rs.getInt(cBikeID);\n LocalDateTime dateTime = rs.getTimestamp(cDateTime).toLocalDateTime();\n double latitude = rs.getDouble(cLatitude);\n double longitude = rs.getDouble(cLongitude);\n double chargingLevel = rs.getDouble(cChargingLevel);\n BikeData bd = new BikeData(bikeId, dateTime, latitude, longitude, chargingLevel);\n return bd;\n }catch(Exception e){\n System.out.println(\"Exception \" + e);\n }\n return null;\n }",
"@Override\r\n\tpublic List<EmployeeBo> extractData(ResultSet rs) throws SQLException, DataAccessException {\n\t\tList<EmployeeBo> lisbo= new ArrayList<EmployeeBo>();\r\n\t\tEmployeeBo bo=null;\r\n\t\twhile(rs.next())\r\n\t\t{\r\n\t\t\tbo=new EmployeeBo();\r\n\t\t\tbo.setEmpno(rs.getInt(1));\r\n\t\t\tbo.setEname(rs.getString(2));\r\n\t\t\tbo.setJob(rs.getString(3));\r\n\t\t\tbo.setSalary(rs.getInt(4));\r\n\t\t\tlisbo.add(bo);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn lisbo;\r\n\t}",
"@Override\n\tpublic ResultSet getResultSet() throws SQLException {\n\t\treturn new CassandraResultSet(driverContext, resultSet);\n\t}",
"T buidEntity(ResultSet rs) throws SQLException;",
"@Override\n\tpublic List<Book> extractData(ResultSet rs) throws SQLException {\n\t\treturn null;\n\t}",
"T deserializeData(R r) throws SQLException;",
"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 }",
"@Override\n public ResultSet getResultSet() throws SQLException {\n\n ResultSet r;\n\n r = result; // save the existing result set\n result = null; // null out the existing result set\n return r; // return the previously extant result set\n }",
"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 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}",
"protected abstract Object mapRow(ResultSet rs) throws SQLException;",
"public ResultSet getResultSet(String sql) {\n stmt = getStatement();\n try {\n rs = stmt.executeQuery(sql);\n } catch (SQLException sqle) {\n System.out.println(sqle.getMessage());\n }\n return rs;\n\n }",
"public ResultSet getResultSet() throws SQLException {\n return null;\r\n }",
"private Vector getData(String where) throws Exception{\n Vector info = new Vector();\n\n Statement stm = con.createStatement();\n ResultSet result = stm.executeQuery(\"SELECT * FROM \" + tableName + where);\n\n while(result.next()){\n String name = result.getObject(\"name\").toString(),\n city = result.getObject(\"city\").toString(),\n phone = result.getObject(\"phone\").toString();\n\n info.addElement(new Person(name, city, phone));\n }\n return info;\n }",
"protected Object fetchRow(ResultSet rs) throws SQLException {\n return fetchUser(rs);\n }",
"private static Object getObject(ResultSet rs, ResultSetMetaData rsmd, int columnIndex)\n\t\tthrows SQLException\n\t{\n\t\tif (rsmd.getColumnType(columnIndex) == java.sql.Types.TINYINT)\n\t\t\treturn rs.getByte(columnIndex);\n\t\telse if (rsmd.getColumnType(columnIndex) == java.sql.Types.SMALLINT)\n\t\t\treturn rs.getShort(columnIndex);\n\t\telse if (rsmd.getColumnType(columnIndex) == java.sql.Types.INTEGER)\n\t\t\treturn rs.getInt(columnIndex);\n\t\telse if (rsmd.getColumnType(columnIndex) == java.sql.Types.BIGINT)\n\t\t\treturn rs.getLong(columnIndex);\n\t\treturn rs.getObject(columnIndex); // Default behavior for other types seems to be OK...hopefully...\n\t}",
"protected Utente fetchSingleResult(ResultSet rs) throws SQLException\n\t{\n\t\tif (rs.next()) {\n\t\t\tUtente dto = new Utente();\n\t\t\tpopulateDto( dto, rs);\n\t\t\treturn dto;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t}",
"public Object getObject(int columnIndex) throws SQLException\n {\n return m_rs.getObject(columnIndex);\n }",
"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 }",
"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}",
"Object deserialize() throws SQLException {\n\ttry {\n\t ByteArrayInputStream bi = new ByteArrayInputStream(data);\n\t ObjectInputStream is = new ObjectInputStream(bi);\n\n\t return is.readObject();\n\t} catch (Exception e) {\n\t throw Trace.error(Trace.SERIALIZATION_FAILURE, e.getMessage());\n\t}\n }",
"public abstract Statement queryToRetrieveData();",
"@Override\n public ResultSet getResultSet() throws SQLException {\n if (isClosed()) {\n throw new SQLException(\"Statement was closed\");\n }\n if (stmt_ref == null) {\n throw new SQLException(\"Prepare something first\");\n }\n\n if (!returnsResultSet) {\n return null;\n }\n\n // getResultSet can only be called once per result\n ResultSet to_return = select_result;\n this.select_result = null;\n return to_return;\n }",
"public List<BusInfo> extractData(ResultSet rs) throws SQLException, DataAccessException {\n\t\t\t\treturn null;\r\n\t\t\t}",
"public List<BusInfo> extractData(ResultSet rs) throws SQLException, DataAccessException {\n\t\t\t\treturn null;\r\n\t\t\t}",
"public Object getObject(String columnName) throws SQLException\n {\n return m_rs.getObject(columnName);\n }",
"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 Artista loadNext(ResultSet resultSet)\r\n\t\t\tthrows SQLException {\n\t\tint i = 1;\r\n\t\tLong codArtista = resultSet.getLong(i++);\t \r\n\t\tString nomeArtista = resultSet.getString(i++);\r\n\r\n\t\t// Rellena el objeto\r\n\t\tArtista a = new Artista();\r\n\t\ta.setCodArtista(codArtista);\r\n\t\ta.setNomeArtista(nomeArtista);\r\n\t\treturn a;\r\n\t}",
"public Object getObject(String columnName) throws SQLException {\n\n try {\n debugCodeCall(\"getObject\", columnName);\n Value v = get(columnName);\n return conn.convertToDefaultObject(v);\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }",
"public <E extends Retrievable> ResultSet read(CharSequence sql, Object... objects);",
"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 }",
"protected abstract T createEntityFromResult (final ResultSet result) throws SQLException;",
"public <T extends Entity> T getObjectByResultSet(T entity, ResultSet rs) throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, SQLException, InstantiationException{\n\t\tList<T> list = getListObjectByResultSet(entity, rs);\n\t\treturn (list != null && !list.isEmpty())?list.get(0):null;\n\t}",
"protected Opportunities fetchSingleResult(ResultSet rs) throws SQLException\r\n\t{\r\n\t\tif (rs.next()) {\r\n\t\t\tOpportunities dto = new Opportunities();\r\n\t\t\tpopulateDto( dto, rs);\r\n\t\t\treturn dto;\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\n\tpublic List<BookCopies> extractData(ResultSet rs) throws SQLException, DataAccessException {\n\t\tList<BookCopies> aList = new ArrayList<BookCopies>();\n\t\twhile(rs.next())\n\t\t{\n\t\t\tBookCopies a = new BookCopies();\n\t\t\tBook bk = bkRun.readOne(rs.getInt(\"bookId\"));\n\t\t\tLibraryBranch brh = brhRun.readOne(rs.getInt(\"branchId\"));\n\t\t\ta.setBook(bk);\n\t\t\ta.setBranch(brh);\n\t\t\ta.setNoOfCopies(rs.getInt(\"noOfCopies\"));\n\t\t\taList.add(a);\n\t\t}\n\t\treturn aList;\n\t}",
"public Object[][] Consulta(String Comsql) {\n Object Datos[][] = null;\n try {\n PreparedStatement pstm = con.prepareStatement(Comsql);\n /* declarando ResulSet que va a contener el resultado de la ejecucion del Query */\n ResultSet rs = pstm.executeQuery();\n /*se ubica en el ultimo registro, para saber cuantos ahi */\n rs.last();\n /*para saber el numero de filas y columnas del ResulSet */\n ResultSetMetaData rsmd = rs.getMetaData();\n /*aqui muestra la cantidad de filas y colmnas ahi */\n int numCols = rsmd.getColumnCount();\n int numFils = rs.getRow();\n /*cojemos nuestro objeto datos y le damos formato, eso es igual a numero de filas y numero de columnas */\n Datos = new Object[numFils][numCols];\n /* nos ubicamos antes de la primera fila */\n rs.beforeFirst();\n\n /*j= filas\n i= columnas\n */\n int j = 0;\n /*recorremos los datos del RS\n */\n while (rs.next()) {\n /*i siempre se inicializa en cero; la condicion va hasta que i sea menor que e numcol; y aumenta de 1 en 1 */\n for (int i = 0; i < numCols; i++) {\n /*aqui le asignamos valor a nuestro arreglo */\n Datos[j][i] = rs.getObject(i + 1);\n }\n j++;\n }\n pstm.close();\n rs.close();\n } catch (Exception e) {\n System.out.println(\"Error : \" + e.getMessage());\n }\n return Datos;\n }",
"private RespuestaVO extractRespuestaFromResultSet(ResultSet rs) throws SQLException {\n\t\tRespuestaVO respuesta = new RespuestaVO(\n\t\t\trs.getLong(\"idRespuesta\"),\n\t\t\trs.getLong(\"idPregunta\"),\n\t\t\trs.getString(\"enunciado\"),\n\t\t\trs.getBoolean(\"correcta\")\n\t\t);\n\t\treturn respuesta;\n\t}",
"protected ProductosPuntoVenta fetchSingleResult(ResultSet rs)\r\n throws SQLException {\r\n if (rs.next()) {\r\n ProductosPuntoVenta dto = new ProductosPuntoVenta();\r\n populateDto(dto, rs);\r\n return dto;\r\n }\r\n else {\r\n return null;\r\n }\r\n\r\n }",
"Object getBlob(ResultSet rs, int pos)\r\n throws Exception;",
"public static ResultSet readTableWithReturnValue(String spOrQueryName) {\r\n\t\ttry {\r\n\t\t\topenCon();\r\n\t\t\ts = conn.createStatement();\r\n\t\t\t_rs = s.executeQuery(spOrQueryName);\r\n\t\t\tcloseCon();\r\n\r\n\t\t} catch (Exception e) {\r\n//\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn _rs;\r\n\t}",
"@Override\n\tpublic List<User> extractData(ResultSet rs) throws SQLException, DataAccessException {\n\t\tList<User> list = new ArrayList<User>();\n\t\twhile (rs.next()) {\n\t\t\tUser user = new User();\n\t\t\tuser.setUserId(rs.getInt(\"user_id\"));\n\t\t\tuser.setUserName(rs.getString(\"user_name\"));\n\t\t\tlist.add(user);\n\n\t\t}\n\t\treturn list;\n\t}",
"public <E extends Writeable> ResultSet read(CharSequence sql);",
"@Nullable\n\t\t\t@Override\n\t\t\tpublic T mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString title = rs.getString(\"title\");\n\t\t\t\tString author = rs.getString(\"author\");\n\t\t\t\tint numPages = rs.getInt(\"num_pages\");\n\t\t\t\tDate releaseDate = rs.getDate(\"release_date\");\n\t\t\t\tboolean available = rs.getBoolean(\"available\");\n\n\t\t\t\tClass<T> type = null; // TODO: we need the type\n\t\t\t\tT object = null; // TODO: type.newInstance();\n\n\t\t\t\t/* TODO: create instance and fill properties\n\t\t\t\tbook.setId(id);\n\t\t\t\tbook.setTitle(title);\n\t\t\t\tbook.setAuthor(author);\n\t\t\t\tbook.setNumPages(numPages);\n\t\t\t\tbook.setReleaseDate(releaseDate);\n\t\t\t\tbook.setAvailable(available);\n\t\t\t\t*/\n\n\t\t\t\treturn object;\n\t\t\t}",
"@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<?> extractData(ResultSet rs) throws SQLException {\n\n\n\t\tList<Publisher> publisher = new ArrayList<Publisher>();\n\t\tBookDAO bdao = new BookDAO(conn);\n\t\t\n\t\twhile(rs.next()){\n\t\t\tPublisher b = new Publisher();\n\t\t\tb.setPublisherId(rs.getInt(\"publisherId\"));\n\t\t\tb.setPublisherName(rs.getString(\"publisherName\"));\n\t\t\tb.setPublisherAddress(rs.getString(\"publisherAddress\"));\n\t\t\tb.setPublisherPhones(rs.getString(\"publisherPhone\"));\n\t\t\t\n\t\t\tif ((b.getBooks() != null && b.getBooks().size() > 0)){\n\t\t\tfor(Book bo: b.getBooks())\n\t\t\t\tb.setBooks((List<Book>) bdao.readFirstLevel(\"select * from tbl_book where bookId = ?)\", new Object[] {bo.getBookId()}));\n\t\t }\n\t\t\tpublisher.add(b);\n\t\t}\n\t\treturn publisher;\n\t}",
"public DataBase getDataSet() {\r\n DataBase dataset = null;\r\n try {\r\n Statement stmt = conexion.createStatement();\r\n String sql;\r\n sql = \"SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = '\" + schema + \"'\";\r\n ResultSet rs = stmt.executeQuery(sql);\r\n dataset = new DataBase();\r\n while (rs.next()) {\r\n \r\n dataset.setCatalog_name(rs.getString(1));\r\n dataset.setSchema_name(rs.getString(2));\r\n dataset.setCharacter_set(rs.getString(3));\r\n dataset.setCollation_name(rs.getString(4));\r\n dataset.setIssued(getIssuedBD(schema));\r\n\r\n }\r\n ArrayList<Table> tables = getTables(schema);\r\n dataset.setTables(tables);\r\n return dataset;\r\n } catch (SQLException ex) {\r\n Logger.getLogger(DAOBaseDatos.class.getName()).log(Level.SEVERE, null, ex);\r\n return null;\r\n }\r\n }",
"public Object getObject(int columnIndex) throws SQLException {\n\n try {\n debugCodeCall(\"getObject\", columnIndex);\n Value v = get(columnIndex);\n return conn.convertToDefaultObject(v);\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }",
"public static ResultSet getResultSet() throws SQLException\n\t{\n\t\tstatement = connection.createStatement();\n\t\tresultSet = statement.executeQuery(selectQuery);\n\t\t\n\t\treturn resultSet;\n\t}",
"public List<BusInfo> extractData(ResultSet rs) throws SQLException, DataAccessException {\n\t\t\t\treturn list;\r\n\t\t\t}",
"public List<BusInfo> extractData(ResultSet rs) throws SQLException, DataAccessException {\n\t\t\t\treturn list;\r\n\t\t\t}",
"protected abstract void streamData(ResultSet paramResultSet)\r\n/* 51: */ throws SQLException, IOException, DataAccessException;",
"public String fetchData(String tableName, int id, String columnName) throws SQLException {\n\n\t\ttry {\n\t\t\tSystem.out.println(\"Id of the Products is \" + id);\n\n\t\t\tSystem.out.println(\"select \" + columnName + \" from \" + tableName + \" where \"\n\t\t\t\t\t+ getPrimaryKeyColumnName(tableName) + \" = \" + id);\n\n\t\t\trs = stmt.executeQuery(\"select \" + columnName + \" from \" + tableName + \" where \"\n\t\t\t\t\t+ getPrimaryKeyColumnName(tableName) + \" = \" + id);\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tSystem.out.println(rs.getString(1));\n\t\t\t\treturn rs.getString(1);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Sorry! wrong Input\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn rs.getString(1);\n\t}",
"private BookData convertRowToBook(ResultSet myRs) throws SQLException {\n\t\t\n\t\tString title = myRs.getString(\"title\");\n\t\t\n\t\tString author = myRs.getString(\"author_name\");\n\t\tString publisher = myRs.getString(\"publisher_name\");\n\t\tint id=myRs.getInt(\"book_id\");\n\t\t\n\t\t\n\t\t\n\t\tBookData tempbook = new BookData(title, author, publisher, id);\n\t\treturn tempbook;\n\n\t}",
"public ResultSet getNativeResultSet(ResultSet rs)\r\n/* 86: */ throws SQLException\r\n/* 87: */ {\r\n/* 88:163 */ return rs;\r\n/* 89: */ }",
"public static void convertRsToBaseData(ResultSet rs,BaseData data) throws SQLException{\n\t\tResultSetMetaData rsMeta = rs.getMetaData();\r\n\t\tint columnCount = rsMeta.getColumnCount();\r\n\t\t\r\n\t\tfor(int i = 1; i <= columnCount; i++){\r\n\t\t\tString key = rsMeta.getColumnLabel(i);\r\n\t\t\tObject value = rs.getObject(key);\r\n\t\t\t\r\n\t\t\t//if(value instanceof oracle.sql.DATE){\r\n\t\t\t//\tvalue = new java.sql.Date(((oracle.sql.DATE)value).timestampValue().getTime());\r\n\t\t\t//}else if(value instanceof oracle.sql.TIMESTAMP){\r\n\t\t\t//\tvalue = new java.sql.Timestamp(((oracle.sql.TIMESTAMP)value).timestampValue().getTime());\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\tdata.setValue(key, value);\r\n\t\t}\r\n\t}",
"public static Vector getResultSet( ResultSet rs ) throws SQLException {\n ResultSetMetaData rsmd = rs.getMetaData();\n int columnCount = rsmd.getColumnCount();\n Vector vResult=new Vector();\n Vector vRow;\n String rString;\n // stuur meta informatie mee met iedere vRow\n \n /** tel de attributen die daadwerkelijk een\n * waarde hebben, dus <> leeg\n */\n int CntValuedAttr;\n \n while (rs.next()) {\n vRow=new Vector();\n CntValuedAttr=0;\n for (int k=1; k<=columnCount; k++) {\n rString=(String)rs.getString(k);\n if (rString.length()!=0)\n CntValuedAttr++;\n vRow.add(rString);\n }\n vRow.add(Integer.toString(CntValuedAttr));\n vResult.add((Vector)vRow);\n }\n \n return vResult;\n }",
"Object getDataValue(final int row, final int column);",
"Object getDataValue(String column, int row);",
"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\n\tpublic Curso mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t/* Se declara e instancia el objeto Persona.*/\n\t\tCurso curso = new Curso();\n\t\t/* Se recoje el identificador de curso del result.*/\n\t\tcurso.setId(rs.getInt(\"id\"));\n\t\t/* Se recoje el codigo de curso del result.*/\n\t\tcurso.setCodigo(rs.getString(\"codigo\"));\n\t\t/* Se recoje el nombre de la curso del result.*/\n\t\tcurso.setNombre(rs.getString(\"nombre\"));\n\t\t\n\t\t\n\t\t/* Se devuelve el objeto Persona.*/\n\t\treturn curso;\n\t}",
"public IMDBBaseEntity entityPerResultSet(ResultSet rs) throws SQLException {\n return null;\n }",
"public void opbLoad(final java.sql.ResultSet resultSet)\r\n throws OpbDataAccessException {\r\n final String methodName = \"opbLoad(ResultSet)\";\r\n\r\n logger.entering(CLASS_NAME, methodName);\r\n\r\n // Clear all field values\r\n opbClearState();\r\n\r\n // Make sure resultSet is not null\r\n OpbAssert.notNull(logger, CLASS_NAME, methodName, \"resultSet\", resultSet);\r\n\r\n // Get field values from resultSet\r\n try {\r\n // load a from column a\r\n a = OpbSqlHelper.getValue(\r\n a, resultSet,\r\n \"a\", true);\r\n // save the value we just loaded as the datasource value\r\n aDataSourceValue = a;\r\n\r\n // load aVarchar from column a_varchar\r\n aVarchar = OpbSqlHelper.getValue(\r\n aVarchar, resultSet,\r\n \"a_varchar\", true);\r\n // save the value we just loaded as the datasource value\r\n aVarcharDataSourceValue = aVarchar;\r\n\r\n // load aNumber from column a_number\r\n aNumber = OpbSqlHelper.getValue(\r\n aNumber, resultSet,\r\n \"a_number\", true);\r\n // save the value we just loaded as the datasource value\r\n aNumberDataSourceValue = aNumber;\r\n\r\n // load aInteger from column a_integer\r\n aInteger = OpbSqlHelper.getValue(\r\n aInteger, resultSet,\r\n \"a_integer\", true);\r\n // save the value we just loaded as the datasource value\r\n aIntegerDataSourceValue = aInteger;\r\n\r\n // load aDate from column a_date\r\n aDate = OpbSqlHelper.getValue(\r\n aDate, resultSet,\r\n \"a_date\", true);\r\n // save the value we just loaded as the datasource value\r\n aDateDataSourceValue = aDate;\r\n\r\n // load aRo from column a_ro\r\n aRo = OpbSqlHelper.getValue(\r\n aRo, resultSet,\r\n \"a_ro\", true);\r\n\r\n\r\n } catch (Exception ex) {\r\n OpbExceptionHelper.throwException(\r\n new OpbDataAccessException(\"failed to load\", ex),\r\n logger, CLASS_NAME, methodName);\r\n\r\n } finally {\r\n logger.exiting(CLASS_NAME, methodName);\r\n\r\n }\r\n\r\n }",
"public DataRow mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\n\t\n\t\tDataRow row = new DataRow();\n\t\t//if (rs.isClosed()){return null;}\n\t\tint cols = rs.getMetaData().getColumnCount();\n\t\t\n\t\tfor (int i=1 ; i <= cols; i++){\n\t\t\tDefaultLobHandler blob = new DefaultLobHandler();\n\t\t\trow.setValue(rs.getMetaData().getColumnName(i), blob.getBlobAsBinaryStream(rs, i));\n\t\t}\n\t\n\t\treturn row;\n\t}",
"public ResultSet getRecords() throws SQLException{\n Statement stmt = getConnection().createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,\n ResultSet.CONCUR_UPDATABLE);\n String sqlGet = \"SELECT * FROM myStudents\";\n stmt.executeQuery(sqlGet);\n ResultSet rs = stmt.getResultSet();\n return rs;\n }",
"private Object getDataSetData(MapDataSet dataSet, DataSetColumn column) {\n \t\tif (dataSet.getRowMap().containsKey(new Integer(0))) {\n \t\t\treturn dataSet.getColumnValue(0, column.getName());\n \t\t}\n \t\telse {\n \t\t\treturn dataSet.getData(column);\n \t\t}\n \t}",
"public List<BookLoans> extractData(ResultSet rs) throws ClassNotFoundException, SQLException {\n\t\tList<BookLoans> bookLoansList = new ArrayList<>();\n\t\twhile (rs.next()) {\n\t\t\tBookLoans bookLoans = new BookLoans();\n\t\t\tbookLoans.setBookID(rs.getInt(\"bookId\"));\n\t\t\tbookLoans.setBranchID(rs.getInt(\"branchId\"));\n\t\t\tbookLoans.setCardNo(rs.getInt(\"cardNo\"));\n\t\t\tbookLoans.setDateOut(OffsetDateTime.ofInstant(rs.getTimestamp(\"dateOut\").toInstant(), ZoneOffset.UTC)); //some messing around to get from epoch time to java time\n\t\t\tbookLoans.setDueDate(OffsetDateTime.ofInstant(rs.getTimestamp(\"dueDate\").toInstant(), ZoneOffset.UTC));\n\t\t\ttry {\n\t\t\t\tbookLoans.setDateIn(OffsetDateTime.ofInstant(rs.getTimestamp(\"dateIn\").toInstant(), ZoneOffset.UTC));\n\t\t\t}\n\t\t\tcatch(Exception e) {bookLoans.setDateIn(null);}\n\t\t\tbookLoansList.add(bookLoans);\n\t\t\t\n\t\t}\n\t\treturn bookLoansList;\n\t}",
"ResultSetMetaData getMetaData() throws SQLException;",
"public static Profil fromResultSet(ResultSet rs) throws SQLException, KasirException{\r\n return new Profil().dynFromResultSet(rs, true);\r\n }",
"@Override\n\tpublic EmployeeData mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\tEmployeeData ed = new EmployeeData();\n\t\ted.setEmpId(rs.getInt(\"EMPID\"));\n\t\ted.setEmpName(rs.getString(\"EMPNAME\"));\n\t\ted.setSalary(rs.getString(\"SALARY\"));\n\t\tDepartmentData dd = new DepartmentData();\n\t\tdd.setDeptId(rs.getInt(\"DEPTID\"));\n\t\tdd.setDeptName(rs.getString(\"DEPTNAME\"));\n\t\ted.setDepartmentData(dd);\n\t\treturn ed;\n\t}",
"protected ExitQuestionsMap fetchSingleResult(ResultSet rs) throws SQLException {\n\t\tif (rs.next()){\n\t\t\tExitQuestionsMap dto = new ExitQuestionsMap();\n\t\t\tpopulateDto(dto, rs);\n\t\t\treturn dto;\n\t\t}\n\t\treturn null;\n\t}",
"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}",
"@Override\n\tpublic Ticket mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\treturn ticketExtractor.extractData(rs);\n\t}",
"public ResultSetMetaData getMetaData() throws SQLException {\n\n try {\n int id = getNextId(TraceObject.RESULT_SET_META_DATA);\n if (isDebugEnabled()) {\n debugCodeAssign(\"ResultSetMetaData\", TraceObject.RESULT_SET_META_DATA, id, \"getMetaData()\");\n }\n checkClosed();\n String catalog = conn.getCatalog();\n JdbcResultSetMetaData meta = new JdbcResultSetMetaData(this, null, result, catalog, conn.getSession().getTrace(), id);\n return meta;\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }",
"public ResultSetRow next() throws SQLException {\n/* 338 */ if (this.fetchedRows == null && this.currentPositionInEntireResult != -1) {\n/* 339 */ throw SQLError.createSQLException(Messages.getString(\"ResultSet.Operation_not_allowed_after_ResultSet_closed_144\"), \"S1000\", this.mysql.getExceptionInterceptor());\n/* */ }\n/* */ \n/* */ \n/* 343 */ if (!hasNext()) {\n/* 344 */ return null;\n/* */ }\n/* */ \n/* 347 */ this.currentPositionInEntireResult++;\n/* 348 */ this.currentPositionInFetchedRows++;\n/* */ \n/* */ \n/* 351 */ if (this.fetchedRows != null && this.fetchedRows.size() == 0) {\n/* 352 */ return null;\n/* */ }\n/* */ \n/* 355 */ if (this.fetchedRows == null || this.currentPositionInFetchedRows > this.fetchedRows.size() - 1) {\n/* 356 */ fetchMoreRows();\n/* 357 */ this.currentPositionInFetchedRows = 0;\n/* */ } \n/* */ \n/* 360 */ ResultSetRow row = this.fetchedRows.get(this.currentPositionInFetchedRows);\n/* */ \n/* 362 */ row.setMetadata(this.metadata);\n/* */ \n/* 364 */ return row;\n/* */ }",
"ExpDataClass getDataClass(int rowId);",
"@Override\r\n\t\t\t\t\t public Object mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\t\t\tStudentVO vo=new StudentVO();\r\n\t\t\t\t\t\tvo.setName(rs.getString(1));\r\n\t\t\t\t\t\tvo.setKor(rs.getInt(2));\r\n\t\t\t\t\t\tvo.setEng(rs.getInt(3));\r\n\t\t\t\t\t\tvo.setMath(rs.getInt(4));\r\n\t\t\t\t\t\tvo.setTotal(rs.getInt(5));\r\n\t\t\t\t\t\tvo.setAvg(rs.getDouble(6));\r\n\t\t\t\t\t\treturn vo;\r\n\t\t\t\t\t }",
"protected PaypalIpn fetchSingleResult(ResultSet rs) throws SQLException\r\n\t{\r\n\t\tif (rs.next()) {\r\n\t\t\tPaypalIpn dto = new PaypalIpn();\r\n\t\t\tpopulateDto( dto, rs);\r\n\t\t\treturn dto;\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t}",
"private NhanVien readFromResultSet(ResultSet rs) throws SQLException {\n NhanVien model = new NhanVien();\n model.setMaNV(rs.getString(\"MaNV\"));\n model.setHoTen(rs.getString(\"HoTen\"));\n model.setGioiTinh(rs.getBoolean(\"GioiTinh\"));\n model.setNgaySinh(rs.getDate(\"NgaySinh\"));\n model.setQueQuan(rs.getString(\"QueQuan\"));\n model.setChuyenMon(rs.getString(\"ChuyenMon\"));\n model.setTrinhDo(rs.getString(\"TrinhDo\"));\n model.setChucVu(rs.getString(\"ChucVu\"));\n model.setLuongCoBan(rs.getFloat(\"LuongCoBan\"));\n model.setHeSoLuong(rs.getFloat(\"HeSoLuong\"));\n model.setPhuCap(rs.getFloat(\"PhuCap\"));\n model.setTienAnTrua(rs.getFloat(\"TienAnTrua\"));\n model.setThucLinh(rs.getFloat(\"ThucLinh\"));\n model.setTGHuongHSLHT(rs.getDate(\"TGHuongHSLHT\"));\n model.setTienPhat(rs.getFloat(\"TienPhat\"));\n model.setUngLuong(rs.getFloat(\"UngLuong\"));\n\n return model;\n }",
"protected java.util.Date getResultSetDate(ResultSet rs, String colName) throws SQLException {\n //capture sql date\n java.sql.Date sqlDate = rs.getDate(colName);\n\n //if it was null, return a null object\n if(rs.wasNull())\n return null;\n\n //otherwise create the new date\n java.util.Date javaDate = new java.util.Date(sqlDate.getTime());\n \n //return a java Date object\n return javaDate;\n }",
"protected Object record2object(String tableAlias, ResultSet results, int position)\r\n throws InvocationTargetException, IllegalAccessException {\r\n if (position < 0 || extractionMode == AUTO || extractionMode == NAME) {\r\n try {\r\n String lookupFieldName = getFieldName(tableAlias);\r\n return databaseGetByNameMethod.invoke(results, lookupFieldName);\r\n }\r\n catch(InvocationTargetException itx) {\r\n if (extractionMode == NAME || position < 0)\r\n throw itx;\r\n else\r\n extractionMode = INDEX;\r\n }\r\n }\r\n return databaseGetByIndexMethod.invoke(results, new Object[] {new Integer(position)});\r\n }",
"private Bike getBikeFromRS(ResultSet rs){ //Help method to get a bike from a ResultSet query\n try{\n int bID = rs.getInt(cBikeID);\n LocalDate date = rs.getDate(cDate).toLocalDate();\n Double price = rs.getDouble(cPrice);\n String make = rs.getString(cMake);\n int typeId = rs.getInt(cTypeId);\n String typeName = rs.getString(cTypeName);\n double rentalPrice = rs.getDouble(cRentalPrice);\n int stationId = rs.getInt(cStationId);\n LocalDateTime dateTime = rs.getTimestamp(cDateTime).toLocalDateTime();\n double lat = rs.getDouble(cLatitude);\n double lng = rs.getDouble(cLongitude);\n double chargingLvl = rs.getDouble(cChargingLevel);\n\n BikeData bd = new BikeData(bID, dateTime, lat, lng, chargingLvl);\n BikeType t = new BikeType(typeName,rentalPrice);\n t.setTypeId(typeId);\n Bike bike = new Bike(date, price, make, t, stationId);\n bike.setBikeId(bID);\n bike.setBikeData(bd);\n return bike;\n }catch(Exception e){\n System.out.println(\"Exception \" + e);\n }\n return null;\n }",
"public ResultSet ServerData() {\n\t\tResultSet rs = null; //new resultset of default value null\r\n\t\ttry {\r\n\r\n\r\n\t\t\tString query = \"SELECT * FROM TBLSERVERS\"; //get all data in the TBLSERVERS table\r\n\t\t\tPreparedStatement pst = conn.prepareStatement(query); //prepare a new statement\r\n\t\t\trs = pst.executeQuery(); //execute statement and store result in a resultset \r\n\t\t} catch (SQLException ex) { //catches SQL exception to prevent an application crash in this case\r\n\t\t\tLogger.getLogger(DB.class.getName()).log(Level.SEVERE, null, ex);\r\n\r\n\t\t}\r\n\t\treturn rs;\r\n\t}",
"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 }",
"protected VwStatsPerGame fetchSingleResult(ResultSet rs) throws SQLException\n\t{\n\t\tif (rs.next()) {\n\t\t\tVwStatsPerGame dto = new VwStatsPerGame();\n\t\t\tpopulateDto( dto, rs);\n\t\t\treturn dto;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t}",
"public ArrayList<Empleado> Read() throws SQLException {\r\n ResultSet rs;\r\n /*Guardamos todos los datos de la tabla en un ArrayList*/\r\n ArrayList<Empleado> listado = new ArrayList<>();\r\n /*Sentencia SQL*/\r\n String sql = \"SELECT * FROM empleados\";\r\n PreparedStatement sentencia = conexion.prepareStatement(sql);\r\n /*Ejecutar sentencia*/\r\n sentencia.execute();\r\n rs = sentencia.getResultSet();\r\n /*Guardamos los valores de cada fila en su objeto*/\r\n while(rs.next()){\r\n Empleado emp = new Empleado(rs.getInt(\"emp_no\"), rs.getString(\"apellido\"), rs.getString(\"oficio\"), rs.getInt(\"dir\"), rs.getDate(\"fecha_alt\"), rs.getFloat(\"salario\"), rs.getFloat(\"comision\"), rs.getInt(\"dept_no\")); \r\n listado.add(emp);\r\n }\r\n return listado;\r\n }",
"@Override\r\n\tpublic City mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\r\n\t\tCity city = new City();\r\n\t\t\r\n\t\t city.setCity(rs.getString(1));\r\n\t\t \r\n\t\t return city;\r\n\t\t\r\n\t}",
"public ResultSet getdata(String dataFileName, String columnname, String sheetname, String location) {\r\n\t\tResultSet rs = null;\r\n\t\tString query = \"\";\r\n\t\ttry {\r\n\t\t\tif (dataFileName.isEmpty()) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\tconnection = connect(dataFileName);\r\n\t\t\tif (connection == null) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\tstmnt = connection.createStatement();\r\n\t\t\tif (stmnt == null) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\tif (columnname.equalsIgnoreCase(\"ALL\")) {\r\n\t\t\t\tif (location == null || location.equalsIgnoreCase(\"\")) {\r\n\t\t\t\t\tquery = \"select * from [\" + sheetname + \"$];\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tquery = \"select * from [\" + sheetname + \"$] where \" + location + \";\";\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (location == null || location.equalsIgnoreCase(\"\")) {\r\n\t\t\t\t\tquery = \"select \" + columnname + \" from [\" + sheetname + \"$];\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tquery = \"select \" + columnname + \" from [\" + sheetname + \"$] where \" + location + \";\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\trs = stmnt.executeQuery(query);\r\n\t\t} catch (Exception ex) {\r\n\r\n\t\t\treturn rs;\r\n\t\t}\r\n\r\n\t\treturn rs;\r\n\t}",
"T getRowData(int rowNumber);",
"private List<Budget> listResults(ResultSet rs) throws SQLException{\n List<Budget> found = new ArrayList<Budget>();\n while (rs.next()){\n Budget x = new Budget();\n x.setDescription(rs.getString(\"bud_description\"));\n x.setCategory(rs.getString(\"bud_category\"));\n x.setBudgetAmount(rs.getDouble(\"bud_budgeted_amount\"));\n x.setActualAmount(rs.getDouble(\"bud_actual_amount\"));\n x.setId(rs.getInt(\"bud_key_id\"));\n }\n return found;\n }",
"public ResultSet getNativeResultSet(ResultSet rs)\r\n/* 69: */ throws SQLException\r\n/* 70: */ {\r\n/* 71:118 */ return (ResultSet)rs.unwrap(this.resultSetType);\r\n/* 72: */ }",
"public static Alumni_data getAlumniData(int id)\n { \n List li=null; \n try{\n session=SessionFact.getSessionFact().openSession();\n li=session.createQuery(\"from Alumni_data where id=:id\").setInteger(\"id\", id).list();\n session.close();\n return (Alumni_data)li.get(0);\n }catch(Exception e){ out.print(\"Wait(AlumniCon.getAlumniData)\"); } \n return new Alumni_data();\n }",
"@Override\n\t\t\t\t\t\tpublic EmrContactDetais mapRow(ResultSet rs,\n\t\t\t\t\t\t\t\tint arg1) throws SQLException {\n\t\t\t\t\t\t\tEmrContactDetais details = new EmrContactDetais();\n\n\t\t\t\t\t\t\tdetails.setName((rs\n\t\t\t\t\t\t\t\t\t.getString(\"contact_name\") != null) ? rs\n\t\t\t\t\t\t\t\t\t.getString(\"contact_name\") : \"\");\n\t\t\t\t\t\t\tdetails.setMobileNumber((rs\n\t\t\t\t\t\t\t\t\t.getString(\"contact_number\") != null) ? rs\n\t\t\t\t\t\t\t\t\t.getString(\"contact_number\") : \"\");\n\t\t\t\t\t\t\tdetails.setRelation((rs.getString(\"relation\") != null) ? rs\n\t\t\t\t\t\t\t\t\t.getString(\"relation\") : \"\");\n\t\t\t\t\t\t\tdetails.setSeq((rs.getString(\"seq\") != null) ? rs\n\t\t\t\t\t\t\t\t\t.getString(\"seq\") : \"\");\n\t\t\t\t\t\t\tdetails.setEmergencyContactId((rs.getString(\"contact_id\") != null) ? rs\n\t\t\t\t\t\t\t\t\t.getString(\"contact_id\") : \"\");\n\t\t\t\t\t\t\tdetails.setCountryCode((rs.getString(\"country_code\") != null) ? rs\n\t\t\t\t\t\t\t\t\t.getString(\"country_code\") : \"\");\n\t\t\t\t\t\t\tdetails.setAltrMobileNumber((rs.getString(\"altr_contact_number\") != null) ? rs\n\t\t\t\t\t\t\t\t\t.getString(\"altr_contact_number\") : \"\");\n\t\t\t\t\t\t\tdetails.setAltrCountryCode((rs.getString(\"altr_country_code\") != null) ? rs\n\t\t\t\t\t\t\t\t\t.getString(\"altr_country_code\") : \"\");\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\treturn details;\n\t\t\t\t\t\t}",
"public final DataSet getData() {\n return data;\n }"
]
| [
"0.6545715",
"0.637878",
"0.6373506",
"0.6343945",
"0.62790406",
"0.6270437",
"0.62101346",
"0.6197667",
"0.61778206",
"0.6164361",
"0.61316335",
"0.60964334",
"0.6095881",
"0.6089942",
"0.6068785",
"0.6060047",
"0.60513484",
"0.6038063",
"0.6004104",
"0.59575063",
"0.59399223",
"0.59379",
"0.59345317",
"0.59333783",
"0.59306884",
"0.59204674",
"0.5892468",
"0.58863103",
"0.5884865",
"0.5860588",
"0.58383244",
"0.58297837",
"0.58226925",
"0.58226925",
"0.58120865",
"0.57987326",
"0.5797638",
"0.57972366",
"0.5795075",
"0.5772949",
"0.57619584",
"0.5756321",
"0.57490695",
"0.57439464",
"0.5742299",
"0.57384497",
"0.5719101",
"0.5716806",
"0.57161975",
"0.56905305",
"0.5677959",
"0.5676547",
"0.56755",
"0.5669261",
"0.56326336",
"0.5632198",
"0.5630475",
"0.5630475",
"0.5611186",
"0.5610572",
"0.56050754",
"0.5603709",
"0.5601584",
"0.5587018",
"0.5586266",
"0.5586194",
"0.5585164",
"0.554922",
"0.55336237",
"0.55319923",
"0.5519051",
"0.55129766",
"0.550746",
"0.5507228",
"0.55063784",
"0.55029017",
"0.54989487",
"0.54977787",
"0.54923874",
"0.5491273",
"0.54801244",
"0.54786825",
"0.5451908",
"0.5445147",
"0.5444901",
"0.54309714",
"0.542561",
"0.54255337",
"0.5423512",
"0.54203916",
"0.54112387",
"0.540694",
"0.54051083",
"0.54030377",
"0.54002047",
"0.53985065",
"0.5397504",
"0.5392401",
"0.5383752",
"0.5375968",
"0.53749985"
]
| 0.0 | -1 |
/ Constructs a new HashSet using the given size | public MySet(int size) {
table = (HashNode<E>[]) new HashNode[size];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Set<Integer> generateSet(int size){\n Set<Integer> data = new HashSet<>();\n for (int i = 0; i < size; i++){\n data.add(i);\n }\n return data;\n }",
"public IntHashSet(int initialCapacity) {\n this(initialCapacity, 0.75f);\n }",
"public HashSet(int bucketsLength)\n {\n buckets = new Node[bucketsLength];\n currentSize = 0;\n }",
"MapBuilder<K,V> hashSize(long size);",
"public HashedVector(int size) {\n\t\tthis.elements = new HashMap<>(size);\n\t}",
"public MyHashSet() {\n hset = new boolean[bucket][]; //get the second array size only if it is required : space conservation if possible\n }",
"public MyHashSet() {\n nodes = new Node[Max_Size];\n }",
"public BoundedTreeSet(int size) {\n\t\tthis.size = size;\n\t}",
"public SparseSet(int size) {\n\n\t sparse = new int[size];\n\t dense = new int[size];\n\t members = 0;\n\t \n\t // Added so value 0 can be added first.\n\t // TODO, test if that is still necessary after fixing a rare bug with addition.\n\t dense[0] = -1;\n\t}",
"private void buildHashSet(int capacity, ClosedHashCell[] hashSet){\r\n for (int i=0; i < capacity; i++){\r\n hashSet[i] = new ClosedHashCell();\r\n }\r\n }",
"public AbstractHashSet(int initialCapacity) {\n\t\tmap = new DelegateAbstractHashMap(initialCapacity, this);\n\t}",
"public BoundedTreeSet(Comparator<? super E> comparator, int size) {\n\t\tsuper(comparator);\n\t\tthis.size = size;\n\t}",
"public HashSet(){\n this(17);\n }",
"public LinkedHashSet() {\n this(10);\n }",
"public ClosedHashSet(){\r\n super();\r\n buildHashSet(capacity(), hashSet);\r\n }",
"@Override\n public Set<Map.Entry<Integer,String>> entrySet() {\n return IntStream.range(0, size)\n .mapToObj(Entry::new)\n .collect(Collectors\n .toCollection(LinkedHashSet::new));\n }",
"public HashTable( int size )\n\t{\n\t\ttheLists = new WordList[ size ];\n\t\tfor (int i = 0; i < theLists.length; i++)\n\t\t\ttheLists[i] = new WordList();\n\t}",
"public HashTable(int size) {\n\t\tallocateArray(size);\n\t\tclear();\n\t}",
"public HashSet(int c){\n @SuppressWarnings(\"unchecked\")\n LinkedList<E>[] tmp = new LinkedList[c];\n this.data = tmp;\n this.buckets = c;\n this.clear();\n }",
"public static <T> HashSet<T> createHashSet() {\n \t\treturn new HashSet<T>();\n \t}",
"public HashMultiSet() {\n\t\thMap = new HashMap<T, Integer>();\n\t\tsize = 0;\n\t}",
"public HeapSet (int initialCapacity) {\r\n\t\tsuper (initialCapacity);\r\n\t}",
"public HashDictionary (int size) {\r\n\t\tthis.size = size;\r\n\t\ttable = new Node[size];\r\n\t\tfor (int i=0;i<size;i++) {\r\n\t\t\ttable[i]=null;\r\n\t\t}\r\n\t}",
"public AbstractHashSet(int initialCapacity, float loadFactor) {\n\t\tmap = new DelegateAbstractHashMap(initialCapacity, loadFactor, this);\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic DesignHashSet() {\n\t\t// Array of ArrayLists.\n\t\tset = (List<Integer>[]) new ArrayList[MAX_LEN];\n\t}",
"public MyHashTable( int size )\n {\n allocateArray( size );\n doClear( );\n }",
"public void initialize(int size);",
"public IdentificationSet(int initialCapacity) {\n map = new HashMap<>(initialCapacity);\n init();\n }",
"public OpenHashSet() {\n this(DEFAULT_HIGHER_CAPACITY, DEFAULT_LOWER_CAPACITY);\n }",
"public IntHashSet() {\n this(20, 0.75f);\n }",
"public RandomizedSet() {\n map = new HashMap<Integer, Integer>();\n set = new ArrayList<Integer>();\n int validLength = 0;\n }",
"public Object clone()\n/* */ {\n/* 251 */ return new IntHashSet(this);\n/* */ }",
"public MyHashSet() {\n \n }",
"public HashTable(int size) {\n \tnumElements = 0;\n Table = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n \tTable.add(new List<>());\n } \n }",
"public ClosedHashSet(String[] data){\r\n setLowerCapacity(DEFAULT_LOWER_CAPACITY);\r\n setHigherCapacity(DEFAULT_HIGHER_CAPACITY);\r\n setInitialCapacity(INITIAL_CAPACITY);\r\n buildHashSet(capacity(), hashSet);\r\n for (String element : data){\r\n add(element);\r\n }\r\n }",
"protected OptionSet(String n, int size) {\n\t\tthis.opt = new Option[size];\n\t\tthis.name = n;\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\topt[i] = new Option();\n\t\t}\n\t \n\t}",
"public Dictionary getWordsBySize ( int size ) {\n\t\tArrayList <String> wordsBySize = new ArrayList<String> ();\n\t\tfor (int i = 0; i < words.size(); i++)\n\t\t\tif (words.get(i).length() == size)\n\t\t\t\twordsBySize.add(words.get(i));\n\t\treturn new Dictionary (wordsBySize);\n\t}",
"public IntHashSet(int initialCapacity, float loadFactor) {\n super();\n if (initialCapacity < 0) {\n throw new IllegalArgumentException(\"Illegal Capacity: \" + initialCapacity);\n }\n if (loadFactor <= 0) {\n throw new IllegalArgumentException(\"Illegal Load: \" + loadFactor);\n }\n if (initialCapacity == 0) {\n initialCapacity = 1;\n }\n\n this.loadFactor = loadFactor;\n table = new Entry[initialCapacity];\n threshold = (int) (initialCapacity * loadFactor);\n }",
"public MyHashSet() {\n s = new ArrayList<>();\n }",
"public static void main(String[] args) {\n\t\tHashSet set1 = new HashSet();\n\n\t\t/*\n\t\t * It creates empty HS object with specified initial capacity and\n\t\t * default fill ratio 0.75. \n\t\t * HashSet set2 = new HashSet(int initialCapacity);\n\t\t */\n\t\tHashSet set2 = new HashSet(20);\n\n\t\t/*\n\t\t * It creates equivalent HS object for given Collection\n\t\t * HashSet set3 = new HashSet(Collection c);\n\t\t */\n\t\tArrayList list = new ArrayList();\n\t\tlist.add(1);\n\t\tlist.add(1);\n\t\tSystem.out.println(\"List is \" + list);\n\t\tHashSet set3 = new HashSet(list);\n\t\tSystem.out.println(\"equivalent HashSet is \" + set3);\n\n\t}",
"public AbstractHashSet(Collection c) {\n\t\tmap = new DelegateAbstractHashMap(Math.max((int) (c.size() / .75f) + 1,\n\t\t\t\t16), this);\n\t\taddAll(c);\n\t}",
"public static void main(String[] args) {\n\n HashSet <Integer> numbers = new HashSet <>();\n numbers.add(1);\n numbers.add(2);\n numbers.add(1);\n System.out.println(numbers.size());\n\n }",
"public void createNew(int size);",
"public HashTable(int size) {\n\t\tarraySize = size;\n\t\thashArray = new DataItem[arraySize];\n\t\tnonItem = new DataItem(-1);\n\t}",
"public static Iterable<boolean[]> powerset(int size) {\n final int finalSize = size;\n return new Iterable<boolean[]>() {\n @Override\n public Iterator<boolean[]> iterator() {\n return new PowerSetIterator(finalSize);\n }\n };\n }",
"public OpenHashSet() {\n super();\n linkedListStrings = new LinkedListString[INITIAL_CAPACITY];\n\n\n }",
"public HashTable(int size) {\n logicalSize = 0;\n defaultSize = size;\n table = new Handle[size];\n }",
"@Test\n\tpublic void testAddHash() {\n\t\t// add a new method for ordering\n\t\tMySet <String> s = loadSet();\n\t\ts.add(\"Alice\");\n\t\ts.add(\"Sue\");\n\t\ts.add(\"Bob\");\n\t\ts.add(\"Cindy\");\n\t\ts.add(\"Joe\");\n\t\t\n\t\tassertEquals(5, ((MyHashSet<String>)s).map.size());\n\t\t\n\t\t\t\n\t}",
"public HashTable(int size){\n\n arraySize = size;\n hashArray = new Elements[arraySize];\n nullement = new Elements(\" -1 \"); \n }",
"public int size(){\n return set.length;\n }",
"protected Set(int[] sortedArray, int newSize) {\n this.count = newSize;\n this.capacity = sortedArray.length;\n this.arr = sortedArray;\n }",
"public DijkstraArrays(int size) {\n\t\tthis.setSize(size);\n\t}",
"public void set_size(int s);",
"public static HashSet<Employee> addEmployeeDetails(int size) {\n\t\tint count = 1;\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner scan = new Scanner(System.in);\n\t\tEmployee emp = null;\n\t\tHashSet<Employee> hashLists = new HashSet<>();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\temp = new Employee();\n\n\t\t\tSystem.out.println(\"Enter the \" + count + \" Employee Details\");\n\t\t\tSystem.out.println(\"Enter the Employee id\");\n\t\t\temp.setEmpId(scan.nextInt());\n\t\t\tSystem.out.println(\"Enter the Employee name\");\n\t\t\temp.setEmpName(scan.next());\n\t\t\tSystem.out.println(\"Enter the Employee age\");\n\t\t\temp.setEmpAge(scan.nextInt());\n\t\t\tSystem.out.println(\"Enter the Employee salary\");\n\t\t\temp.setEmpSalary(scan.nextInt());\n\t\t\thashLists.add(emp);\n\t\t\tcount++;\n\t\t}\n\t\treturn hashLists;\n\n\t}",
"@Override protected List<String> initialize(int size){\n container.clear();\n container.addAll(Arrays.asList(Generated.array(String.class, new RandomGenerator.String(), size)));\n return container;\n }",
"public IntMap(int size){\r\n hashMask=size-1;\r\n indexMask=(size<<1)-1;\r\n data=new int[size<<1];\r\n }",
"@Test\r\n public void testSize1() {\r\n Assert.assertEquals(5, set1.size());\r\n }",
"@SuppressWarnings(\"unchecked\")\r\n private IDictionary<K, V>[] makeArrayOfChains(int size) {\r\n // Note: You do not need to modify this method.\r\n // See ArrayDictionary's makeArrayOfPairs(...) method for\r\n // more background on why we need this method.\r\n return (IDictionary<K, V>[]) new IDictionary[size];\r\n }",
"public Cache(Integer size) {\n this.size = size;\n recentlyUsed = new ArrayList<K>();\n cache = new HashMap<>();\n }",
"void init(int size) {\n int numOfElements = size / MAX_BITS;\n if (size % MAX_BITS > 0)\n numOfElements++;\n\n values = new long[numOfElements];\n }",
"public ZYArraySet(int initLength){\n if(initLength<0)\n throw new IllegalArgumentException(\"The length cannot be nagative\");\n elements = (ElementType[])new Object[initLength];\n }",
"public static <T> Set<T> createSet(Iterable<T> iterable) {\n\t\tSet<T> set = new HashSet<T>();\n\t\tfor (T entry : iterable)\n\t\t\tset.add(entry);\n\t\treturn set;\n\t}",
"public IntegerSet() {\n elements = new int[MAX_SIZE];\n size = 0;\n }",
"public ArrayList<Constellation> getSameSize(int size){\n\t\t\n\t\tArrayList<Constellation> toReturn = new ArrayList<Constellation>();\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=0;i<storedConstallations.size();i++){\n\t\t\t\n\t\t\tif(size==storedConstallations.get(i).getPossitions().size()){\n\t\t\t\ttoReturn.add(storedConstallations.get(i));\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn toReturn;\t\t\n\t}",
"public DesignHashSet() {\n map=new HashMap<>();\n }",
"Set createSet();",
"public void sizeHasBeenSet() {\n isSizeSet = true;\n }",
"public ClosedHashSet(float upperLoadFactor,float lowerLoadFactor){\r\n super(upperLoadFactor,lowerLoadFactor);\r\n buildHashSet(capacity(), hashSet);\r\n }",
"public static <T> Set<Set<T>> find(List<T> friends, int size) {\r\n\t\tObjects.requireNonNull(friends, \"friends must not be null\");\r\n\t\treturn combine(friends, size, new HashSet<Set<T>>(), new HashSet<T>(), 0);\r\n\t}",
"public OpenHashSet(java.lang.String[] data){\r\n this.hashTable = new String[defaultCapacity];\r\n this.lowerLoadFactor = defaultLowerLoadFactor;\r\n this.upperLoadFactor = defaultUpperLoadFactor;\r\n this.capacity = defaultCapacity;\r\n this.size = defaultSize;\r\n this.hashing = false;\r\n for(String i:data){\r\n this.add(i);\r\n }\r\n }",
"public IntHashSet(int paramInt)\n/* */ {\n/* 61 */ this(paramInt, 0.3D);\n/* */ }",
"public IndexedSet(final int initialCapacity) {\n elements = new ArrayList<>(initialCapacity);\n indexByElement = new Object2IntOpenHashMap<>(initialCapacity);\n }",
"public ArraySet() {\n\t\tthis(DEFAULT_CAPACITY);\n\t}",
"public void setSize(Integer size) {\n this.size = size;\n }",
"LengthDistinct createLengthDistinct();",
"public LeetCode346(int size) {\n this.maxSize = size;\n }",
"HashSet<BitSet> createSubsetsOfLen2(BitSet bs){\n HashSet<BitSet> subsets = new HashSet<>();\n \n for(int i=0; i<bs.length();){\n i = bs.nextSetBit(i);\n \n for(int j=i+1; j<bs.length();){\n j = bs.nextSetBit(j);\n BitSet b = new BitSet(bitsetLen);\n b.set(i, true);\n b.set(j, true);\n subsets.add(b);\n j++;\n }\n i++;\n }\n return subsets;\n }",
"public void setSize(int size);",
"protected Set() {\n size = 0;\n set = new int[TEN];\n }",
"public IdentityMap(int size) {\n maxSize = size;\n searchKey = new CacheKey(new Vector(1), null, null);\n }",
"public void initialize(int size) {\n setMaxSize(size);\n }",
"public HeapSet () {\r\n\t\tsuper ();\r\n\t}",
"public void setSize(int index, int size);",
"public void setSize(int size){\n this.size = size;\n }",
"private void set_size(int size)\r\n\t{\r\n\t\tthis.size = size;\r\n\t}",
"public IntHashSet()\n/* */ {\n/* 69 */ this(0, 0.3D);\n/* */ }",
"@Test\r\n public void sizeSets() throws Exception {\r\n assertEquals(5, sInt.size());\r\n assertEquals(3, sStr.size());\r\n }",
"@Override\n public int size() {\n return theSet.size();\n }",
"public <T> Set<T> setOf(int count, Supplier<T> supplier) {\n Set<T> set = new HashSet<>();\n for (int i = 0; i < count; i++) {\n set.add(supplier.get());\n }\n return set;\n }",
"public ShingleSet(int k) {\n\t\tthis.k = k;\n\t}",
"public void setSize(int size){\n n = size;\n //makes new array and changes the toSort array\n randomArray(n);\n toSort = origArray.clone();\n }",
"public Map<Integer, Integer> generateMap(int size){\n Map<Integer, Integer> data = new HashMap<>();\n for (int i = 0; i < size; i++){\n data.put(i, i);\n }\n return data;\n }",
"public OpenHashSet(float upperLoadFactor, float lowerLoadFactor) {\n super(upperLoadFactor, lowerLoadFactor);\n openHashSetArray = new OpenHashSetList[INITIAL_CAPACITY];\n\n for (int i=0 ; i<this.capacity() ; i++)\n openHashSetArray[i]=new OpenHashSetList();\n }",
"private void rehashing(boolean increase){\r\n int newLength;\r\n // if loadFactor is too big. //\r\n if (increase){\r\n newLength = capacity()*CAPACITY_CHANGE;\r\n }\r\n // if loadFactor is too small. //\r\n else{newLength = capacity()/CAPACITY_CHANGE;}\r\n // builds the new hashSet with the new capacity. //\r\n ClosedHashCell[] newHashSet = new ClosedHashCell[newLength];\r\n buildHashSet(newLength, newHashSet);\r\n for (ClosedHashCell cell : hashSet){\r\n if (cell.getValue() != null) {\r\n int j = 0;\r\n int clamping = (cell.getValue().hashCode() + (j+j*j) / 2) & (newLength - 1);\r\n while (!newHashSet[clamping].addMe(cell.getValue())) {\r\n j++;\r\n clamping = (cell.getValue().hashCode() + (j+j*j) / 2) & (newLength - 1);\r\n }\r\n }\r\n }\r\n hashSet = newHashSet;\r\n }",
"public CompactHashMap(int size) {\n\t\t// NOTE: If array size is 0, we get a\n\t\t// \"java.lang.ArithmeticException: / by zero\" in add(Object).\n\t\tkeys = (K[]) new Object[(size == 0 ? 1 : size)];\n\t\tvalues = (V[]) new Object[(size == 0 ? 1 : size)];\n\t\telements = 0;\n\t\tfreecells = keys.length;\n\t\tmodCount = 0;\n\t}",
"public void setSize(long size) {\r\n\t\tthis.size = size;\r\n\t}",
"public HashTable(int tableSize) {\n\t\ttable = new ArrayList<>(tableSize);\n\t\tcapacity = tableSize;\n\t\tfor (int i = 0; i < tableSize; i++) {\n\t\t\ttable.add(new SequentialSearchSymbolTable<K, V>());\n\t\t}\n\t}",
"public RandomizedSet() {\n set = new HashSet<Integer>();\n }",
"public DelegateAbstractHashMap(int initialCapacity, AbstractHashSet set) {\n\t\t\tsuper(initialCapacity);\n\t\t\tthis.set = set;\n\t\t}",
"public OCRSet(int initialCapacity) {\r\n this.map = new HashMap<Integer, E>(initialCapacity);\r\n }"
]
| [
"0.70944047",
"0.6651354",
"0.657871",
"0.6569684",
"0.651287",
"0.64710873",
"0.64459383",
"0.64194524",
"0.64090157",
"0.6344211",
"0.63426083",
"0.63201934",
"0.6278322",
"0.61452276",
"0.611473",
"0.602125",
"0.6018795",
"0.5997838",
"0.5982795",
"0.5980729",
"0.5956764",
"0.5938525",
"0.5929167",
"0.58942944",
"0.58781314",
"0.5860266",
"0.58483684",
"0.5845101",
"0.5840638",
"0.58009285",
"0.5796264",
"0.5741211",
"0.5730524",
"0.57042325",
"0.56951165",
"0.56934214",
"0.5691216",
"0.5689532",
"0.5683189",
"0.5641134",
"0.5614301",
"0.56043243",
"0.56039524",
"0.5603294",
"0.55909956",
"0.55886734",
"0.55754787",
"0.55747944",
"0.5566265",
"0.5541861",
"0.5525932",
"0.55167234",
"0.55106956",
"0.5500484",
"0.5485407",
"0.5484644",
"0.5479745",
"0.5476679",
"0.54747653",
"0.54723275",
"0.5468392",
"0.5455682",
"0.54483587",
"0.5446473",
"0.54343635",
"0.5423427",
"0.54182905",
"0.5414512",
"0.54048544",
"0.539087",
"0.5387946",
"0.53845274",
"0.53836316",
"0.537183",
"0.5367659",
"0.5367338",
"0.536335",
"0.5354234",
"0.5352118",
"0.53319436",
"0.5317924",
"0.53126925",
"0.53103286",
"0.5307618",
"0.53032196",
"0.5302791",
"0.52977425",
"0.5293475",
"0.5289261",
"0.5284302",
"0.5279963",
"0.5276987",
"0.52730095",
"0.5263799",
"0.5260526",
"0.5255531",
"0.5255375",
"0.5248477",
"0.5239463",
"0.52378976"
]
| 0.7329768 | 0 |
/ Adds the given element to this HashSet Returns true if the addition was successful | public boolean add(E e) {
if (contains(e)) {
return false;
}
int i = hash(e);
table[i] = new HashNode<E>(e, table[i]);
size++;
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean add(Object element);",
"public boolean add(E element){\n Object result = map.put(element, \"\");\n return (result == null);\n }",
"public boolean add( T element )\n {\n // THIS IS AN APPEND TO THE LOGICAL END OF THE ARRAY AT INDEX count\n if (size() == theArray.length) upSize(); // DOUBLES PHYSICAL CAPACITY\n theArray[ count++] = element; // ADD IS THE \"setter\"\n return true; // success. it was added\n }",
"@Override\n\tpublic boolean add(T element) {\n\t\titemProbs_.put(element, 1d);\n\t\telementArray_ = null;\n\t\tklSize_ = 0;\n\t\treturn true;\n\t}",
"@Override\n public boolean add(final T element) {\n if (this.size > this.data.length - 1) {\n this.doubleArraySizeBy(2);\n }\n\n this.data[this.size++] = element;\n return true;\n }",
"boolean add(T element);",
"boolean add(T element);",
"public boolean add(ElementType element){\n if(this.contains(element)){\n return false;\n }\n else{\n if(size==capacity){\n reallocate();\n }\n elements[size]=element;\n size++;\n }\n return true;\n }",
"@Override\n public boolean addItem(T item) {\n //Make sure the Set does not already contain the item\n if(!this.contains(item)) {\n //Make sure there is enough room for the item. If there isn't\n //resize the array\n if(numItems == arr.length)\n this.ensureCap();\n //Add the item to the end and increment numItems\n arr[numItems++] = item;\n //return true\n return true;\n }\n //if item was already in set, return false\n return false;\n }",
"@Override\n public final boolean add(final Integer element) {\n // First, check to see that the array can support another element\n ensureCapacity(size);\n // Add the element to the next available slot\n arrayList[size++] = element;\n return true;\n }",
"public @Override boolean add(E element) {\n \tappend(element);\n \treturn true;\n }",
"public boolean add(Element element) {\n if (addNoNotify(element)) {\n setChanged();\n Message message = Message.makeAdded(element);\n notifyObservers(message);\n return true;\n } else {\n return false;\n }\n\n }",
"@Override\n public boolean add(E e) {\n notNull(e);\n if (size >= elementData.length) {\n int newCapacity = (elementData.length << 1);\n elementData = Arrays.copyOf(elementData, newCapacity);\n }\n elementData[size++] = e;\n return true;\n }",
"public abstract boolean addDataTo(Element element);",
"@Override\n public boolean add(X x) {\n if (!allowElementsWithoutIdentification)\n throw new IllegalArgumentException(\"It is not allowed to put Elements without Identification in this Set\");\n\n return map.put(x, placeholder) == null;\n }",
"protected boolean performAdd(Triple e) {\n return wrapped.add(e);\n }",
"public boolean add(IntSet add){\n\t\tif(contains(add)==-1){\n\t\t\tcontents.addElement(add);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public abstract boolean add(Comparable element) throws IllegalArgumentException;",
"public boolean add(E obj)\r\n {\r\n int originalSize = this.size();\r\n listIterator(originalSize).add(obj);\r\n return originalSize != this.size();\r\n }",
"public boolean add(T element) {\n if (this.position >= this.container.length) {\n this.enlargeCapacity();\n }\n this.container[this.position++] = element;\n return true;\n }",
"@Override\n public boolean add(T e) {\n if (elements.add(e)) {\n ordered.add(e);\n return true;\n } else {\n return false;\n }\n }",
"@Override\n\tpublic boolean add(Object obj) {\n\t\treturn util.add(obj);\n\t}",
"@Override\n public boolean add(T e) {\n if (numElements == maxElements) {\n doubleCapacity();\n }\n\n // Add element\n elements[numElements++] = e;\n return true;\n }",
"public boolean add(E key)\r\n {\r\n if(this.contains(key))\r\n {\r\n return false;\r\n }\r\n\r\n else\r\n {\r\n super.add(key);\r\n }\r\n return true;\r\n }",
"public boolean add(String element) {\n if (element == null) {\n throw new IllegalArgumentException(\"Null string!\");\n }\n\n Node addNode = getNodeByString(element, true);\n\n if (addNode.isTerminal()) {\n return false;\n }\n\n addNode.setTerminal(true);\n\n return true;\n }",
"@Override\n\tpublic boolean add(E e) {\n\t\treturn false;\n\t}",
"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 }",
"public boolean add(Object x)\n {\n if (loadFactor() > 1)\n {\n resize(nearestPrime(2 * buckets.length - 1));\n }\n\n int h = x.hashCode();\n h = h % buckets.length;\n if (h < 0) { h = -h; }\n\n Node current = buckets[h];\n while (current != null)\n {\n if (current.data.equals(x))\n {\n return false; // Already in the set\n }\n current = current.next;\n }\n Node newNode = new Node();\n newNode.data = x;\n newNode.next = buckets[h];\n buckets[h] = newNode;\n currentSize++;\n return true;\n }",
"boolean add(E e);",
"public boolean add (Object o) {return addLast(o);}",
"public boolean add(E x) {\n\t\taddLast(x);\n\t\treturn true;\n\t}",
"public boolean add(E o) {\r\n if (o == null)\r\n return false;\r\n if (this.map.containsKey(o.hashCode())) {\r\n return false;\r\n }\r\n return this.map.put(o.hashCode(), o) == null;\r\n }",
"public boolean add(T val) {\n Integer idx = hmap.get(val);\n if (idx == null) {\n int i = list.size();\n list.add(val);\n idx = new Integer(i);\n hmap.put(val, idx);\n return true;\n }\n return false;\n }",
"@Override\n public boolean addItem(T item) {\n //Make sure the item is not already in the set\n if(!this.contains(item)){\n //create a new node with the item, and the current first node\n Node n = new Node(item, first);\n //update first node reference\n first = n;\n //increment numItems\n numItems++;\n return true;\n }\n //if item is already in the set return false\n return false;\n }",
"@Override\n public boolean add(T value) {\n if (!this.validate(this.cursor)) {\n this.ensureCapacity();\n }\n this.values[this.cursor++] = value;\n return this.values[this.cursor - 1].equals(value);\n }",
"public boolean add(Object value)\r\n {\r\n if (contains(value))\r\n return false;\r\n root = add(root, value);\r\n return true;\r\n }",
"public boolean add(String newValue) {\n if (!collection.contains(newValue) && collection.add(newValue)) {\n return true;\n }\n return false;\n }",
"public void validAdd(String element){\n\t\tlist.addLast(element);\n\t}",
"@Override\n public boolean add(E e) {\n return offer(e);\n }",
"public boolean add (E e);",
"public boolean add (T item){\n\t\t\t\tint index = (item.hashCode() & Integer.MAX_VALUE) % table.length;\n\t\t\t\t\n\t\t\t\t// find the item and return false if item is in the AVLTree\n\t\t\t\tif (table[index].contains((T)item))\n\t\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t\tif (!table[index].add(item))\n\t\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t\t// we will add item, so increment modCount\n\t\t\t\tmodCount++;\n\n\t\t\t\thashTableSize++;\n\n\t\t\t\tif (hashTableSize >= tableThreshold)\n\t\t\t\t\trehash(2 * table.length + 1);\n\n\t\t\t\treturn true;\n\t}",
"public static <E> boolean addNotNull(Collection<E> collection, E element) {\n\t\tif (element == null) {\n\t\t\treturn false;\n\t\t}\n\t\treturn collection.add(element);\n\t}",
"@Override\n public void add(Integer element) {\n if (this.contains(element) != -1) {\n return;\n }\n // when already in use\n int index = this.getIndex(element);\n if(this.data[index] != null && this.data[index] != this.thumbstone){\n int i = index + 1;\n boolean foundFreePlace = false;\n while(!foundFreePlace && i != index){\n if(this.data[i] == null && this.data[i] == this.thumbstone){\n foundFreePlace = true;\n }else{\n if(i == this.data.length - 1){\n // start at beginning.\n i = 0;\n }else{\n i++;\n }\n }\n }\n if(foundFreePlace){\n this.data[i] = element;\n }else{\n throw new IllegalStateException(\"Data Structre Full\");\n }\n }\n }",
"@Test\r\n public void addWorks() throws Exception {\r\n TreeSet<Integer> s = new TreeSet<>();\r\n assertTrue(s.add(1));\r\n assertTrue(s.contains(1));\r\n assertFalse(s.add(1));\r\n }",
"public boolean add(T element, double prob) {\n\t\titemProbs_.put(element, prob);\n\t\telementArray_ = null;\n\t\tklSize_ = 0;\n\t\treturn true;\n\t}",
"public boolean add(java.lang.String newValue) {\n\n int loc = indexValue(newValue);\n\n if (loc == -1) {\n\n if ((numOfElements + 1) / (double)capacity > upperLoadFactor) {\n changeHashSetSize(openHashSetArray, 1);\n }\n\n openHashSetArray[this.clamp(newValue.hashCode())].myList.add(newValue);\n numOfElements++;\n return true;\n }\n return false;\n }",
"public boolean add(T item) {\n\t\treturn list.add(item);\n\t}",
"public boolean add(T t);",
"public boolean add(Object added)\n {\n boolean ret = super.add(added);\n normalize();\n return(ret);\n }",
"@Override\n public boolean add(E item) {\n if (item == null)\n throw new IllegalArgumentException(\"null invalid value for bag\");\n Counter count = map.get(item);\n if (count == null)\n map.put(item, new Counter(1));\n else\n count.increment();\n return true;\n }",
"public boolean addEntry(String element, String path, int position) {\n\t\tinvertedIndex.putIfAbsent(element, new TreeMap<String, TreeSet<Integer>>());\n\t\tinvertedIndex.get(element).putIfAbsent(path, new TreeSet<Integer>());\n\t\tboolean added = this.invertedIndex.get(element).get(path).add(position);\n\t\tthis.counts.putIfAbsent(path, position);\n\n\t\tif (position > counts.get(path)) {\n\t\t\tthis.counts.put(path, position);\n\t\t}\n\t\treturn added;\n\t}",
"public boolean add(T entry) {\n return false;\n }",
"public Boolean add(int value) {\n\t\t\n\t\tfor (Integer elem : elemList) {\n\t\t\tif (elem == value)\n\t\t\t\treturn false;\n\t\t}\n\t\tthis.elemList.add(value);\n\t\treturn true;\n\t}",
"public boolean add (E item)\n {\n add(size, item); // calling public method add\n return true;\n }",
"@Override\n public boolean add(Set<E> e) {\n throw new UnsupportedOperationException(\"Add not supported\");\n }",
"public boolean addAll(ISet<E> otherSet) {\n\t\tif (otherSet == null)\n\t\t\tthrow new IllegalArgumentException(\"The given set is null.\");\n\t\tboolean result = false;\n\t\tfor (E obj: otherSet) {\n\t\t\tif (!this.contains(obj)) {\n\t\t\t\tthis.add(obj);\n\t\t\t\tresult = true;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public boolean add(int paramInt)\n/* */ {\n/* 179 */ ensureCapacity(this.m_entryCount + 1);\n/* 180 */ int i = -internalFind(paramInt) - 1;\n/* 181 */ if (i >= 0) {\n/* 182 */ this.m_entryCount += 1;\n/* 183 */ this.m_flagTable[i] = true;\n/* 184 */ this.m_keyTable[i] = paramInt;\n/* 185 */ return true;\n/* */ }\n/* 187 */ return false;\n/* */ }",
"@Override\n public void add(T element) {\n add(size(), element);\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 }",
"public boolean add(E item) {\r\n\t\troot = add(root, item);\r\n\t\treturn addReturn;\r\n\t}",
"public boolean add(E item){\n\t\troot = add(item, root);\n\t\treturn addReturn;\n\t}",
"public boolean add(Object o) {\n\t\treturn map.put(o, PRESENT) == null;\n\t}",
"boolean add(String val);",
"boolean add(T value);",
"public final boolean add(ArraySet<T> source) {\n final T[] sourceArraySet = source.getArray();\n\n if (sourceArraySet == null) {\n return false;\n }\n\n synchronized (sync) {\n if (array == null) {\n array = Arrays.copyOf(sourceArraySet, sourceArraySet.length);\n return true;\n }\n\n boolean result = false;\n\n for (int i = 0; i < sourceArraySet.length; i++) {\n final T element = sourceArraySet[i];\n\n final T[] oldArray = array;\n array = ArrayUtils.addUnique(array, element, replaceElementIfEquals);\n\n result |= (oldArray != array);\n }\n\n return result;\n }\n }",
"@Override\r\n\tpublic boolean contains(T element) {\n\t\treturn false;\r\n\t}",
"public boolean insert(int val) {\r\n return set.add(val);\r\n }",
"E add(E element) {\n\t\t\tshort index = (short)((element.hashCode() >> 24) & 0x000000FF);\n\t\t\tE obj = nodes[index].add(this, element.hashCode(), element, (byte) 1);\n\t\t\tif (obj == null) {\n\t\t\t\tsize++;\n\t\t\t}\n\t\t\treturn obj;\n\t\t}",
"@Test(timeout=1000)\n\tpublic void testSimpleAdd() {\n\t\thashmap.add(s1);\n\t\tStudent[] array = hashmap.getArray();\n\t\tboolean success = false;\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tStudent s = array[i];\n\t\t\tif (s1.equals(s)){\n\t\t\t\tsuccess = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tassertTrue(\"add() failed. Element not found in array\", success);\n\t}",
"public boolean add(E anEntry){\n if (size == capacity){\n reallocate();\n }\n theData[size] = anEntry;\n size++;\n\n return true;\n }",
"public boolean add(@NonNull T object) {\n final boolean added = data.add(object);\n notifyItemInserted(data.size() + 1);\n return added;\n }",
"public boolean add(String value){\n int index=findIndexBinary(value);\n super.add(index,value);\n return true;\n }",
"@Override\n public final boolean add(Integer e) {\n if(definedOn.contains(e)){\n return super.add(e);\n } else {\n return false;\n }\n }",
"public void add(T element);",
"public void add(T element);",
"@Override\n public boolean contains(final Object element) {\n return this.lastIndexOf(element) != -1;\n }",
"public boolean add(E data) throws NullPointerException\n {\n if(data == null)\n {\n throw new NullPointerException();\n }\n add(size(), data);\n return true; \n }",
"public Boolean add(Integer i) {\n return list.add(i);\n }",
"boolean add(Object obj);",
"boolean add(Object obj);",
"public boolean add(X x, Identification identification) {\n return map.put(x, identification) == null;\n }",
"public boolean add(BSTMapNode element) \n\t{\n\t\tif(element.getKey() < this.key)\n\t\t{\n\t\t\tif(this.left == null)\n\t\t\t{\n\t\t\t\tBSTMapNode e = new BSTMapNode(null, null, this, element.getKey(), element.getValue());\n\t\t\t\tthis.left = e;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tthis.left.add(element);\n\t\t\t}\n\t\t}\n\t\telse if(element.getKey() > this.key)\n\t\t{\n\t\t\tif(this.right == null)\n\t\t\t{\n\t\t\t\tBSTMapNode e = new BSTMapNode(null, null, this, element.getKey(), element.getValue());\n\t\t\t\tthis.right = e;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.right.add(element);\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"boolean add(Object object) ;",
"public boolean add(Account account) {\n if (find(account) != -1) {\n return false;\n }\n if (size == accounts.length) {\n grow();\n }\n accounts[size] = account;\n size++;\n return true;\n }",
"public boolean add(String value){\n\t//add to the correct spot.\n\t//you may still use super.add(index,value)\n\tif (size() == getData().length) {\n\t resize();\n\t}\n\t//index = findIndex(value);\n\tint index = findIndexBinary(value);\n\tsuper.add(index,value);\n\treturn true;\n }",
"public abstract void add(T element);",
"public abstract void add(T element);",
"@Override\n\tpublic boolean insert(E e) {\n\t\treturn add(e);\n\t}",
"public boolean add( Object newVal )\n {\n\t//first expand if necessary\n\tif ( _size >= _data.length )\n\t expand();\n\n\t_data[_size] = newVal;\n\t_size++;\n\n\treturn true;\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 }",
"public boolean add (T obj) {\r\n\t\tboolean result = _list.add (obj);\r\n\t\tHeapSet.siftUp (this, _list.size () - 1);\r\n\t\treturn result;\r\n\t}",
"public boolean addWeet(Weet weet) {\n /**\n * Method for adding a new weet to the weets we already have saved in our store.\n */\n return array.addWeetToStore(weet);\n }",
"public void add (T element);",
"public boolean add(String string){\r\n if(string == null) {\r\n return false;\r\n }\r\n int hash = string.hashCode(),index = 0;\r\n int i = 0;\r\n boolean found = false;\r\n while(!found){\r\n index = (hash + (i*i+i)/2) & (this.capacity()-1);\r\n if(this.hashTable[index] == null || this.hashTable[index] == this.deleted){\r\n found = true;\r\n }\r\n else if(this.hashTable[index].equals(string)){\r\n return false;\r\n }\r\n i ++;\r\n }\r\n this.hashTable[index] = string;\r\n this.size +=1;\r\n this.checkForReHash(1);\r\n return true;\r\n\r\n }",
"public boolean add(int key) {\r\n\t\tint i = ArrayUtils.binarySearch(keys, size, key);\r\n\r\n\t\tif (i >= 0) {\r\n\t\t\treturn false; // already in array no need to add again\r\n\t\t} else {\r\n\t\t\ti = ~i;\r\n\r\n\t\t\tif (size >= keys.length) {\r\n\t\t\t\tint n = ArrayUtils.idealArraySize(size + 1);\r\n\r\n\t\t\t\tint[] nkeys = new int[n];\r\n\r\n\t\t\t\tSystem.arraycopy(keys, 0, nkeys, 0, keys.length);\r\n\t\t\t\tkeys = nkeys;\r\n\t\t\t}\r\n\r\n\t\t\tif (size - i != 0) {\r\n\t\t\t\tSystem.arraycopy(keys, i, keys, i + 1, size - i);\r\n\t\t\t}\r\n\r\n\t\t\tkeys[i] = key;\r\n\t\t\tsize++;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\n\tpublic boolean add(E vertex) {\n\t\treturn vertices.add(vertex);\n\t}",
"void add(T element);",
"void add(T element);",
"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 }",
"@Override // java.util.Collection, java.util.Set\r\n public boolean addAll(Collection<? extends E> collection) {\r\n b(this.f513d + collection.size());\r\n boolean added = false;\r\n Iterator<? extends E> it = collection.iterator();\r\n while (it.hasNext()) {\r\n added |= add(it.next());\r\n }\r\n return added;\r\n }"
]
| [
"0.7243405",
"0.7188397",
"0.71497405",
"0.6948256",
"0.6834829",
"0.6831091",
"0.6831091",
"0.6829779",
"0.6801339",
"0.6761763",
"0.6756802",
"0.67242855",
"0.6611797",
"0.65941745",
"0.65722954",
"0.64923465",
"0.6426931",
"0.64262813",
"0.6406167",
"0.6361987",
"0.6361903",
"0.6353574",
"0.6340099",
"0.63006437",
"0.6287683",
"0.6277392",
"0.6243775",
"0.62381124",
"0.62205577",
"0.62046134",
"0.6201979",
"0.6187414",
"0.61709315",
"0.6170344",
"0.616371",
"0.61533284",
"0.6137359",
"0.61190194",
"0.6108709",
"0.6101307",
"0.60982424",
"0.609545",
"0.6089528",
"0.60831",
"0.60607135",
"0.60592973",
"0.60476315",
"0.60207593",
"0.60179883",
"0.60054684",
"0.6002368",
"0.5996562",
"0.5995786",
"0.59940374",
"0.59781265",
"0.5970128",
"0.59497166",
"0.5947968",
"0.5946036",
"0.594154",
"0.59391826",
"0.5932405",
"0.5930469",
"0.5913954",
"0.5902564",
"0.5893091",
"0.58783656",
"0.58778965",
"0.587098",
"0.5866379",
"0.58556634",
"0.5854457",
"0.58352935",
"0.5834555",
"0.5834555",
"0.5830132",
"0.58287656",
"0.5828153",
"0.580623",
"0.580623",
"0.580432",
"0.5796165",
"0.57944685",
"0.5789794",
"0.5776757",
"0.5776734",
"0.5776734",
"0.57752126",
"0.5770745",
"0.5759291",
"0.57409275",
"0.5730443",
"0.5729293",
"0.5722981",
"0.572146",
"0.57196665",
"0.5706141",
"0.5706141",
"0.5699934",
"0.5698762"
]
| 0.63012415 | 23 |
/ Returns true if the given element is contained in this HashSet and false otherwise | public boolean contains(E e) {
int i = hash(e);
HashNode<E> current = table[i];
while (current != null) {
if (current.data.equals(e)) {
return true;
}
current = current.next;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean contains(E element);",
"public boolean contains(T element);",
"public boolean contains(E element) {\r\n return items.contains(element);\r\n }",
"public boolean contains(Object elem);",
"@Override\r\n\tpublic boolean contains(T element) {\n\t\treturn false;\r\n\t}",
"boolean contains(T element);",
"public boolean contains(ElementType element){\n for(ElementType e:this){\n if(e.equals(element)){\n return true;\n }\n }\n return false;\n }",
"public boolean contains(E elem) {\n return indexOf(elem) != -1;\n }",
"public boolean contains(Object element) {\n\n\t\tif (element == null) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"ArrayList cannot contain a null element.\");\n\t\t}\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tObject object = this.storedObjects[i];\n\t\t\tif (object.equals(element)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n public boolean contains(final Object element) {\n return this.lastIndexOf(element) != -1;\n }",
"@Override\r\n\tpublic boolean contains(Object o) {\n\t\treturn set.contains(o);\r\n\t}",
"public boolean contains(T elem) {\n return list.contains(elem);\n }",
"boolean contains(E element) {\n\t\t\tshort index = (short)((element.hashCode() >> 24) & 0x000000FF);\n\t\t\treturn nodes[index].contains(element.hashCode(), (byte) 1);\n\t\t}",
"boolean contains();",
"public boolean contains(T element) {\n\t\tif (head == null)\n\t\t\treturn false;\n\t\tNode<T> curNode = head;\n\t\twhile (curNode != null) {\n\t\t\tif (curNode.value.equals(element))\n\t\t\t\treturn true;\n\t\t\tcurNode = curNode.next;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean contains(T elem) {\n\t\tfor (int i = 0; i < valCount; ++i) {\n\t\t\tif (values[i].equals(elem)) { // if current value is same\n\t\t\t\treturn true;\n\t\t\t} else if (comp.compare(values[i],elem) < 0) { // finds the set of children that can possibly contain elem\n\t\t\t\treturn children[i].contains(elem);\n\t\t\t}\n\t\t}\n\t\tif (childCount > 1) { // check final set of children\n\t\t\treturn children[valCount - 1].contains(elem);\n\t\t}\n\t\treturn false;\n\t}",
"public boolean contains(E elem) {\n Iterator<E> inorder = getInorderIterator();\n\n while (inorder.hasNext()) {\n if (inorder.next().equals(elem)) {\n return true;\n }\n }\n return false;\n }",
"public boolean contains(E element) {\n // TODO: YOUR CODE HERE\n return backwards.containsKey(element);\n }",
"public abstract boolean contains(E e);",
"public boolean contains(E value);",
"@Override\n public boolean contains(T item) {\n Node n = first;\n //walk through the linked list untill you reach the end\n while(n != null) {\n //see if the item exists in the set, if it does return true\n if(n.value.equals(item))\n return true;\n //move to the next node\n n = n.next;\n }\n //if not found return false\n return false;\n }",
"boolean contains(String element);",
"public boolean contains(E item) {\n \t\n \tif(item == null) {\n \t\tthrow new IllegalArgumentException(\"Invalid parameter!\");\n \t}\n \t\n \t// create iterator instance to go thru set\n \tIterator<E> iterateSet = this.iterator(); \t\n \twhile(iterateSet.hasNext()) {\n \t\t// searches for a target item\n \t\tif( iterateSet.next().equals(item)) {\n \t\t\treturn true;\n \t\t}\n \t}\n \t\n \treturn false;\n }",
"public boolean contains(final int item) {\n for (int i = 0; i < size; i++) {\n if (set[i] == item) {\n return true;\n }\n }\n return false;\n }",
"public boolean contains(E e){\n int target = e.hashCode() % this.buckets;\n return data[target].contains(e);\n }",
"@Override\n public boolean contains(String element) {\n Node currNode = this.head;\n if(currNode == null){\n }\n while(currNode.getNextNode() != null){\n if(currNode.getItem().equals(element)){\n return true;\n }\n currNode = currNode.getNextNode();\n }\n return false;\n }",
"boolean hasContains();",
"public boolean contains(E obj){\n\t\tif (obj == null)\n\t\t\tthrow new IllegalArgumentException(\"The given item is null.\");\n\t\tfor(E val : this) {\n\t\t\tif(val.equals(obj))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean contains(T anEntry) {\n\t\tfor(int i=0; i<numberOfElements; i++) {\n\t\t\tif(list[i].equals(anEntry)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean contains(T item) {\n synchronized(this) {\n return _treeSet.contains(item);\n }\n }",
"@Override\n\tpublic boolean contains(E e) {\n\t\treturn false;\n\t}",
"public boolean contains(E item){\n\t\treturn (find(item) != null) ? true : false;\n\t}",
"public boolean contains(Object o);",
"public boolean contains(Object o);",
"public boolean contains(SVGElement element) {\n \t\treturn elementToModel.containsKey(element);\n \t}",
"Boolean contains(X x);",
"public boolean contains(int element) {\n for(Integer i:data) {\n if(i!=null && i==element) {\n return true;\n }\n }\n return false;\n /*for(int i=0;i<data.length;i++) {\n if(data[i]==element) {\n return true;\n }\n }\n return false;*/\n }",
"public Boolean searchElement(E element){\n HeapIterator<E> it = heapIterator();\n \n while(it.hasNext()){\n if(it.next().equals(element)) return true;\n }\n\n return false;\n }",
"public boolean contains(E e) {\n\t /*\n\t * Add code here\n\t */\n\t\t for(int c=0;c<num_elements;c++){\n\t\t\t if(elements[c]==e){\n\t\t\t\t return true;\n\t\t\t }\n\t\t }\n\t return false;\n\t }",
"public boolean contains(Object o) {\n\n Object value = elements.get(o);\n return value != null;\n }",
"public boolean doesContain(T t) {\n if (Arrays.asList(a).contains(t)) {\n return true;\n } else {\n return false;\n }\n }",
"public boolean contains(T entry) {\n return false;\n }",
"public boolean contains(T val);",
"public boolean contains(T anEntry) {\n return binarySearch(0, length - 1, anEntry);\n }",
"public boolean contains(T item) {\n Iterator<T> iterator = this.iterator();\n while (iterator.hasNext()) {\n if (iterator.next().equals(item))\n return true;\n }\n\n return false;\n }",
"public boolean contains(BSTMapNode element) \n\t{\n\t\tthis.compare(element);\n\t\tif(element.getKey() == this.key)\n\t\t{\n\t\t\treturn true;\n\t\t\t\n\t\t}\n\t\telse if(element.getKey() < this.key)\n\t\t{\n\t\t\tif(this.left == null)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn this.left.contains(element);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(this.right == null)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn this.right.contains(element);\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public boolean contains(int key) {\n \tfor(int k:set){\n \tif(k==key){\n \t\treturn true;\n \t}\n }\n\t\treturn false;\n }",
"public boolean contains(E item) {\r\n\t\treturn (find(item) != null);\r\n\t}",
"@Override\n\tpublic boolean contains(T targetElement) {\n\t\t\n\t\treturn findAgain(targetElement, root);\n\t}",
"public boolean contains(SeqItemset set)\n\t{\n\t\tif (m_size<set.m_size) return false;\n\t\tint ind = 0;\n\t\tint i = 0;\n\t\twhile ((i<set.m_size) && (-1!=ind))\n\t\t{\n\t\t\tind = indexOf(set.elementIdAt(i));\n\t\t\ti++;\n\t\t}\n\t\tif (-1==ind) return false;\n\t\telse return true;\n\t}",
"public boolean contains(int elemToBeSearched)\n\t{\n\t\tSinglyLinkedListNode nextNode = head;\n\t\tSinglyLinkedListNode prevNode = null;\n\t\twhile(head != null)\n\t\t{\n\t\t\tif(nextNode.getData() == elemToBeSearched)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprevNode = nextNode;\n\t\t\t\tnextNode = prevNode.getNext();\n\t\t\t\tif(nextNode == null)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@Override public boolean equals(Object o) {\n if (this == o) { return true; }\n if ( !(o instanceof Set) ) { return false; }\n Set that = (Set) o;\n return that.size() == inner.size() &&\n containsAll(that);\n }",
"boolean contains(Object o);",
"boolean contains(Object o);",
"boolean contains(Object o);",
"public boolean contains(final Object value) {\n\t\tboolean found = false;\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tif (elements[i].equals(value)) {\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn found;\n\t}",
"public boolean contains (Object item){\n\t\t// compute the hash table index\n\t\t\t\tint index = (item.hashCode() & Integer.MAX_VALUE) % table.length;\n\n\t\t\t\t// find the item and return false if item is in the ArrayList\n\t\t\t\tif (table[index].contains((T)item))\n\t\t\t\t\treturn true;\n\t\t\t\telse\n\t\t\t\t\treturn false;\n\t}",
"public boolean contains(T e){\n return indexOf(e) != -1;\n }",
"@Override\n public boolean contains(T o) {\n if(o == null) return false;\n int hcode = hash(o);\n hcode %= array.length;\n\n if(array[hcode].empty()) return false;\n array[hcode].reset();\n while (!array[hcode].endpos()) {\n if (eqals(o, array[hcode].elem())) {\n return true;\n } else array[hcode].advance();\n }\n return false;\n }",
"public boolean contains(int elem){\n return itemArray[count-1] == elem;\n }",
"public boolean elementOf(int value){\n for(int element = 0; element < set.length; element++){\n if(set[element] == value)\n return true; \n }\n return false;\n }",
"public boolean contains(String element) {\n if (element == null) {\n throw new IllegalArgumentException(\"Null string!\");\n }\n\n Node candidateNode = getNodeByString(element, false);\n\n if (candidateNode == null) {\n return false;\n }\n\n return candidateNode.isTerminal();\n }",
"public boolean evaluate(T obj) {\n\t\treturn set.contains(obj);\n\t}",
"private static <T> boolean containsInMap(Map<Class, Set<T>> map, Class key, T element) {\n Set<T> set = map.get(key);\n\n if (set == null) {\n return false;\n }\n\n return set.contains(element);\n }",
"public abstract boolean contains(Object item);",
"boolean hasElement();",
"public boolean contains(T obj) {\r\n\t\tlogger.trace(\"Enter contains\");\r\n\t\tlogger.trace(\"Exit contains\");\r\n\t\treturn data.contains(obj);\r\n\t}",
"boolean contains(T o);",
"public boolean contains(A val) {\n return false; \n }",
"public boolean contains (E val) {\n return containsRecursive(root, val);\n }",
"public boolean contains(T data)\r\n {\r\n if(containsData.contains(data) == true) //Checking my hashset of data to see if our data has been inserted!\r\n return true;\r\n \r\n return false;//If we didnt find the node within our list, return false. \r\n }",
"public boolean contains(T x) {\n\t\tEntry<T> t = getSplay(find(x));\n\t\tif(t != null && t.element == x) {\n\t\t\tsplay(t);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}",
"public boolean contains(T instance);",
"@Override\r\n\t\tpublic boolean contains(E value) {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.contains(value);\r\n\t\t\t}\r\n\t\t}",
"public boolean contains(E item) {\n if (item == null) {\n throw new NullPointerException();\n }\n else {\n DoublyLinkedNode<E> iter = head.getNext();\n while (iter.getNext() != null) {\n if (iter.getData().equals(item)) {\n return true;\n }\n iter = iter.getNext();\n }\n return false;\n }\n }",
"public boolean contains(Solution solution)\r\n\t{\r\n\t\treturn set.contains(solution);\r\n\t}",
"public boolean contains (T target);",
"public boolean contains (T target);",
"public boolean contains(T target);",
"@Override\n public final boolean contains(final Object o) {\n return Collections.exists(getComponents(),\n new Assertion<PriorityList<? extends _PriorityElement_>>() {\n public boolean isTrueFor(PriorityList<? extends _PriorityElement_> s) {\n return s.contains(o);\n }\n });\n }",
"boolean\tcontains(Object o);",
"public boolean contains( T key )\n {\n if (key == null) return false;\n for ( int i=0 ; i < size() ; ++i )\n if ( get(i).equals( key ) ) \n return true;\n \n return false;\n }",
"public boolean contains(Object value) {\n\t\treturn false;\n\t}",
"public boolean contains(WModelObject object)\n\t{\n\t\treturn m_elements.contains(object);\n\t}",
"public boolean containsElement(int i, T obj);",
"public boolean contains(Object o) {\n\t\treturn map.containsKey(o);\n\t}",
"public boolean contains(Object o) {\r\n return this.map.containsKey(o.hashCode());\r\n }",
"public boolean contains( AnyType x )\r\n\t{\r\n\t\treturn contains( x, root );\r\n\t}",
"@Override\n\tpublic boolean contains(Object value) {\n\t\tif (indexOf(value) != -1) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"@Override\n public boolean contains(Object object) {\n T value = (T) object;\n boolean result = false;\n for (int index = 0; index < this.values.length; index++) {\n T data = (T) this.values[index];\n if (data != null) {\n if (value.equals(data)) {\n result = true;\n }\n }\n }\n\n return result;\n }",
"@Override\n\tpublic boolean contains(Object o) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean contains(Object o) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean contains(Object o) {\n\t\treturn false;\n\t}",
"@Override\n\t\tpublic boolean contains(Object o) {\n\t\t\treturn false;\n\t\t}",
"public boolean contains(E obj)\n {\n Node m = head;\n while( m.getNext() != null)\n {\n m = m.getNext();\n if(m.getValue().equals(obj))\n {\n return true; \n }\n }\n return false;\n }",
"public boolean hasNextInSet() {\n return (hasNext() &&\n (indexOfCurrentElement + 1 < firstIndexOfCurrentSet + quantity) &&\n (indexOfCurrentElement + 1 >= firstIndexOfCurrentSet)); \n }",
"public boolean has(Object item) {\n JMLListEqualsNode<E> ptr = this;\n //@ maintaining (* no earlier element is elem_equals to item *);\n while (ptr != null) {\n if (elem_equals(ptr.val, item)) {\n return true;\n }\n ptr = ptr.next;\n }\n return false;\n }",
"public boolean contains (E item)\n {\n int index = indexOf(item);\n if (index != -1)\n return true; // item found\n else\n return false; // item not found\n }",
"public boolean hasElement(String name) {\n return elements.has(name);\n }",
"@Override\n public boolean contains(T object) {\n for (int i = 0; i < this.size; i++) {\n if (array[i].equals(object)) {\n return true;\n }\n }\n return false;\n }"
]
| [
"0.79371697",
"0.77230823",
"0.75936747",
"0.75771517",
"0.7556312",
"0.7402794",
"0.73929685",
"0.7380265",
"0.73767155",
"0.73571754",
"0.7271287",
"0.724172",
"0.71193725",
"0.70827323",
"0.70824564",
"0.70496523",
"0.695567",
"0.6905122",
"0.68711853",
"0.6817848",
"0.67987585",
"0.67715013",
"0.6733439",
"0.67139935",
"0.67019206",
"0.67008656",
"0.66631866",
"0.6648383",
"0.6636949",
"0.66326725",
"0.6606646",
"0.6599238",
"0.65920377",
"0.65920377",
"0.6584466",
"0.6562704",
"0.65595716",
"0.6555566",
"0.6553767",
"0.6546744",
"0.65279007",
"0.64902335",
"0.648262",
"0.6469518",
"0.64641815",
"0.64492476",
"0.6442492",
"0.64406824",
"0.6437448",
"0.6436403",
"0.64269966",
"0.64194757",
"0.64075005",
"0.64075005",
"0.64075005",
"0.6405971",
"0.63978547",
"0.6388968",
"0.6371571",
"0.6365536",
"0.6359",
"0.6349018",
"0.6341387",
"0.63371485",
"0.6320595",
"0.6316998",
"0.6302889",
"0.62900126",
"0.6282146",
"0.62660456",
"0.62399834",
"0.62395716",
"0.61909974",
"0.6188169",
"0.6180759",
"0.6177955",
"0.6172677",
"0.6172677",
"0.61723906",
"0.6165767",
"0.6150483",
"0.614676",
"0.6140952",
"0.6136247",
"0.61215925",
"0.61077094",
"0.610185",
"0.6101137",
"0.60949576",
"0.60948205",
"0.6090381",
"0.6090381",
"0.6090381",
"0.60897034",
"0.60827434",
"0.6075975",
"0.60695505",
"0.6049083",
"0.60356796",
"0.60300255"
]
| 0.6428527 | 50 |
/ Removes the given element from this HashSet Returns true if the removal was successful | public boolean remove(E e) {
if (!contains(e)) {
return false;
}
int i = hash(e);
if (table[i].data.equals(e)) {
table[i] = table[i].next;
} else {
HashNode<E> current = table[i];
while (!current.next.data.equals(e)) {
current = current.next;
}
current.next = current.next.next;
}
size--;
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean remove(final Object element) {\n for (int i = 0; i < size; i++) {\n if (this.checkIfEqual(element, i)) {\n this.shiftRemove(i);\n return true;\n }\n }\n\n return false;\n }",
"@Override\r\n\tpublic boolean remove(T element) {\n\t\treturn this._list.remove(element);\r\n\t}",
"@Override\r\n\tpublic boolean remove(Object o) {\n\t\treturn set.remove(o);\r\n\t}",
"public boolean remove(Object element) {\n\n\t\tif (element == null) {\n\t\t\tthrow new IllegalArgumentException(\"ArrayList cannot contain null.\");\n\t\t}\n\t\tint index = -1;\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tObject object = this.storedObjects[i];\n\t\t\tif (object.equals(element)) {\n\t\t\t\tindex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (index == -1) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (int i = index + 1; i < this.size; i++) {\n\t\t\tthis.storedObjects[i - 1] = this.storedObjects[i];\n\t\t}\n\t\tthis.size--;\n\t\tthis.storedObjects[this.size] = null;\n\t\treturn true;\n\t}",
"boolean remove(T element);",
"public boolean remove(E element){\n // TO BE IMPLEMENTED\n Object result = map.remove(element);\n if(result != null){\n return true;\n }else{\n return false;\n } \n }",
"boolean remove(String elementId);",
"public boolean remove(ElementType element){\n if(this.find(element)==-1){\n return false;\n }\n elements[this.find(element)]=elements[size-1];\n size--;\n return true;\n }",
"public boolean removeElement(Object obj);",
"public boolean remove(E elem) {\r\n\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\tif (indices.get(i).data == elem) {\r\n\t\t\t\tremoveAt(i);\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 atomicRemove();",
"public boolean Remove(TreeNode<T> element) {\n\t\treturn false;\n\t}",
"public boolean removeElement(Element element) {\n if (removeNoNotify(element)) {\n setChanged();\n Message message = Message.makeRemoved(element);\n notifyObservers(message);\n return true;\n } else {\n return false;\n }\n\n }",
"public boolean remove(int val) {\r\n return set.remove(val);\r\n }",
"public final boolean remove(final Integer element) {\n final int index = linearSearch(element);\n if (index == -1) {\n return false;\n } else {\n for (int i = index; i < (size - 1); i++) {\n arrayList[i] = arrayList[i + 1];\n arrayList[i + 1] = 0;\n }\n size--;\n return true;\n\n }\n }",
"boolean remove(E e);",
"@Override\n public boolean remove(T item) {\n //find the node with the value\n Node n = getRefTo(item);\n //make sure it actually is in the set\n if(n == null)\n return false;\n //reassign the value from the first node to the removed node\n n.value = first.value;\n //take out the first node\n remove();\n return true;\n }",
"public boolean remove(int val) {\n if (set.contains(val)) {\n set.remove(val);\n return true;\n } else return false;\n }",
"public boolean remove(E e){\n int target = e.hashCode() % this.buckets;\n return this.data[target].remove(e) == null;\n }",
"public abstract boolean remove(E e);",
"public T remove (T element);",
"public boolean remove(E item) {\n \tif(item == null) {\n \t\tthrow new IllegalArgumentException(\"Invalid parameter!\");\n \t}\n \t\n \tIterator<E> iterateSet = this.iterator();\n \tboolean foundMatch = false;\n \t\n \twhile(iterateSet.hasNext()) {\n \t\tE element = iterateSet.next();\n \t\t// removes all occurrences of a target element\n \t\tif(element.equals(item)) {\n \t\t\titerateSet.remove();\n \t\t\tfoundMatch = true;\n \t\t}\t\n \t}\n \t\n \treturn foundMatch;\n }",
"public boolean remove(Object o);",
"@Override\n\tpublic boolean remove(Object value) {\n\t\ttry {\n\t\t\tremove(indexOf(value));\n\t\t}catch(IndexOutOfBoundsException e){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean remove()\n {\n return false;\n }",
"public void remove(T element);",
"public boolean remove(T element, Point2D pos);",
"@Override\n\tpublic boolean remove(Object value) {\n\t\tint index = indexOf(value);\n\n\t\tif (index == -1) {\n\t\t\treturn false;\n\t\t}\n\n\t\tremove(index);\n\t\treturn true;\n\t}",
"public boolean remove(Object obj);",
"public boolean remove(E item){\n\t\treturn (delete(item) != null) ? true : false;\n\t}",
"public boolean remove(int elem)\r\n\t{\r\n\t\tElo p = null;\r\n\t\tp = busca(elem);\r\n\r\n\t\tif (p == null) return false;\r\n\r\n\t\t/* Retira primeiro elemento */\r\n\t\tif (p == prim) \r\n\t\t\tprim = prim.prox;\r\n\t\telse \r\n\t\t\t/* Retira elemento do meio */\r\n\t\t\tp.ant.prox = p.prox;\r\n\r\n\t\t/* Testa se é ultimo elemento */ \r\n\t\tif (p.prox != null)\r\n\t\t\tp.prox.ant = p.ant;\r\n\r\n\t\tp = null;\r\n\t\t\r\n\t\tthis.tamanho--;\r\n\r\n\t\treturn true;\r\n\t}",
"public boolean removeBook(Book book) {\n \treturn set.remove(book);\n }",
"private boolean remove() {\r\n\t\t\treturn removed = true;\r\n\t\t}",
"@Override\n public boolean remove(Object o) {\n if (contains(o)) {\n root = root.removeElement(o);\n size--;\n return true;\n }\n return false;\n }",
"@Override\n public boolean remove(Object o) {\n if (elements.remove(o)) {\n ordered.remove(o);\n return true;\n } else {\n return false;\n }\n\n }",
"public boolean remove(T element) {\n\t\tif (head == null)\n\t\t\treturn false;\n\t\tNode<T> curNode = head;\n\t\tif (curNode.value.equals(element)) {\n\t\t\thead = curNode.next;\n\t\t\tsize--;\n\t\t\treturn true;\n\t\t}\n\t\twhile (curNode.next != null) {\n\t\t\tif (curNode.next.value.equals(element)) {\n\t\t\t\tcurNode.next = curNode.next.next;\n\t\t\t\tsize--;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcurNode = curNode.next;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\r\n protected boolean remove(SubsetImpl r)\r\n {\r\n if (r != null) {\r\n /*\r\n * if the subset contains the element, use the subset method to do all the work\r\n * TableSliceElementImpl.remove will be called again to finish up\r\n */\r\n \tif (r.contains(this)) \r\n \t\tr.remove(this);\r\n \t\r\n \treturn m_subsets.remove(r);\r\n }\r\n \r\n return false;\r\n }",
"boolean remove(Object o);",
"public boolean remove(T anEntry);",
"public boolean remove(T item) {\n\t\treturn list.remove(item);\n\t}",
"public boolean remove() {\n if (parent == null) {\n throw new RuntimeException(ROOT_REMOVING_EXCEPTION_MESSAGE);\n }\n\n return parent.remove(value); // increments modificationCount!\n }",
"boolean remove(Object obj);",
"boolean remove(Object obj);",
"public boolean delete(T element) {\n boolean isDelete = false;\n int index = this.getIndex(element);\n if (index != -1) {\n this.deleteElement(index);\n isDelete = true;\n }\n return isDelete;\n }",
"public boolean remove(E item) {\n\t\tif (item == null)\n\t\t\tthrow new IllegalArgumentException(\"The given item is null.\");\n\t\tIterator<E> iterator = this.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tif (iterator.next().equals(item)) {\n\t\t\t\titerator.remove();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t\titerator.next();\n\t\t}\n\t\treturn false;\n\t}",
"@SuppressWarnings(\"unchecked\") // stops Java complaining about the call to compare\n public boolean remove(Object item) {\n E itm = (E) item; //this here is cast statment, which allows an object of anytype to be cast as a generic element, which means multiple types of elements can be use in this program\n if (itm == null) { //if the item is null it sends but null, if the item at index is null rerun false, and if the item does not equal the item at the position it returns null\n return false;\n }\n int indexValue = findIndexOf(itm);\n if (data[indexValue] == null) return false;\n if (!data[indexValue].equals(item))\n return false;\n\n for (int i = indexValue; i < count; i++) { //iterates through the list, moving all the elements to the on in front,\n data[i] = data[i + 1];\n }\n count--; //the decrments the count to show an item has been remove, it has not been removed but instead moved to the end, from there the item is overwritten when something is added.\n return true; //the count prevents the item from being seen.\n }",
"public boolean remove(String element) {\n if (element == null) {\n throw new IllegalArgumentException(\"Null string!\");\n }\n\n Node removeNode = getNodeByString(element, false);\n\n if (removeNode == null) {\n return false;\n }\n\n if (!removeNode.isTerminal()) {\n return false;\n }\n\n removeNode.setTerminal(false);\n\n return true;\n }",
"public boolean remove(int val) {\n if (!set.containsKey(val)) return false;\n int lastElement = list.get(list.size() - 1);\n int idx = set.get(val);\n list.set(idx, lastElement);\n set.put(lastElement, idx);\n list.remove(list.size() - 1);\n set.remove(val);\n return true;\n }",
"public /*@ non_null @*/ JMLObjectSet<E> remove(E elem) {\n if (!has(elem)) {\n return this;\n } else {\n //@ assume the_list != null;\n JMLListObjectNode<E> new_list = the_list.remove(elem);\n //@ assume (new_list == null) == (size == 1);\n return new JMLObjectSet<E>(new_list, size - 1);\n }\n }",
"public boolean remove(BSTMapNode element) \n\t{\n\t\t\n\t\tif(element.getKey() == this.key)\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\treturn true;\n\t\t\t\n\t\t}\n\t\telse if(element.getKey() < this.key)\n\t\t{\n\t\t\tif(this.left == null)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn this.left.contains(element);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(this.right == null)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn this.right.contains(element);\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"boolean remove(T o);",
"public boolean remove(IntSet remove){\n\t\tint index = contains(remove);\n\t\tif(index==-1){\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\tcontents.remove(index);\n\t\t\treturn true;\n\t\t}\n\t}",
"public boolean remove (Object obj) {\r\n\t\tboolean result = _list.remove (obj);\r\n\t\tHeapSet.heapify (this);\r\n\t\treturn result;\r\n\t}",
"public boolean remove(Object value) {\n\t\treturn false;\n\t}",
"public Object remove();",
"public boolean remove(Object value)\r\n {\r\n if (!contains(value))\r\n return false;\r\n root = remove(root, value);\r\n return true;\r\n }",
"public boolean remove(Object o) {\r\n return this.map.remove(o.hashCode()) != null;\r\n }",
"@Override\n\t\tpublic boolean remove(Object o) {\n\t\t\treturn false;\n\t\t}",
"public boolean remove(K key);",
"public boolean remove(Object o) {\n\t\tif(!contains(o))\r\n\t\t\treturn false;\r\n\t\tremove(indexOf(o));\r\n\t\treturn true;\r\n\t}",
"public static native boolean RemoveIt(long lpjFbxArrayVector2, long pElement);",
"@Override\n\tpublic boolean remove(Object o) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean remove(Object o) {\n\t\treturn false;\n\t}",
"public <K> boolean remove(K key);",
"@Override\n public boolean remove(Object o) {\n for (int i = 0; i < size; i++) {\n if (contains(o)) {\n remove(i);\n return true;\n }\n }\n return false;\n }",
"@Override\n public boolean remove(Object item) {\n if (item == null)\n return false;\n Counter count = map.get(item);\n if (count == null)\n return false;\n count.decrement();\n if (count.isZero())\n map.remove(item);\n return true;\n }",
"@Override public boolean remove(Object vme) {\n // throw new UnsupportedOperationException(\"remove: \" + o + \"; must remove by index\");\n return remove(indexOf(vme)) != null;\n }",
"public boolean remove(Object o) {\n int index = indexOf(o);\n if (index == -1) return false;\n remove(index);\n return true;\n }",
"public T remove(T element) throws EmptyCollectionException, ElementNotFoundException;",
"boolean remove (I id);",
"public boolean remove (Object item){\n\t\t\t\tint index = (item.hashCode() & Integer.MAX_VALUE) % table.length;\n\t\t\t\t\n\t\t\t\tif (table[index].remove(item)) {\n\t\t\t\t\tmodCount++;\n\t\t\t\t\thashTableSize--;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn false;\n\n\t}",
"public boolean remove(Object o) {\n\t\treturn map.remove(o) == PRESENT;\n\t}",
"public E remove();",
"public E remove();",
"public boolean remove(T data) {\n\t\tint targetIndex = indexOf(data);\n\t\tif (targetIndex == -1) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tT temp = remove(targetIndex);\n\t\t\treturn true;\n\t\t}\n\t}",
"public boolean remove(int paramInt)\n/* */ {\n/* 231 */ int i = internalFind(paramInt);\n/* 232 */ if (i >= 0) {\n/* 233 */ this.m_flagTable[i] = false;\n/* 234 */ this.m_entryCount -= 1;\n/* 235 */ while (this.m_flagTable[(i = stepSlot(i))] != false) {\n/* 236 */ reinsert(i);\n/* */ }\n/* 238 */ return true;\n/* */ }\n/* 240 */ return false;\n/* */ }",
"public boolean remove(RealObject o);",
"@Test\n public void testRemove_Contains() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(1);\n\n Integer item = 1;\n boolean expResult = true;\n boolean result = instance.remove(item);\n assertEquals(expResult, result);\n }",
"public boolean remove(final Object o) {\r\n\t\tif (o == null) {\r\n\t\t\tfor (int index = 0; index < this.size; index++) {\r\n\t\t\t\tif (this.elementData[index] == null) {\r\n\t\t\t\t\tthis.fastRemove( index );\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (int index = 0; index < this.size; index++) {\r\n\t\t\t\tif (o.equals( this.elementData[index] )) {\r\n\t\t\t\t\tthis.fastRemove( index );\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean remove(U value) {\n\t\t\tNode<U> currNode = mHead;\n\n\t\t\tfor (int i = 0; i < mLength; ++i) {\n\t\t\t\tif (Objects.equals(currNode.getValue(), value)) {\n\t\t\t\t\tunlinkNode(currNode);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tcurrNode = currNode.getNext();\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}",
"boolean remove(int pos);",
"public boolean remove(Key key) ;",
"public boolean remove(E element)\r\n\t{\r\n\t\tBTNode<E> cursor = root;\r\n\t\tBTNode<E> parentOfCursor = null;\r\n\t\tboolean done = false;\r\n\r\n\t\twhile(cursor != null && !done)\r\n\t\t{\r\n\t\t\tif(element.equals(cursor.getData()))\r\n\t\t\t\tdone = true;\r\n\t\t\telse if(element.compareTo(cursor.getData()) <= 0)\r\n\t\t\t{\r\n\t\t\t\tparentOfCursor = cursor;\r\n\t\t\t\tcursor = cursor.getLeft();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tparentOfCursor = cursor;\r\n\t\t\t\tcursor = cursor.getRight();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tif(cursor == null)\r\n\t\t{\r\n\t\t\tdone = false;\r\n\t\t}\r\n\t\telse if(cursor.getLeft() == null && cursor == root)\r\n\t\t{\r\n\t\t\troot = root.getRight();\r\n\t\t\tnumItems--;\r\n\t\t}\r\n\t\telse if(cursor.getLeft() == null && cursor != root)\r\n\t\t{\r\n\t\t\tif(cursor == parentOfCursor.getLeft())\r\n\t\t\t{\r\n\t\t\t\tparentOfCursor.setLeft(cursor.getRight());\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tparentOfCursor.setRight(cursor.getRight());\r\n\t\t\tnumItems--;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tcursor.setData(cursor.getLeft().getRightMostData());\r\n\t\t\tcursor.setLeft(cursor.getLeft().removeRightMost());\r\n\t\t\tnumItems--;\r\n\t\t}\r\n\r\n\t\treturn done;\r\n\t}",
"public boolean remove(New object);",
"public boolean remove(int val) {\n if (!realSet.contains(val)) return false;\n if (realSet.size() > 10 && realSet.size() == allSet.length / 4) {\n Integer[] tmpSet = new Integer[size * 2];\n int not = 0;\n for (int i = 0; i < size; i ++) {\n if (allSet[i] == null) {\n not ++;\n continue;\n }\n tmpSet[i - not] = allSet[i];\n }\n size -= not;\n allSet = tmpSet;\n }\n realSet.remove(val);\n return true;\n }",
"@Test(timeout=1000)\n\tpublic void testRemove() {\n\t\tStudent[] array = new Student[7];\n\t\tarray[5] = s2; // This is the correct hash position of this student\n\t\thashmap.setArray(array);\n\t\thashmap.remove(s2);\n\t\t// Check if the element has been removed\n\t\tboolean success = true;\n\t\tarray = hashmap.getArray();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tStudent s = array[i];\n\t\t\tif (s2.equals(s)){\n\t\t\t\tsuccess = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tassertTrue(\"remove() failed. Element was not removed from hashtable\", success);\n\t}",
"protected boolean performRemove(Triple triple) {\n Iterator<Triple> e = filter(null, null, null);\n while (e.hasNext()) {\n if (triple.equals(e.next())) {\n e.remove();\n return true;\n }\n }\n return false;\n }",
"@Test\r\n\t\tpublic void testDeleteElement() {\n\t\t\ttestingSet= new IntegerSet(list1);\r\n\t\t\tInteger array[] = testingSet.toArray(); \r\n\t\t\ttestingSet.deleteElement(0);\r\n\t\t\t// check to see if the first element in the set still exists\r\n\t\t\t// should result to false \r\n\t\t\tassertEquals(testingSet.exists(array[0]), false); \r\n\t\t}",
"@Override\n\tpublic boolean delete(Eleve o) {\n\t\tmap.remove(o.getId(), o);\n\t\treturn true;\n\t}",
"public boolean remove ( Object o ){\n\n \ttry{\n\n if(contains(o)){\n\n \t\t for(int i = 0; i < list.size(); i++){\n\n if(list.get(i).equals(o)){\n list.remove(i);\n }\n\n }\n\n \t\t return true;\n\n }\n\n else{\n return false;\n }\n\n \t}\n\n \tcatch (Exception e){\n \t\treturn false;\n \t}\n\n }",
"public boolean remove(AddressEntry addressEntry) {\n return entrySet.remove(addressEntry);\n }",
"@Override\n public boolean remove(T item) {\n //find where the item is in the array\n int index = this.findIndex(item);\n //if it is not in the array, return false\n if(index == -1)\n return false;\n //otherwise, move the last item in the array to the removed items\n //spot, decrement numItems and return true\n else{\n arr[index] = arr[--numItems];\n return true;\n }\n }",
"boolean remove(K key);",
"boolean remove(K key);",
"boolean remove(String name);",
"public void remove();",
"public void remove();",
"public void remove();",
"public void remove();",
"public void remove();"
]
| [
"0.7519336",
"0.7332444",
"0.7280559",
"0.7227912",
"0.71574175",
"0.70886856",
"0.7011523",
"0.693443",
"0.69144076",
"0.68781364",
"0.68339574",
"0.68144745",
"0.6786638",
"0.6780466",
"0.6754601",
"0.6689629",
"0.66894877",
"0.6674399",
"0.6663261",
"0.660785",
"0.6563768",
"0.65308034",
"0.6498817",
"0.6459544",
"0.6441984",
"0.6439412",
"0.64241415",
"0.6402287",
"0.6393717",
"0.639257",
"0.6382986",
"0.63699955",
"0.63668734",
"0.63655716",
"0.6358929",
"0.6356363",
"0.63484275",
"0.6334608",
"0.62912375",
"0.6283816",
"0.62782574",
"0.6278081",
"0.6278081",
"0.62722826",
"0.6255945",
"0.6255356",
"0.62534887",
"0.623974",
"0.6237879",
"0.6230398",
"0.6226314",
"0.622599",
"0.62225616",
"0.62126744",
"0.6201678",
"0.61979055",
"0.61886793",
"0.61834145",
"0.6181114",
"0.61724925",
"0.61702687",
"0.61698514",
"0.61698514",
"0.6168822",
"0.61431795",
"0.6123543",
"0.6120616",
"0.61147493",
"0.61124516",
"0.610375",
"0.61005265",
"0.60883945",
"0.6083634",
"0.6083634",
"0.60697997",
"0.6066578",
"0.60523754",
"0.6036963",
"0.6026593",
"0.60222155",
"0.60157526",
"0.6003643",
"0.6000441",
"0.5996569",
"0.5994305",
"0.5983254",
"0.5980896",
"0.5980607",
"0.5979903",
"0.5971234",
"0.59691244",
"0.5961507",
"0.59604585",
"0.59604585",
"0.5955948",
"0.5951283",
"0.5951283",
"0.5951283",
"0.5951283",
"0.5951283"
]
| 0.63771945 | 31 |
/ Returns the size of this HashSet | public int size() {
return size;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int size() {\n \tint currentSize = 0;\n \t\n \tIterator<E> iterateSet = this.iterator();\n \t\n \t// calculates number of elements in this set\n \twhile(iterateSet.hasNext()) {\n \t\titerateSet.next();\n \t\tcurrentSize++;\t\t\n \t}\n \t\n \treturn currentSize;\n \t\n }",
"public int size() {\n return set.size();\n }",
"public int size() {\n\t\treturn set.size();\n\t}",
"public int size() {\r\n\t\treturn set.size();\r\n\t}",
"@Override\n public int size() {\n return theSet.size();\n }",
"@Override\r\n\tpublic int size() {\n\t\treturn set.size();\r\n\t}",
"public int size(){\n return set.length;\n }",
"@Override\r\n\tpublic int size() {\r\n\t\treturn keySet().size();\r\n\t}",
"public final int size() {\n int size = 0;\n final Iterator iterator = this.iterator();\n while (iterator.hasNext()) {\n size++;\n iterator.next();\n }\n return size;\n }",
"@Override\n\tpublic int size() {\n\t\treturn util.iterator.IteratorUtilities.size(iterator());\n\t}",
"public int size(){\n\t\treturn hashTableSize;\n\t}",
"public int size() {\n\t\tTree<K, V> t = this;\n\t\tint size = 1;\n\t\treturn size(t, size);\n\t}",
"public int size() {\n // DO NOT MODIFY THIS METHOD!\n return size;\n }",
"public int size() {\n\t\tint result = 0;\n\t\tfor (E val: this)\n\t\t\tresult++;\n\t\treturn result;\n\t}",
"public int size() {\n int size = 0;\n for (Collection<V> value : map.values()) {\n size += value.size();\n }\n return size;\n }",
"public int size()\r\n\t{\r\n\t\treturn this.size;\r\n\t}",
"public int size() {\n // DO NOT MODIFY!\n return size;\n }",
"public int size() { return _byHashCode.size(); }",
"public int size() {\r\n\t\treturn this.size;\r\n\t}",
"public int size() {\r\n\t\treturn this.size;\r\n\t}",
"public int size() {\r\n\t\treturn this.size;\r\n\t}",
"public final synchronized int size() {\n\t\treturn map.size();\n\t}",
"public final int size() {\r\n\t\treturn this.size;\r\n\t}",
"public int size() \r\n\t{\r\n\t\treturn getCounter();\r\n\t}",
"public int size() {\n\t\treturn this.size;\n\t}",
"public int size() {\n\t\treturn this.size;\n\t}",
"public int size() {\n\t\treturn numEntries;\n\t}",
"public int size() {\n synchronized (this.base) {\n return this.base.size();\n }\n }",
"public int size()\n {\n return this.size;\n }",
"public int size() {\n // TODO: Implement this method\n return size;\n }",
"public int size() {\n return this.size;\n }",
"public int size() {\n return this.size;\n }",
"public int size() {\n return this.size;\n }",
"public int size() {\n return this.size;\n }",
"public int size() {\n return this.size;\n }",
"public int size() {\n return this.size;\n }",
"public int size() {\n return this.size;\n }",
"public int size() {\n return this.size;\n }",
"public int size() {\n return this.size;\n }",
"public int size() {\n return this.size;\n }",
"public int size()\r\n\t{\r\n\t\treturn count;\r\n\t}",
"public long size();",
"public int size() {\r\n\t\treturn size;\r\n\t}",
"public int size() {\r\n\t\treturn size;\r\n\t}",
"public int size() {\r\n\t\treturn size;\r\n\t}",
"public int size() {\r\n\t\treturn size;\r\n\t}",
"public int size() {\r\n\t\treturn size;\r\n\t}",
"public int size() {\r\n\t\treturn size;\r\n\t}",
"public int size() {\n\t\treturn map.size();\n\t}",
"public int size () {\r\n return this.size;\r\n }",
"public int size() {\n\t\treturn count;\n\t}",
"public int size() {\n\t\treturn count;\n\t}",
"public int size() {\n\t\treturn count;\n\t}",
"public final int size()\n {\n return m_count;\n }",
"public int\tsize() {\n\t\treturn map.size();\n\t}",
"public int size() {\n\t\treturn size;\n\t}",
"public int size() {\n\t\treturn size;\n\t}",
"public int size() {\n\t\treturn size;\n\t}",
"public int size() {\n\t\treturn size;\n\t}",
"public int size() {\n\t\treturn size;\n\t}",
"public int size() {\n\t\treturn size;\n\t}",
"public int size() {\n\t\treturn size;\n\t}",
"public int size() {\n\t\treturn size;\n\t}",
"public int size() {\n\t\treturn size;\n\t}",
"public int size() {\n\t\treturn size;\n\t}",
"public int size() {\n\t\treturn size;\n\t}",
"public int size() {\n\t\treturn size;\n\t}",
"public int size() {\n\t\treturn size;\r\n\t}",
"public int size() {\n\t\treturn size;\r\n\t}",
"public int size() {\n return map.size();\n }",
"public int size()\r\n {\r\n return count;\r\n }",
"public int size() {\r\n return size;\r\n }",
"public int size() {\r\n return size;\r\n }",
"public int size() {\r\n return size;\r\n }",
"public int size() {\r\n return size;\r\n }",
"public int size() {\n return this.size;\n }",
"public Integer size() { return this.entries.length(); }",
"public int size() {\n\n return size;\n }",
"public int size()\r\n {\r\n return size;\r\n }",
"public int size()\r\n {\r\n return size;\r\n }",
"public int size()\r\n {\r\n return size;\r\n }",
"public int size() {\n return doSize();\n }",
"@Override\n public int size() {\n int count = 0;\n for (Counter c : map.values())\n count += c.value();\n return count;\n }",
"public int size() {\n if (hasKeys) {\n return keys.size();\n } else {\n return objects.size();\n }\n }",
"public int size()\n\t{\n\t\treturn size;\n\t}",
"public int size()\n\t{\n\t\treturn size;\n\t}",
"public int size() {\n\t\t// DO NOT CHANGE THIS METHOD\n\t\treturn numElements;\n\t}",
"public int size()\n {\n return this.size;\n }",
"public int size() {\n return super.size();\n }"
]
| [
"0.79799175",
"0.7956307",
"0.79506403",
"0.7949465",
"0.786734",
"0.7772439",
"0.7559827",
"0.7540901",
"0.7451816",
"0.72681725",
"0.7261303",
"0.7261034",
"0.7233765",
"0.72260135",
"0.7224205",
"0.72144973",
"0.72100145",
"0.71741694",
"0.7157106",
"0.7157106",
"0.7157106",
"0.71542424",
"0.7142909",
"0.71305394",
"0.7123119",
"0.7123119",
"0.71114767",
"0.7080147",
"0.7077299",
"0.705367",
"0.7051464",
"0.7051464",
"0.7051464",
"0.7051464",
"0.7051464",
"0.7051464",
"0.7051464",
"0.7051464",
"0.7051464",
"0.7051464",
"0.7049438",
"0.7048229",
"0.70469993",
"0.70469993",
"0.70469993",
"0.70469993",
"0.70469993",
"0.70469993",
"0.7046899",
"0.703995",
"0.7037712",
"0.7037712",
"0.7037712",
"0.70310956",
"0.7024033",
"0.70226914",
"0.70226914",
"0.70226914",
"0.70226914",
"0.70226914",
"0.70226914",
"0.70226914",
"0.70226914",
"0.70226914",
"0.70226914",
"0.70226914",
"0.70226914",
"0.7019172",
"0.7019172",
"0.70099145",
"0.7007668",
"0.70059353",
"0.70059353",
"0.70059353",
"0.70059353",
"0.7004951",
"0.70048493",
"0.7000726",
"0.6999349",
"0.6999349",
"0.6999349",
"0.6994562",
"0.6992388",
"0.69919014",
"0.69916576",
"0.69916576",
"0.6990531",
"0.6981235",
"0.69783413"
]
| 0.0 | -1 |
/ Returns true if this HashSet is empty, false otherwise | public boolean isEmpty() {
return size == 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn set.isEmpty();\r\n\t}",
"public boolean isEmpty(){\n if(set.length == 0)\n return true;\n return false;\n }",
"public boolean isEmpty() {\n return this.size == 0;\n }",
"public boolean isEmpty() {\n return this.size == 0;\n }",
"@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn this.size == 0;\r\n\t}",
"public boolean isEmpty() {\n\t\treturn this.size == 0;\n\t}",
"public boolean isEmpty()\n {\n return this.size == 0;\n }",
"public final boolean isEmpty() {\r\n\t\treturn this.size == 0;\r\n\t}",
"public boolean isEmpty() {\n return (this.size == 0);\n }",
"@Override\n public boolean isEmpty() {\n return this.size == 0;\n }",
"public boolean isEmpty() {\n\t\treturn(this.size == 0);\n\t}",
"public boolean empty() {\n\t\treturn (size() <= 0);\n\t}",
"@Override\n public boolean isEmpty() {\n return this.count() == 0;\n }",
"public boolean isEmpty() {\n\t\tif (this.size() == 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isEmpty() {\r\n\t\tif (this.size == 0) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean isEmpty() {\n return values.isEmpty();\n }",
"public boolean isEmpty() {\n return (this.count == 0);\n }",
"public boolean empty()\n {\n return isEmpty();\n }",
"public synchronized boolean isEmpty() {\n\t\treturn size == 0;\n\t}",
"public boolean empty() {\n return size == 0;\n }",
"public boolean isEmpty() {\n return doIsEmpty();\n }",
"public synchronized boolean isEmpty() {\r\n return super.isEmpty();\r\n }",
"public boolean empty() {\n\t if(q.size()==0) return true;\n\t return false;\n\t }",
"public boolean isEmpty (){\n\t\treturn hashTableSize == 0;\n\t}",
"public boolean isEmpty()\r\n {\r\n if (count > 0) return false;\r\n else return true;\r\n }",
"public boolean isEmpty() {\n return size() == 0;\n }",
"public boolean isEmpty() {\n return size() == 0;\n }",
"public boolean isEmpty() {\n return size() == 0;\n }",
"public boolean isEmpty() {\n return size() == 0;\n }",
"public boolean isEmpty() {\n return size() == 0;\n }",
"public boolean isEmpty() {\n return size() == 0;\n }",
"public boolean isEmpty() {\n return size() == 0;\n }",
"public boolean isEmpty() {\n return size() == 0;\n }",
"public boolean isEmpty() {\n return size() == 0;\n }",
"public boolean isEmpty() {\n return size() == 0;\n }",
"public synchronized boolean isEmpty() {\r\n return size == 0;\r\n }",
"public boolean isEmpty() {\n\t return size() == 0;\n\t }",
"public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn size() == 0;\n\t}",
"public boolean isEmpty(){\n return this.size()==0;\n }",
"public boolean isEmpty() {\n return mValues.isEmpty();\n }",
"public boolean isEmpty()\r\n\t{\r\n\t\treturn count == 0;\r\n\t}",
"public boolean isEmpty() {\n return CollectionUtils.isEmpty(this.getData());\n }",
"@Override\n public boolean isEmpty() {\n return this.size==0;\n }",
"public boolean isEmpty() {\n return size() == 0;\n }",
"public boolean isEmpty() {\n\t\treturn size == 0;\r\n\t}",
"public boolean isEmpty() {\n\t\treturn size == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn size == 0;\n\t}",
"public boolean isEmpty() {\n\t\treturn size == 0;\n\t}",
"public boolean isEmpty() {\n return (count == 0);\n }",
"public boolean empty() {\r\n return size == 0;\r\n }",
"public boolean empty() {\n return data.size() == 0;\n }",
"public boolean empty() {\n return q.isEmpty();\n }",
"public boolean isEmpty() {\r\n\t\treturn size == 0;\r\n\t}",
"public boolean empty() {\n return size <= 0;\n }",
"public boolean isEmpty() {\n return (size() == 0);\n }",
"public boolean empty() {\n\t return s.isEmpty();\n\t}",
"public boolean isEmpty() \r\n\t{\r\n\t\treturn size() == 0;\r\n\t}",
"public boolean isEmpty() {\n\t\treturn (size == 0);\n\t}",
"public boolean isEmpty()\r\n\t{\r\n\t\treturn (count == 0);\r\n\t}",
"public boolean\tisEmpty() {\n\t\treturn map.isEmpty();\n\t}",
"public final synchronized boolean isEmpty() {\n\t\treturn map.isEmpty();\n\t}",
"public boolean isEmpty() { return size == 0; }",
"public boolean isEmpty() { return size == 0; }",
"public boolean isEmpty() { return size == 0; }",
"public boolean isEmpty() {\r\n return size == 0;\r\n }",
"public boolean isEmpty() {\r\n return size == 0;\r\n }",
"public boolean isEmpty() {\n return (size == 0);\n }",
"public boolean isEmpty(){\n\t\tboolean ans = false;\n\t\tif (_size == 0) ans = true;\n\t\treturn ans;\n\t}",
"public boolean empty() {\n return q.isEmpty();\n }",
"public boolean isEmpty() {\r\n return (size == 0);\r\n }",
"public boolean isEmpty(){\r\n\t\treturn size() == 0;\r\n\t}",
"public boolean isEmpty() {\n return count == 0;\n }",
"public boolean isEmpty() {\n return count == 0;\n }",
"public boolean isEmpty() {\n return count == 0;\n }",
"public boolean isEmpty() {\n return collection.isEmpty();\n }"
]
| [
"0.85329443",
"0.8258168",
"0.7974895",
"0.7974895",
"0.79645985",
"0.79514074",
"0.79330766",
"0.7921005",
"0.7902745",
"0.78696406",
"0.78594995",
"0.7852768",
"0.78417397",
"0.7820747",
"0.7806156",
"0.780107",
"0.77902585",
"0.77898026",
"0.7779015",
"0.77635527",
"0.775658",
"0.7755227",
"0.7751009",
"0.77456605",
"0.7729841",
"0.7727752",
"0.7727752",
"0.7727752",
"0.7727752",
"0.7727752",
"0.7727752",
"0.7727752",
"0.7727752",
"0.7727752",
"0.7727752",
"0.7720579",
"0.7720272",
"0.7718731",
"0.7718731",
"0.7718731",
"0.7718731",
"0.7718298",
"0.7718035",
"0.7715631",
"0.7713603",
"0.77066314",
"0.7704963",
"0.77020735",
"0.77015686",
"0.77015686",
"0.77015686",
"0.7701341",
"0.7698521",
"0.7697017",
"0.7693112",
"0.7689886",
"0.768965",
"0.76870424",
"0.768601",
"0.768141",
"0.767965",
"0.7679412",
"0.76790935",
"0.7677973",
"0.76772094",
"0.76772094",
"0.76772094",
"0.7675437",
"0.7675437",
"0.76731604",
"0.7672555",
"0.76688135",
"0.7668546",
"0.76647437",
"0.7663091",
"0.7663091",
"0.7663091",
"0.7662884"
]
| 0.7666478 | 90 |
/ Returns the hash of the given element | private int hash(E e) {
return Math.abs(e.hashCode()) % table.length;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getHash();",
"String getHash();",
"int getHash();",
"public BigInteger hash(String element)\n\t{ \n\t\treturn (BigInteger.valueOf(element.hashCode())).mod(modulus);\n\t}",
"public abstract int getHash();",
"com.google.protobuf.ByteString getHash();",
"com.google.protobuf.ByteString getHash();",
"public int hash(String item);",
"public int hash(T input);",
"public int hashcode();",
"public int hashCode(T elemento)\n {\n return elemento.toInt()%tamanioEst;\n }",
"public String getHash()\n {\n return hash;\n }",
"public String getHash() {\n return hash;\n }",
"java.lang.String getHashData();",
"org.apache.xmlbeans.XmlString xgetHashData();",
"int computeHashCode(byte val);",
"long hash(Block block, int position);",
"public String getHash() {\n return hash;\n }",
"public String getHash() {\n return hash;\n }",
"public String getHash() {\n return hash;\n }",
"public int getHash() {\n return hash_;\n }",
"public String getHash() {\n\t\treturn hash;\n\t}",
"String getHashAlgorithm();",
"public int getHash() {\n return hash_;\n }",
"public String getHash() {\n\t\treturn _hash;\n\t}",
"public byte[] getHash() {\n\t\treturn _hash.getDataID();\n\t}",
"public static String hash(String token){\n return Integer.toString( token.hashCode() );\n }",
"org.apache.xmlbeans.XmlAnyURI xgetManifestHashAlgorithm();",
"int hashCode();",
"int hashCode();",
"public String getHashValue() {\n return hashValue;\n }",
"public Hashtable getElementHashEntry() {\n\t\treturn (element);\n\t}",
"public int hash(String w){\n return (Math.abs(w.hashCode()) % hashTable.length);\n }",
"static int getHash(int par0)\n {\n return computeHash(par0);\n }",
"public String getHashValue() {\n\t\tif(hash == null || hash.equals(\"\")){\n\t\t\tthis.calculateHashValue();\n\t\t}\n\t\treturn hash;\n\t}",
"public int hashCode();",
"public int hashCode();",
"public int hashCode();",
"public int hashCode();",
"public byte[] getHash() {\n\t\treturn generatedHash;\n\t}",
"public String getHashCode();",
"private int computeHash(URI location) {\n \t\treturn location.hashCode();\n \t}",
"public String getHash()\n\t{\n\t\tif(isModified) generateHash();\n\t\treturn hash;\n\t}",
"public int hashCode()\n {\n return hash;\n }",
"int hash(String makeHash, int mod);",
"private int getHash(String word){\n\t\tif (word == null){\n\t\t\treturn INVALID;\n\t\t}\n\n\t\tint hash = 52;\n\t\tif ((word.charAt(0) >= 'a') && (word.charAt(0) <= 'z')){\n\t\t\thash = word.charAt(0) - 'a';\n\t\t}\n\t\telse if ((word.charAt(0) >= 'A') && (word.charAt(0) <= 'Z')){\n\t\t\thash = word.charAt(0) - 'A' + 26;\n\t\t}\n\t\treturn hash;\n\t}",
"private byte[] SHA256hash(byte[] tobeHashed){\r\n\t\tSHA256Digest digester=new SHA256Digest(); \r\n\t\tbyte[] retValue=new byte[digester.getDigestSize()]; \r\n\t\tdigester.update(tobeHashed, 0, tobeHashed.length); \r\n\t\tdigester.doFinal(retValue, 0);\r\n\t return retValue; \r\n}",
"public HASH256 getHash1(){return hash1;}",
"public byte[] getHash()\n\t{\n\t\treturn md5.getHash();\n\t}",
"private static int computeHash(int par0)\n {\n par0 ^= par0 >>> 20 ^ par0 >>> 12;\n return par0 ^ par0 >>> 7 ^ par0 >>> 4;\n }",
"private String hash(){\r\n return Utility.SHA512(this.simplify());\r\n }",
"public abstract int doHash(T t);",
"@Override\n public int hashCode()\n {\n return Objects.hash(super.hashCode(), elementHeader);\n }",
"private int hash(T x)\n {\n // calcolo della chiave ridotta - eventualmente negativa\n int h = x.hashCode() % v.length;\n\n // calcolo del valore assoluto\n if (h < 0)\n h = -h;\n \n return h; \n }",
"private int calculateHash(int id, String uri) {\n\t\treturn uri.hashCode() * Constants.HASH_PRIMES[0]\n\t\t\t\t+ Integer.toString(id).hashCode() * Constants.HASH_PRIMES[1];\n\t}",
"private int hasher() {\n int i = 0;\n int hash = 0;\n while (i != length) {\n hash += hashableKey.charAt(i++);\n hash += hash << 10;\n hash ^= hash >> 6;\n }\n hash += hash << 3;\n hash ^= hash >> 11;\n hash += hash << 15;\n return getHash(hash);\n }",
"public int hashCode() {\n return hash.hashCode();\n }",
"private String calulateHash() {\n\t\tsequence++; // increase the sequence to avoid 2 identical transactions having the same hash\n\t\treturn StringUtil.applySha256(StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(reciepient)\n\t\t\t\t+ Float.toString(value) + sequence);\n\t}",
"int\thashCode();",
"String getHashControl();",
"private int getHash(Object key) {\n return key.hashCode();\n }",
"@Override\n\tpublic int hash(String item) {\n\t\tlong hashCode = 0l;\n\t\tchar[] c = item.toCharArray();\n\t\tfor (int i = 0; i < c.length; i++) {\n\t\t\thashCode += c[i] * Math.pow(31, c.length - (i + 1));\n\t\t}\n\t\tint i = (int) hashCode % 2147483647;\n\n\t\n\t\treturn Math.abs(i);\n\t\t\n\t}",
"private static String HashIt(String token) {\n\t\tStringBuffer hexString = new StringBuffer();\n\t\ttry {\n\t\t\tMessageDigest digest = MessageDigest.getInstance(\"SHA-256\");\n\t\t\tbyte[] hash = digest.digest(token.getBytes(StandardCharsets.UTF_8));\n\t\t\t\n\t\t\t// Convert to hex\n\t\t for (int i = 0; i < hash.length; i++) {\n\t\t\t String hex = Integer.toHexString(0xff & hash[i]);\n\t\t\t if(hex.length() == 1) {\n\t\t\t \thexString.append('0');\n\t\t\t }\n\t\t\t hexString.append(hex);\n\t\t }\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\tSystem.err.println(e.getStackTrace());\n\t\t\thexString.setLength(0);\n\t\t}\n\t return hexString.toString();\t\t\n\t}",
"@Override\n public int getHash(String name) {\n int x = 0;\n int sum = 0;\n while (x < name.length()) {\n sum += name.charAt(x);\n x++;\n }\n int result = sum % size;\n return result;\n }",
"public String getHash() {\n byte[] bArr = new byte[21];\n bArr[0] = (byte) getCTxDestinationType().getValue();\n System.arraycopy(this.mData, 0, bArr, 1, 20);\n return StringToolkit.bytesToString(bArr);\n }",
"@Override\n public int hashCode() {\n final int primeNum = 31;\n int result = primeNum * numElement;\n Node<T> iter = head;\n for (int index = 0; index < numElement; index++) {\n result = primeNum * iter.hashCode();\n iter = iter.getNext();\n }\n return result;\n }",
"public static String GetHash(String input)\n {\n String hash = DigestUtils.sha1Hex(input);\n System.out.println(hash);\n return hash;\n }",
"byte[] getDigest();",
"com.google.protobuf.ByteString getFileHash();",
"com.google.protobuf.ByteString getFileHash();",
"public static int calculateHash(final Field field) {\n int hash = 17;\n hash = (37 * hash) + field.getName().hashCode();\n Class type = field.getType();\n hash = (37 * hash) + type.getName().hashCode();\n return hash;\n }",
"private int getHash() {\n return (name + FluentIterable.from(getDimensions()).transform(new Function<CloudConfigurationDimension, String>() {\n @Override\n public String apply(CloudConfigurationDimension dimension) {\n return getStringRepresentation(dimension);\n }\n }).toString()).hashCode();\n }",
"public int hashCode()\n {\n int hash = 7;\n hash = 83 * hash + (counter != null ? counter.hashCode() : 0);\n return hash;\n }",
"public int hashCode() {\n if (myhash == -1) {\n myhash = timestamp.hashCode() + signerCertPath.hashCode();\n }\n return myhash;\n }",
"public String getHash(String str) throws Exception{\n\t\t\n\t\tMessageDigest md = MessageDigest.getInstance(\"MD5\");\n md.update(str.getBytes());\n \n byte byteData[] = md.digest();\n \n //convert the byte to hex format method 1\n StringBuffer sb = new StringBuffer();\n for (int i = 0; i < byteData.length; i++) {\n sb.append(Integer.toString((byteData[i] & 0xff) + 0x100, 16).substring(1));\n }\n \n String hex = sb.toString();\n System.out.println(hex);\n return hex; \n}",
"public String calculateHash () {\n StringBuilder hashInput = new StringBuilder(previousHash)\n .append(timeStamp)\n .append(magicNumber)\n .append(timeSpentMining);\n for (Transfer transfer : this.transfers) {\n String transferDesc = transfer.getDescription();\n hashInput.append(transferDesc);\n }\n return CryptoUtil.applySha256(hashInput.toString());\n }",
"String getSaltedHash();",
"final int hash(E object)\n {\n // Spread bits to regularize both segment and index locations,\n // using variant of single-word Wang/Jenkins hash.\n int h = object.hashCode();\n h += (h << 15) ^ 0xffffcd7d;\n h ^= (h >>> 10);\n h += (h << 3);\n h ^= (h >>> 6);\n h += (h << 2) + (h << 14);\n h = h ^ (h >>> 16);\n return h;\n }",
"public int hashCode() {\n if (size == 0) {\n return 0;\n } else {\n int hash = 0xffff;\n JMLListObjectNode<E> walker = the_list;\n while (walker != null) {\n E wv = walker.val;\n if (wv != null) {\n hash ^= wv.hashCode();\n }\n walker = walker.next;\n } \n return hash;\n }\n }",
"@Override\n\tpublic long getHashCode(String key) {\n\t\tlong hash = 0;\n\t\tlong b = 378551;\n\t\tlong a = 63689;\n\t\tint tmp = 0;\n\t\tfor (int i = 0; i < key.length(); i++) {\n\t\t\ttmp = key.charAt(i);\n\t\t\thash = hash * a + tmp;\n\t\t\ta *= b;\n\t\t}\n\t\treturn hash;\n\t}",
"public int hashCode() {\n int hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + (userId != null ? userId.hashCode() : 0);\n hash = hash * UtilConstants.HASH_PRIME + (role != null ? role.hashCode() : 0);\n return hash;\n }",
"private String calculateHash() {\n\n // Increments the sequence to prevent two transactions from having identical keys.\n sequence++;\n return StringUtil.applySha256(\n StringUtil.getStringFromKey(sender) +\n StringUtil.getStringFromKey(recipient) +\n Float.toString(value) +\n sequence\n );\n }",
"@Override\n public int hashCode ()\n {\n int hash = 7;\n hash = 53 * hash + Arrays.hashCode (this.bytes);\n return hash;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }",
"int hash(T key) throws IOException, NoSuchAlgorithmException {\n\t\tByteArrayOutputStream b = new ByteArrayOutputStream();\n ObjectOutputStream o = new ObjectOutputStream(b);\n o.writeObject(key);\n byte[] data = b.toByteArray();\n \n //hash key using MD5 algorithm\n\t\t//System.out.println(\"Start MD5 Digest\");\n MessageDigest md = MessageDigest.getInstance(\"MD5\");\n md.update(data);//this updates the digest using the specified byte array\n \tbyte[] hash = md.digest();\n \tByteBuffer wrapped = ByteBuffer.wrap(hash); // big-endian by default\n \tint hashNum = wrapped.getInt(); \n \treturn hashNum;\n \t\n\t}",
"java.lang.String getManifestHashAlgorithm();",
"public abstract int hashCode();",
"private static String CalHash(byte[] passSalt) throws NoSuchAlgorithmException, UnsupportedEncodingException {\n //get the instance value corresponding to Algorithm selected\n MessageDigest key = MessageDigest.getInstance(\"SHA-256\");\n //Reference:https://stackoverflow.com/questions/415953/how-can-i-generate-an-md5-hash\n //update the digest using specified array of bytes\n key.update(passSalt);\n String PassSaltHash = javax.xml.bind.DatatypeConverter.printHexBinary(key.digest());\n return PassSaltHash;\n }",
"public int hashCode() {\n return 37 * 17;\n }",
"public int hashCode() {\n try {\n int res = 0;\n byte[] array = getEncoded();\n for (int i=0; i<array.length; i++) {\n res += array[i] & 0xFF;\n }\n return res;\n } catch (CRLException e) {\n return 0;\n }\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }",
"public int hashCode() {\n\t\treturn BeanTools.createHashcode(id, consultContent, consultTime);\r\n\t}",
"byte[] digest();",
"protected abstract int hashOfObject(Object key);",
"public int hashCode() {\n return this.trieNode.hashCode();\n }",
"public int hashCode() {\n if (hash == -1) {\n hash = 0;\n byte b[] = packet.getData();\n int len = b.length;\n for (int ix = 0; ix < len; ix++) {\n\thash = 31 * hash + b[ix];\n }\n hash ^= (packet.getAddress().hashCode() ^\n\t (packet.getPort() << 15) ^\n\t (packet.getLength() << 3) ^\n\t (packet.getOffset() << 8));\n }\n return hash;\n }",
"public static String hash(String in) {\r\n\t\treturn DigestUtils.md5Hex(in.getBytes());\r\n\t}",
"static int getHash(Object obj) {\n return getHash(new HashSet<Class>(), obj, 0);\n }"
]
| [
"0.76894987",
"0.76894987",
"0.76023215",
"0.7492106",
"0.7213185",
"0.7144821",
"0.7144821",
"0.7129684",
"0.70039696",
"0.6951048",
"0.690608",
"0.68719804",
"0.68470615",
"0.68397206",
"0.68350875",
"0.68187755",
"0.68082756",
"0.6802814",
"0.6802814",
"0.6802814",
"0.67553675",
"0.6717407",
"0.6713071",
"0.6707953",
"0.6637261",
"0.6618783",
"0.65636826",
"0.654947",
"0.65395135",
"0.65395135",
"0.65256613",
"0.65205956",
"0.64963543",
"0.6469756",
"0.6460917",
"0.6444101",
"0.6444101",
"0.6444101",
"0.6444101",
"0.6442255",
"0.6436852",
"0.6436537",
"0.64296395",
"0.6418723",
"0.63924825",
"0.63797814",
"0.6378009",
"0.63539076",
"0.6339042",
"0.6313872",
"0.63083506",
"0.6290511",
"0.62814134",
"0.6271886",
"0.62661093",
"0.6239497",
"0.6235375",
"0.6232763",
"0.6223135",
"0.6220112",
"0.6207686",
"0.6197349",
"0.61961746",
"0.6191051",
"0.6189878",
"0.61851877",
"0.61847204",
"0.61825854",
"0.61787695",
"0.61787695",
"0.6176773",
"0.6150786",
"0.61423194",
"0.6141169",
"0.61404586",
"0.6131771",
"0.6129486",
"0.61215043",
"0.61096394",
"0.6107172",
"0.6097594",
"0.60869783",
"0.6077499",
"0.6071358",
"0.6071358",
"0.60705906",
"0.60695416",
"0.6067154",
"0.6064962",
"0.6061586",
"0.60602397",
"0.6058892",
"0.6058892",
"0.605839",
"0.6033179",
"0.6029259",
"0.6010174",
"0.60080796",
"0.6002352",
"0.59956884"
]
| 0.637612 | 47 |
/ Constructs a new node with the given value and next link | public HashNode(E data, HashNode<E> next) {
this.data = data;
this.next = next;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Node(String value, Node next) {\n\t\t\tthis.value = value;\n\t\t\tthis.next = next;\n\t\t}",
"public Node(T value) {\n\t\t\tthis.value = value; // initializing\n\t\t\tnext = null;\n\t\t}",
"public Node(String value) {\n\t\t\tthis.value = value;\n\t\t\tthis.next = null;\n\t\t}",
"public Node(String val, Node n)\n {\n value = val;\n next = n;\n }",
"public Node(int value, Node next)\n\t\t{\n\t\t\tthis.value = value;\n\t\t\tthis.next = next;\n\t\t}",
"public Cell(Object value, Cell link)\n { val = value; \n next = link;\n }",
"@SuppressWarnings(\"unused\")\n public Node(Object dataValue, Node nextValue) \n {\n next = nextValue;\n data = dataValue;\n }",
"public Node(T value) \n\t\t//PRE: T is initialized\n\t\t//POST: A node is created with value T \n\t\t{\n\t\t\tthis.value = value;\t\n\t\t\tnext = null;\n\t\t\tisCurrent = false;\n\t\t}",
"public Node(int value)\n\t\t{\n\t\t\tthis.value = value;\n\t\t\tthis.next = null;\n\t\t}",
"Node(T theValue, Node theNext) {\n if (theValue == null)\n throw new RuntimeException(\"Null is not accepted for data\");\n value = theValue;\n next = theNext;\n }",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\tprivate void setNext(k key, v value) {\n\t\t\tnext = new Node (key, value, null);\n\t\t}",
"public DoublyLinkedNode(T val) {\n value = val;\n previous = null;\n next = null;\n }",
"public Node(Key key, Value val, Node next) {\n this.key = key;\n this.val = val;\n this.next = next;\n }",
"public void newNode(E value) throws Exception {\n\t\tif(!hasNext())\n\t\t\tthrow new Exception(\"This node has already been linked\");\n\t\t\n\t\tnext_node = new Node<E>(value);\n\t}",
"public Node(T value) {\n\t\tthis.value = value;\n\t}",
"Node(T val) {\n this.val = val;\n this.next = null;\n }",
"public Node(T value) {\n this.value = value;\n }",
"Node(Object newItem){\n item = newItem; //--points to a different\n next = null;\n }",
"public abstract GraphNode<N, E> createNode(N value);",
"public Node(String value)\n\t{\n\t\tthis.children = new ArrayList<Node>();\n\t\tthis.value = value;\n\t}",
"public Node(Object dataValue, Node nextValue, Node prevValue) \r\n\t\t{\r\n\t\t\tnext = nextValue;\r\n\t\t\tprev = prevValue;\r\n\t\t\tdata = dataValue;\r\n\t\t}",
"public Node createNode(int value) {\r\n\t\treturn new Node(value, null, null);\r\n\t}",
"private static Node createNode(int value) {\n\t\treturn new Node(value);\n\t}",
"public DSAGraphNode(String inLabel, E inValue)\n {\n label = inLabel;\n value = inValue;\n links = new DSALinkedList<DSAGraphNode<E>>();\n visited = false;\n edgeList = new DSALinkedList<DSAGraphEdge<E>>();\n distanceFromSource = Double.MAX_VALUE;\n previous = null;\n }",
"public Node(int value) {\n\t\tthis.value = value;\n\t}",
"public Node(Key key, Value value) {\n\t this.key = key;\n\t this.value = value;\n }",
"public BNode(int key, int value, BNode next) {\n this.key = key;\n this.value = value;\n this.left = null;\n this.right = null;\n this.next = next;\n this.height = 0;\n }",
"Node(int value, String name) {\n this.value = value;\n this.name = name;\n }",
"private Node(T value) {\n\t\t\tthis.value = value;\n\t\t}",
"public void add(T value) {\n Node<T> newNode = new Node<T>();\n newNode.data = value;\n newNode.next = null;\n if (head == null) {\n head = newNode;\n } else {\n Node<T> last = head;\n while (last.next != null) {\n last = last.next;\n }\n last.next = newNode;\n }\n }",
"private Node(K keyPortion, V valuePortion)\n {\n this(keyPortion, valuePortion, null);\n }",
"Node(E value) {\n this.value = value;\n this.childen = new ArrayList<>();\n }",
"private Node(T value, Node<T> left, Node<T> right, Node<T> previous) {\n\t\t\tthis.value = value;\n\t\t\tthis.left = left;\n\t\t\tthis.right = right;\n\t\t\tthis.previous = previous;\n\t\t}",
"public void add(E value) { // add a value to the linked list\n\t\tif (head == null) {\n\t\t\thead = new Node<E>(value);\n\t\t\treturn;\n\t\t} else {\n\t\t\tNode<E> temp = new Node<E>(value);\n\t\t\tNode<E> current = head;\n\t\t\twhile (current.getNext() != null) {\n\t\t\t\tcurrent = current.getNext();\n\t\t\t}\n\t\t\t// set the new node's next-node reference to this node's next-node\n\t\t\t// reference\n\t\t\ttemp.setNext(current.getNext());\n\t\t\t// now set this node's next-node reference to the new node\n\t\t\tcurrent.setNext(temp);\n\t\t}\n\t}",
"public void add(int value) {\n Node newNode = new Node(value);\n if(this.head == null) { //head is a pointer\n this.head = newNode;\n } else {\n Node runner = this.head;\n while(runner.next != null) {\n runner = runner.next;\n }\n runner.next = newNode;\n }\n }",
"public void add(T value) {\n\t\tNode newNode = new Node(value);\n\t\tif (head == null) {\n\t\t\thead = newNode;\n\t\t\treturn;\n\t\t}\n\t\tNode current = head;\n\t\twhile (current.next != null) {\n\t\t\tcurrent = current.next;\n\t\t}\n\t\tcurrent.next = newNode;\n\t}",
"public Node(int value, int priority, Node next)\n\t\t{\n\t\t\tthis.value = value;\n\t\t\tthis.priority = priority;\n\t\t\tthis.next = next;\n\t\t}",
"@Override\n\tpublic void push(T value) {\n\t\tLink_Node<T>node = new Link_Node<T>(value);\n\t\tnode.setPrevious(last);\n\t\tlast = node;\n\t\tcounts++;\n\t}",
"private static void recAdd(Node l, String value) {\n\t\tif (l.next == null) {\n\t\t\tl.next = new Node(value);\n\t\t\treturn;\n\t\t} else {\n\t\t\t// Base 2, the value behide the leader's value bigger than the value we want to add\n\t\t\tif (l.next.value.compareTo(value) > 0) {\n\t\t\t\tNode temp = new Node(value, l.next);\n\t\t\t\tl.next = temp;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Base 2, the value already in the list\n\t\t\telse if (l.next.value.equals(value)) {\n\t\t\t\treturn;\n\t\t\t} else\n\t\t\t\trecAdd(l.next, value);\n\t\t\t\treturn;\n\t\t}\n\n\t}",
"public Node(T val) {\r\n\t\tthis.val = val;\r\n\t}",
"public Node(T value) {\n this.value = value;\n this.height = 0;\n this.leftChild = null;\n this.rightChild = null;\n this.parent = null;\n }",
"public Node (Object newItem) {\n next = null; // set intially to null\n item = newItem;\n }",
"Node (int data) {\n this.value = data;\n this.next = null;\n }",
"public DequeNode(DequeNode<T> next, T value, DequeNode<T> prev) {\n this.next = next;\n this.value = value;\n this.prev = prev;\n }",
"private HashNode(KeyType key, ValueType value) {\r\n this.key = key;\r\n this.value = value;\r\n }",
"public Node(final Object key, final Object value) {\r\n this.k = new Object[]{key};\r\n this.v = new Object[]{value};\r\n this.c = null;\r\n this.kcount = 1;\r\n }",
"public Node(char value) {\n this.value = value;\n this.left = null;\n this.right = null;\n }",
"public void addAtStart(T value) {\n Node<T> newNode = new Node<>();\n newNode.data = value;\n newNode.next = head;\n head = newNode;\n }",
"public HashNode(KeyType key, ValueType value) {\r\n this.key = key;\r\n this.value = value;\r\n }",
"public node (int newData, node newNext){\r\n\t this.data = newData;\r\n\t this.next = newNext;\r\n\t}",
"public BNode(int key, int value) {\n this.key = key;\n this.value = value;\n this.left = null;\n this.right = null;\n this.next = null;\n this.height = 0;\n }",
"public BTNode(int value){ \r\n node = value; \r\n leftleaf = null;\r\n rightleaf = null;\r\n }",
"public Node(K key, V value) {// this is the constructor of a new Node\n\t\t\tmKey = key;// it takes as an arguments a key\n\t\t\tmValue = value;// and a value\n\t\t\tmParent = mSentinel;// and makes a nodw with no parent\n\t\t\tmLeft = mSentinel;// or children\n\t\t\tmright = mSentinel;// that stores the key and the value\n\t\t}",
"public Node setNextNode(Node node);",
"public Node(E data, Node<E> link) {\r\n\t\tthis.data = data;\r\n\t\tthis.link = link;\r\n\t\tthis.counter = 0;\r\n\t}",
"public void add(String value) {\n\t\tif (head == null)\n\t\t\thead = new Node(value);\n\t\telse if (head.value.compareTo(value) > 0) {\n\t\t\thead = new Node(value, head);\n\t\t} else if (head.value.compareTo(value) == 0) {\n\t\t\treturn;\n\t\t} else\n\t\t\trecAdd(head, value);\n\t}",
"Node(Object e, Node p, Node n) {\n element = e;\n previous = p;\n next = n;\n }",
"public List(E value) {\n\t\thead = new ListNode(value, null);\n\t}",
"public void addToListWithCycle(T value) {\n Node<T> tmp = lastNode;\n Node<T> node = new Node<>(value, firstNode);\n lastNode = node;\n if (tmp == null) {\n firstNode = node;\n } else {\n tmp.next = node;\n }\n size++;\n }",
"public Node(int val) {\n this.val = val;\n }",
"public listNode(String val) {\n\t\t\tdata= val;\n\t\t\tnext= null;\n\t\t\tprevious= null;\n\t\t}",
"public void addToNoCycle(T value) {\n Node<T> tmp = lastNode;\n Node<T> node = new Node<>(value, null);\n lastNode = node;\n if (tmp == null) {\n firstNode = node;\n } else {\n tmp.next = null;\n }\n size++;\n\n }",
"public TreeNodeImpl(N value) {\n this.value = value;\n }",
"public void insert(int value){\n head = new Node(value,head);\n size++;\n }",
"public Node<E> addNode(E value){\n Node<E> newNode = new Node<>(value);\n if(value != null){\n nodes.putIfAbsent(newNode, new HashSet<>());\n }\n return newNode;\n }",
"public void setNext(Node n) { next = n; }",
"void insert(int value){\n\t\tNode newNode=new Node(value);\n\n\t\tif(head==null){\n\t\t\thead=newNode;\n\t\t\tsize++;\n\t\t}\n\t\telse{\n\t\t\tNode temp=head;\n\t\t\twhile(temp.getNext()!=null){\n\t\t\t\ttemp=temp.getNext();\n\t\t\t}\n\t\t\ttemp.setNext(newNode);\n\t\t\tsize++;\n\t\t}\n\t}",
"public TreeNode(TreeNode parent, Object value)\r\n\t{\r\n\t\tm_parent = parent;\r\n\t\tm_value = value;\r\n\t}",
"public void add(K value)\n {\n\tSkipListNode<K> newNode = new SkipListNode<K>(value, p); //New node with random height\n\tint h = newNode.height(); \n\thead.ensureHeight(h); \n\tArrayList<SkipListNode<K>> pred = findPredecessors(value); //ArrayList of predecessors\n\tSkipListNode<K> predNode = new SkipListNode<K>();\n\n\t//For each sub-list, adjusts next of newNode and next of predecessor\n\twhile (h > 0) {\n\t predNode = pred.get(h-1);\n\t newNode.setNext(h-1, predNode.next(h-1)); //Set next of newNode at level h-1 to h-1 predecessor's next at level h-1\n\t predNode.setNext(h-1, newNode); //Set the h-1 predecessor's next reference to newNode at level h-1\n\t h--; //Decrement h\n\t}\n\tsize++; //Increment size to indicate new node\n }",
"public Node(T t, Node n) {\r\n \r\n element = t;\r\n next = n;\r\n }",
"public Node(T value, boolean isCurrent) \n\t\t//PRE: T and isCurrent are initialized\n\t\t//POST: A node is created with value t and current flag set to true\n\t\t{\n\t\t\tthis(value);\n\t\t\tthis.isCurrent = isCurrent;\n\t\t}",
"public void add(int index, Object value) {\n if (index > _size) {\n throw new ListIndexOutOfBoundsException(\"Error\");\n }\n ListNode node = new ListNode(value);\n if (index == 0) {\n node.next = start;\n start = node;\n } else {\n ListNode prev = start;\n for (int i = 0; i<index - 1; i++ ) {\n prev = prev.next;\n }\n ListNode temp = prev.next;\n prev.next = node;\n node.next = temp;\n } \n _size++;\n }",
"void append(int value) {\n\t\tNode n = new Node(value);\n\t\tif (length == 0) {\n\t\t\thead = n;\n\t\t\ttail = n;\n\t\t} else {\n\t\t\ttail.next = n;\n\t\t\ttail = n;\n\t\t}\n\t\tlength++;\n\t\t//print();\n\t}",
"public void insertNode(int val)\r\n {\r\n temp=new TriLinkNode();\r\n temp.v1=val;\r\n temp.d1=false;\r\n temp.i1=true;\r\n if(root==null)\r\n {\r\n root=temp;\r\n }else\r\n {\r\n recInsertNode(root);\r\n }\r\n \r\n }",
"public void add(final T value) {\n\n final var node = new Node<>(value);\n final var currentTail = this.tail;\n\n if (currentTail != null) {\n currentTail.next = node;\n }\n\n if (head == null) {\n this.head = node;\n }\n tail = node;\n size++;\n }",
"public void add(int value) {\nNode newNode = new Node(value);\nif (head == null) {\nhead = newNode;\nsize++;\nreturn;\n}\nNode current = head;\nwhile (current.next != null) {\ncurrent = current.next;\n}\ncurrent.next = newNode;\nsize++;\n}",
"public TreeNode(Object value)\r\n\t{\r\n\t\tthis(null, value);\r\n\t}",
"public Node(Object _data, Node _next) {\r\n\t\t\tnext = _next;\r\n\t\t\tdata = _data;\r\n\t\t}",
"public void insert(int value) {\n\t\t\n\t\tNode temp =new Node(value); // created object name temp (creating NODE) that have 2 contain data and next\n\t\t\n\t\t// no node available therefore this is 1st node\n\t\tif(this.head==null) { \n\t\t\thead = temp; // head pointed to temp\n\t\t}\n\t\telse {\n\t\t\t// this is not the first node to be inserted\n\t\t\ttemp.next = head; // head ke contain temp ke next me copy kiye\n\t\t\thead = temp; // temp pointed(next) copy into head\n\n\t\t}\n\t}",
"public Node(D d){\n\t\tdata = d;\n\t\tnext = null;\n\t}",
"public BSTNode(E value) {\r\n\t\tthis.value = value;\r\n\t}",
"Node(Team v){\r\n value = v;\r\n }",
"public Node(Content content, Node next) {\n\t\tthis.content = content;\n\t\tthis.next = next;\n\t}",
"public void append(int nodeValue)\n {\n ListNode newNode = new ListNode(nodeValue);\n\n // Check if the head is null\n if(this.head == null && this.tail == null)\n {\n this.head = newNode;\n this.tail = newNode;\n } else {\n\n ListNode currNode = this.head;\n ListNode prevNode = this.head;\n\n // Traverse the list\n while(currNode.getNextNode() != null)\n {\n // System.out.println(\"STUCK\");\n // System.out.println(\"CURRENT NODE VALUE: \" + currNode.getValue());\n // System.out.println(\"NEXT NODE FROM CURRENT: \" + currNode.getNextNode().getValue());\n prevNode = currNode;\n currNode = currNode.getNextNode();\n \n }\n\n // Wire the two nodes together\n currNode.setNextNode(newNode);\n newNode.setPrevNode(currNode);\n this.tail = newNode;\n }\n\n this.size = size + 1;\n\n }",
"Node(TNode i, Node n){\t\t\t//A function to create a Node\n\t\telement = i;\t\t\t\t\n\t\tnext = n;\n\t}",
"public ListNode insert(ListNode head, int value) {\n\t\t ListNode node = new ListNode(value);\n\t\t if(head == null || value <= head.value){\n\t\t node.next = head;\n\t\t return node;\n\t\t }\n\t\t ListNode cur = head;\n\t\t while(cur.next != null && cur.next.value < value){\n\t\t cur = cur.next;\n\t\t }\n\t\t ListNode next = cur.next;\n\t\t cur.next = node;\n\t\t node.next = next;\n\t\t return head;\n\t\t }",
"public Node(String newdata)\n {\n previous = null;\n next = null;\n data = newdata;\n }",
"@Override\n\tpublic void add(L value) {\n\t\tif(value==null) throw new NullPointerException();\n\t\tListNode<L> newNode=new ListNode<>(value);\n newNode.storage=value;\n newNode.next=null;\n newNode.previous=last;\n if(last==null){\n first=newNode;\n }else {\n last.next=newNode;\n }\n last=newNode;\n\t\tthis.size++;\n\t\tthis.modificationCount++;\n\t}",
"public void append(int value) {\n\t\t\n\t\tNode temp = new Node(value);\n\t\t\n\t\t// no node available therefore this is 1st node\n\t\tif(this.head == null) {\n\t\t\thead = temp;\n\t\t}\n\t\t// 1 and more than one node available\n\t\telse {\n\t\t\tNode it = this.head; // it pointed to head pointed\n\t\t\twhile(it.next != null) { //it++ up to it.next get null\n\t\t\t\tit = it.next;\n\t\t\t}\n\t\t\t// it pointed to last node\n\t\t\tit.next = temp; // insert value at last\n\t\t\ttemp.next = null;\n\t\t}\n\t}",
"public Node(D d, Node<D> n){\n\t\tdata = d;\n\t\tnext = n;\n\t}",
"public DNode(String e, DNode p, DNode n) { element = e; prev = p; next = 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 DLBNode(char inputValue){\r\n\t\t\tvalue = inputValue;\r\n\t\t\tchildNode = null;\r\n\t\t\tsiblingNode = null;\r\n\t\t}",
"public void setNext(DNode newNext) { next = newNext; }",
"public void add(int value, String name){\n \n Node newNode = new Node(value, name); //Intialize new node \n \n if(root == null){ //If the root is null \n root = newNode; //Set newNode to the root \n }\n else{ \n Node myNode = root; //Create a second new node\n Node parent; //Crete a parent Node \n\n while (true) { //While true....\n \n parent = myNode;//Set parent node to myNode\n \n if (value < myNode.value) { //If the value is less than my node \n \n myNode = myNode.left; //Set myNode to left \n \n if (myNode == null) { //If the value of myNode is null \n \n parent.left = newNode; //Set the left parent node to newNode\n return; \n \n }\n }else {\n \n myNode = myNode.right; //Set myNode to the right Node\n \n if (myNode == null) {\n \n parent.right = newNode; //Set the right node to the newNode\n return;\n \n }\n\n }\n\n }\n \n }\n \n \n }",
"public Node(int data, Node next, char a) {\n // Call the other constructor in the list\n this(data);\n this.next = next;\n }",
"public RBNode<T, E> createRBNode(T key, E value) {\r\n\t\tRBNode<T, E> tempRBNode = new RBNode<T, E>(key, value, 'r');\r\n\t\treturn tempRBNode;\r\n\t}",
"public void setNext(Node<D> n){\n\t\tnext = n;\n\t}",
"public static MyLinkedList addToTail(MyLinkedList list, int value) {\n\n Node toInsert = new Node(value);\n toInsert.next = null; //because it has to be the tail (last node)\n\n // If the Linked List is empty,\n // then make the new node as head\n if (list.head == null) {\n list.head = toInsert;\n } else {\n // Else traverse till the last node\n // and insert the new_node there\n Node last = list.head;\n while (last.next != null) {\n last = last.next;\n }\n // Insert the new_node at last node\n last.next = toInsert;\n }\n return list;\n }",
"public ListNode(Object newItem, ListNode nextNode){\n\t\tlistItem = newItem;\n\t\tnext = nextNode;\n\t}",
"public Node(E data, Node next) {\n\t\t\tthis.data = data;\n\t\t\tthis.next = next;\n\t\t}"
]
| [
"0.78223944",
"0.7639713",
"0.7464974",
"0.7374093",
"0.73699653",
"0.7328986",
"0.7328945",
"0.7202565",
"0.7132793",
"0.7131026",
"0.70587164",
"0.7050063",
"0.7022319",
"0.7010482",
"0.6995416",
"0.6959925",
"0.6949785",
"0.692883",
"0.69054323",
"0.68657625",
"0.6852954",
"0.67925197",
"0.6758623",
"0.6756229",
"0.6753185",
"0.6740458",
"0.67265826",
"0.66881293",
"0.66871256",
"0.6622102",
"0.6594779",
"0.651586",
"0.6502079",
"0.6485127",
"0.64832467",
"0.6481973",
"0.6458986",
"0.6446002",
"0.64198065",
"0.6413491",
"0.6392528",
"0.63751435",
"0.63714105",
"0.63139474",
"0.62984324",
"0.6297133",
"0.6292062",
"0.6289117",
"0.6272685",
"0.6263693",
"0.62479633",
"0.62424856",
"0.62283117",
"0.6226274",
"0.6225719",
"0.62030303",
"0.6175971",
"0.61648494",
"0.6146197",
"0.61451477",
"0.6113541",
"0.6105219",
"0.6101764",
"0.60968345",
"0.6094627",
"0.6093421",
"0.60904896",
"0.60811174",
"0.6078826",
"0.6067695",
"0.6061137",
"0.605924",
"0.60557276",
"0.6054447",
"0.6027623",
"0.6021821",
"0.6014979",
"0.6013393",
"0.6013304",
"0.6002025",
"0.5996509",
"0.5996452",
"0.59958035",
"0.5987064",
"0.597921",
"0.59782195",
"0.5971105",
"0.5965234",
"0.5961747",
"0.59559894",
"0.5951037",
"0.5949075",
"0.59465563",
"0.5937865",
"0.5932529",
"0.59266156",
"0.5911902",
"0.59107184",
"0.5900466",
"0.5897286",
"0.5895988"
]
| 0.0 | -1 |
TODO Autogenerated method stub | public void keyPressed(KeyEvent arg0) {
if(arg0.getKeyCode()==KeyEvent.VK_ENTER){
GOBJECT.Giw.visible=false;
}
if(arg0.getKeyCode()==KeyEvent.VK_A){
GOBJECT.hero.dir=1;
GOBJECT.hero.isleft=true;
}else if(arg0.getKeyCode()==KeyEvent.VK_S){
GOBJECT.hero.isdown=true;
GOBJECT.hero.dir=0;
}else if(arg0.getKeyCode()==KeyEvent.VK_D){
GOBJECT.hero.dir=2;
GOBJECT.hero.isright=true;
}else if(arg0.getKeyCode()==KeyEvent.VK_W){
GOBJECT.hero.dir=3;
GOBJECT.hero.isup=true;
}else if(arg0.getKeyCode()==KeyEvent.VK_J){
}
} | {
"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 void keyReleased(KeyEvent arg0) {
if(arg0.getKeyCode()==KeyEvent.VK_A){
GOBJECT.hero.isleft=false;
}else if(arg0.getKeyCode()==KeyEvent.VK_S){
GOBJECT.hero.isdown=false;
GOBJECT.hero.dir=0;
}else if(arg0.getKeyCode()==KeyEvent.VK_D){
GOBJECT.hero.dir=2;
GOBJECT.hero.isright=false;
}else if(arg0.getKeyCode()==KeyEvent.VK_W){
GOBJECT.hero.dir=3;
GOBJECT.hero.isup=false;
}else if(arg0.getKeyCode()==KeyEvent.VK_J){
}
GSelectWindow.Action(arg0.getKeyChar());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
]
| 0.0 | -1 |
TODO Autogenerated method stub | public void keyTyped(KeyEvent 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 | public void mouseClicked(MouseEvent arg0) {
int aimr=(arg0.getY()+GOBJECT.Map.movey)/GOBJECT.Map.space;
int aimc=(arg0.getX()+GOBJECT.Map.movex)/GOBJECT.Map.space;
int startr=(GOBJECT.hero.rect.y+GOBJECT.Map.movey)/GOBJECT.Map.space;
int startc=(GOBJECT.hero.rect.x+GOBJECT.Map.movex)/GOBJECT.Map.space;
smart.bfs(GOBJECT.Map.maptable[0], GOBJECT.Map.maxr, GOBJECT.Map.maxc, startr, startc, aimr, aimc);
smart.getRoad();
this.GOBJECT.mouseAn.getLive();
} | {
"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 |
move screen according to mouse position | public void SystemAction(){
if(GOBJECT.mouse.x<GOBJECT.Map.space&&GOBJECT.Map.movex>0){
GOBJECT.Map.movex--;
}
if(GOBJECT.mouse.x>this.getWidth()-GOBJECT.Map.space&&(GOBJECT.Map.movex+GameSystem.screen_width)<GOBJECT.Map.maxc*GOBJECT.Map.space){
GOBJECT.Map.movex++;
}
if(GOBJECT.mouse.y<GOBJECT.Map.space&&GOBJECT.Map.movey>0){
GOBJECT.Map.movey--;
}
if(GOBJECT.mouse.y>this.getHeight()-GOBJECT.Map.space&&GOBJECT.Map.movey+GameSystem.screen_height<GOBJECT.Map.maxr*GOBJECT.Map.space){
GOBJECT.Map.movey++;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void moveMouse(int horizontal, int vertical);",
"@Override\r\n public void mouseDragged(MouseEvent e) {\r\n int deltaX = e.getXOnScreen() - screenX;\r\n int deltaY = e.getYOnScreen() - screenY; \r\n \r\n setLocation(myX + deltaX, myY + deltaY);\r\n }",
"void mouseMove(int x,int y) throws BhelpException\n{\n // BoardLog.logD(\"BHELP\",\"MOVE MOUSE \" + x + \" \" + y);\n\n checkMouse();\n\n Point sp = new Point(x,y);\n convertPointToScreen(sp);\n getRobot().mouseMove(sp.x,sp.y);\n setMouse(x,y);\n}",
"@Override\r\n\t\t\tpublic void mouseMove(MouseEvent e) {\n\t\t\t\tif(x>0)\r\n\t\t\t\t{\r\n\t\t\t\t\tshell.setLocation(e.x-x + shell.getLocation().x,\r\n\t\t\t\t\t\te.y-y + shell.getLocation().y);\r\n\t\t\t\t}\r\n\t\t\t}",
"private void mouseMove() {\n if (this.holding) {\n Point point = new Point(mousex, mousey);\n this.addPixel(point);\n }\n }",
"public void mouseMoved (MouseEvent me) { mouse_x = me.getX(); mouse_y = me.getY(); repaint(); }",
"@Override\n public void mouseDragged(MouseEvent evt) {\n setLocation(evt.getXOnScreen() - posX, evt.getYOnScreen() - posY);\n }",
"public abstract void moveMouse(int iPosX, int iPosY);",
"public void move() {\n\t\t\tint mx = getMouseX();\r\n\t\t\tint my = getMouseY();\r\n\t\t\tif (mx!=oldmousex) x=mx;\r\n\t\t\tif (my!=oldmousey) y=my;\r\n\t\t\toldmousex=mx;\r\n\t\t\toldmousey=my;\r\n\t\t\tif (getKey(key_left)||getKey(key_right)) {\r\n\t\t\t\tint inc = getKey(key_left) ? -1 : 1;\r\n\t\t\t\tclearKey(key_left);\r\n\t\t\t\tclearKey(key_right);\r\n\t\t\t\t// find next spider \r\n\t\t\t\tJGPoint cen = getCenterTile();\r\n\t\t\t\tfor (int tx=1; tx<pfTilesX(); tx++) {\r\n\t\t\t\t\tcen.x += inc;\r\n\t\t\t\t\tif (cen.x<0) cen.x = pfTilesX()-1;\r\n\t\t\t\t\tif (cen.x>=pfTilesX()) cen.x = 0;\r\n\t\t\t\t\tif (and(getTileCid(cen.x,1),2)) {\r\n\t\t\t\t\t\tx = cen.x*tileWidth() + 3;\r\n\t\t\t\t\t\ty = 20;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (getMouseButton(1)||getKey(key_fire)) {\r\n\t\t\t\tsetGraphic(\"scissors_c\");\r\n\t\t\t\tif (!scissors_c) playAudio(\"scissors\");\r\n\t\t\t\tscissors_c=true;\r\n\t\t\t} else {\r\n\t\t\t\tsetGraphic(\"scissors_o\");\r\n\t\t\t\tscissors_c=false;\r\n\t\t\t}\r\n\t\t}",
"public void mouseMove(int _x, int _y, Dimension box){\n\t\tint oldX = x;\n\t\tint oldY = y;\n\t\t\n\t\tint newX = _x - xClicked;\n\t\tint newY = _y - yClicked;\n\t\t\n\t\t// Move on the grid only\n\t\t//newX -= newX%GRID_WIDTH;\n\t\t//newY -= newY%GRID_HEIGHT;\n\t\t\n\t\tif ( newX >= 0 && newX + width <= box.width){\n\t\t\tx = newX;\n\t\t}\n\t\t\n\t\tif ( newY >= 0 && newY + height <= box.height){\n\t\t\ty = newY;\n\t\t}\n\t\t\n\t\thistory.addDisplayMove(this, oldX, oldY, newX, newY);\n\t}",
"private void formMouseDragged(java.awt.event.MouseEvent evt) {\n int x = evt.getXOnScreen();\n int y = evt.getYOnScreen();\n setLocation(x-xMouse , y-yMouse);\n }",
"public abstract void makeMove(int mouseDownX, int mouseDownY, int MouseUpX, int mouseUpY, int left, int top, int width, int height);",
"@Override\r\n\tpublic void mouseMoved(MouseEvent e) {\r\n\t\tlastPointOnScreen = e.getPoint();\t\t\t\r\n\t\t\r\n\t\tif(screenWidth != 0)//control looking around for first person\r\n\t\t{\r\n\t\taSquare.setAngularVelocity(2*Math.pow((e.getX() - screenWidth/2)/(screenWidth/2.),3));\r\n\t\t}\r\n\t\t\r\n\t\tif(showDebug)//select closest point to cursor for global var\r\n\t\t{\r\n\t\t\tdouble minDistance = 100.0;\r\n\t\t\tclosestPointToCursor = null;\r\n\t\t\t\r\n\t\t\tArrayList<PolygonD> objectsInScene = new ArrayList<PolygonD>();\r\n\t\t\tobjectsInScene.addAll(objects);\r\n\t\t\tobjectsInScene.add(currentShape);\r\n\r\n\t\t\t//iterate over all of the verts in all of the objects in the scene\r\n\t\t\tfor(PolygonD obj : objectsInScene)\r\n\t\t\t\tfor(PointD p : obj.getVerts())\r\n\t\t\t\t{\r\n\t\t\t\t\tdouble distance = (double)(new Vector(\r\n\t\t\t\t\t\t\tp, \r\n\t\t\t\t\t\t\tnew PointD(\r\n\t\t\t\t\t\t\t\t\te.getPoint().x - worldCenter.getX(),\r\n\t\t\t\t\t\t\t\t\te.getPoint().y - worldCenter.getY()\r\n\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t)).getMag();\r\n\t\t\t\t\tif(distance < minDistance)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//set closest point to cursor\r\n\t\t\t\t\t\tminDistance = distance;\r\n\t\t\t\t\t\tclosestPointToCursor = p;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t}\r\n\t}",
"public abstract void mouseMoved(int displayX, int displayY);",
"void updatePosition() {\n if (gameScreen.cursorIsOnLeft()) \n {\n // set the panel's rightmost edge to be 1/12th from the edge\n // set the panel's bottommost edge to be 1/6th from the edge\n setLocation(\n gameScreen.getScreenWidth() * 11/12 - getWidth(), \n gameScreen.getScreenHeight() * 5/6 - getHeight());\n }\n else // Otherwise the cursor must be on the right half of the screen\n {\n // set the panel's leftmost edge to be 1/12th from the edge\n // set the panel's bottommost edge to be 1/6th from the edge\n setLocation(\n gameScreen.getScreenWidth() * 1/12, \n gameScreen.getScreenHeight() * 5/6 - getHeight());\n }\n }",
"@Override\n public native void mouseMove(int x, int y);",
"private void PanelPertamaMouseDragged(java.awt.event.MouseEvent evt) {\n int x = evt.getXOnScreen();\n int y = evt.getYOnScreen();\n this.setLocation(x - xx, y - xy);\n }",
"@Override\n\t\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t\t\tmouseX = e.getX();\n\t\t\t\tmouseY = e.getY();\n\t\t\t\tmenu.setMouseX(mouseX);\n\t\t\t\tmenu.setMouseY(mouseY);\n\t\t\t}",
"public static void main(String[] args) throws AWTException {\n\n\nPointerInfo a = MouseInfo.getPointerInfo();\nPoint b = a.getLocation();\nint x = (int) b.getX();\nint y = (int) b.getY();\nSystem.out.print(y + \"jjjjjjjjj\");\nSystem.out.print(x);\nRobot r = new Robot();\nr.mouseMove(x, y - 50);\n\n\n\t}",
"@Override public boolean mouseMoved (int screenX, int screenY) {\n\t\treturn false;\n\t}",
"public void mouseMoved(MouseEvent e) {\n mouseX = e.getX();\n mouseY = e.getY();\n }",
"private void computeScreenLocation(MouseEvent mouseEvent)\r\n\t{\r\n\t\t\r\n\t\tscreenLocation.setLocation(mouseEvent.getX(), mouseEvent.getY());\r\n\t\tSwingUtilities.convertPointToScreen(screenLocation, (Component)mouseEvent.getSource());\r\n\t\r\n\t}",
"public void mouseDragged(MouseEvent e) {\n\n try {\n dragEndScreen = e.getPoint();\n //Create a point2d.float with the\n Point2D.Float dragStart = transformPoint(dragStartScreen);\n Point2D.Float dragEnd = transformPoint(dragEndScreen);\n //calculate how far the screen is dragged from its start position.\n double dx = dragEnd.getX() - dragStart.getX();\n double dy = dragEnd.getY() - dragStart.getY();\n transform.translate(dx, dy);\n\n //remember to reposition points to avoid unstable dragging.\n dragStartScreen = dragEndScreen;\n dragEndScreen = null;\n repaint();\n } catch (NoninvertibleTransformException ex) {\n ex.printStackTrace();\n }\n\n }",
"private void setMousePossition() {\n mouseX = Mouse.getMouseX() / Display.SCALE;\n mouseY = Mouse.getMouseY() / Display.SCALE;\n }",
"public void pointToMouse() {\n pointToXY(p.mouseX,p.mouseY);\n }",
"public void mouseMoved(MouseEvent e) {\n \tapp.updateCoord(e.getX(),e.getY());\n }",
"@Override\n\t\t\tpublic boolean mouseMoved(int screenX, int screenY) {\n\t\t\t\treturn false;\n\t\t\t}",
"@Override\n\t\t\tpublic boolean mouseMoved(int screenX, int screenY) {\n\t\t\t\treturn false;\n\t\t\t}",
"public void setMousePosition( final float x, final float y ) throws RemoteException {\r\n playerState.mousePosition.x = x;\r\n playerState.mousePosition.y = y;\r\n }",
"void mouseMoved(double x, double y, MouseEvent e );",
"@Override\n public boolean mouseMoved(int screenX, int screenY) {\n return false;\n }",
"@Override\n public boolean mouseMoved(int screenX, int screenY) {\n return false;\n }",
"public void mouseDragged(MouseEvent evt) {\n\t\t\t\tframe.setLocation(evt.getXOnScreen() - posX, evt.getYOnScreen() - posY);\r\n\r\n\t\t\t}",
"@Override\n public void mouseMoved(MouseEvent e) {\n mouseXPosition = e.getX();\n }",
"@Override\n public boolean mouseMoved(final int screenX, final int screenY) {\n return false;\n }",
"private void frameDragMouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_frameDragMouseDragged\n int x = evt.getXOnScreen();\n int y = evt.getYOnScreen();\n \n this.setLocation(x - xMouse, y - yMouse);\n }",
"public void move() {\n this.pposX = this.posX;\n this.pposY = this.posY;\n this.posX = newPosX;\n this.posY = newPosY;\n }",
"public void place(){\n\t\tplace((float) Math.floor(Main.mouseSelector.x)+0.5f,(float) Math.floor(Main.mouseSelector.y)+0.5f);\r\n\t}",
"@Override\r\n\tpublic boolean mouseMoved(int screenX, int screenY) {\n\t\treturn false;\r\n\t}",
"public void mouseMoved(MouseEvent e) {\n\t\tmainPanel2.mouseX = e.getX()-25;\r\n\t\tmainPanel2.mouseY = e.getY()-30;\r\n\t\tmainPanel2.repaint();\r\n\t}",
"@Override\n\t\t\tpublic void mouseMove(MouseEvent e) {\n\t\t\t\tint x = e.x;\n\t\t\t\tint y = e.y;\n\t\t\t\t\n\t\t\t\tgc.setFont(new Font(mainFrame.getDisplay(),\"楷体\",40,SWT.BOLD));\n\t\t\t\tgc.setAlpha(255);\n\t\t\t\tgc.setForeground(new Color(mainFrame.getDisplay(),255,255,255));\n\t\t\t\t\n\t\t\t\tif(settingRect.contains(x,y)) {\n\t\t\t\t\t gc.drawString(\"设置选项\", 342, 285,true);\n\t\t\t\t\t changeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(helpRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"帮助信息\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(aboutRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"关于游戏\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(exitRect.contains(x,y)) {\n\t\t\t\t\t\tgc.drawString(\"退出游戏\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\telse if(onButton(classicP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"经典模式\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse if(onButton(timeP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"时间模式\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\n\t\t\t\t}\n\t\t\t\telse if(onButton(levelP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"冒险闯关\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse if(onButton(onlineP,x,y)) {\n\t\t\t\t\t\tgc.drawString(\"联网对战\", 342, 285,true);\n\t\t\t\t\t\tchangeCursor(true);\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcanvas.redraw();\n\t\t\t\t\tchangeCursor(false);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}",
"public void updateMouse(int screenX, int screenY) {\n\t\tmouseDelta.set(screenX - getMouse().x, Gdx.graphics.getHeight() - screenY - getMouse().y);\r\n\t\tmouse.set(screenX, Gdx.graphics.getHeight() - screenY);\r\n\t\t\t\t\t\t\r\n\t\t//mouse vectors, normalized to work in terms of screen units instead of pixels\r\n\t\tmouseDeltaNorm.set(getMouseDelta().scl(1/AbstractScreen.ppuX,1/AbstractScreen.ppuY));\r\n\t\tmouseNorm.set(getMouse().scl(1/AbstractScreen.ppuX,1/AbstractScreen.ppuY));\r\n\t}",
"public void\tmouseMoved(int oldx, int oldy, int newx, int newy) \n {\n mouseX = newx;\n mouseY = newy;\n }",
"@Override\r\n\tpublic void mouseDragged(MouseEvent e) {\r\n\t\tif((e.getModifiersEx() & MouseEvent.BUTTON2_DOWN_MASK) != 0)\r\n\t\t{\r\n\t\t\t//for middle mouse button drags, pan across the scene\r\n\t\t\tVector temp = new Vector(new PointD(lastPointOnScreen), new PointD(e.getPoint()));\r\n\t\t\ttemp.setTail(worldCenter);\r\n\t\t\tworldCenter = temp.getHead();\r\n\t\t\tlastPointOnScreen = e.getPoint();\r\n\t\t}\r\n\t\telse if((e.getModifiersEx() & MouseEvent.BUTTON1_DOWN_MASK) != 0)\r\n\t\t{\r\n\t\t\t//for left mouse button drags, move closest vert.\r\n\t\t\tif(closestPointToCursor != null)\r\n\t\t\t{\r\n\t\t\t\tVector temp = new Vector(new PointD(lastPointOnScreen), new PointD(e.getPoint()));\r\n\t\t\t\ttemp.setTail(closestPointToCursor);\r\n\t\t\t\tclosestPointToCursor.set(temp.getHead());\r\n\t\t\t\tlastPointOnScreen = e.getPoint();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"public void mouseMoved(MouseEvent e) {\n mX=e.getX();\n mY=e.getY();\n }",
"@Override\n\tpublic boolean mouseMoved(int screenX, int screenY)\n\t{\n\t\treturn false;\n\t}",
"private void toolbarEmpMouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_toolbarEmpMouseDragged\n int x = evt.getXOnScreen();\n int y = evt.getYOnScreen();\n // Move frame by the mouse delta\n setLocation(getLocationOnScreen().x + x - lastX,\n getLocationOnScreen().y + y - lastY);\n lastX = x;\n lastY = y;\n }",
"public void move(){\n\t\t\tbx += (int)movex;\n\t\t\tby += (int)movey;\n\t\t\tthis.setBounds((int)bx,(int)by,10,10);\n\n\t\t\t\n\t\t}",
"@Override\n\tpublic boolean mouseMoved(int screenX, int screenY) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean mouseMoved(int screenX, int screenY) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean mouseMoved(int screenX, int screenY) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean mouseMoved(int screenX, int screenY) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean mouseMoved(int screenX, int screenY) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean mouseMoved(int screenX, int screenY) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean mouseMoved(int screenX, int screenY) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean mouseMoved(int screenX, int screenY) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean mouseMoved(int screenX, int screenY) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean mouseMoved(int screenX, int screenY) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean mouseMoved(int screenX, int screenY) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean mouseMoved(int screenX, int screenY) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean mouseMoved(int screenX, int screenY) {\n\t\treturn false;\n\t}",
"public void centerMouse()\n\t{\n\t\tmouseMoving = false;\n\n\t\tint screenCenterX = 0, screenCenterY = 0;\n\n\t\tscreenCenterX = EscapeComponent.frameOut.getX() + (int) RuntimeConfiguration.getInstance().getScreen().getWidth() / 2;\n\t\tscreenCenterY = EscapeComponent.frameOut.getY() + (int) RuntimeConfiguration.getInstance().getScreen().getHeight() / 2;\n\n\t\toldx = 0;\n\t\t\n\t\tr.mouseMove(screenCenterX, screenCenterY);\n\t}",
"public void update() {\n MouseWrapper mouseWrapper = Engine.get().getMouseWrapper();\n bufferBuffer.clear();\n if (\n Engine.get().getEngineState() == Engine.EngineState.PLAY ||\n Engine.get().getEngineState() == Engine.EngineState.PAUSE\n ) {\n VectorD mousePos = new VectorD(\n mouseWrapper.getX(),\n mouseWrapper.getY()\n );\n VectorD difference = mousePos.diff(\n Engine.get().getGameState().getCursorFollow()\n );\n if (difference.length() > Constants.MOUSE_FOLLOW_CUTOFF) {\n difference =\n difference.multiplicate(Constants.MOUSE_FOLLOW_MULTIPLIER);\n }\n Engine\n .get()\n .getGameState()\n .setCursorFollow(\n Engine\n .get()\n .getGameState()\n .getCursorFollow()\n .sum(difference)\n );\n\n Entity player = EntityUtil.getPlayer(\n Engine.get().getEntityStream()\n );\n TransformationStorage playerPos = (TransformationStorage) player.getComponent(\n SpaxelComponent.TRANSFORMATION\n );\n\n Engine\n .get()\n .getGameState()\n .setScreenOffset(calculateScreenOffset(playerPos));\n }\n renderEntities();\n\n Engine.get().getCurrentUI().render(bufferBuffer);\n\n master.render(bufferBuffer);\n }",
"@Override\r\n public void mouseDragged(MouseEvent e) {\n int thisX = getLocation().x;\r\n int thisY = getLocation().y;\r\n\r\n //determina el desplazamiento\r\n int xMoved = (thisX + e.getX()) - (thisX + initialClick.x);\r\n int yMoved = (thisY + e.getY()) - (thisY + initialClick.y);\r\n\r\n //mueve la ventana a su nueva posicion\r\n int X = thisX + xMoved;\r\n int Y = thisY + yMoved;\r\n this.setLocation(X, Y);\r\n }",
"public void tick() {\n\t\ta = Window.frame.getMousePosition();\n\t\tif (a != null) {\n\t\t\tmx = (int)a.getX();\n\t\t\tmy = (int)a.getY();\n\t\t}\n\t\t//System.out.println(a);\n\t}",
"public void mouseMoved(MouseEvent e){\n int x1=(e.getX()-MARGIN+GRID_SPAN/2)/GRID_SPAN;\r\n int y1=(e.getY()-MARGIN+GRID_SPAN/2)/GRID_SPAN;\r\n //Can't set chess when gameover, pos outside of board or position(x1,y1) already occupied. \r\n //if not valid, set cursor to default.\r\n if(x1<0||x1>ROWS||y1<0||y1>COLS||gameOver||findChess(x1,y1))\r\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\r\n //if valid, set cursor to hand\r\n else setCursor(new Cursor(Cursor.HAND_CURSOR));\r\n\r\n }",
"@Override\r\n protected void redrawCursor() {\n this.viewport.getCursor().moveAccordingly(this.finger.getFingerPitch(), this.finger.getFingerYaw());\r\n }",
"public void mouseMoved(MouseEvent e,double w,double h) throws RemoteException;",
"public void moveCursorLeft();",
"private void cursorPosChanged( double x, double y )\n {\n }",
"public void mouseMoved(MouseEvent e)\n {\n int x=e.getX();\n int y=e.getY();\n }",
"public void move() {\n\t\tmoveX();\n\t\tmoveY();\n\t}",
"public void move() {\r\n posX += movementX;\r\n posY += movementY;\r\n anchorX += movementX;\r\n anchorY += movementY;\r\n }",
"public void update() {\n\t\tint xa = 0, ya = 0; \n\t\tif(game.getPlayer().x < 0){\n\t\t\txa -= 2;\n\t\t}else if(game.getPlayer().x + 32 > game.getScreen().width){\n\t\t\txa += 2;\n\t\t}\n\t\tif(game.getPlayer().y < 0){\n\t\t\tya -= 2;\n\t\t}else if(game.getPlayer().y + 32 > game.getScreen().height){\n\t\t\tya +=2;\n\t\t}\n\t\t\n\t\tif (xa != 0 || ya!= 0) move(xa, ya);\n\t\t\n\t\t//detects if the mouse is clicking on the interface\n\t\t/*if(Mouse.getButton() == 1 && Mouse.getX() >= 0 && Mouse.getX() <= 1200 && Mouse.getY() > 525 && Mouse.getY() < 675) {\n\t\t\tclicked = true;\n\t\t} else {\n\t\t\tclicked = false;\n\t\t}*/\n\t\t\n\t\treturn;\n\t}",
"public void move(){\n x+=xDirection;\n y+=yDirection;\n }",
"public void moveCursor(int x, int y) {\n int pos = x + (y * COLS);\n this.x = x;\n this.y = y;\n writeCursor(0x0F, pos);\n writeCursor(0x0E, pos >>> 8);\n }",
"public void mouseMoved(MouseEvent mouseMove)\r\n\t{\r\n\t\t\r\n\t}",
"@Override\n public void mouseMoved(MouseEvent e) {\n // Simply find x and y and then overwrite last frame data\n int x = e.getX();\n int y = e.getY();\n\n old_x = x;\n old_y = y;\n }",
"@Override\n\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t\tint x = e.getX();\n\t\t\tint y = e.getY();\n\t\t\t//System.out.println(\"X: \" + x + \" Y: \" +y);\n\n\t\t}",
"public void mouseMoved(MouseEvent e) {}",
"public void mouseMoved(MouseEvent e) {}",
"public void mouseMoved (MouseEvent n)\r\n {\r\n \tmouseX = n.getX();\r\n \tmouseY = n.getY();\r\n }",
"public abstract void mouseMoved(Point p);",
"@Override\r\n\tpublic void mouseMoved(MouseEvent e) {\n\t\thero.x = e.getX();\r\n\t\thero.y = e.getY();\r\n\t\tSystem.out.println(hero.x + \":\" + hero.y);\r\n\t\t\r\n\t}",
"private void moved(MouseEvent e)\r\n {\n }",
"Point onScreen();",
"@Override\n\tpublic void update() {\n\t\tmouseMove(gm.mouseY);\n\t\tmoveCollider();\n\t}",
"public void onMouseClick(Location point) {\n\t Thread t6 = new MoveMouth(0, 0, canvas);\n t6.start(); \n }",
"public void update() {\n\t\t\n\t\tVector size = new Vector(Main.frame.getContentPane().getWidth() + 64, 64 + 64);\n\t\tposition = new Vector(0, Main.frame.getContentPane().getHeight() - 40);\n\t\t\n\t\tRectangle rect = new Rectangle(position, size);\n\t\t\n\t\tif (rect.contains(Mouse.getVector())) {\n\t\t\troom.isMouseOverGUI = true;\n\t\t}\n\t}",
"@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\torigin.x=e.getX();\r\n\t\t\t\torigin.y=e.getY();\r\n\t\t\t}",
"void home() {\n\t\tx = y = 10;\n\t\twin.repaint();\n\t}",
"public void mouseMoved(MouseEvent e){}",
"private void moveStart(MouseEvent e) {\n\t\tif (e.getButton()!=PRIMARY || resizing.get()!=NONE) return;\n\n\t\tmouseMonitor = APP.getMouse().observeMouseVelocity(consumer(m -> mouseSpeed = m.getSpeed()));\n\t\tisMoving.set(true);\n\t\tappX = e.getSceneX();\n\t\tappY = e.getSceneY();\n\t}",
"public void mouseMoved(MouseEvent e) {\n\t\tif (!movingmouse) {\r\n\t\t\ta += (double) (getWidth() / 2 - e.getX()) / 200;\r\n\r\n\t\t\ttry {\r\n\t\t\t\tnew Robot().mouseMove(getWidth() / 2, getHeight() / 2);\r\n\t\t\t} catch (AWTException e1) {\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tupdate();\r\n\t}",
"void onMouseMoved(double mouseX, double mouseY, double prevMouseX, double prevMouseY);",
"@Override\r\n\t\t\tpublic void mouseDragged(MouseEvent e) {\n\t\t\t\tPoint point=getLocation();\r\n\t\t\t\tsetLocation(point.x + (e.getX() - origin.x), point.y + (e.getY() - origin.y));\r\n\t\t\t}",
"@Override\n protected void mouseClickMove(int mouseX, int mouseY, int clickedMouseButton, long timeSinceLastClick) {\n this.screenContainer.mouseClickMove(mouseX, mouseY, clickedMouseButton, timeSinceLastClick);\n }",
"public void update () {\n fill (175);\n rect(mouseX,mouseY,w,h);\n }",
"private void startDragging() {\n Point mousePosition = calculateMouseLocation();\n mouseX = mousePosition.getX();\n mouseY = mousePosition.getY();\n prevX = getArea().getX();\n prevY = getArea().getY();\n setDragging(true);\n }",
"@Override\n public void movement() {\n if (isAlive()) {\n //Prüfung ob A oder die linke Pfeiltaste gedrückt ist\n if (Keyboard.isKeyDown(KeyEvent.VK_LEFT) || Keyboard.isKeyDown(KeyEvent.VK_A)) {\n //Änder die X Position um den speed wert nach link (verkleinert sie)\n setPosX(getPosX() - getSpeed());\n //Prüft ob der Spieler den linken Rand des Fensters erreicht hat\n if (getPosX() <= 0) {\n //Setzt die X Position des Spielers an den Rand des Fensters zurück\n setPosX(0);\n }\n }\n //Prüfung ob D oder die rechte Pfeiltaste gedrückt ist\n if (Keyboard.isKeyDown(KeyEvent.VK_RIGHT) || Keyboard.isKeyDown(KeyEvent.VK_D)) {\n //Änder die X Position um den speed wert nach rechts (vergrößert sie)\n setPosX(getPosX() + getSpeed());\n //Prüft ob der Spieler den rechten Rand des Fensters erreicht hat\n if (getPosX() >= Renderer.getWindowSizeX() - getWight() - 7) {\n //Setzt die X Position des Spielers an den Rand des Fensters zurück\n setPosX(Renderer.getWindowSizeX() - getWight() - 7);\n }\n }\n //Aktualsiert die Hitbox\n setBounds();\n }\n }"
]
| [
"0.73603004",
"0.73170805",
"0.72802895",
"0.7243976",
"0.72218037",
"0.7066193",
"0.7022354",
"0.7015081",
"0.70102173",
"0.6970504",
"0.6966023",
"0.6918455",
"0.68966347",
"0.6881242",
"0.6864998",
"0.6861929",
"0.68551797",
"0.6846314",
"0.683998",
"0.6795592",
"0.6765433",
"0.67577887",
"0.67536575",
"0.67516595",
"0.67511684",
"0.6738174",
"0.6730402",
"0.6730402",
"0.67045116",
"0.66979206",
"0.6688144",
"0.6688144",
"0.6685789",
"0.6667401",
"0.6638087",
"0.6632849",
"0.6617198",
"0.66131574",
"0.66127515",
"0.6610301",
"0.6600833",
"0.6589155",
"0.65737426",
"0.6571306",
"0.6560901",
"0.6552177",
"0.654359",
"0.6517775",
"0.65052384",
"0.65052384",
"0.65052384",
"0.65052384",
"0.65052384",
"0.65052384",
"0.65052384",
"0.65052384",
"0.65052384",
"0.65052384",
"0.65052384",
"0.65052384",
"0.65052384",
"0.6474433",
"0.6472579",
"0.6472269",
"0.6466634",
"0.64308554",
"0.64127964",
"0.64127326",
"0.64009523",
"0.6392402",
"0.63853633",
"0.63684064",
"0.63610363",
"0.63409436",
"0.6328049",
"0.6327305",
"0.6322951",
"0.6313164",
"0.63098484",
"0.63065815",
"0.63065815",
"0.6303995",
"0.63003486",
"0.62922037",
"0.6291839",
"0.62799245",
"0.62758666",
"0.6275038",
"0.6270062",
"0.6269772",
"0.6253884",
"0.62501496",
"0.6249427",
"0.6248884",
"0.62448156",
"0.62417203",
"0.624047",
"0.6240419",
"0.62402904",
"0.62272733"
]
| 0.6721052 | 28 |
TODO Autogenerated method stub | public static void main(String[] args) {
MyFrame myframe=new MyFrame();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
]
| 0.0 | -1 |
Constructor de la clase | public GrupoCrearEditarBackingMB() {
super();
this.dto = new GrupoDTO();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Constructor() {\r\n\t\t \r\n\t }",
"public Constructor(){\n\t\t\n\t}",
"public Pasien() {\r\n }",
"public CyanSus() {\n\n }",
"public Clade() {}",
"public Carrera(){\n }",
"public Classe() {\r\n }",
"public Chauffeur() {\r\n\t}",
"public AntrianPasien() {\r\n\r\n }",
"public SlanjePoruke() {\n }",
"public Alojamiento() {\r\n\t}",
"public Curso() {\r\n }",
"private Instantiation(){}",
"public prueba()\r\n {\r\n }",
"public Cohete() {\n\n\t}",
"public Achterbahn() {\n }",
"public Lanceur() {\n\t}",
"public Cgg_jur_anticipo(){}",
"public PSRelation()\n {\n }",
"public Pitonyak_09_02() {\r\n }",
"public Corso() {\n\n }",
"public Supercar() {\r\n\t\t\r\n\t}",
"public Coche() {\n super();\n }",
"public Caso_de_uso () {\n }",
"public TTau() {}",
"public Kullanici() {}",
"public Aritmetica(){ }",
"public Trening() {\n }",
"public CSSTidier() {\n\t}",
"public Odontologo() {\n }",
"public Rol() {}",
"defaultConstructor(){}",
"public Vehiculo() {\r\n }",
"public Chick() {\n\t}",
"public _355() {\n\n }",
"public Libro() {\r\n }",
"public Ov_Chipkaart() {\n\t\t\n\t}",
"public TCubico(){}",
"private TMCourse() {\n\t}",
"public Anschrift() {\r\n }",
"public TebakNusantara()\n {\n }",
"public Phl() {\n }",
"private void __sep__Constructors__() {}",
"public NhanVien()\n {\n }",
"public Livro() {\n\n\t}",
"public Tigre() {\r\n }",
"public Propuestas() {}",
"public Troco() {\n }",
"public Student(){}",
"public Excellon ()\n {}",
"public Postoj() {}",
"public Orbiter() {\n }",
"public Busca(){\n }",
"public JSFOla() {\n }",
"public Mitarbeit() {\r\n }",
"public Mannschaft() {\n }",
"private BaseDatos() {\n }",
"protected Asignatura()\r\n\t{}",
"public Demo() {\n\t\t\n\t}",
"public Persona() {\n\t}",
"public DetArqueoRunt () {\r\n\r\n }",
"public Carrinho() {\n\t\tsuper();\n\t}",
"public Car(){\n\t\t\n\t}",
"public EnsembleLettre() {\n\t\t\n\t}",
"public Mueble() {\n }",
"public Aktie() {\n }",
"public OOP_207(){\n\n }",
"public Banco(){}",
"public Tbdtokhaihq3() {\n super();\n }",
"public Candidatura (){\n \n }",
"public Data() {\n \n }",
"public Plato(){\n\t\t\n\t}",
"public Datos(){\n }",
"public Funcionario() {\r\n\t\t\r\n\t}",
"public Chant(){}",
"public Parameters() {\n\t}",
"public Tbdcongvan36() {\n super();\n }",
"void DefaultConstructor(){}",
"public ContasCorrentes(){\n this(0,\"\",0.0,0.0,0);\n }",
"public Prova() {}",
"public CCuenta()\n {\n }",
"public Corrida(){\n\n }",
"public RptPotonganGaji() {\n }",
"public SgaexpedbultoImpl()\n {\n }",
"public Persona() {\n }",
"public Tarifa() {\n ;\n }",
"public Exercicio(){\n \n }",
"public OVChipkaart() {\n\n }",
"public Demo3() {}",
"public Lotto2(){\n\t\t\n\t}",
"public Venda() {\n }",
"public ChaCha()\n\t{\n\t\tsuper();\n\t}",
"public AbstractClass() { //Sobrecarga del constructor AbstractClass ya que se puede inicializar de 2 maneras\n }",
"public Contato() {\n }",
"public Aanbieder() {\r\n\t\t}",
"public Person() {\n\t\t\n\t}",
"public Classroom() {\n\t}",
"public Magazzino() {\r\n }",
"public Gasto() {\r\n\t}",
"public Sobre() {\n\t\tsuper();\n\t\tinitialize();\n\t}",
"public Produto() {}"
]
| [
"0.8376671",
"0.82482725",
"0.7757712",
"0.76491547",
"0.764287",
"0.75641066",
"0.7557304",
"0.7555219",
"0.75255686",
"0.7461729",
"0.74616057",
"0.7438721",
"0.74067116",
"0.7393601",
"0.73794305",
"0.737154",
"0.73671997",
"0.7337879",
"0.7337316",
"0.73341864",
"0.7313249",
"0.7308003",
"0.73014486",
"0.7286598",
"0.72854495",
"0.72806126",
"0.7276211",
"0.726982",
"0.72578394",
"0.7255836",
"0.7244511",
"0.72424406",
"0.72343045",
"0.7224225",
"0.71780586",
"0.717157",
"0.7157366",
"0.71555436",
"0.71501595",
"0.7147036",
"0.7146139",
"0.71375966",
"0.7127987",
"0.71212405",
"0.7110599",
"0.710362",
"0.7101352",
"0.7091096",
"0.70835495",
"0.7081683",
"0.70791984",
"0.70779765",
"0.70618206",
"0.70607895",
"0.70521325",
"0.70498455",
"0.70493287",
"0.7046411",
"0.7041636",
"0.704",
"0.70373034",
"0.7026407",
"0.70260817",
"0.70260626",
"0.7022154",
"0.70123565",
"0.70032346",
"0.70011115",
"0.69987345",
"0.69925755",
"0.69866824",
"0.6981651",
"0.69783765",
"0.6977111",
"0.69766194",
"0.6976283",
"0.69717973",
"0.696329",
"0.69617575",
"0.6959797",
"0.69580036",
"0.69540024",
"0.6949844",
"0.69443756",
"0.69405514",
"0.6939727",
"0.69326776",
"0.69310296",
"0.69284743",
"0.69282734",
"0.69281584",
"0.6924836",
"0.69237673",
"0.6921983",
"0.69213474",
"0.6916805",
"0.69099265",
"0.69089574",
"0.6905706",
"0.6896925",
"0.6894953"
]
| 0.0 | -1 |
Pos constructor de la clase | @PostConstruct
public void init() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Position() {\n\n\t}",
"public POS(int position) {\n \t\tthis.position = position;\n \t}",
"public Position(int x, int y) {\n this.x = x;\n this.y = y;\n }",
"Position createPosition();",
"public Position()\n\t{\n\t\t// do not remove bean constructor.\n\t}",
"Position_Position createPosition_Position();",
"public Position(int x, int y) {\n this.x = x;\n this.y = y;\n }",
"protected Item(Point pos)\n\t{\n\t\tthis.pos = pos;\n\t}",
"public void case4_Position() {\r\n Position testPosition = new Position(0,0);\r\n\r\n }",
"public Position position();",
"public Position(Position p_p)\n {\n this.x = p_p.x;\n this.y = p_p.y;\n }",
"public Position(final int xPos, final int yPos) {\n this.posX = xPos;\n this.posY = yPos;\n this.charAlg = PositionTraductor.getAlgebraicNotation(posX, posY);\n }",
"public TextPos() {\n this.value = 1;\n }",
"public Position(String pos) {\n pos = pos.toLowerCase();\n x = (int) pos.charAt(0) - 97;\n y = (int) pos.charAt(1) - 49;\n }",
"posXY(int x, int y){\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}",
"public Position(int p_X, int p_Y)\n {\n this.x = p_X;\n this.y = p_Y;\n }",
"Position_abscisse createPosition_abscisse();",
"public Position(int x, int y) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}",
"public Position() {\n xCoord = 0;\n yCoord = 0;\n zCoord = 0;\n }",
"public Node(final int pos)\n {\n this.pos = pos;\n }",
"protected Coord() {\n\t}",
"public Position(Position position) {\n this.x = position.x;\n this.y = position.y;\n this.xVelocity = position.xVelocity;\n this.yVelocity = position.yVelocity;\n this.xAcceleration = position.xAcceleration;\n this.yAcceleration = position.yAcceleration;\n }",
"public Coordenada() {\n }",
"public Point(Vector position) {\n\t\tthis(position, 5.0);\n\t}",
"Vaisseau_occupeLaPosition createVaisseau_occupeLaPosition();",
"@SuppressWarnings(\"unused\")\n public Coordinate() {}",
"Point(int x_, int y_){\n x = x_;\n y = y_;\n }",
"public DocumentWordPosition() {}",
"Position_ordonnee createPosition_ordonnee();",
"Vector getPos();",
"Punto(){\r\n x=0;\r\n y=0;\r\n }",
"static TermVectorPosition of(int pos, PostingsEnum pe) throws IOException {\n Objects.requireNonNull(pe);\n\n int sOffset = pe.startOffset();\n int eOffset = pe.endOffset();\n if (sOffset >= 0 && eOffset >= 0) {\n return new TermVectorPosition(pos, sOffset, eOffset);\n }\n return new TermVectorPosition(pos);\n }",
"public Corner(double posX,double posY)\n {\n // inicializa variáveis de instância\n this.posX=posX;\n this.posY=posY;\n }",
"Object getPosition();",
"Vaisseau_positionner createVaisseau_positionner();",
"@Test \r\n public void case3_Position() {\r\n Position testPosition = new Position(2, 3);\r\n\r\n }",
"public Point(){\n this.x = 0;\n this.y = 0;\n }",
"public Point(int x,int y){\r\n\t\tthis.pos = x;\r\n\t\tthis.id = y;\r\n\t}",
"public void setPos(Punto pos) {\n\t\tthis.pos = pos;\n\t}",
"public MbCoordDpto() {\r\n \r\n }",
"public TextPos() {\n lineNumber = -1;\n linePos = -1; \n }",
"private MsoSmartArtNodePosition(int value) { this.value = value; }",
"@Test(expected = IllegalArgumentException.class)\r\n public void case2_Position() {\r\n Position testPosition = new Position(6, 7);\r\n\r\n }",
"@Test(expected = IllegalArgumentException.class)\r\n public void case1_Position() {\r\n Position testPosition = new Position(-1, -2);\r\n\r\n }",
"Position_changerAbscisse createPosition_changerAbscisse();",
"private void CreaCoordinate(){\n \n this.punto = new Point(80, 80);\n \n }",
"public Position(int rowIndex, int colIndex){\r\n this.rowPosition=rowIndex;\r\n this.colPosition=colIndex;\r\n }",
"public Coordinate() { row = col = -1; }",
"public AStarNode(Position pos) {\n this(pos.getX(), pos.getY());\n }",
"public MyPoint1 (double x, double y) {}",
"Point() {\n this.x = 0;\n this.y = 0;\n }",
"public int getPos();",
"public int getPos();",
"public Gpos(PartOfSpeech pos) {\n\t\t\tthis.pos = pos;\n\t\t}",
"public Position (int r, int c) {\n\t\tthis.r = r;\n\t\tthis.c = c;\n\t}",
"public Pos getPos()\r\n\t{\r\n\t\treturn position;\r\n\t}",
"public void setPos(int pos);",
"public void setPos(int pos);",
"public Position(double x, double y) {\n\t\txCoord = x;\n\t\tyCoord = y;\n\t}",
"public Position(double x, double y, double z) {\n xCoord = x;\n yCoord = y;\n zCoord = z;\n }",
"public abstract Position getPosition();",
"public PosicionArista() {\n this(new Posicion(), OrientacionArista.Este);\n }",
"public Base(int posX, int posY, Animacion animacion) {\n this.posX = posX;\n this.posY = posY;\n this.animacion = animacion;\n }",
"public Ponto(int x, int y){\n this.x = x;\n this.y = y;\n }",
"public Position(final int row, final int col) {\r\n this.row = row;\r\n this.col= col;\r\n }",
"public Point()\n\t{ \n\t\t// Instantiate default properties\n\t\tx = 0;\n\t\ty = 0;\n\t}",
"@Override\n public Position getPosition() {\n return new Position(this.x, this.y);\n }",
"public Position() {\r\n\t\tthis.positionX = 0;\r\n\t\tthis.positionY = 0;\r\n\t\tthis.angle = 0;\r\n\t\tthis.penState=true;\r\n\t\tthis.clearScreen=false;\r\n\t\tthis.color=0;\r\n\t}",
"public PositionComponent(float x, float y) {\n\t\tthis(x, y, 0);\n\t}",
"public Token setPos(String pos) {\n this.pos = pos;\n return this;\n }",
"public Piste(int x, int y){\n\t\tthis.x=x;\n\t\tthis.y=y;\n\t}",
"public void initPos(){\r\n for (int i=0; i< MAX_LENGTH; i++){\r\n pos[i] = i;\r\n }\r\n }",
"public Point() {\n }",
"public Point() {\n }",
"Item(int x, int y) {\n this.posX = x;\n this.posY = y;\n }",
"Point() {\n\t\tthis.x = 0;\n\t\tthis.y = 0;\n\t}",
"SpacesInvaders_aUnVaisseauQuiOccupeLaPosition createSpacesInvaders_aUnVaisseauQuiOccupeLaPosition();",
"public Entidade(int x, int y, char s){\r\n\t\tposicaoX = x;\r\n\t\tposicaoY = y;\r\n\t\tsimbolo = s;\r\n\t}",
"Position getPosition();",
"Position getPosition();",
"public Coordinates(int x, int y){\n this.x = x;\n this.y = y;\n }",
"@Override\n\tpublic int getPos() {\n\t\treturn 0;\n\t}",
"public String getPos(){\r\n\t\t return pos;\r\n\t }",
"public Punto getPos() {\n\t\treturn pos;\n\t}",
"public VisScreenCoordinates(double pos[], VisObject vo)\n {\n this.vo = vo;\n this.pos = pos;\n }",
"public MoveableEntity(double posX, double posY, Map map) {\n super(posX , posY, map);\n this.newPosX = posX;\n this.newPosY = posY;\n }",
"@Override\n\t\t\tpublic Vector getPosition() {\n\t\t\t\treturn new Vector(-2709.487, -4281.02, 3861.564); //-4409.0, 2102.0, -4651.0);\n\t\t\t}",
"public Coordinate getPosition();",
"public Position getPosition();",
"public Position getPosition();",
"public Position getPosition();",
"public interface Position {}",
"public abstract String getPos();",
"private TAPosition()\n {\n\n }",
"Point()\n\t{\n\t\t//default point\n\t\t//this = properties of this object we are working with\n\t\tthis.x=0;\n\t\tthis.y=0;\n\t\tcountOfPoints++;\n\t}",
"public Coordinate(int x,int y)\n {\n this.x = x;\n this.y = y;\n }",
"public Robot(Case pos, int vitesse){\n \tthis.position=pos;\n \tthis.vitesse=(int) (vitesse/3.6);\n \tthis.enDeplacement=false; \n \tthis.destination=new LinkedList<Direction>();\n }",
"PositionedObject(){\n float x = DrawingHelper.getGameViewWidth()/2;\n float y = DrawingHelper.getGameViewHeight()/2;\n _position.set(x,y);\n }",
"public Nave(int xPos,int yPos) {\n\t\tthis.xPos=xPos;\n\t\tthis.yPos=yPos;\n\t}",
"public AStarNode(double x_pos, double y_pos) {\n super(x_pos, y_pos);\n }",
"public int getPos()\n {\n return pos;\n }"
]
| [
"0.80050904",
"0.78629035",
"0.73633546",
"0.7321847",
"0.7291223",
"0.7276969",
"0.71704346",
"0.7122302",
"0.711882",
"0.7079937",
"0.706276",
"0.702625",
"0.7006153",
"0.69908535",
"0.69831485",
"0.69436336",
"0.6852234",
"0.6831648",
"0.6823698",
"0.67869496",
"0.6753568",
"0.6698929",
"0.6673221",
"0.6667747",
"0.66596943",
"0.665669",
"0.6651396",
"0.6624703",
"0.66227436",
"0.66123533",
"0.65982074",
"0.65703315",
"0.65670896",
"0.65606064",
"0.65360445",
"0.6520297",
"0.6502422",
"0.6500927",
"0.64945143",
"0.6486153",
"0.64858806",
"0.64854383",
"0.6485222",
"0.64849454",
"0.64846045",
"0.6468683",
"0.64590496",
"0.64575475",
"0.64550215",
"0.6451734",
"0.6436021",
"0.6421576",
"0.6421576",
"0.6420724",
"0.64191586",
"0.6414133",
"0.6407512",
"0.6407512",
"0.6393474",
"0.63922006",
"0.6380853",
"0.6377071",
"0.6364991",
"0.6351442",
"0.63387996",
"0.6328178",
"0.63252324",
"0.63247645",
"0.63216615",
"0.6299783",
"0.6291061",
"0.62844944",
"0.62778354",
"0.62778354",
"0.6274128",
"0.626682",
"0.6263927",
"0.6257089",
"0.62502927",
"0.62502927",
"0.62473047",
"0.6243099",
"0.62423843",
"0.6235878",
"0.6233824",
"0.6232177",
"0.62139213",
"0.621131",
"0.62087846",
"0.62087846",
"0.62087846",
"0.6202985",
"0.61932904",
"0.61743575",
"0.6165815",
"0.6159614",
"0.61575186",
"0.614954",
"0.614936",
"0.6148794",
"0.6147332"
]
| 0.0 | -1 |
Metodo encargado de llamar al EJB para insertar una persona. | public String insertarGrupo() {
this.log.info("inicio insertarPersoa");
try {
this.bean.insertarUserGroup(this.dto);
String msg = TablaValores.getValor(TABLA_PARAMETROS, "msgCrearEditar", "okInserta");
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(msg));
this.log.info("termino insertarGrupo");
} catch (Exception e) {
this.log.error("Error " + e.getMessage());
this.log.error("Error " + e.getClass());
String msg = TablaValores.getValor(TABLA_PARAMETROS, "msgCrearEditar", "nokInserta");
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, e.getMessage()));
return "error";
}
return "success";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void Insert(PersonelContract entity) {\n\n\t}",
"public void insert(Service servico){\n Database.servico.add(servico);\n }",
"ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);",
"Lancamento persistir(Lancamento lancamento);",
"public void createEmp(Empresa p) throws ClassNotFoundException {\r\n\r\n java.sql.Connection con = ConnectionFactory.getConnection();\r\n PreparedStatement stmt = null;\r\n\r\n try {\r\n stmt = con.prepareStatement(\"INSERT INTO tbempresas(codEmp,nomeEmp)\" + \"VALUES(?,?)\");\r\n stmt.setInt(1, p.getCodEmp());\r\n stmt.setString(2, p.getNomeEmp());\r\n\r\n stmt.executeUpdate();\r\n\r\n JOptionPane.showMessageDialog(null, \"salvo com sucesso\");\r\n } catch (SQLException ex) {\r\n System.out.println(ex);\r\n } finally {\r\n ConnectionFactory.closeConnection((com.mysql.jdbc.Connection) con, stmt);\r\n }\r\n }",
"public int agregar(Persona p) {\n\t\tint r=0;\n\t\t\n\t\t\n\t\t String query = \"INSERT INTO TABLA (Id, nombre) values (?, ?)\";\n\t\ttry {\n\t\t\t\n\t\t\tcon= c.conectar();\n\t\t\tps=con.prepareStatement(query);\n\t\t\t\n\t\t\tps.setString(1, p.getId());\n\t\t\tps.setString(2, p.getNom());\n\t\t\tr=ps.executeUpdate();\n\t\t\tif(r==1) {\n\t\t\t\tr=1;\n\t\t\t}else {\n\t\t\t\tr=0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\t\n\t\t}\n\t\treturn r;\n\t\t\n\t\t\n\t\t\n\t}",
"@Override\n\tpublic void insert(Unidade obj) {\n\n\t}",
"@Override\n public int insertar(ClienteBean cliente) {\n clienteDAO = new ClienteDAOImpl();\n return clienteDAO.insertar (cliente);\n }",
"int insert (EmpBean emp) throws ClassNotFoundException, SQLException {\n\t\t\n\tConnection con = DBUtil.getConnection();\n\tString sql= \"insert into empTab values(?,?,?)\";\n\tPreparedStatement ps = con.prepareStatement(sql);\n\tps.setString(1, emp.getEmpName());\n\tps.setString(2, emp.getEmpemailid());\n\tps.setInt(3, emp.getEmpphoneno());\n\t\n\n\treturn ps.executeUpdate(); //1 row inserted\n\t\n\t\n\t\n}",
"@Override\n public void salvar(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 if(paciente.getIdPaciente() == 0){\n em.persist(paciente);\n }else{\n em.merge(paciente);\n }\n em.getTransaction().commit();\n em.close();\n factory.close();\n }",
"ParqueaderoEntidad agregar(String nombre);",
"void persiste(UsuarioDetalle usuarioDetalle);",
"public interface Compromiso_peticionLocal extends javax.ejb.EJBLocalObject {\n\t/**\n\t * Get accessor for persistent attribute: tiag_id\n\t */\n\tpublic java.lang.Long getTiag_id();\n\t/**\n\t * Set accessor for persistent attribute: tiag_id\n\t */\n\tpublic void setTiag_id(java.lang.Long newTiag_id);\n\t/**\n\t * Get accessor for persistent attribute: id_rango\n\t */\n\tpublic java.lang.Integer getId_rango();\n\t/**\n\t * Set accessor for persistent attribute: id_rango\n\t */\n\tpublic void setId_rango(java.lang.Integer newId_rango);\n\t/**\n\t * Get accessor for persistent attribute: peti_numero\n\t */\n\tpublic java.lang.Long getPeti_numero();\n\t/**\n\t * Set accessor for persistent attribute: peti_numero\n\t */\n\tpublic void setPeti_numero(java.lang.Long newPeti_numero);\n\t/**\n\t * Get accessor for persistent attribute: codigo_pcom\n\t */\n\tpublic java.lang.String getCodigo_pcom();\n\t/**\n\t * Set accessor for persistent attribute: codigo_pcom\n\t */\n\tpublic void setCodigo_pcom(java.lang.String newCodigo_pcom);\n\t/**\n\t * Get accessor for persistent attribute: dia_especifico\n\t */\n\tpublic java.sql.Timestamp getDia_especifico();\n\t/**\n\t * Set accessor for persistent attribute: dia_especifico\n\t */\n\tpublic void setDia_especifico(java.sql.Timestamp newDia_especifico);\n\t/**\n\t * Get accessor for persistent attribute: id_tecnico\n\t */\n\tpublic java.lang.Long getId_tecnico();\n\t/**\n\t * Set accessor for persistent attribute: id_tecnico\n\t */\n\tpublic void setId_tecnico(java.lang.Long newId_tecnico);\n\t/**\n\t * Get accessor for persistent attribute: user_mac\n\t */\n\tpublic java.lang.String getUser_mac();\n\t/**\n\t * Set accessor for persistent attribute: user_mac\n\t */\n\tpublic void setUser_mac(java.lang.String newUser_mac);\n\t/**\n\t * Get accessor for persistent attribute: hora_desde\n\t */\n\tpublic java.lang.String getHora_desde();\n\t/**\n\t * Set accessor for persistent attribute: hora_desde\n\t */\n\tpublic void setHora_desde(java.lang.String newHora_desde);\n\t/**\n\t * Get accessor for persistent attribute: hora_hasta\n\t */\n\tpublic java.lang.String getHora_hasta();\n\t/**\n\t * Set accessor for persistent attribute: hora_hasta\n\t */\n\tpublic void setHora_hasta(java.lang.String newHora_hasta);\n\t/**\n\t * Get accessor for persistent attribute: codigo_agencia\n\t */\n\tpublic java.lang.String getCodigo_agencia();\n\t/**\n\t * Set accessor for persistent attribute: codigo_agencia\n\t */\n\tpublic void setCodigo_agencia(java.lang.String newCodigo_agencia);\n\t/**\n\t * Get accessor for persistent attribute: estado\n\t */\n\tpublic java.lang.Short getEstado();\n\t/**\n\t * Set accessor for persistent attribute: estado\n\t */\n\tpublic void setEstado(java.lang.Short newEstado);\n\t/**\n\t * Get accessor for persistent attribute: grse_id\n\t */\n\tpublic java.lang.Integer getGrse_id();\n\t/**\n\t * Set accessor for persistent attribute: grse_id\n\t */\n\tpublic void setGrse_id(java.lang.Integer newGrse_id);\n\t/**\n\t * Get accessor for persistent attribute: fecha\n\t */\n\tpublic java.sql.Timestamp getFecha();\n\t/**\n\t * Set accessor for persistent attribute: fecha\n\t */\n\tpublic void setFecha(java.sql.Timestamp newFecha);\n\t/**\n\t * Get accessor for persistent attribute: care_id\n\t */\n\tpublic java.lang.Integer getCare_id();\n\t/**\n\t * Set accessor for persistent attribute: care_id\n\t */\n\tpublic void setCare_id(java.lang.Integer newCare_id);\n\t/**\n\t * Get accessor for persistent attribute: usua_id\n\t */\n\tpublic java.lang.Long getUsua_id();\n\t/**\n\t * Set accessor for persistent attribute: usua_id\n\t */\n\tpublic void setUsua_id(java.lang.Long newUsua_id);\n\t/**\n\t * Get accessor for persistent attribute: id_cita_previa\n\t */\n\tpublic java.lang.Long getId_cita_previa();\n\t/**\n\t * Set accessor for persistent attribute: id_cita_previa\n\t */\n\tpublic void setId_cita_previa(java.lang.Long newId_cita_previa);\n}",
"@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}",
"@Override\r\n public void crearCliente(Cliente cliente) throws Exception {\r\n entity.getTransaction().begin();//inicia la creacion\r\n entity.persist(cliente);//se crea el cliente\r\n entity.getTransaction().commit();//finaliza la creacion\r\n }",
"public abstract String insertarTipoActividad(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException;",
"public void inserir(Comentario c);",
"public void persistir(Cliente cliente){\n }",
"private void attachEntity(Usuario entity) {\n }",
"@Override\r\n\tpublic MensajeBean inserta(Tramite_presentan_info_impacto nuevo) {\n\t\treturn tramite.inserta(nuevo);\r\n\t}",
"@Override\n public void insertAccount() throws Exception {\n\n }",
"@Override\n\tpublic MensajeBean inserta(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.inserta(nuevo);\n\t}",
"void insert(CTipoPersona record) throws SQLException;",
"int insert(PersonRegisterDo record);",
"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 }",
"public void registrarPersona() {\n\t\ttry {\n\t\t\tif (validaNumDocumento(getNumDocumentPersona())) {\n\t\t\t\t\tif (validaDireccion()) {\n\t\t\t\t\t\tif (validaApellidosNombres()) {\n\t\t\t\t\t\t\tPaPersona persona = new PaPersona();\n\t\t\t\t\t\t\tif (getActualizaPersona() != null && getActualizaPersona().equals(\"N\")) {\n\t\t\t\t\t\t\t\tpersona.setPersonaId(Constante.RESULT_PENDING);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpersona.setPersonaId(getPersonaId() == null ? Constante.RESULT_PENDING: getPersonaId());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpersona.setTipoDocumentoId(Integer.valueOf(mapTipoDocumento.get(getTipoDocumento())));\n\t\t\t\t\t\t\tpersona.setNroDocIdentidad(getNumDocumentPersona());\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tif (persona.getTipoDocumentoId() == Constante.TIPO_DOCUMENTO_RUC_ID) {\n\t\t\t\t\t\t\t\tpersona.setRazonSocial(getRazonSocial());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpersona.setPrimerNombre(getPrimerNombre());\n\t\t\t\t\t\t\t\tpersona.setSegundoNombre(getSegundoNombre());\n\t\t\t\t\t\t\t\tpersona.setApePaterno(getApellidoPaterno());\n\t\t\t\t\t\t\t\tpersona.setApeMaterno(getApellidoMaterno());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tPaDireccion direccion = new PaDireccion();\n\t\t\t\t\t\t\tdireccion.setDireccionId(getDireccionId() == null ? Constante.RESULT_PENDING: getDireccionId());\n\t\t\t\t\t\t\tif (getSelectedOptBusc().intValue() == 1) {\n\t\t\t\t\t\t\t\tdireccion.setTipoViaId(mapGnTipoVia.get(getCmbtipovia().getValue()));\n\t\t\t\t\t\t\t\tdireccion.setViaId(mapGnVia.get(getCmbvia().getValue()));\n\t\t\t\t\t\t\t\tdireccion.setLugarId(null);\n\t\t\t\t\t\t\t\tdireccion.setSectorId(null);\n\t\t\t\t\t\t\t\tdireccion.setNumero(numero);\n\t\t\t\t\t\t\t\tdireccion.setPersonaId(persona.getPersonaId());\n\n\t\t\t\t\t\t\t\tString direccionCompleta = papeletaBo.getDireccionCompleta(direccion,mapIGnTipoVia, mapIGnVia);\n\t\t\t\t\t\t\t\tif (direccionCompleta != null && direccionCompleta.trim().length() > 0) {\n\t\t\t\t\t\t\t\t\tdireccion.setDireccionCompleta(direccionCompleta);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdireccion.setDireccionCompleta(getDireccionCompleta());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tBuscarPersonaDTO personaDto = getPersonaDto(persona, direccion);\n\t\t\t\t\t\t\tString personaPapeleta = (String) getSessionMap().get(\"personaPapeleta\");\n\t\t\t\t\t\t\tif (personaPapeleta != null\n\t\t\t\t\t\t\t\t\t&& personaPapeleta.equals(\"I\")) {\n\t\t\t\t\t\t\t\tRegistroPapeletasManaged registro = (RegistroPapeletasManaged) getManaged(\"registroPapeletasManaged\");\n\t\t\t\t\t\t\t\tregistro.setDatosInfractor(personaDto);\n\t\t\t\t\t\t\t} else if (personaPapeleta != null\n\t\t\t\t\t\t\t\t\t&& personaPapeleta.equals(\"P\")) {\n\t\t\t\t\t\t\t\tRegistroPapeletasManaged registro = (RegistroPapeletasManaged) getManaged(\"registroPapeletasManaged\");\n\t\t\t\t\t\t\t\tregistro.setDatosPropietario(personaDto);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlimpiar();\n\t\t\t\t\t\t\tesContribuyente = (Boolean) getSessionMap().get(\"esContribuyente\");\n\t\t\t\t\t\t\tif (esContribuyente == true) {\t\n\t\t\t\t\t\t\t\tWebMessages.messageError(\"Es un Contribeyente s�lo se Actualiz� la Direcci�n para Papeletas, los otros datos es por DJ\");\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tWebMessages\n\t\t\t\t\t\t\t\t\t.messageError(\"Apellidos y nombres no valido\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tWebMessages\n\t\t\t\t\t\t\t\t.messageError(\"Especifique la direccion de la persona\");\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tWebMessages\n\t\t\t\t\t\t.messageError(\"Número de documento de identidad no valido\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"void lookupAndSaveNewPerson();",
"public void insertEmp(Emp emp) {\n\t\t\n\t}",
"void insert(organize_infoBean record);",
"public synchronized Boolean nuevoCliente(JSONObject persona,JSONObject cliente) throws ExceptionViajesCompartidos {\n\n\n //creo los objectos a partir de los JSON recibidos\n \tPersona p= new Persona(persona);\n \tCliente c= new Cliente(cliente);\n \t/*\n \ttry{\n\t\t\t iniciarTransaccion( );\n\t\t\t c.setPersona(p);\n\t\t\t System.out.println(\"id persona antes de insert: \"+p.getId_persona());\n\t\t\t entitymanager.persist(p);\n\t\t\t System.out.println(\"id persona despues de insert: \"+p.getId_persona());\n\t\t\t System.out.println(\"id cliente antes de insert: \"+c.getId_usuario());\n\t\t\t entitymanager.persist(c);\n\t\t\t System.out.println(\"id cliente despues de insert: \"+c.getId_usuario());\n\t\t\t Query qry = entitymanager.createNamedQuery(\"Rol.porNombre\");\n\t \t qry.setParameter(\"nombre\", \"cliente\");\n\t\t\t Rol r= (Rol) qry.getSingleResult();\n\t\t\t c.asignarRol(r);\n\t\t\t entitymanager.getTransaction( ).commit( );\t\n\t\t\t \n\t\t\t System.out.println(\"id persona despues de commit: \"+p.getId_persona());\n\t\t\t System.out.println(\"id cliente despues de commit: \"+c.getId_usuario());\n\t\t\t Rol rol_recien_asignado= c.getRoles().get(0).getRol();\n\t\t\t System.out.println(\"nombre del rol recien asignado: \"+rol_recien_asignado.getNombre_rol());\n\t\t\t \n\t\t\t return true;\n\t\t}catch(Exception e){\n\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t} \n\t\t*/\t\n\t\tthis.iniciarTransaccion();\n\t\t c.setPersona(p);\n\t\t c.setPuntos(0);\n\t\t c.setReputacion(3);\n\t\t entitymanager.persist(p);\n\t\t entitymanager.persist(c);\n\t\t Query qry = entitymanager.createNamedQuery(\"Rol.porNombre\");\n\t\t qry.setParameter(\"nombre\", \"cliente\");\n\t\t Rol r= (Rol) qry.getSingleResult();\n c.asignarRol(r);\n try{\n this.entitymanager.getTransaction().commit();\n return true;\n\n }catch(RollbackException e){\n String error= ManejadorErrores.parsearRollback(e);\n throw new ExceptionViajesCompartidos(\"ERROR: \"+error);\n }\n\t}",
"public void insertConsultoraNivel1(ConsultoraNivel1 consultoraNivel1);",
"@Override\r\n\tpublic int inserta(ReservaBean bean) throws Exception {\n\t\treturn 0;\r\n\t}",
"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 interface PersonLocal extends javax.ejb.EJBLocalObject {\r\n\t/**\r\n\t * Get accessor for persistent attribute: password\r\n\t */\r\n\tpublic java.lang.String getPassword();\r\n\t/**\r\n\t * Set accessor for persistent attribute: password\r\n\t */\r\n\tpublic void setPassword(java.lang.String newPassword);\r\n\t/**\r\n\t * Get accessor for persistent attribute: firstName\r\n\t */\r\n\tpublic java.lang.String getFirstName();\r\n\t/**\r\n\t * Set accessor for persistent attribute: firstName\r\n\t */\r\n\tpublic void setFirstName(java.lang.String newFirstName);\r\n\t/**\r\n\t * Get accessor for persistent attribute: lastName\r\n\t */\r\n\tpublic java.lang.String getLastName();\r\n\t/**\r\n\t * Set accessor for persistent attribute: lastName\r\n\t */\r\n\tpublic void setLastName(java.lang.String newLastName);\r\n\t/**\r\n\t * Get accessor for persistent attribute: emailAddress\r\n\t */\r\n\tpublic java.lang.String getEmailAddress();\r\n\t/**\r\n\t * Set accessor for persistent attribute: emailAddress\r\n\t */\r\n\tpublic void setEmailAddress(java.lang.String newEmailAddress);\r\n\t/**\r\n\t * This method was generated for supporting the relationship role named todo.\r\n\t * It will be deleted/edited when the relationship is deleted/edited.\r\n\t */\r\n\tpublic java.util.Collection getTodo();\r\n\t/**\r\n\t * This method was generated for supporting the relationship role named todo.\r\n\t * It will be deleted/edited when the relationship is deleted/edited.\r\n\t */\r\n\tpublic void setTodo(java.util.Collection aTodo);\r\n\t/**\r\n\t * This is our method to get all todos for one person\r\n\t */\r\n\tpublic java.util.Collection getTodos();\r\n\tpublic boolean isPasswordCorrect(String password);\r\n}",
"@Override\n public boolean inserir(Pessoa p) {\n try {\n pessoa.getPessoas().add(p);\n serializar(arquivo2Serializado, pessoa);\n } catch (Exception ex) {\n Logger.getLogger(PessoaDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return true;\n }",
"public co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.soltec\n\t\t.datos_publicacion\n\t\t.ejb\n\t\t.sb\n\t\t.DatosPublicacionSTLocal create()\n\t\tthrows javax.ejb.CreateException;",
"public void insere (String nome)\n {\n //TODO\n }",
"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 salvar() {\n\n try {\n ClienteDao fdao = new ClienteDao();\n fdao.Salvar(cliente);\n\n cliente = new Cliente();\n//mesagem para saber se foi salvo com sucesso\n JSFUtil.AdicionarMensagemSucesso(\"Clente salvo com sucesso!\");\n\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n }",
"public void insert(Employee e) throws ClassNotFoundException, SQLException;",
"public ClientePk insert(Cliente dto) throws ClienteDaoException;",
"public int insert(IEntity entity) throws SQLException;",
"@Override\n\tpublic int insert(Object ob) {\n\t\t\n\t\tint res = session.insert(\"party.party_insert_one\",ob);\n\t\t\n\t\treturn res;\n\t}",
"@Override\n public void salvar(EntidadeDominio entidade) throws SQLException\n {\n\t\n }",
"public static void insertFournisseur(Fournisseur unFournisseur ) {\n Bdd uneBdd = new Bdd(\"localhost\", \"paruline \", \"root\", \"\");\n\n String checkVille = \"CALL checkExistsCity('\" + unFournisseur.getVille() + \"','\" + unFournisseur.getCp() + \"');\";\n try {\n uneBdd.seConnecter();\n Statement unStat = uneBdd.getMaConnection().createStatement();\n\n ResultSet unRes = unStat.executeQuery(checkVille);\n\n int nb = unRes.getInt(\"nb\");\n\n if (nb == 0) {\n String ajoutVille = \"CALL InsertCity('\" + unFournisseur.getVille() + \"', '\" + unFournisseur.getCp() + \"');\";\n\n try {\n Statement unStatAjout = uneBdd.getMaConnection().createStatement();\n\n unStatAjout.executeQuery(ajoutVille);\n unStatAjout.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + ajoutVille);\n }\n }\n\n String id = \"CALL GetCity('\" + unFournisseur.getVille() + \"', '\" + unFournisseur.getCp() + \"')\";\n\n try {\n Statement unStatId = uneBdd.getMaConnection().createStatement();\n\n ResultSet unResId = unStatId.executeQuery(id);\n\n int id_city = unResId.getInt(\"id_city\");\n\n\n\n String insertFournisseur = \"INSERT INTO fournisseur(id_city, name_f, adresse_f, phoneFour) VALUES (\" + id_city + \", '\" + unFournisseur.getNom() + \"', \" +\n \"'\" + unFournisseur.getAdresse() + \"', '\" + unFournisseur.getTelephone() + \"')\";\n\n try {\n Statement unStatFourn = uneBdd.getMaConnection().createStatement();\n unStatFourn.executeQuery(insertFournisseur);\n\n unStatFourn.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + insertFournisseur);\n }\n\n unResId.close();\n unStatId.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + id);\n }\n\n unRes.close();\n unStat.close();\n uneBdd.seDeConnecter();\n } catch (SQLException exp) {\n System.out.println(\"Erreur : \" + checkVille);\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 void insertaMensaje(InfoMensaje m) throws Exception;",
"@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}",
"public com.vh.locker.ejb.Contact create(java.lang.Long id, java.lang.String name, java.lang.String nickName, java.lang.String phone, java.lang.String email, com.vh.locker.ejb.User anUser) throws javax.ejb.CreateException;",
"public void daoInsertar(Miembro m) throws SQLException {\r\n\t\t\r\n\t\tPreparedStatement ps= con.prepareCall(\"INSERT INTO miembros (nombre, apellido1, apellido2, edad, cargo)VALUES(?,?,?,?,?)\");\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.executeUpdate();\r\n\t\tps.close();\r\n\t}",
"public void guardar() {\n try {\n if (this.buscarCodApelacion()) {\n Dr_siseg_usuarioBean usuario = new Dr_siseg_usuarioBean();\n FacesContext facesContext = FacesContext.getCurrentInstance();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n apelacionesDao.INSERTA_APELACIONES(apelacionesBean); \n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.apelacionesBean.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"0\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue insertada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n this.apelacionesBean = new ApelacionesBean();\n addMessage(\"Guadado Exitosamente\", 1);\n } else {\n addMessage(\"La solicitud de apelacion especificada no existe\", 1);\n this.Listar();\n }\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al insertar el registro, contacte al administrador del sistema\", 1);\n }\n }",
"public void create(Querellante quere) throws IOException, SQLException {\n con = getConnection();\n cs = con.prepareCall(\"Call create_persona(?,?,?,?,?,?)\");\n cs.setEscapeProcessing(true);\n cs.setString(1, quere.getNombre());\n cs.setString(2, quere.getApellido());\n cs.setInt(3, quere.getCedula());\n cs.setInt(4, quere.getTelefono());\n cs.setString(5, quere.getDireccion());\n cs.setInt(6, 3);\n cs.execute();\n\n con.close();\n\n }",
"@Override\r\n\tpublic int insertEmployee(Connection con, Employee employee) {\n\t\treturn 0;\r\n\t}",
"public void addRegistro(String nombre, String apellidos, String dni) {\r\n\t\t\r\n\t\tSession ss = Util.getSessionFactory().openSession();\r\n\t\tTransaction tr = null;\r\n\t\ttry {\r\n\t\t\ttr = ss.beginTransaction();// comenzamos a hacer cositas\r\n\t\t\t// id incremental,por eso pongo cero\r\n\t\t\tPersona p = new Persona(0, nombre, apellidos, dni);\r\n\t\t\tss.save(p);\r\n\t\t\ttr.commit();\r\n\t\t} catch (HibernateException e) {\r\n\t\t\tSystem.out.println(\"Pako_error= \" + e);\r\n\t\t} finally {\r\n\t\t\tss.close();\r\n\t\t\t// System.out.println(\"Final\");\r\n\t\t}\r\n\t}",
"public void nuevoPaciente(String idPaciente, String DNI, String nombres, String apellidos, String direccion, String ubigeo, String telefono1, String telefono2, String edad)\n {\n try\n {\n PreparedStatement pstm=(PreparedStatement)\n con.getConnection().prepareStatement(\"insert into \" + \" paciente(idPaciente, dui, nombres, apellidos, direccion, ubigeo, telefono1, telefono2, edad)\" + \"values (?,?,?,?,?,?,?,?,?)\");\n \n pstm.setString(1, idPaciente);\n pstm.setString(2, DNI);\n pstm.setString(3, nombres);\n pstm.setString(4, apellidos);\n pstm.setString(5, direccion);\n pstm.setString(6, ubigeo);\n pstm.setString(7, telefono1);\n pstm.setString(8, telefono2);\n pstm.setString(9, edad); \n \n pstm.execute();\n pstm.close();\n }\n catch(SQLException e)\n {\n System.out.print(e);\n }\n }",
"BeanPedido crearPedido(BeanCrearPedido pedido);",
"@Override\n public void insert(J34SiscomexMercadoriaAdi j34SiscomexMercadoriaAdi) {\n super.doInsert(j34SiscomexMercadoriaAdi);\n }",
"public void inseriEmpresa() throws IOException {\n\t\tString r;\n\t\tthis.vetEmpreas[this.nEmpresas] = new Empresa();\n\t\t\n\t\tSystem.out.println(\"Inseri o nome \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setNome(r);\n\n\t\tSystem.out.println(\"Inseri o CNPJ \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setCnpj(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o endereco \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setEndereco(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o email \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setEmail(r);\n\t\t\n\t\tSystem.out.println(\"Inseri InscricaoEstadual \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setInscricaoEstadual(r);\n\t\t\n\t\tSystem.out.println(\"Inseri Razao Social \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setRazaoSocial(r);\n\t\t\n\t\tthis.nEmpresas +=1;\n\t}",
"public OrdemDeServico inserir (OrdemDeServico servico) {\n\t\tservico.setId((Long) null);\n\t\treturn repoOrdem.save(servico);\n\t}",
"void adicionaComentario(Comentario comentario);",
"public void create(Membre membre) {\n try {\n// em = getEntityManager();\n// entManager.getTransaction().begin();\n entManager.persist(membre);\n// entManager.getTransaction().commit();\n } finally {\n// if (entManager.getTransaction() != null) {\n// entManager.close();\n// }\n }\n }",
"public void create(Personne pers) {\n\t\ttry{\n\t\t\tString req = \"INSERT INTO PERSONNE_1 (ID, Nom ,Prenom)\" + \"VALUES(?,?,?)\";\n\t\t\tPreparedStatement ps= connect.prepareStatement(req);\n\t\t\tps.setInt(1,ID);\n\t\t\tps.setString(2,pers.getNom());\n\t\t\tps.setString(3,pers.getPrenom());\n\t\t\tps.executeUpdate();\n\t\t\tID++;\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"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 }",
"public int insert(person p){\n\t\t\treturn j.update(\" insert into person (id,name,location,birthdate) \"+ \" values(?,?,?,?) \", new Object[] {p.getId(),p.getName(),p.getLocation(),new Timestamp(p.getDate().getTime())});\r\n\t\t\r\n\t}",
"public void crearActividad (Actividad a) {\r\n String query = \"INSERT INTO actividad (identificacion_navegate, numero_matricula, fecha, hora, destino, eliminar) VALUES (\\\"\" \r\n + a.getIdentificacionNavegante()+ \"\\\", \" \r\n + a.getNumeroMatricula() + \", \\\"\" \r\n + a.getFecha() + \"\\\", \\\"\" \r\n + a.getHora() + \"\\\", \\\"\" \r\n + a.getDestino()+ \"\\\" ,false)\";\r\n try {\r\n Statement st = con.createStatement();\r\n st.executeUpdate(query);\r\n st.close();\r\n JOptionPane.showMessageDialog(null, \"Actividad creada\", \"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 void insertClient(ClientVO clientVO);",
"@Override\n\tpublic Paciente registrar(Paciente t) {\n\t\treturn dao.save(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 }",
"public void insertUser() {}",
"private void registrarSolicitudBienEntidad(SolicitudBienEntidadDTO SolicitudBienEntidadDTO) {\n SolicitudBienEntidad solicitudBienEntidad = SolicitudBienEntidadHelper.toLevel1Entity(SolicitudBienEntidadDTO,\n null);\n em.persist(solicitudBienEntidad);\n }",
"public void crearEntidad() throws EntidadNotFoundException {\r\n\t\tif (validarCampos(getNewEntidad())) {\r\n\t\t\tif (validarNomNitRepetidoEntidad(getNewEntidad())) {\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_WARN, \"Advertencia: \", \"Nombre, Nit o Prejifo ya existe en GIA\"));\r\n\t\t\t} else {\r\n\t\t\t\tif (entidadController.crearEntidad(getNewEntidad())) {\r\n\t\t\t\t\tmensajeGrow(\"Entidad Creada Satisfactoriamente\", getNewEntidad());\r\n\t\t\t\t\tRequestContext.getCurrentInstance().execute(\"PF('entCrearDialog').hide()\");\r\n\t\t\t\t\tsetNewEntidad(new EntidadDTO());\r\n\t\t\t\t\tresetCodigoBUA();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmensajeGrow(\"Entidad No Fue Creada\", getNewEntidad());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlistarEntidades();\r\n\t\t\t// newEntidad = new EntidadDTO();\r\n\t\t\t// fechaActual();\r\n\t\t}\r\n\r\n\t}",
"int insert(ParUsuarios record);",
"public interface ITestJtaBiz {\n void insert(int id);\n}",
"public void insertPerson(Person p) throws DataAccessException {\n String sql = \"INSERT INTO persons (person_id, assoc_username, first_name, last_name, gender, \" +\n \"father_id, mother_id, spouse_id) VALUES(?,?,?,?,?,?,?,?)\";\n try(PreparedStatement stmt = conn.prepareStatement(sql)) {\n stmt.setString(1, p.getPerson_id());\n stmt.setString(2, p.getAssoc_username());\n stmt.setString(3, p.getFirst_name());\n stmt.setString(4, p.getLast_name());\n stmt.setString(5, p.getGender());\n stmt.setString(6, p.getFather_id());\n stmt.setString(7, p.getMother_id());\n stmt.setString(8, p.getSpouse_id());\n\n stmt.executeUpdate();\n } catch (SQLException e) {\n throw new DataAccessException(\"Error encountered while inserting into the database\");\n }\n }",
"public interface Mensaje_SMS_ACSLocal extends javax.ejb.EJBLocalObject {\n\t/**\n\t * Get accessor for persistent attribute: id\n\t */\n\tpublic java.lang.Long getId();\n\t/**\n\t * Set accessor for persistent attribute: id\n\t */\n\tpublic void setId(java.lang.Long newId);\n\t/**\n\t * Get accessor for persistent attribute: xml\n\t */\n\tpublic java.lang.String getXml();\n\t/**\n\t * Set accessor for persistent attribute: xml\n\t */\n\tpublic void setXml(java.lang.String newXml);\n\t/**\n\t * Get accessor for persistent attribute: peti_numero\n\t */\n\tpublic java.lang.Long getPeti_numero();\n\t/**\n\t * Set accessor for persistent attribute: peti_numero\n\t */\n\tpublic void setPeti_numero(java.lang.Long newPeti_numero);\n\t/**\n\t * Get accessor for persistent attribute: fecha_envio\n\t */\n\tpublic java.sql.Timestamp getFecha_envio();\n\t/**\n\t * Set accessor for persistent attribute: fecha_envio\n\t */\n\tpublic void setFecha_envio(java.sql.Timestamp newFecha_envio);\n\t/**\n\t * Get accessor for persistent attribute: usuario\n\t */\n\tpublic java.lang.String getUsuario();\n\t/**\n\t * Set accessor for persistent attribute: usuario\n\t */\n\tpublic void setUsuario(java.lang.String newUsuario);\n}",
"int insert(MVoucherDTO record);",
"public void insertarEmpleado(CLEmpleado cl) throws SQLException{\r\n String sql = \"{CALL sp_insertarEmpleado(?,?,?,?,?,?,?,?)}\";\r\n \r\n try{\r\n ps = cn.prepareCall(sql);\r\n ps.setString(1, cl.getPrimerNombre());\r\n ps.setString(2, cl.getSegundoNombre());\r\n ps.setString(3, cl.getPrimerApellido());\r\n ps.setString(4, cl.getSegundoApellido());\r\n ps.setString(5, cl.getDireccion());\r\n ps.setString(6, cl.getTelefonoCelular());\r\n ps.setInt(7, cl.getIdCargo());\r\n ps.setInt(8, 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 }",
"@Override\n\tpublic void add() {\n\t\tSystem.out.println(\"Injection to database : Oracle\");\n\t}",
"public void addPersona( Persona persona ) throws Exception \n\t{\n\n\t\tDAOPersona dao = new DAOPersona();\n\t\ttry\n\t\t{\n\t\t\tthis.conn = darConexion();\n\t\t\tdao.setConn(conn);\n\n\t\t\tdao.addPersona(persona);\n\n\t\t}\n\t\tcatch (SQLException sqlException) {\n\t\t\tSystem.err.println(\"[EXCEPTION] SQLException:\" + sqlException.getMessage());\n\t\t\tsqlException.printStackTrace();\n\t\t\tthrow sqlException;\n\t\t} \n\t\tcatch (Exception exception) {\n\t\t\tSystem.err.println(\"[EXCEPTION] General Exception:\" + exception.getMessage());\n\t\t\texception.printStackTrace();\n\t\t\tthrow exception;\n\t\t} \n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tdao.cerrarRecursos();\n\t\t\t\tif(this.conn!=null){\n\t\t\t\t\tthis.conn.close();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (SQLException exception) {\n\t\t\t\tSystem.err.println(\"[EXCEPTION] SQLException While Closing Resources:\" + exception.getMessage());\n\t\t\t\texception.printStackTrace();\n\t\t\t\tthrow exception;\n\t\t\t}\n\t\t}\n\t}",
"private void saveNewPerson() {\r\n\r\n\t\tSystem.out.println(\"Start Save new Patient...\");\r\n\r\n\t\ttry {\r\n\t\t\tIPerson p1 = new Person(\"admin\", new Role(Roles.ADMINISTRATOR,\r\n\t\t\t\t\t\"Hauptadministrator\"), \"Passwort\", \"[email protected]\", \"Vorname\",\r\n\t\t\t\t\t\"Nachname\", \"Organisation\", \"Abteilung\", \"Fachrichtung\",\r\n\t\t\t\t\t\"Strasse\", \"3e\", \"54321\", \"Ort\");\r\n\r\n\t\t\tp1.save();\r\n\t\t} catch (BusinesslogicException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t} catch (DatabaseException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"New Patient saved!!\");\r\n\t}",
"@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 }",
"@TransactionAttribute(TransactionAttributeType.REQUIRED)\n @Override\n public void registrarCompra(ArrayList<Mueble> muebles, Usuario cliente) throws OperacionInvalidaException {\n Mueble mueble;\n \n Usuario clienteConsultado = (Usuario) persistenciaOracle.findById(Usuario.class, cliente.getLogin()); \n \n if (!muebles.isEmpty()) {\n for (int i = 0; i < muebles.size(); i++) {\n mueble = muebles.get(i);\n \n Mueble editar = (Mueble) persistenciaOracle.findById(Mueble.class, mueble.getReferencia());\n\n if (editar != null) {\n editar.setCantidad(editar.getCantidad() - mueble.getCantidad());\n RegistroVenta compra = new RegistroVenta(new Date(System.currentTimeMillis()), mueble, mueble.getCantidad(), null, cliente);\n clienteConsultado.agregarRegistro(compra);\n\n persistenciaOracle.update(clienteConsultado);\n persistenciaOracle.update(editar);\n\n } else {\n throw new OperacionInvalidaException(\"Mueble no existe.\");\n }\n }\n } else {\n throw new OperacionInvalidaException(\"Lista de muebles vacia.\");\n }\n }",
"public void insertarPaciente ( String dni, String nombre, String apellidos, String telefono,String emaail,float peso_actual, float peso_objetivo, float altura, int edad, String sexo, String password,String complexion);",
"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 EspecieEntity inserta(EspecieEntity entity){\r\n em.persist(entity);\r\n return entity;\r\n }",
"int insert(ProEmployee record);",
"void insert(CTipoComprobante record) throws SQLException;",
"@Override\n public Mechanic addEmployee(Mechanic mechanic) {\n LOGGER.info(\"Create new Mechanic in the database\");\n return mechanicRepository.save(mechanic);\n }",
"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 }",
"public TipoPk insert(Tipo dto) throws TipoDaoException;",
"int insertName(String nmNameLast, int idPerson);",
"public interface Bitacora_peticionLocalHome extends javax.ejb.EJBLocalHome {\n\t/**\n\t * Creates an instance from a key for Entity Bean: Bitacora_peticion\n\t */\n\t static final String JNDI_NAME=\"ejb/co/com/telefonica/atiempo/ejb/eb/Bitacora_peticionLocalHome\";\n\tpublic co.com.telefonica.atiempo.ejb.eb.Bitacora_peticionLocal create(\n\t\tjava.lang.Long bipe_id)\n\t\tthrows javax.ejb.CreateException;\n\t/**\n\t * Finds an instance using a key for Entity Bean: Bitacora_peticion\n\t */\n\tpublic co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.ejb\n\t\t.eb\n\t\t.Bitacora_peticionLocal findByPrimaryKey(\n\t\tco.com.telefonica.atiempo.ejb.eb.Bitacora_peticionKey primaryKey)\n\t\tthrows javax.ejb.FinderException;\n\t/**\n\t * Creates an instance from a key for Entity Bean: Bitacora_peticion\n\t */\n\tpublic co.com.telefonica.atiempo.ejb.eb.Bitacora_peticionLocal create(\n\t\tjava.lang.Long bipe_id,\n\t\tjava.lang.Long usua_id,\n\t\tjava.sql.Timestamp bipe_fecha_inicio,\n\t\tco.com.telefonica.atiempo.ejb.eb.ActividadLocal argFk_acti_2_bipe,\n\t\tco.com.telefonica.atiempo.ejb.eb.PeticionLocal argFk_peticion)\n\t\tthrows javax.ejb.CreateException;\n\n\t/**\n\t * @param idActividad\n\t * @param object\n\t * @param idPeticion\n\t * @param idUsuario\n\t * @param date\n\t * @param object2\n\t * @param object3\n\t * @param esReversa\n\t * @return\n\t */\n\tpublic co.com.telefonica.atiempo.ejb.eb.Bitacora_peticionLocal create(\n\t\tLong idActividad,\n\t\tLong idCausa,\n\t\tLong peticion,\n\t\tLong usuaId,\n\t\tDate bipeFechaInicio,\n\t\tDate bipeFechaFin,\n\t\tString bipeObservacion,\n\t\tShort esReversa)\n\t\tthrows CreateException;\n\n\tpublic java.util.Collection findbyNumeroPeticion(java.lang.Long idPeticion) throws javax.ejb.FinderException;\n//\tpublic java.util.Collection findFechaFin(java.lang.Long idPeticion) throws javax.ejb.FinderException;\n//\n\tpublic java.util.Collection findByPetiOrden(java.lang.Long idPeticion) throws javax.ejb.FinderException;\n\tpublic Bitacora_peticionLocal findByPeticionActividad(java.lang.Long idPeticion, java.lang.Long idActividad) throws javax.ejb.FinderException;\n\tpublic Bitacora_peticionLocal findByPeticionActividadUsuario(java.lang.Long idPeticion, java.lang.Long idActividad, java.lang.Long idUsuario)\n\t\tthrows javax.ejb.FinderException;\n//\t//public Bitacora_peticionLocal findNumPeticionActividad(java.lang.Long numPeticion) throws javax.ejb.FinderException;\n//\tpublic java.util.Collection findByPeticionFechaTerminoNula(java.lang.Long nroPeticion) throws javax.ejb.FinderException;\n//\tpublic Bitacora_peticionLocal findObsPeticionActividad(java.lang.Long numeroPeticion, java.lang.Long numeroActividad)\n//\t\tthrows javax.ejb.FinderException;\n//\tpublic Bitacora_peticionLocal findByCodigoObservacionPeticion(java.lang.Long peticion) throws javax.ejb.FinderException;\n//\tpublic Bitacora_peticionLocal findByIdPeticionAndMdfTerminada(java.lang.Long idPeticion) throws javax.ejb.FinderException;\n//\t\n\tpublic java.util.Collection findbyPeticionRol(java.lang.Long idPeticion, java.lang.Long idRol) throws javax.ejb.FinderException;\n//\tpublic java.util.Collection findByPeticionActividadNoNula(java.lang.Long idPeticion, java.lang.Long idActividad) throws javax.ejb.FinderException;\n\tpublic java.util.Collection findByPeticionActividadCerrada(java.lang.Long petiNumero, java.lang.Long actId) throws javax.ejb.FinderException;\n\tpublic java.util.Collection findPreviuosActivity(java.lang.Long petiNumero)\n\t\tthrows javax.ejb.FinderException;\n\tpublic java.util.Collection findbypeticionfechafin(java.lang.Long idPeticion)\n\t\tthrows javax.ejb.FinderException;\n\tpublic java.util.Collection findByOpenAct(java.lang.Long idActividad)\n\t\tthrows javax.ejb.FinderException;\n\tpublic co.com.telefonica.atiempo.ejb.eb.Bitacora_peticionLocal findbyMaxActivity(java.lang.Long idPeticion, java.lang.Long idActividad) throws javax.ejb.FinderException;\n}",
"public int addSickPerson(SickPerson sickPerson) throws SQLException;",
"public void ejbCreate() {\n\n }",
"public void adicionar() {\n String sql = \"insert into empresa(empresa, cnpj, endereco, telefone, email) values (?,?,?,?,?)\";\n try {\n pst = conexao.prepareStatement(sql);\n pst.setString(1, txtEmpNome.getText());\n pst.setString(2, txtEmpCNPJ.getText());\n pst.setString(3, txtEmpEnd.getText());\n pst.setString(4, txtEmpTel.getText());\n pst.setString(5, txtEmpEmail.getText());\n // validacao dos campos obrigatorios\n if ((txtEmpNome.getText().isEmpty()) || (txtEmpCNPJ.getText().isEmpty())) {\n JOptionPane.showMessageDialog(null, \"Preencha todos os campos obrigatórios\");\n } else {\n //a linha abaixo atualiza a tabela usuarios com os dados do formulario\n // a esttrutura abaixo confirma a inserção na tabela\n int adicionado = pst.executeUpdate();\n if (adicionado > 0) {\n JOptionPane.showMessageDialog(null, \"Empresa adicionada com sucesso\");\n txtEmpNome.setText(null);\n txtEmpEnd.setText(null);\n txtEmpTel.setText(null);\n txtEmpEmail.setText(null);\n txtEmpCNPJ.setText(null);\n }\n }\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }",
"@Override\r\n public void createNewEntity(String entityName) {\n\r\n }",
"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 }",
"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 interface ClienteDAO {\n public Cliente registrarCliente(Cliente cliente);\n}",
"public void create(Joueur joueur) {\n EntityManager em = EntityManagerHolder.getCurrentEntityManager();\n EntityTransaction tx = null;\n\n try {\n// session = HibernateUtil.getSessionFactory().getCurrentSession();\n// tx = session.beginTransaction();\n// session.persist(joueur);\n tx = em.getTransaction();\n em.persist(joueur);\n //declenche l'ajout d'un ou plusieurs elements -> synchronisation de la session et de la BDD\n\n System.out.println(\"Joueur créé avec succès\");\n } catch (Exception e) {\n\n e.printStackTrace();\n } finally {\n if (em != null) {\n em.close();\n }\n }\n }",
"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}"
]
| [
"0.6550411",
"0.65325016",
"0.64544505",
"0.63718843",
"0.6348371",
"0.6297462",
"0.6291971",
"0.628731",
"0.6281921",
"0.62652886",
"0.62390405",
"0.6225422",
"0.6223515",
"0.6196809",
"0.6190363",
"0.6184222",
"0.6180582",
"0.6164926",
"0.6161966",
"0.61547273",
"0.6150126",
"0.6129439",
"0.61169887",
"0.60956395",
"0.6090122",
"0.6085405",
"0.60760134",
"0.60747194",
"0.6066061",
"0.60530144",
"0.60521924",
"0.6046562",
"0.6044133",
"0.6037115",
"0.60337335",
"0.6031269",
"0.60167074",
"0.6013503",
"0.60012",
"0.5983282",
"0.59804827",
"0.5980355",
"0.5979232",
"0.59692425",
"0.59670085",
"0.5959459",
"0.5956455",
"0.5953206",
"0.5952358",
"0.59493685",
"0.59422183",
"0.5935806",
"0.5933167",
"0.59303665",
"0.59159636",
"0.5911906",
"0.591154",
"0.5911319",
"0.5908399",
"0.59056234",
"0.58992195",
"0.58819294",
"0.5880235",
"0.58784765",
"0.5875102",
"0.58719844",
"0.5871243",
"0.58663076",
"0.58600134",
"0.58522534",
"0.58511645",
"0.5845058",
"0.584489",
"0.5843357",
"0.5842413",
"0.5840613",
"0.58404714",
"0.58382004",
"0.58333683",
"0.58328205",
"0.58314157",
"0.5824013",
"0.582151",
"0.5818857",
"0.5815249",
"0.5813368",
"0.58093935",
"0.5807834",
"0.58072484",
"0.5805784",
"0.5803827",
"0.5803741",
"0.5799038",
"0.57982856",
"0.57916766",
"0.57834524",
"0.57816595",
"0.5781598",
"0.5780761",
"0.577739",
"0.5771957"
]
| 0.0 | -1 |
Metodo encargado de llamar al EJB para insertar una persona. | public String actualizaGrupo() {
this.log.info("inicio actualizaPersona");
try {
this.bean.actualizaUserGroup(this.dto);
String msg = TablaValores.getValor(TABLA_PARAMETROS, "msgCrearEditar", "okActualiza");
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(msg));
this.log.info("termino actualizaGrupo");
} catch (Exception e) {
this.log.error("Error actualizaGrupo");
this.log.error("Error " + e.getMessage());
this.log.error("Error " + e.getClass());
String msg = TablaValores.getValor(TABLA_PARAMETROS, "msgCrearEditar", "nokActualiza");
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, e.getMessage()));
return "error";
}
return "success";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void Insert(PersonelContract entity) {\n\n\t}",
"public void insert(Service servico){\n Database.servico.add(servico);\n }",
"ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);",
"Lancamento persistir(Lancamento lancamento);",
"public void createEmp(Empresa p) throws ClassNotFoundException {\r\n\r\n java.sql.Connection con = ConnectionFactory.getConnection();\r\n PreparedStatement stmt = null;\r\n\r\n try {\r\n stmt = con.prepareStatement(\"INSERT INTO tbempresas(codEmp,nomeEmp)\" + \"VALUES(?,?)\");\r\n stmt.setInt(1, p.getCodEmp());\r\n stmt.setString(2, p.getNomeEmp());\r\n\r\n stmt.executeUpdate();\r\n\r\n JOptionPane.showMessageDialog(null, \"salvo com sucesso\");\r\n } catch (SQLException ex) {\r\n System.out.println(ex);\r\n } finally {\r\n ConnectionFactory.closeConnection((com.mysql.jdbc.Connection) con, stmt);\r\n }\r\n }",
"public int agregar(Persona p) {\n\t\tint r=0;\n\t\t\n\t\t\n\t\t String query = \"INSERT INTO TABLA (Id, nombre) values (?, ?)\";\n\t\ttry {\n\t\t\t\n\t\t\tcon= c.conectar();\n\t\t\tps=con.prepareStatement(query);\n\t\t\t\n\t\t\tps.setString(1, p.getId());\n\t\t\tps.setString(2, p.getNom());\n\t\t\tr=ps.executeUpdate();\n\t\t\tif(r==1) {\n\t\t\t\tr=1;\n\t\t\t}else {\n\t\t\t\tr=0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\t\n\t\t}\n\t\treturn r;\n\t\t\n\t\t\n\t\t\n\t}",
"@Override\n\tpublic void insert(Unidade obj) {\n\n\t}",
"@Override\n public int insertar(ClienteBean cliente) {\n clienteDAO = new ClienteDAOImpl();\n return clienteDAO.insertar (cliente);\n }",
"int insert (EmpBean emp) throws ClassNotFoundException, SQLException {\n\t\t\n\tConnection con = DBUtil.getConnection();\n\tString sql= \"insert into empTab values(?,?,?)\";\n\tPreparedStatement ps = con.prepareStatement(sql);\n\tps.setString(1, emp.getEmpName());\n\tps.setString(2, emp.getEmpemailid());\n\tps.setInt(3, emp.getEmpphoneno());\n\t\n\n\treturn ps.executeUpdate(); //1 row inserted\n\t\n\t\n\t\n}",
"@Override\n public void salvar(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 if(paciente.getIdPaciente() == 0){\n em.persist(paciente);\n }else{\n em.merge(paciente);\n }\n em.getTransaction().commit();\n em.close();\n factory.close();\n }",
"ParqueaderoEntidad agregar(String nombre);",
"void persiste(UsuarioDetalle usuarioDetalle);",
"public interface Compromiso_peticionLocal extends javax.ejb.EJBLocalObject {\n\t/**\n\t * Get accessor for persistent attribute: tiag_id\n\t */\n\tpublic java.lang.Long getTiag_id();\n\t/**\n\t * Set accessor for persistent attribute: tiag_id\n\t */\n\tpublic void setTiag_id(java.lang.Long newTiag_id);\n\t/**\n\t * Get accessor for persistent attribute: id_rango\n\t */\n\tpublic java.lang.Integer getId_rango();\n\t/**\n\t * Set accessor for persistent attribute: id_rango\n\t */\n\tpublic void setId_rango(java.lang.Integer newId_rango);\n\t/**\n\t * Get accessor for persistent attribute: peti_numero\n\t */\n\tpublic java.lang.Long getPeti_numero();\n\t/**\n\t * Set accessor for persistent attribute: peti_numero\n\t */\n\tpublic void setPeti_numero(java.lang.Long newPeti_numero);\n\t/**\n\t * Get accessor for persistent attribute: codigo_pcom\n\t */\n\tpublic java.lang.String getCodigo_pcom();\n\t/**\n\t * Set accessor for persistent attribute: codigo_pcom\n\t */\n\tpublic void setCodigo_pcom(java.lang.String newCodigo_pcom);\n\t/**\n\t * Get accessor for persistent attribute: dia_especifico\n\t */\n\tpublic java.sql.Timestamp getDia_especifico();\n\t/**\n\t * Set accessor for persistent attribute: dia_especifico\n\t */\n\tpublic void setDia_especifico(java.sql.Timestamp newDia_especifico);\n\t/**\n\t * Get accessor for persistent attribute: id_tecnico\n\t */\n\tpublic java.lang.Long getId_tecnico();\n\t/**\n\t * Set accessor for persistent attribute: id_tecnico\n\t */\n\tpublic void setId_tecnico(java.lang.Long newId_tecnico);\n\t/**\n\t * Get accessor for persistent attribute: user_mac\n\t */\n\tpublic java.lang.String getUser_mac();\n\t/**\n\t * Set accessor for persistent attribute: user_mac\n\t */\n\tpublic void setUser_mac(java.lang.String newUser_mac);\n\t/**\n\t * Get accessor for persistent attribute: hora_desde\n\t */\n\tpublic java.lang.String getHora_desde();\n\t/**\n\t * Set accessor for persistent attribute: hora_desde\n\t */\n\tpublic void setHora_desde(java.lang.String newHora_desde);\n\t/**\n\t * Get accessor for persistent attribute: hora_hasta\n\t */\n\tpublic java.lang.String getHora_hasta();\n\t/**\n\t * Set accessor for persistent attribute: hora_hasta\n\t */\n\tpublic void setHora_hasta(java.lang.String newHora_hasta);\n\t/**\n\t * Get accessor for persistent attribute: codigo_agencia\n\t */\n\tpublic java.lang.String getCodigo_agencia();\n\t/**\n\t * Set accessor for persistent attribute: codigo_agencia\n\t */\n\tpublic void setCodigo_agencia(java.lang.String newCodigo_agencia);\n\t/**\n\t * Get accessor for persistent attribute: estado\n\t */\n\tpublic java.lang.Short getEstado();\n\t/**\n\t * Set accessor for persistent attribute: estado\n\t */\n\tpublic void setEstado(java.lang.Short newEstado);\n\t/**\n\t * Get accessor for persistent attribute: grse_id\n\t */\n\tpublic java.lang.Integer getGrse_id();\n\t/**\n\t * Set accessor for persistent attribute: grse_id\n\t */\n\tpublic void setGrse_id(java.lang.Integer newGrse_id);\n\t/**\n\t * Get accessor for persistent attribute: fecha\n\t */\n\tpublic java.sql.Timestamp getFecha();\n\t/**\n\t * Set accessor for persistent attribute: fecha\n\t */\n\tpublic void setFecha(java.sql.Timestamp newFecha);\n\t/**\n\t * Get accessor for persistent attribute: care_id\n\t */\n\tpublic java.lang.Integer getCare_id();\n\t/**\n\t * Set accessor for persistent attribute: care_id\n\t */\n\tpublic void setCare_id(java.lang.Integer newCare_id);\n\t/**\n\t * Get accessor for persistent attribute: usua_id\n\t */\n\tpublic java.lang.Long getUsua_id();\n\t/**\n\t * Set accessor for persistent attribute: usua_id\n\t */\n\tpublic void setUsua_id(java.lang.Long newUsua_id);\n\t/**\n\t * Get accessor for persistent attribute: id_cita_previa\n\t */\n\tpublic java.lang.Long getId_cita_previa();\n\t/**\n\t * Set accessor for persistent attribute: id_cita_previa\n\t */\n\tpublic void setId_cita_previa(java.lang.Long newId_cita_previa);\n}",
"@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}",
"@Override\r\n public void crearCliente(Cliente cliente) throws Exception {\r\n entity.getTransaction().begin();//inicia la creacion\r\n entity.persist(cliente);//se crea el cliente\r\n entity.getTransaction().commit();//finaliza la creacion\r\n }",
"public abstract String insertarTipoActividad(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException;",
"public void inserir(Comentario c);",
"public void persistir(Cliente cliente){\n }",
"private void attachEntity(Usuario entity) {\n }",
"@Override\r\n\tpublic MensajeBean inserta(Tramite_presentan_info_impacto nuevo) {\n\t\treturn tramite.inserta(nuevo);\r\n\t}",
"@Override\n public void insertAccount() throws Exception {\n\n }",
"@Override\n\tpublic MensajeBean inserta(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.inserta(nuevo);\n\t}",
"void insert(CTipoPersona record) throws SQLException;",
"int insert(PersonRegisterDo record);",
"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 }",
"public void registrarPersona() {\n\t\ttry {\n\t\t\tif (validaNumDocumento(getNumDocumentPersona())) {\n\t\t\t\t\tif (validaDireccion()) {\n\t\t\t\t\t\tif (validaApellidosNombres()) {\n\t\t\t\t\t\t\tPaPersona persona = new PaPersona();\n\t\t\t\t\t\t\tif (getActualizaPersona() != null && getActualizaPersona().equals(\"N\")) {\n\t\t\t\t\t\t\t\tpersona.setPersonaId(Constante.RESULT_PENDING);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpersona.setPersonaId(getPersonaId() == null ? Constante.RESULT_PENDING: getPersonaId());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpersona.setTipoDocumentoId(Integer.valueOf(mapTipoDocumento.get(getTipoDocumento())));\n\t\t\t\t\t\t\tpersona.setNroDocIdentidad(getNumDocumentPersona());\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tif (persona.getTipoDocumentoId() == Constante.TIPO_DOCUMENTO_RUC_ID) {\n\t\t\t\t\t\t\t\tpersona.setRazonSocial(getRazonSocial());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpersona.setPrimerNombre(getPrimerNombre());\n\t\t\t\t\t\t\t\tpersona.setSegundoNombre(getSegundoNombre());\n\t\t\t\t\t\t\t\tpersona.setApePaterno(getApellidoPaterno());\n\t\t\t\t\t\t\t\tpersona.setApeMaterno(getApellidoMaterno());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tPaDireccion direccion = new PaDireccion();\n\t\t\t\t\t\t\tdireccion.setDireccionId(getDireccionId() == null ? Constante.RESULT_PENDING: getDireccionId());\n\t\t\t\t\t\t\tif (getSelectedOptBusc().intValue() == 1) {\n\t\t\t\t\t\t\t\tdireccion.setTipoViaId(mapGnTipoVia.get(getCmbtipovia().getValue()));\n\t\t\t\t\t\t\t\tdireccion.setViaId(mapGnVia.get(getCmbvia().getValue()));\n\t\t\t\t\t\t\t\tdireccion.setLugarId(null);\n\t\t\t\t\t\t\t\tdireccion.setSectorId(null);\n\t\t\t\t\t\t\t\tdireccion.setNumero(numero);\n\t\t\t\t\t\t\t\tdireccion.setPersonaId(persona.getPersonaId());\n\n\t\t\t\t\t\t\t\tString direccionCompleta = papeletaBo.getDireccionCompleta(direccion,mapIGnTipoVia, mapIGnVia);\n\t\t\t\t\t\t\t\tif (direccionCompleta != null && direccionCompleta.trim().length() > 0) {\n\t\t\t\t\t\t\t\t\tdireccion.setDireccionCompleta(direccionCompleta);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdireccion.setDireccionCompleta(getDireccionCompleta());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tBuscarPersonaDTO personaDto = getPersonaDto(persona, direccion);\n\t\t\t\t\t\t\tString personaPapeleta = (String) getSessionMap().get(\"personaPapeleta\");\n\t\t\t\t\t\t\tif (personaPapeleta != null\n\t\t\t\t\t\t\t\t\t&& personaPapeleta.equals(\"I\")) {\n\t\t\t\t\t\t\t\tRegistroPapeletasManaged registro = (RegistroPapeletasManaged) getManaged(\"registroPapeletasManaged\");\n\t\t\t\t\t\t\t\tregistro.setDatosInfractor(personaDto);\n\t\t\t\t\t\t\t} else if (personaPapeleta != null\n\t\t\t\t\t\t\t\t\t&& personaPapeleta.equals(\"P\")) {\n\t\t\t\t\t\t\t\tRegistroPapeletasManaged registro = (RegistroPapeletasManaged) getManaged(\"registroPapeletasManaged\");\n\t\t\t\t\t\t\t\tregistro.setDatosPropietario(personaDto);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlimpiar();\n\t\t\t\t\t\t\tesContribuyente = (Boolean) getSessionMap().get(\"esContribuyente\");\n\t\t\t\t\t\t\tif (esContribuyente == true) {\t\n\t\t\t\t\t\t\t\tWebMessages.messageError(\"Es un Contribeyente s�lo se Actualiz� la Direcci�n para Papeletas, los otros datos es por DJ\");\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tWebMessages\n\t\t\t\t\t\t\t\t\t.messageError(\"Apellidos y nombres no valido\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tWebMessages\n\t\t\t\t\t\t\t\t.messageError(\"Especifique la direccion de la persona\");\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tWebMessages\n\t\t\t\t\t\t.messageError(\"Número de documento de identidad no valido\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void insertEmp(Emp emp) {\n\t\t\n\t}",
"void lookupAndSaveNewPerson();",
"void insert(organize_infoBean record);",
"public void insertConsultoraNivel1(ConsultoraNivel1 consultoraNivel1);",
"public synchronized Boolean nuevoCliente(JSONObject persona,JSONObject cliente) throws ExceptionViajesCompartidos {\n\n\n //creo los objectos a partir de los JSON recibidos\n \tPersona p= new Persona(persona);\n \tCliente c= new Cliente(cliente);\n \t/*\n \ttry{\n\t\t\t iniciarTransaccion( );\n\t\t\t c.setPersona(p);\n\t\t\t System.out.println(\"id persona antes de insert: \"+p.getId_persona());\n\t\t\t entitymanager.persist(p);\n\t\t\t System.out.println(\"id persona despues de insert: \"+p.getId_persona());\n\t\t\t System.out.println(\"id cliente antes de insert: \"+c.getId_usuario());\n\t\t\t entitymanager.persist(c);\n\t\t\t System.out.println(\"id cliente despues de insert: \"+c.getId_usuario());\n\t\t\t Query qry = entitymanager.createNamedQuery(\"Rol.porNombre\");\n\t \t qry.setParameter(\"nombre\", \"cliente\");\n\t\t\t Rol r= (Rol) qry.getSingleResult();\n\t\t\t c.asignarRol(r);\n\t\t\t entitymanager.getTransaction( ).commit( );\t\n\t\t\t \n\t\t\t System.out.println(\"id persona despues de commit: \"+p.getId_persona());\n\t\t\t System.out.println(\"id cliente despues de commit: \"+c.getId_usuario());\n\t\t\t Rol rol_recien_asignado= c.getRoles().get(0).getRol();\n\t\t\t System.out.println(\"nombre del rol recien asignado: \"+rol_recien_asignado.getNombre_rol());\n\t\t\t \n\t\t\t return true;\n\t\t}catch(Exception e){\n\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t} \n\t\t*/\t\n\t\tthis.iniciarTransaccion();\n\t\t c.setPersona(p);\n\t\t c.setPuntos(0);\n\t\t c.setReputacion(3);\n\t\t entitymanager.persist(p);\n\t\t entitymanager.persist(c);\n\t\t Query qry = entitymanager.createNamedQuery(\"Rol.porNombre\");\n\t\t qry.setParameter(\"nombre\", \"cliente\");\n\t\t Rol r= (Rol) qry.getSingleResult();\n c.asignarRol(r);\n try{\n this.entitymanager.getTransaction().commit();\n return true;\n\n }catch(RollbackException e){\n String error= ManejadorErrores.parsearRollback(e);\n throw new ExceptionViajesCompartidos(\"ERROR: \"+error);\n }\n\t}",
"@Override\r\n\tpublic int inserta(ReservaBean bean) throws Exception {\n\t\treturn 0;\r\n\t}",
"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 }",
"@Override\n public boolean inserir(Pessoa p) {\n try {\n pessoa.getPessoas().add(p);\n serializar(arquivo2Serializado, pessoa);\n } catch (Exception ex) {\n Logger.getLogger(PessoaDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return true;\n }",
"public interface PersonLocal extends javax.ejb.EJBLocalObject {\r\n\t/**\r\n\t * Get accessor for persistent attribute: password\r\n\t */\r\n\tpublic java.lang.String getPassword();\r\n\t/**\r\n\t * Set accessor for persistent attribute: password\r\n\t */\r\n\tpublic void setPassword(java.lang.String newPassword);\r\n\t/**\r\n\t * Get accessor for persistent attribute: firstName\r\n\t */\r\n\tpublic java.lang.String getFirstName();\r\n\t/**\r\n\t * Set accessor for persistent attribute: firstName\r\n\t */\r\n\tpublic void setFirstName(java.lang.String newFirstName);\r\n\t/**\r\n\t * Get accessor for persistent attribute: lastName\r\n\t */\r\n\tpublic java.lang.String getLastName();\r\n\t/**\r\n\t * Set accessor for persistent attribute: lastName\r\n\t */\r\n\tpublic void setLastName(java.lang.String newLastName);\r\n\t/**\r\n\t * Get accessor for persistent attribute: emailAddress\r\n\t */\r\n\tpublic java.lang.String getEmailAddress();\r\n\t/**\r\n\t * Set accessor for persistent attribute: emailAddress\r\n\t */\r\n\tpublic void setEmailAddress(java.lang.String newEmailAddress);\r\n\t/**\r\n\t * This method was generated for supporting the relationship role named todo.\r\n\t * It will be deleted/edited when the relationship is deleted/edited.\r\n\t */\r\n\tpublic java.util.Collection getTodo();\r\n\t/**\r\n\t * This method was generated for supporting the relationship role named todo.\r\n\t * It will be deleted/edited when the relationship is deleted/edited.\r\n\t */\r\n\tpublic void setTodo(java.util.Collection aTodo);\r\n\t/**\r\n\t * This is our method to get all todos for one person\r\n\t */\r\n\tpublic java.util.Collection getTodos();\r\n\tpublic boolean isPasswordCorrect(String password);\r\n}",
"public co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.soltec\n\t\t.datos_publicacion\n\t\t.ejb\n\t\t.sb\n\t\t.DatosPublicacionSTLocal create()\n\t\tthrows javax.ejb.CreateException;",
"public void insere (String nome)\n {\n //TODO\n }",
"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 salvar() {\n\n try {\n ClienteDao fdao = new ClienteDao();\n fdao.Salvar(cliente);\n\n cliente = new Cliente();\n//mesagem para saber se foi salvo com sucesso\n JSFUtil.AdicionarMensagemSucesso(\"Clente salvo com sucesso!\");\n\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n }",
"public void insert(Employee e) throws ClassNotFoundException, SQLException;",
"public int insert(IEntity entity) throws SQLException;",
"public ClientePk insert(Cliente dto) throws ClienteDaoException;",
"@Override\n\tpublic int insert(Object ob) {\n\t\t\n\t\tint res = session.insert(\"party.party_insert_one\",ob);\n\t\t\n\t\treturn res;\n\t}",
"@Override\n public void salvar(EntidadeDominio entidade) throws SQLException\n {\n\t\n }",
"public static void insertFournisseur(Fournisseur unFournisseur ) {\n Bdd uneBdd = new Bdd(\"localhost\", \"paruline \", \"root\", \"\");\n\n String checkVille = \"CALL checkExistsCity('\" + unFournisseur.getVille() + \"','\" + unFournisseur.getCp() + \"');\";\n try {\n uneBdd.seConnecter();\n Statement unStat = uneBdd.getMaConnection().createStatement();\n\n ResultSet unRes = unStat.executeQuery(checkVille);\n\n int nb = unRes.getInt(\"nb\");\n\n if (nb == 0) {\n String ajoutVille = \"CALL InsertCity('\" + unFournisseur.getVille() + \"', '\" + unFournisseur.getCp() + \"');\";\n\n try {\n Statement unStatAjout = uneBdd.getMaConnection().createStatement();\n\n unStatAjout.executeQuery(ajoutVille);\n unStatAjout.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + ajoutVille);\n }\n }\n\n String id = \"CALL GetCity('\" + unFournisseur.getVille() + \"', '\" + unFournisseur.getCp() + \"')\";\n\n try {\n Statement unStatId = uneBdd.getMaConnection().createStatement();\n\n ResultSet unResId = unStatId.executeQuery(id);\n\n int id_city = unResId.getInt(\"id_city\");\n\n\n\n String insertFournisseur = \"INSERT INTO fournisseur(id_city, name_f, adresse_f, phoneFour) VALUES (\" + id_city + \", '\" + unFournisseur.getNom() + \"', \" +\n \"'\" + unFournisseur.getAdresse() + \"', '\" + unFournisseur.getTelephone() + \"')\";\n\n try {\n Statement unStatFourn = uneBdd.getMaConnection().createStatement();\n unStatFourn.executeQuery(insertFournisseur);\n\n unStatFourn.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + insertFournisseur);\n }\n\n unResId.close();\n unStatId.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + id);\n }\n\n unRes.close();\n unStat.close();\n uneBdd.seDeConnecter();\n } catch (SQLException exp) {\n System.out.println(\"Erreur : \" + checkVille);\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 void insertaMensaje(InfoMensaje m) throws Exception;",
"@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}",
"public com.vh.locker.ejb.Contact create(java.lang.Long id, java.lang.String name, java.lang.String nickName, java.lang.String phone, java.lang.String email, com.vh.locker.ejb.User anUser) throws javax.ejb.CreateException;",
"public void daoInsertar(Miembro m) throws SQLException {\r\n\t\t\r\n\t\tPreparedStatement ps= con.prepareCall(\"INSERT INTO miembros (nombre, apellido1, apellido2, edad, cargo)VALUES(?,?,?,?,?)\");\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.executeUpdate();\r\n\t\tps.close();\r\n\t}",
"public void guardar() {\n try {\n if (this.buscarCodApelacion()) {\n Dr_siseg_usuarioBean usuario = new Dr_siseg_usuarioBean();\n FacesContext facesContext = FacesContext.getCurrentInstance();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n apelacionesDao.INSERTA_APELACIONES(apelacionesBean); \n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.apelacionesBean.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"0\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue insertada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n this.apelacionesBean = new ApelacionesBean();\n addMessage(\"Guadado Exitosamente\", 1);\n } else {\n addMessage(\"La solicitud de apelacion especificada no existe\", 1);\n this.Listar();\n }\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al insertar el registro, contacte al administrador del sistema\", 1);\n }\n }",
"public void create(Querellante quere) throws IOException, SQLException {\n con = getConnection();\n cs = con.prepareCall(\"Call create_persona(?,?,?,?,?,?)\");\n cs.setEscapeProcessing(true);\n cs.setString(1, quere.getNombre());\n cs.setString(2, quere.getApellido());\n cs.setInt(3, quere.getCedula());\n cs.setInt(4, quere.getTelefono());\n cs.setString(5, quere.getDireccion());\n cs.setInt(6, 3);\n cs.execute();\n\n con.close();\n\n }",
"@Override\r\n\tpublic int insertEmployee(Connection con, Employee employee) {\n\t\treturn 0;\r\n\t}",
"public void addRegistro(String nombre, String apellidos, String dni) {\r\n\t\t\r\n\t\tSession ss = Util.getSessionFactory().openSession();\r\n\t\tTransaction tr = null;\r\n\t\ttry {\r\n\t\t\ttr = ss.beginTransaction();// comenzamos a hacer cositas\r\n\t\t\t// id incremental,por eso pongo cero\r\n\t\t\tPersona p = new Persona(0, nombre, apellidos, dni);\r\n\t\t\tss.save(p);\r\n\t\t\ttr.commit();\r\n\t\t} catch (HibernateException e) {\r\n\t\t\tSystem.out.println(\"Pako_error= \" + e);\r\n\t\t} finally {\r\n\t\t\tss.close();\r\n\t\t\t// System.out.println(\"Final\");\r\n\t\t}\r\n\t}",
"public void nuevoPaciente(String idPaciente, String DNI, String nombres, String apellidos, String direccion, String ubigeo, String telefono1, String telefono2, String edad)\n {\n try\n {\n PreparedStatement pstm=(PreparedStatement)\n con.getConnection().prepareStatement(\"insert into \" + \" paciente(idPaciente, dui, nombres, apellidos, direccion, ubigeo, telefono1, telefono2, edad)\" + \"values (?,?,?,?,?,?,?,?,?)\");\n \n pstm.setString(1, idPaciente);\n pstm.setString(2, DNI);\n pstm.setString(3, nombres);\n pstm.setString(4, apellidos);\n pstm.setString(5, direccion);\n pstm.setString(6, ubigeo);\n pstm.setString(7, telefono1);\n pstm.setString(8, telefono2);\n pstm.setString(9, edad); \n \n pstm.execute();\n pstm.close();\n }\n catch(SQLException e)\n {\n System.out.print(e);\n }\n }",
"@Override\n public void insert(J34SiscomexMercadoriaAdi j34SiscomexMercadoriaAdi) {\n super.doInsert(j34SiscomexMercadoriaAdi);\n }",
"BeanPedido crearPedido(BeanCrearPedido pedido);",
"public void inseriEmpresa() throws IOException {\n\t\tString r;\n\t\tthis.vetEmpreas[this.nEmpresas] = new Empresa();\n\t\t\n\t\tSystem.out.println(\"Inseri o nome \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setNome(r);\n\n\t\tSystem.out.println(\"Inseri o CNPJ \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setCnpj(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o endereco \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setEndereco(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o email \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setEmail(r);\n\t\t\n\t\tSystem.out.println(\"Inseri InscricaoEstadual \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setInscricaoEstadual(r);\n\t\t\n\t\tSystem.out.println(\"Inseri Razao Social \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setRazaoSocial(r);\n\t\t\n\t\tthis.nEmpresas +=1;\n\t}",
"public OrdemDeServico inserir (OrdemDeServico servico) {\n\t\tservico.setId((Long) null);\n\t\treturn repoOrdem.save(servico);\n\t}",
"void adicionaComentario(Comentario comentario);",
"public void create(Membre membre) {\n try {\n// em = getEntityManager();\n// entManager.getTransaction().begin();\n entManager.persist(membre);\n// entManager.getTransaction().commit();\n } finally {\n// if (entManager.getTransaction() != null) {\n// entManager.close();\n// }\n }\n }",
"public void create(Personne pers) {\n\t\ttry{\n\t\t\tString req = \"INSERT INTO PERSONNE_1 (ID, Nom ,Prenom)\" + \"VALUES(?,?,?)\";\n\t\t\tPreparedStatement ps= connect.prepareStatement(req);\n\t\t\tps.setInt(1,ID);\n\t\t\tps.setString(2,pers.getNom());\n\t\t\tps.setString(3,pers.getPrenom());\n\t\t\tps.executeUpdate();\n\t\t\tID++;\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"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 }",
"public int insert(person p){\n\t\t\treturn j.update(\" insert into person (id,name,location,birthdate) \"+ \" values(?,?,?,?) \", new Object[] {p.getId(),p.getName(),p.getLocation(),new Timestamp(p.getDate().getTime())});\r\n\t\t\r\n\t}",
"public void crearActividad (Actividad a) {\r\n String query = \"INSERT INTO actividad (identificacion_navegate, numero_matricula, fecha, hora, destino, eliminar) VALUES (\\\"\" \r\n + a.getIdentificacionNavegante()+ \"\\\", \" \r\n + a.getNumeroMatricula() + \", \\\"\" \r\n + a.getFecha() + \"\\\", \\\"\" \r\n + a.getHora() + \"\\\", \\\"\" \r\n + a.getDestino()+ \"\\\" ,false)\";\r\n try {\r\n Statement st = con.createStatement();\r\n st.executeUpdate(query);\r\n st.close();\r\n JOptionPane.showMessageDialog(null, \"Actividad creada\", \"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 void insertClient(ClientVO clientVO);",
"@Override\n\tpublic Paciente registrar(Paciente t) {\n\t\treturn dao.save(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 }",
"public void insertUser() {}",
"private void registrarSolicitudBienEntidad(SolicitudBienEntidadDTO SolicitudBienEntidadDTO) {\n SolicitudBienEntidad solicitudBienEntidad = SolicitudBienEntidadHelper.toLevel1Entity(SolicitudBienEntidadDTO,\n null);\n em.persist(solicitudBienEntidad);\n }",
"public void crearEntidad() throws EntidadNotFoundException {\r\n\t\tif (validarCampos(getNewEntidad())) {\r\n\t\t\tif (validarNomNitRepetidoEntidad(getNewEntidad())) {\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_WARN, \"Advertencia: \", \"Nombre, Nit o Prejifo ya existe en GIA\"));\r\n\t\t\t} else {\r\n\t\t\t\tif (entidadController.crearEntidad(getNewEntidad())) {\r\n\t\t\t\t\tmensajeGrow(\"Entidad Creada Satisfactoriamente\", getNewEntidad());\r\n\t\t\t\t\tRequestContext.getCurrentInstance().execute(\"PF('entCrearDialog').hide()\");\r\n\t\t\t\t\tsetNewEntidad(new EntidadDTO());\r\n\t\t\t\t\tresetCodigoBUA();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmensajeGrow(\"Entidad No Fue Creada\", getNewEntidad());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlistarEntidades();\r\n\t\t\t// newEntidad = new EntidadDTO();\r\n\t\t\t// fechaActual();\r\n\t\t}\r\n\r\n\t}",
"int insert(ParUsuarios record);",
"public void insertPerson(Person p) throws DataAccessException {\n String sql = \"INSERT INTO persons (person_id, assoc_username, first_name, last_name, gender, \" +\n \"father_id, mother_id, spouse_id) VALUES(?,?,?,?,?,?,?,?)\";\n try(PreparedStatement stmt = conn.prepareStatement(sql)) {\n stmt.setString(1, p.getPerson_id());\n stmt.setString(2, p.getAssoc_username());\n stmt.setString(3, p.getFirst_name());\n stmt.setString(4, p.getLast_name());\n stmt.setString(5, p.getGender());\n stmt.setString(6, p.getFather_id());\n stmt.setString(7, p.getMother_id());\n stmt.setString(8, p.getSpouse_id());\n\n stmt.executeUpdate();\n } catch (SQLException e) {\n throw new DataAccessException(\"Error encountered while inserting into the database\");\n }\n }",
"public interface ITestJtaBiz {\n void insert(int id);\n}",
"int insert(MVoucherDTO record);",
"public void insertarEmpleado(CLEmpleado cl) throws SQLException{\r\n String sql = \"{CALL sp_insertarEmpleado(?,?,?,?,?,?,?,?)}\";\r\n \r\n try{\r\n ps = cn.prepareCall(sql);\r\n ps.setString(1, cl.getPrimerNombre());\r\n ps.setString(2, cl.getSegundoNombre());\r\n ps.setString(3, cl.getPrimerApellido());\r\n ps.setString(4, cl.getSegundoApellido());\r\n ps.setString(5, cl.getDireccion());\r\n ps.setString(6, cl.getTelefonoCelular());\r\n ps.setInt(7, cl.getIdCargo());\r\n ps.setInt(8, 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 }",
"@Override\n\tpublic void add() {\n\t\tSystem.out.println(\"Injection to database : Oracle\");\n\t}",
"public interface Mensaje_SMS_ACSLocal extends javax.ejb.EJBLocalObject {\n\t/**\n\t * Get accessor for persistent attribute: id\n\t */\n\tpublic java.lang.Long getId();\n\t/**\n\t * Set accessor for persistent attribute: id\n\t */\n\tpublic void setId(java.lang.Long newId);\n\t/**\n\t * Get accessor for persistent attribute: xml\n\t */\n\tpublic java.lang.String getXml();\n\t/**\n\t * Set accessor for persistent attribute: xml\n\t */\n\tpublic void setXml(java.lang.String newXml);\n\t/**\n\t * Get accessor for persistent attribute: peti_numero\n\t */\n\tpublic java.lang.Long getPeti_numero();\n\t/**\n\t * Set accessor for persistent attribute: peti_numero\n\t */\n\tpublic void setPeti_numero(java.lang.Long newPeti_numero);\n\t/**\n\t * Get accessor for persistent attribute: fecha_envio\n\t */\n\tpublic java.sql.Timestamp getFecha_envio();\n\t/**\n\t * Set accessor for persistent attribute: fecha_envio\n\t */\n\tpublic void setFecha_envio(java.sql.Timestamp newFecha_envio);\n\t/**\n\t * Get accessor for persistent attribute: usuario\n\t */\n\tpublic java.lang.String getUsuario();\n\t/**\n\t * Set accessor for persistent attribute: usuario\n\t */\n\tpublic void setUsuario(java.lang.String newUsuario);\n}",
"private void saveNewPerson() {\r\n\r\n\t\tSystem.out.println(\"Start Save new Patient...\");\r\n\r\n\t\ttry {\r\n\t\t\tIPerson p1 = new Person(\"admin\", new Role(Roles.ADMINISTRATOR,\r\n\t\t\t\t\t\"Hauptadministrator\"), \"Passwort\", \"[email protected]\", \"Vorname\",\r\n\t\t\t\t\t\"Nachname\", \"Organisation\", \"Abteilung\", \"Fachrichtung\",\r\n\t\t\t\t\t\"Strasse\", \"3e\", \"54321\", \"Ort\");\r\n\r\n\t\t\tp1.save();\r\n\t\t} catch (BusinesslogicException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t} catch (DatabaseException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"New Patient saved!!\");\r\n\t}",
"public void addPersona( Persona persona ) throws Exception \n\t{\n\n\t\tDAOPersona dao = new DAOPersona();\n\t\ttry\n\t\t{\n\t\t\tthis.conn = darConexion();\n\t\t\tdao.setConn(conn);\n\n\t\t\tdao.addPersona(persona);\n\n\t\t}\n\t\tcatch (SQLException sqlException) {\n\t\t\tSystem.err.println(\"[EXCEPTION] SQLException:\" + sqlException.getMessage());\n\t\t\tsqlException.printStackTrace();\n\t\t\tthrow sqlException;\n\t\t} \n\t\tcatch (Exception exception) {\n\t\t\tSystem.err.println(\"[EXCEPTION] General Exception:\" + exception.getMessage());\n\t\t\texception.printStackTrace();\n\t\t\tthrow exception;\n\t\t} \n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tdao.cerrarRecursos();\n\t\t\t\tif(this.conn!=null){\n\t\t\t\t\tthis.conn.close();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (SQLException exception) {\n\t\t\t\tSystem.err.println(\"[EXCEPTION] SQLException While Closing Resources:\" + exception.getMessage());\n\t\t\t\texception.printStackTrace();\n\t\t\t\tthrow exception;\n\t\t\t}\n\t\t}\n\t}",
"@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 insertarPaciente ( String dni, String nombre, String apellidos, String telefono,String emaail,float peso_actual, float peso_objetivo, float altura, int edad, String sexo, String password,String complexion);",
"@TransactionAttribute(TransactionAttributeType.REQUIRED)\n @Override\n public void registrarCompra(ArrayList<Mueble> muebles, Usuario cliente) throws OperacionInvalidaException {\n Mueble mueble;\n \n Usuario clienteConsultado = (Usuario) persistenciaOracle.findById(Usuario.class, cliente.getLogin()); \n \n if (!muebles.isEmpty()) {\n for (int i = 0; i < muebles.size(); i++) {\n mueble = muebles.get(i);\n \n Mueble editar = (Mueble) persistenciaOracle.findById(Mueble.class, mueble.getReferencia());\n\n if (editar != null) {\n editar.setCantidad(editar.getCantidad() - mueble.getCantidad());\n RegistroVenta compra = new RegistroVenta(new Date(System.currentTimeMillis()), mueble, mueble.getCantidad(), null, cliente);\n clienteConsultado.agregarRegistro(compra);\n\n persistenciaOracle.update(clienteConsultado);\n persistenciaOracle.update(editar);\n\n } else {\n throw new OperacionInvalidaException(\"Mueble no existe.\");\n }\n }\n } else {\n throw new OperacionInvalidaException(\"Lista de muebles vacia.\");\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 EspecieEntity inserta(EspecieEntity entity){\r\n em.persist(entity);\r\n return entity;\r\n }",
"int insert(ProEmployee record);",
"void insert(CTipoComprobante record) throws SQLException;",
"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 }",
"public TipoPk insert(Tipo dto) throws TipoDaoException;",
"@Override\n public Mechanic addEmployee(Mechanic mechanic) {\n LOGGER.info(\"Create new Mechanic in the database\");\n return mechanicRepository.save(mechanic);\n }",
"int insertName(String nmNameLast, int idPerson);",
"public interface Bitacora_peticionLocalHome extends javax.ejb.EJBLocalHome {\n\t/**\n\t * Creates an instance from a key for Entity Bean: Bitacora_peticion\n\t */\n\t static final String JNDI_NAME=\"ejb/co/com/telefonica/atiempo/ejb/eb/Bitacora_peticionLocalHome\";\n\tpublic co.com.telefonica.atiempo.ejb.eb.Bitacora_peticionLocal create(\n\t\tjava.lang.Long bipe_id)\n\t\tthrows javax.ejb.CreateException;\n\t/**\n\t * Finds an instance using a key for Entity Bean: Bitacora_peticion\n\t */\n\tpublic co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.ejb\n\t\t.eb\n\t\t.Bitacora_peticionLocal findByPrimaryKey(\n\t\tco.com.telefonica.atiempo.ejb.eb.Bitacora_peticionKey primaryKey)\n\t\tthrows javax.ejb.FinderException;\n\t/**\n\t * Creates an instance from a key for Entity Bean: Bitacora_peticion\n\t */\n\tpublic co.com.telefonica.atiempo.ejb.eb.Bitacora_peticionLocal create(\n\t\tjava.lang.Long bipe_id,\n\t\tjava.lang.Long usua_id,\n\t\tjava.sql.Timestamp bipe_fecha_inicio,\n\t\tco.com.telefonica.atiempo.ejb.eb.ActividadLocal argFk_acti_2_bipe,\n\t\tco.com.telefonica.atiempo.ejb.eb.PeticionLocal argFk_peticion)\n\t\tthrows javax.ejb.CreateException;\n\n\t/**\n\t * @param idActividad\n\t * @param object\n\t * @param idPeticion\n\t * @param idUsuario\n\t * @param date\n\t * @param object2\n\t * @param object3\n\t * @param esReversa\n\t * @return\n\t */\n\tpublic co.com.telefonica.atiempo.ejb.eb.Bitacora_peticionLocal create(\n\t\tLong idActividad,\n\t\tLong idCausa,\n\t\tLong peticion,\n\t\tLong usuaId,\n\t\tDate bipeFechaInicio,\n\t\tDate bipeFechaFin,\n\t\tString bipeObservacion,\n\t\tShort esReversa)\n\t\tthrows CreateException;\n\n\tpublic java.util.Collection findbyNumeroPeticion(java.lang.Long idPeticion) throws javax.ejb.FinderException;\n//\tpublic java.util.Collection findFechaFin(java.lang.Long idPeticion) throws javax.ejb.FinderException;\n//\n\tpublic java.util.Collection findByPetiOrden(java.lang.Long idPeticion) throws javax.ejb.FinderException;\n\tpublic Bitacora_peticionLocal findByPeticionActividad(java.lang.Long idPeticion, java.lang.Long idActividad) throws javax.ejb.FinderException;\n\tpublic Bitacora_peticionLocal findByPeticionActividadUsuario(java.lang.Long idPeticion, java.lang.Long idActividad, java.lang.Long idUsuario)\n\t\tthrows javax.ejb.FinderException;\n//\t//public Bitacora_peticionLocal findNumPeticionActividad(java.lang.Long numPeticion) throws javax.ejb.FinderException;\n//\tpublic java.util.Collection findByPeticionFechaTerminoNula(java.lang.Long nroPeticion) throws javax.ejb.FinderException;\n//\tpublic Bitacora_peticionLocal findObsPeticionActividad(java.lang.Long numeroPeticion, java.lang.Long numeroActividad)\n//\t\tthrows javax.ejb.FinderException;\n//\tpublic Bitacora_peticionLocal findByCodigoObservacionPeticion(java.lang.Long peticion) throws javax.ejb.FinderException;\n//\tpublic Bitacora_peticionLocal findByIdPeticionAndMdfTerminada(java.lang.Long idPeticion) throws javax.ejb.FinderException;\n//\t\n\tpublic java.util.Collection findbyPeticionRol(java.lang.Long idPeticion, java.lang.Long idRol) throws javax.ejb.FinderException;\n//\tpublic java.util.Collection findByPeticionActividadNoNula(java.lang.Long idPeticion, java.lang.Long idActividad) throws javax.ejb.FinderException;\n\tpublic java.util.Collection findByPeticionActividadCerrada(java.lang.Long petiNumero, java.lang.Long actId) throws javax.ejb.FinderException;\n\tpublic java.util.Collection findPreviuosActivity(java.lang.Long petiNumero)\n\t\tthrows javax.ejb.FinderException;\n\tpublic java.util.Collection findbypeticionfechafin(java.lang.Long idPeticion)\n\t\tthrows javax.ejb.FinderException;\n\tpublic java.util.Collection findByOpenAct(java.lang.Long idActividad)\n\t\tthrows javax.ejb.FinderException;\n\tpublic co.com.telefonica.atiempo.ejb.eb.Bitacora_peticionLocal findbyMaxActivity(java.lang.Long idPeticion, java.lang.Long idActividad) throws javax.ejb.FinderException;\n}",
"public int addSickPerson(SickPerson sickPerson) throws SQLException;",
"public void ejbCreate() {\n\n }",
"public void adicionar() {\n String sql = \"insert into empresa(empresa, cnpj, endereco, telefone, email) values (?,?,?,?,?)\";\n try {\n pst = conexao.prepareStatement(sql);\n pst.setString(1, txtEmpNome.getText());\n pst.setString(2, txtEmpCNPJ.getText());\n pst.setString(3, txtEmpEnd.getText());\n pst.setString(4, txtEmpTel.getText());\n pst.setString(5, txtEmpEmail.getText());\n // validacao dos campos obrigatorios\n if ((txtEmpNome.getText().isEmpty()) || (txtEmpCNPJ.getText().isEmpty())) {\n JOptionPane.showMessageDialog(null, \"Preencha todos os campos obrigatórios\");\n } else {\n //a linha abaixo atualiza a tabela usuarios com os dados do formulario\n // a esttrutura abaixo confirma a inserção na tabela\n int adicionado = pst.executeUpdate();\n if (adicionado > 0) {\n JOptionPane.showMessageDialog(null, \"Empresa adicionada com sucesso\");\n txtEmpNome.setText(null);\n txtEmpEnd.setText(null);\n txtEmpTel.setText(null);\n txtEmpEmail.setText(null);\n txtEmpCNPJ.setText(null);\n }\n }\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }",
"@Override\r\n public void createNewEntity(String entityName) {\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 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 }",
"public interface ClienteDAO {\n public Cliente registrarCliente(Cliente cliente);\n}",
"public void create(Joueur joueur) {\n EntityManager em = EntityManagerHolder.getCurrentEntityManager();\n EntityTransaction tx = null;\n\n try {\n// session = HibernateUtil.getSessionFactory().getCurrentSession();\n// tx = session.beginTransaction();\n// session.persist(joueur);\n tx = em.getTransaction();\n em.persist(joueur);\n //declenche l'ajout d'un ou plusieurs elements -> synchronisation de la session et de la BDD\n\n System.out.println(\"Joueur créé avec succès\");\n } catch (Exception e) {\n\n e.printStackTrace();\n } finally {\n if (em != null) {\n em.close();\n }\n }\n }",
"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}"
]
| [
"0.65534496",
"0.6534772",
"0.645539",
"0.6372965",
"0.63510853",
"0.62986",
"0.6295481",
"0.6289832",
"0.6284447",
"0.6267222",
"0.6238807",
"0.62273264",
"0.62211674",
"0.61994183",
"0.61928856",
"0.61859924",
"0.6182687",
"0.6166866",
"0.61635107",
"0.6156679",
"0.61538196",
"0.61312413",
"0.61195475",
"0.6098312",
"0.609191",
"0.60860485",
"0.60774696",
"0.6077062",
"0.6068934",
"0.60555905",
"0.6053878",
"0.6048736",
"0.60458153",
"0.6035227",
"0.60340506",
"0.60326886",
"0.60185474",
"0.60149586",
"0.60022867",
"0.5985782",
"0.59836",
"0.5983498",
"0.5982189",
"0.59716356",
"0.596921",
"0.5961097",
"0.59592617",
"0.5956428",
"0.59538597",
"0.59518796",
"0.59434843",
"0.59386384",
"0.59355456",
"0.59321094",
"0.5920127",
"0.5914136",
"0.591349",
"0.59109366",
"0.5910491",
"0.59075236",
"0.590207",
"0.58865505",
"0.5881849",
"0.588131",
"0.58772165",
"0.5874649",
"0.5873786",
"0.58680004",
"0.58641577",
"0.58541906",
"0.58525485",
"0.5848586",
"0.5846798",
"0.584541",
"0.5843",
"0.5842756",
"0.5840287",
"0.5839514",
"0.5835474",
"0.5834303",
"0.58338684",
"0.58254087",
"0.5824001",
"0.5820993",
"0.5817893",
"0.5815377",
"0.58129156",
"0.58090115",
"0.580869",
"0.5808106",
"0.58058715",
"0.5801655",
"0.58013386",
"0.57994074",
"0.5794467",
"0.5786284",
"0.5785166",
"0.5785059",
"0.5782488",
"0.57811254",
"0.5775372"
]
| 0.0 | -1 |
Metodo encargado de llamar al EJB para insertar una persona. | public String obtenerGrupo(String id) {
if (id != null && "".compareTo(id) != 0) {
try {
this.dto = this.bean.obtenerUserGroups(id);
} catch (Exception e) {
this.log.error("Error al bean.obtenerPersonas(" + this.dto.getId() + "):" + e);
e.printStackTrace();
String msg = TablaValores.getValor(TABLA_PARAMETROS, "msgCrearEditar", "nokObtener");
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, e.getMessage()));
}
}
return "actualiza";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void Insert(PersonelContract entity) {\n\n\t}",
"public void insert(Service servico){\n Database.servico.add(servico);\n }",
"ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);",
"Lancamento persistir(Lancamento lancamento);",
"public void createEmp(Empresa p) throws ClassNotFoundException {\r\n\r\n java.sql.Connection con = ConnectionFactory.getConnection();\r\n PreparedStatement stmt = null;\r\n\r\n try {\r\n stmt = con.prepareStatement(\"INSERT INTO tbempresas(codEmp,nomeEmp)\" + \"VALUES(?,?)\");\r\n stmt.setInt(1, p.getCodEmp());\r\n stmt.setString(2, p.getNomeEmp());\r\n\r\n stmt.executeUpdate();\r\n\r\n JOptionPane.showMessageDialog(null, \"salvo com sucesso\");\r\n } catch (SQLException ex) {\r\n System.out.println(ex);\r\n } finally {\r\n ConnectionFactory.closeConnection((com.mysql.jdbc.Connection) con, stmt);\r\n }\r\n }",
"public int agregar(Persona p) {\n\t\tint r=0;\n\t\t\n\t\t\n\t\t String query = \"INSERT INTO TABLA (Id, nombre) values (?, ?)\";\n\t\ttry {\n\t\t\t\n\t\t\tcon= c.conectar();\n\t\t\tps=con.prepareStatement(query);\n\t\t\t\n\t\t\tps.setString(1, p.getId());\n\t\t\tps.setString(2, p.getNom());\n\t\t\tr=ps.executeUpdate();\n\t\t\tif(r==1) {\n\t\t\t\tr=1;\n\t\t\t}else {\n\t\t\t\tr=0;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\t\n\t\t}\n\t\treturn r;\n\t\t\n\t\t\n\t\t\n\t}",
"@Override\n\tpublic void insert(Unidade obj) {\n\n\t}",
"@Override\n public int insertar(ClienteBean cliente) {\n clienteDAO = new ClienteDAOImpl();\n return clienteDAO.insertar (cliente);\n }",
"int insert (EmpBean emp) throws ClassNotFoundException, SQLException {\n\t\t\n\tConnection con = DBUtil.getConnection();\n\tString sql= \"insert into empTab values(?,?,?)\";\n\tPreparedStatement ps = con.prepareStatement(sql);\n\tps.setString(1, emp.getEmpName());\n\tps.setString(2, emp.getEmpemailid());\n\tps.setInt(3, emp.getEmpphoneno());\n\t\n\n\treturn ps.executeUpdate(); //1 row inserted\n\t\n\t\n\t\n}",
"@Override\n public void salvar(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 if(paciente.getIdPaciente() == 0){\n em.persist(paciente);\n }else{\n em.merge(paciente);\n }\n em.getTransaction().commit();\n em.close();\n factory.close();\n }",
"ParqueaderoEntidad agregar(String nombre);",
"void persiste(UsuarioDetalle usuarioDetalle);",
"public interface Compromiso_peticionLocal extends javax.ejb.EJBLocalObject {\n\t/**\n\t * Get accessor for persistent attribute: tiag_id\n\t */\n\tpublic java.lang.Long getTiag_id();\n\t/**\n\t * Set accessor for persistent attribute: tiag_id\n\t */\n\tpublic void setTiag_id(java.lang.Long newTiag_id);\n\t/**\n\t * Get accessor for persistent attribute: id_rango\n\t */\n\tpublic java.lang.Integer getId_rango();\n\t/**\n\t * Set accessor for persistent attribute: id_rango\n\t */\n\tpublic void setId_rango(java.lang.Integer newId_rango);\n\t/**\n\t * Get accessor for persistent attribute: peti_numero\n\t */\n\tpublic java.lang.Long getPeti_numero();\n\t/**\n\t * Set accessor for persistent attribute: peti_numero\n\t */\n\tpublic void setPeti_numero(java.lang.Long newPeti_numero);\n\t/**\n\t * Get accessor for persistent attribute: codigo_pcom\n\t */\n\tpublic java.lang.String getCodigo_pcom();\n\t/**\n\t * Set accessor for persistent attribute: codigo_pcom\n\t */\n\tpublic void setCodigo_pcom(java.lang.String newCodigo_pcom);\n\t/**\n\t * Get accessor for persistent attribute: dia_especifico\n\t */\n\tpublic java.sql.Timestamp getDia_especifico();\n\t/**\n\t * Set accessor for persistent attribute: dia_especifico\n\t */\n\tpublic void setDia_especifico(java.sql.Timestamp newDia_especifico);\n\t/**\n\t * Get accessor for persistent attribute: id_tecnico\n\t */\n\tpublic java.lang.Long getId_tecnico();\n\t/**\n\t * Set accessor for persistent attribute: id_tecnico\n\t */\n\tpublic void setId_tecnico(java.lang.Long newId_tecnico);\n\t/**\n\t * Get accessor for persistent attribute: user_mac\n\t */\n\tpublic java.lang.String getUser_mac();\n\t/**\n\t * Set accessor for persistent attribute: user_mac\n\t */\n\tpublic void setUser_mac(java.lang.String newUser_mac);\n\t/**\n\t * Get accessor for persistent attribute: hora_desde\n\t */\n\tpublic java.lang.String getHora_desde();\n\t/**\n\t * Set accessor for persistent attribute: hora_desde\n\t */\n\tpublic void setHora_desde(java.lang.String newHora_desde);\n\t/**\n\t * Get accessor for persistent attribute: hora_hasta\n\t */\n\tpublic java.lang.String getHora_hasta();\n\t/**\n\t * Set accessor for persistent attribute: hora_hasta\n\t */\n\tpublic void setHora_hasta(java.lang.String newHora_hasta);\n\t/**\n\t * Get accessor for persistent attribute: codigo_agencia\n\t */\n\tpublic java.lang.String getCodigo_agencia();\n\t/**\n\t * Set accessor for persistent attribute: codigo_agencia\n\t */\n\tpublic void setCodigo_agencia(java.lang.String newCodigo_agencia);\n\t/**\n\t * Get accessor for persistent attribute: estado\n\t */\n\tpublic java.lang.Short getEstado();\n\t/**\n\t * Set accessor for persistent attribute: estado\n\t */\n\tpublic void setEstado(java.lang.Short newEstado);\n\t/**\n\t * Get accessor for persistent attribute: grse_id\n\t */\n\tpublic java.lang.Integer getGrse_id();\n\t/**\n\t * Set accessor for persistent attribute: grse_id\n\t */\n\tpublic void setGrse_id(java.lang.Integer newGrse_id);\n\t/**\n\t * Get accessor for persistent attribute: fecha\n\t */\n\tpublic java.sql.Timestamp getFecha();\n\t/**\n\t * Set accessor for persistent attribute: fecha\n\t */\n\tpublic void setFecha(java.sql.Timestamp newFecha);\n\t/**\n\t * Get accessor for persistent attribute: care_id\n\t */\n\tpublic java.lang.Integer getCare_id();\n\t/**\n\t * Set accessor for persistent attribute: care_id\n\t */\n\tpublic void setCare_id(java.lang.Integer newCare_id);\n\t/**\n\t * Get accessor for persistent attribute: usua_id\n\t */\n\tpublic java.lang.Long getUsua_id();\n\t/**\n\t * Set accessor for persistent attribute: usua_id\n\t */\n\tpublic void setUsua_id(java.lang.Long newUsua_id);\n\t/**\n\t * Get accessor for persistent attribute: id_cita_previa\n\t */\n\tpublic java.lang.Long getId_cita_previa();\n\t/**\n\t * Set accessor for persistent attribute: id_cita_previa\n\t */\n\tpublic void setId_cita_previa(java.lang.Long newId_cita_previa);\n}",
"@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}",
"@Override\r\n public void crearCliente(Cliente cliente) throws Exception {\r\n entity.getTransaction().begin();//inicia la creacion\r\n entity.persist(cliente);//se crea el cliente\r\n entity.getTransaction().commit();//finaliza la creacion\r\n }",
"public abstract String insertarTipoActividad(TipoActividad tipoAct) throws PersistenceException, ClassNotFoundException;",
"public void inserir(Comentario c);",
"public void persistir(Cliente cliente){\n }",
"private void attachEntity(Usuario entity) {\n }",
"@Override\r\n\tpublic MensajeBean inserta(Tramite_presentan_info_impacto nuevo) {\n\t\treturn tramite.inserta(nuevo);\r\n\t}",
"@Override\n public void insertAccount() throws Exception {\n\n }",
"@Override\n\tpublic MensajeBean inserta(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.inserta(nuevo);\n\t}",
"void insert(CTipoPersona record) throws SQLException;",
"int insert(PersonRegisterDo record);",
"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 }",
"public void registrarPersona() {\n\t\ttry {\n\t\t\tif (validaNumDocumento(getNumDocumentPersona())) {\n\t\t\t\t\tif (validaDireccion()) {\n\t\t\t\t\t\tif (validaApellidosNombres()) {\n\t\t\t\t\t\t\tPaPersona persona = new PaPersona();\n\t\t\t\t\t\t\tif (getActualizaPersona() != null && getActualizaPersona().equals(\"N\")) {\n\t\t\t\t\t\t\t\tpersona.setPersonaId(Constante.RESULT_PENDING);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpersona.setPersonaId(getPersonaId() == null ? Constante.RESULT_PENDING: getPersonaId());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpersona.setTipoDocumentoId(Integer.valueOf(mapTipoDocumento.get(getTipoDocumento())));\n\t\t\t\t\t\t\tpersona.setNroDocIdentidad(getNumDocumentPersona());\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tif (persona.getTipoDocumentoId() == Constante.TIPO_DOCUMENTO_RUC_ID) {\n\t\t\t\t\t\t\t\tpersona.setRazonSocial(getRazonSocial());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpersona.setPrimerNombre(getPrimerNombre());\n\t\t\t\t\t\t\t\tpersona.setSegundoNombre(getSegundoNombre());\n\t\t\t\t\t\t\t\tpersona.setApePaterno(getApellidoPaterno());\n\t\t\t\t\t\t\t\tpersona.setApeMaterno(getApellidoMaterno());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tPaDireccion direccion = new PaDireccion();\n\t\t\t\t\t\t\tdireccion.setDireccionId(getDireccionId() == null ? Constante.RESULT_PENDING: getDireccionId());\n\t\t\t\t\t\t\tif (getSelectedOptBusc().intValue() == 1) {\n\t\t\t\t\t\t\t\tdireccion.setTipoViaId(mapGnTipoVia.get(getCmbtipovia().getValue()));\n\t\t\t\t\t\t\t\tdireccion.setViaId(mapGnVia.get(getCmbvia().getValue()));\n\t\t\t\t\t\t\t\tdireccion.setLugarId(null);\n\t\t\t\t\t\t\t\tdireccion.setSectorId(null);\n\t\t\t\t\t\t\t\tdireccion.setNumero(numero);\n\t\t\t\t\t\t\t\tdireccion.setPersonaId(persona.getPersonaId());\n\n\t\t\t\t\t\t\t\tString direccionCompleta = papeletaBo.getDireccionCompleta(direccion,mapIGnTipoVia, mapIGnVia);\n\t\t\t\t\t\t\t\tif (direccionCompleta != null && direccionCompleta.trim().length() > 0) {\n\t\t\t\t\t\t\t\t\tdireccion.setDireccionCompleta(direccionCompleta);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdireccion.setDireccionCompleta(getDireccionCompleta());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tBuscarPersonaDTO personaDto = getPersonaDto(persona, direccion);\n\t\t\t\t\t\t\tString personaPapeleta = (String) getSessionMap().get(\"personaPapeleta\");\n\t\t\t\t\t\t\tif (personaPapeleta != null\n\t\t\t\t\t\t\t\t\t&& personaPapeleta.equals(\"I\")) {\n\t\t\t\t\t\t\t\tRegistroPapeletasManaged registro = (RegistroPapeletasManaged) getManaged(\"registroPapeletasManaged\");\n\t\t\t\t\t\t\t\tregistro.setDatosInfractor(personaDto);\n\t\t\t\t\t\t\t} else if (personaPapeleta != null\n\t\t\t\t\t\t\t\t\t&& personaPapeleta.equals(\"P\")) {\n\t\t\t\t\t\t\t\tRegistroPapeletasManaged registro = (RegistroPapeletasManaged) getManaged(\"registroPapeletasManaged\");\n\t\t\t\t\t\t\t\tregistro.setDatosPropietario(personaDto);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlimpiar();\n\t\t\t\t\t\t\tesContribuyente = (Boolean) getSessionMap().get(\"esContribuyente\");\n\t\t\t\t\t\t\tif (esContribuyente == true) {\t\n\t\t\t\t\t\t\t\tWebMessages.messageError(\"Es un Contribeyente s�lo se Actualiz� la Direcci�n para Papeletas, los otros datos es por DJ\");\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tWebMessages\n\t\t\t\t\t\t\t\t\t.messageError(\"Apellidos y nombres no valido\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tWebMessages\n\t\t\t\t\t\t\t\t.messageError(\"Especifique la direccion de la persona\");\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tWebMessages\n\t\t\t\t\t\t.messageError(\"Número de documento de identidad no valido\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void insertEmp(Emp emp) {\n\t\t\n\t}",
"void lookupAndSaveNewPerson();",
"void insert(organize_infoBean record);",
"public void insertConsultoraNivel1(ConsultoraNivel1 consultoraNivel1);",
"public synchronized Boolean nuevoCliente(JSONObject persona,JSONObject cliente) throws ExceptionViajesCompartidos {\n\n\n //creo los objectos a partir de los JSON recibidos\n \tPersona p= new Persona(persona);\n \tCliente c= new Cliente(cliente);\n \t/*\n \ttry{\n\t\t\t iniciarTransaccion( );\n\t\t\t c.setPersona(p);\n\t\t\t System.out.println(\"id persona antes de insert: \"+p.getId_persona());\n\t\t\t entitymanager.persist(p);\n\t\t\t System.out.println(\"id persona despues de insert: \"+p.getId_persona());\n\t\t\t System.out.println(\"id cliente antes de insert: \"+c.getId_usuario());\n\t\t\t entitymanager.persist(c);\n\t\t\t System.out.println(\"id cliente despues de insert: \"+c.getId_usuario());\n\t\t\t Query qry = entitymanager.createNamedQuery(\"Rol.porNombre\");\n\t \t qry.setParameter(\"nombre\", \"cliente\");\n\t\t\t Rol r= (Rol) qry.getSingleResult();\n\t\t\t c.asignarRol(r);\n\t\t\t entitymanager.getTransaction( ).commit( );\t\n\t\t\t \n\t\t\t System.out.println(\"id persona despues de commit: \"+p.getId_persona());\n\t\t\t System.out.println(\"id cliente despues de commit: \"+c.getId_usuario());\n\t\t\t Rol rol_recien_asignado= c.getRoles().get(0).getRol();\n\t\t\t System.out.println(\"nombre del rol recien asignado: \"+rol_recien_asignado.getNombre_rol());\n\t\t\t \n\t\t\t return true;\n\t\t}catch(Exception e){\n\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t} \n\t\t*/\t\n\t\tthis.iniciarTransaccion();\n\t\t c.setPersona(p);\n\t\t c.setPuntos(0);\n\t\t c.setReputacion(3);\n\t\t entitymanager.persist(p);\n\t\t entitymanager.persist(c);\n\t\t Query qry = entitymanager.createNamedQuery(\"Rol.porNombre\");\n\t\t qry.setParameter(\"nombre\", \"cliente\");\n\t\t Rol r= (Rol) qry.getSingleResult();\n c.asignarRol(r);\n try{\n this.entitymanager.getTransaction().commit();\n return true;\n\n }catch(RollbackException e){\n String error= ManejadorErrores.parsearRollback(e);\n throw new ExceptionViajesCompartidos(\"ERROR: \"+error);\n }\n\t}",
"@Override\r\n\tpublic int inserta(ReservaBean bean) throws Exception {\n\t\treturn 0;\r\n\t}",
"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 interface PersonLocal extends javax.ejb.EJBLocalObject {\r\n\t/**\r\n\t * Get accessor for persistent attribute: password\r\n\t */\r\n\tpublic java.lang.String getPassword();\r\n\t/**\r\n\t * Set accessor for persistent attribute: password\r\n\t */\r\n\tpublic void setPassword(java.lang.String newPassword);\r\n\t/**\r\n\t * Get accessor for persistent attribute: firstName\r\n\t */\r\n\tpublic java.lang.String getFirstName();\r\n\t/**\r\n\t * Set accessor for persistent attribute: firstName\r\n\t */\r\n\tpublic void setFirstName(java.lang.String newFirstName);\r\n\t/**\r\n\t * Get accessor for persistent attribute: lastName\r\n\t */\r\n\tpublic java.lang.String getLastName();\r\n\t/**\r\n\t * Set accessor for persistent attribute: lastName\r\n\t */\r\n\tpublic void setLastName(java.lang.String newLastName);\r\n\t/**\r\n\t * Get accessor for persistent attribute: emailAddress\r\n\t */\r\n\tpublic java.lang.String getEmailAddress();\r\n\t/**\r\n\t * Set accessor for persistent attribute: emailAddress\r\n\t */\r\n\tpublic void setEmailAddress(java.lang.String newEmailAddress);\r\n\t/**\r\n\t * This method was generated for supporting the relationship role named todo.\r\n\t * It will be deleted/edited when the relationship is deleted/edited.\r\n\t */\r\n\tpublic java.util.Collection getTodo();\r\n\t/**\r\n\t * This method was generated for supporting the relationship role named todo.\r\n\t * It will be deleted/edited when the relationship is deleted/edited.\r\n\t */\r\n\tpublic void setTodo(java.util.Collection aTodo);\r\n\t/**\r\n\t * This is our method to get all todos for one person\r\n\t */\r\n\tpublic java.util.Collection getTodos();\r\n\tpublic boolean isPasswordCorrect(String password);\r\n}",
"@Override\n public boolean inserir(Pessoa p) {\n try {\n pessoa.getPessoas().add(p);\n serializar(arquivo2Serializado, pessoa);\n } catch (Exception ex) {\n Logger.getLogger(PessoaDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return true;\n }",
"public co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.soltec\n\t\t.datos_publicacion\n\t\t.ejb\n\t\t.sb\n\t\t.DatosPublicacionSTLocal create()\n\t\tthrows javax.ejb.CreateException;",
"public void insere (String nome)\n {\n //TODO\n }",
"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 salvar() {\n\n try {\n ClienteDao fdao = new ClienteDao();\n fdao.Salvar(cliente);\n\n cliente = new Cliente();\n//mesagem para saber se foi salvo com sucesso\n JSFUtil.AdicionarMensagemSucesso(\"Clente salvo com sucesso!\");\n\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n }",
"public void insert(Employee e) throws ClassNotFoundException, SQLException;",
"public int insert(IEntity entity) throws SQLException;",
"public ClientePk insert(Cliente dto) throws ClienteDaoException;",
"@Override\n\tpublic int insert(Object ob) {\n\t\t\n\t\tint res = session.insert(\"party.party_insert_one\",ob);\n\t\t\n\t\treturn res;\n\t}",
"@Override\n public void salvar(EntidadeDominio entidade) throws SQLException\n {\n\t\n }",
"public static void insertFournisseur(Fournisseur unFournisseur ) {\n Bdd uneBdd = new Bdd(\"localhost\", \"paruline \", \"root\", \"\");\n\n String checkVille = \"CALL checkExistsCity('\" + unFournisseur.getVille() + \"','\" + unFournisseur.getCp() + \"');\";\n try {\n uneBdd.seConnecter();\n Statement unStat = uneBdd.getMaConnection().createStatement();\n\n ResultSet unRes = unStat.executeQuery(checkVille);\n\n int nb = unRes.getInt(\"nb\");\n\n if (nb == 0) {\n String ajoutVille = \"CALL InsertCity('\" + unFournisseur.getVille() + \"', '\" + unFournisseur.getCp() + \"');\";\n\n try {\n Statement unStatAjout = uneBdd.getMaConnection().createStatement();\n\n unStatAjout.executeQuery(ajoutVille);\n unStatAjout.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + ajoutVille);\n }\n }\n\n String id = \"CALL GetCity('\" + unFournisseur.getVille() + \"', '\" + unFournisseur.getCp() + \"')\";\n\n try {\n Statement unStatId = uneBdd.getMaConnection().createStatement();\n\n ResultSet unResId = unStatId.executeQuery(id);\n\n int id_city = unResId.getInt(\"id_city\");\n\n\n\n String insertFournisseur = \"INSERT INTO fournisseur(id_city, name_f, adresse_f, phoneFour) VALUES (\" + id_city + \", '\" + unFournisseur.getNom() + \"', \" +\n \"'\" + unFournisseur.getAdresse() + \"', '\" + unFournisseur.getTelephone() + \"')\";\n\n try {\n Statement unStatFourn = uneBdd.getMaConnection().createStatement();\n unStatFourn.executeQuery(insertFournisseur);\n\n unStatFourn.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + insertFournisseur);\n }\n\n unResId.close();\n unStatId.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + id);\n }\n\n unRes.close();\n unStat.close();\n uneBdd.seDeConnecter();\n } catch (SQLException exp) {\n System.out.println(\"Erreur : \" + checkVille);\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 void insertaMensaje(InfoMensaje m) throws Exception;",
"@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}",
"public com.vh.locker.ejb.Contact create(java.lang.Long id, java.lang.String name, java.lang.String nickName, java.lang.String phone, java.lang.String email, com.vh.locker.ejb.User anUser) throws javax.ejb.CreateException;",
"public void daoInsertar(Miembro m) throws SQLException {\r\n\t\t\r\n\t\tPreparedStatement ps= con.prepareCall(\"INSERT INTO miembros (nombre, apellido1, apellido2, edad, cargo)VALUES(?,?,?,?,?)\");\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.executeUpdate();\r\n\t\tps.close();\r\n\t}",
"public void guardar() {\n try {\n if (this.buscarCodApelacion()) {\n Dr_siseg_usuarioBean usuario = new Dr_siseg_usuarioBean();\n FacesContext facesContext = FacesContext.getCurrentInstance();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n apelacionesDao.INSERTA_APELACIONES(apelacionesBean); \n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.apelacionesBean.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"0\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue insertada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n this.apelacionesBean = new ApelacionesBean();\n addMessage(\"Guadado Exitosamente\", 1);\n } else {\n addMessage(\"La solicitud de apelacion especificada no existe\", 1);\n this.Listar();\n }\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al insertar el registro, contacte al administrador del sistema\", 1);\n }\n }",
"public void create(Querellante quere) throws IOException, SQLException {\n con = getConnection();\n cs = con.prepareCall(\"Call create_persona(?,?,?,?,?,?)\");\n cs.setEscapeProcessing(true);\n cs.setString(1, quere.getNombre());\n cs.setString(2, quere.getApellido());\n cs.setInt(3, quere.getCedula());\n cs.setInt(4, quere.getTelefono());\n cs.setString(5, quere.getDireccion());\n cs.setInt(6, 3);\n cs.execute();\n\n con.close();\n\n }",
"@Override\r\n\tpublic int insertEmployee(Connection con, Employee employee) {\n\t\treturn 0;\r\n\t}",
"public void addRegistro(String nombre, String apellidos, String dni) {\r\n\t\t\r\n\t\tSession ss = Util.getSessionFactory().openSession();\r\n\t\tTransaction tr = null;\r\n\t\ttry {\r\n\t\t\ttr = ss.beginTransaction();// comenzamos a hacer cositas\r\n\t\t\t// id incremental,por eso pongo cero\r\n\t\t\tPersona p = new Persona(0, nombre, apellidos, dni);\r\n\t\t\tss.save(p);\r\n\t\t\ttr.commit();\r\n\t\t} catch (HibernateException e) {\r\n\t\t\tSystem.out.println(\"Pako_error= \" + e);\r\n\t\t} finally {\r\n\t\t\tss.close();\r\n\t\t\t// System.out.println(\"Final\");\r\n\t\t}\r\n\t}",
"public void nuevoPaciente(String idPaciente, String DNI, String nombres, String apellidos, String direccion, String ubigeo, String telefono1, String telefono2, String edad)\n {\n try\n {\n PreparedStatement pstm=(PreparedStatement)\n con.getConnection().prepareStatement(\"insert into \" + \" paciente(idPaciente, dui, nombres, apellidos, direccion, ubigeo, telefono1, telefono2, edad)\" + \"values (?,?,?,?,?,?,?,?,?)\");\n \n pstm.setString(1, idPaciente);\n pstm.setString(2, DNI);\n pstm.setString(3, nombres);\n pstm.setString(4, apellidos);\n pstm.setString(5, direccion);\n pstm.setString(6, ubigeo);\n pstm.setString(7, telefono1);\n pstm.setString(8, telefono2);\n pstm.setString(9, edad); \n \n pstm.execute();\n pstm.close();\n }\n catch(SQLException e)\n {\n System.out.print(e);\n }\n }",
"@Override\n public void insert(J34SiscomexMercadoriaAdi j34SiscomexMercadoriaAdi) {\n super.doInsert(j34SiscomexMercadoriaAdi);\n }",
"BeanPedido crearPedido(BeanCrearPedido pedido);",
"public void inseriEmpresa() throws IOException {\n\t\tString r;\n\t\tthis.vetEmpreas[this.nEmpresas] = new Empresa();\n\t\t\n\t\tSystem.out.println(\"Inseri o nome \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setNome(r);\n\n\t\tSystem.out.println(\"Inseri o CNPJ \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setCnpj(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o endereco \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setEndereco(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o email \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setEmail(r);\n\t\t\n\t\tSystem.out.println(\"Inseri InscricaoEstadual \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setInscricaoEstadual(r);\n\t\t\n\t\tSystem.out.println(\"Inseri Razao Social \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setRazaoSocial(r);\n\t\t\n\t\tthis.nEmpresas +=1;\n\t}",
"public OrdemDeServico inserir (OrdemDeServico servico) {\n\t\tservico.setId((Long) null);\n\t\treturn repoOrdem.save(servico);\n\t}",
"void adicionaComentario(Comentario comentario);",
"public void create(Membre membre) {\n try {\n// em = getEntityManager();\n// entManager.getTransaction().begin();\n entManager.persist(membre);\n// entManager.getTransaction().commit();\n } finally {\n// if (entManager.getTransaction() != null) {\n// entManager.close();\n// }\n }\n }",
"public void create(Personne pers) {\n\t\ttry{\n\t\t\tString req = \"INSERT INTO PERSONNE_1 (ID, Nom ,Prenom)\" + \"VALUES(?,?,?)\";\n\t\t\tPreparedStatement ps= connect.prepareStatement(req);\n\t\t\tps.setInt(1,ID);\n\t\t\tps.setString(2,pers.getNom());\n\t\t\tps.setString(3,pers.getPrenom());\n\t\t\tps.executeUpdate();\n\t\t\tID++;\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"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 }",
"public int insert(person p){\n\t\t\treturn j.update(\" insert into person (id,name,location,birthdate) \"+ \" values(?,?,?,?) \", new Object[] {p.getId(),p.getName(),p.getLocation(),new Timestamp(p.getDate().getTime())});\r\n\t\t\r\n\t}",
"public void crearActividad (Actividad a) {\r\n String query = \"INSERT INTO actividad (identificacion_navegate, numero_matricula, fecha, hora, destino, eliminar) VALUES (\\\"\" \r\n + a.getIdentificacionNavegante()+ \"\\\", \" \r\n + a.getNumeroMatricula() + \", \\\"\" \r\n + a.getFecha() + \"\\\", \\\"\" \r\n + a.getHora() + \"\\\", \\\"\" \r\n + a.getDestino()+ \"\\\" ,false)\";\r\n try {\r\n Statement st = con.createStatement();\r\n st.executeUpdate(query);\r\n st.close();\r\n JOptionPane.showMessageDialog(null, \"Actividad creada\", \"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 void insertClient(ClientVO clientVO);",
"@Override\n\tpublic Paciente registrar(Paciente t) {\n\t\treturn dao.save(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 }",
"public void insertUser() {}",
"private void registrarSolicitudBienEntidad(SolicitudBienEntidadDTO SolicitudBienEntidadDTO) {\n SolicitudBienEntidad solicitudBienEntidad = SolicitudBienEntidadHelper.toLevel1Entity(SolicitudBienEntidadDTO,\n null);\n em.persist(solicitudBienEntidad);\n }",
"public void crearEntidad() throws EntidadNotFoundException {\r\n\t\tif (validarCampos(getNewEntidad())) {\r\n\t\t\tif (validarNomNitRepetidoEntidad(getNewEntidad())) {\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_WARN, \"Advertencia: \", \"Nombre, Nit o Prejifo ya existe en GIA\"));\r\n\t\t\t} else {\r\n\t\t\t\tif (entidadController.crearEntidad(getNewEntidad())) {\r\n\t\t\t\t\tmensajeGrow(\"Entidad Creada Satisfactoriamente\", getNewEntidad());\r\n\t\t\t\t\tRequestContext.getCurrentInstance().execute(\"PF('entCrearDialog').hide()\");\r\n\t\t\t\t\tsetNewEntidad(new EntidadDTO());\r\n\t\t\t\t\tresetCodigoBUA();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmensajeGrow(\"Entidad No Fue Creada\", getNewEntidad());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlistarEntidades();\r\n\t\t\t// newEntidad = new EntidadDTO();\r\n\t\t\t// fechaActual();\r\n\t\t}\r\n\r\n\t}",
"int insert(ParUsuarios record);",
"public interface ITestJtaBiz {\n void insert(int id);\n}",
"public void insertPerson(Person p) throws DataAccessException {\n String sql = \"INSERT INTO persons (person_id, assoc_username, first_name, last_name, gender, \" +\n \"father_id, mother_id, spouse_id) VALUES(?,?,?,?,?,?,?,?)\";\n try(PreparedStatement stmt = conn.prepareStatement(sql)) {\n stmt.setString(1, p.getPerson_id());\n stmt.setString(2, p.getAssoc_username());\n stmt.setString(3, p.getFirst_name());\n stmt.setString(4, p.getLast_name());\n stmt.setString(5, p.getGender());\n stmt.setString(6, p.getFather_id());\n stmt.setString(7, p.getMother_id());\n stmt.setString(8, p.getSpouse_id());\n\n stmt.executeUpdate();\n } catch (SQLException e) {\n throw new DataAccessException(\"Error encountered while inserting into the database\");\n }\n }",
"public void insertarEmpleado(CLEmpleado cl) throws SQLException{\r\n String sql = \"{CALL sp_insertarEmpleado(?,?,?,?,?,?,?,?)}\";\r\n \r\n try{\r\n ps = cn.prepareCall(sql);\r\n ps.setString(1, cl.getPrimerNombre());\r\n ps.setString(2, cl.getSegundoNombre());\r\n ps.setString(3, cl.getPrimerApellido());\r\n ps.setString(4, cl.getSegundoApellido());\r\n ps.setString(5, cl.getDireccion());\r\n ps.setString(6, cl.getTelefonoCelular());\r\n ps.setInt(7, cl.getIdCargo());\r\n ps.setInt(8, 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 }",
"int insert(MVoucherDTO record);",
"public interface Mensaje_SMS_ACSLocal extends javax.ejb.EJBLocalObject {\n\t/**\n\t * Get accessor for persistent attribute: id\n\t */\n\tpublic java.lang.Long getId();\n\t/**\n\t * Set accessor for persistent attribute: id\n\t */\n\tpublic void setId(java.lang.Long newId);\n\t/**\n\t * Get accessor for persistent attribute: xml\n\t */\n\tpublic java.lang.String getXml();\n\t/**\n\t * Set accessor for persistent attribute: xml\n\t */\n\tpublic void setXml(java.lang.String newXml);\n\t/**\n\t * Get accessor for persistent attribute: peti_numero\n\t */\n\tpublic java.lang.Long getPeti_numero();\n\t/**\n\t * Set accessor for persistent attribute: peti_numero\n\t */\n\tpublic void setPeti_numero(java.lang.Long newPeti_numero);\n\t/**\n\t * Get accessor for persistent attribute: fecha_envio\n\t */\n\tpublic java.sql.Timestamp getFecha_envio();\n\t/**\n\t * Set accessor for persistent attribute: fecha_envio\n\t */\n\tpublic void setFecha_envio(java.sql.Timestamp newFecha_envio);\n\t/**\n\t * Get accessor for persistent attribute: usuario\n\t */\n\tpublic java.lang.String getUsuario();\n\t/**\n\t * Set accessor for persistent attribute: usuario\n\t */\n\tpublic void setUsuario(java.lang.String newUsuario);\n}",
"@Override\n\tpublic void add() {\n\t\tSystem.out.println(\"Injection to database : Oracle\");\n\t}",
"private void saveNewPerson() {\r\n\r\n\t\tSystem.out.println(\"Start Save new Patient...\");\r\n\r\n\t\ttry {\r\n\t\t\tIPerson p1 = new Person(\"admin\", new Role(Roles.ADMINISTRATOR,\r\n\t\t\t\t\t\"Hauptadministrator\"), \"Passwort\", \"[email protected]\", \"Vorname\",\r\n\t\t\t\t\t\"Nachname\", \"Organisation\", \"Abteilung\", \"Fachrichtung\",\r\n\t\t\t\t\t\"Strasse\", \"3e\", \"54321\", \"Ort\");\r\n\r\n\t\t\tp1.save();\r\n\t\t} catch (BusinesslogicException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t} catch (DatabaseException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"New Patient saved!!\");\r\n\t}",
"public void addPersona( Persona persona ) throws Exception \n\t{\n\n\t\tDAOPersona dao = new DAOPersona();\n\t\ttry\n\t\t{\n\t\t\tthis.conn = darConexion();\n\t\t\tdao.setConn(conn);\n\n\t\t\tdao.addPersona(persona);\n\n\t\t}\n\t\tcatch (SQLException sqlException) {\n\t\t\tSystem.err.println(\"[EXCEPTION] SQLException:\" + sqlException.getMessage());\n\t\t\tsqlException.printStackTrace();\n\t\t\tthrow sqlException;\n\t\t} \n\t\tcatch (Exception exception) {\n\t\t\tSystem.err.println(\"[EXCEPTION] General Exception:\" + exception.getMessage());\n\t\t\texception.printStackTrace();\n\t\t\tthrow exception;\n\t\t} \n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tdao.cerrarRecursos();\n\t\t\t\tif(this.conn!=null){\n\t\t\t\t\tthis.conn.close();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (SQLException exception) {\n\t\t\t\tSystem.err.println(\"[EXCEPTION] SQLException While Closing Resources:\" + exception.getMessage());\n\t\t\t\texception.printStackTrace();\n\t\t\t\tthrow exception;\n\t\t\t}\n\t\t}\n\t}",
"@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 insertarPaciente ( String dni, String nombre, String apellidos, String telefono,String emaail,float peso_actual, float peso_objetivo, float altura, int edad, String sexo, String password,String complexion);",
"@TransactionAttribute(TransactionAttributeType.REQUIRED)\n @Override\n public void registrarCompra(ArrayList<Mueble> muebles, Usuario cliente) throws OperacionInvalidaException {\n Mueble mueble;\n \n Usuario clienteConsultado = (Usuario) persistenciaOracle.findById(Usuario.class, cliente.getLogin()); \n \n if (!muebles.isEmpty()) {\n for (int i = 0; i < muebles.size(); i++) {\n mueble = muebles.get(i);\n \n Mueble editar = (Mueble) persistenciaOracle.findById(Mueble.class, mueble.getReferencia());\n\n if (editar != null) {\n editar.setCantidad(editar.getCantidad() - mueble.getCantidad());\n RegistroVenta compra = new RegistroVenta(new Date(System.currentTimeMillis()), mueble, mueble.getCantidad(), null, cliente);\n clienteConsultado.agregarRegistro(compra);\n\n persistenciaOracle.update(clienteConsultado);\n persistenciaOracle.update(editar);\n\n } else {\n throw new OperacionInvalidaException(\"Mueble no existe.\");\n }\n }\n } else {\n throw new OperacionInvalidaException(\"Lista de muebles vacia.\");\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 EspecieEntity inserta(EspecieEntity entity){\r\n em.persist(entity);\r\n return entity;\r\n }",
"int insert(ProEmployee record);",
"void insert(CTipoComprobante record) throws SQLException;",
"@Override\n public Mechanic addEmployee(Mechanic mechanic) {\n LOGGER.info(\"Create new Mechanic in the database\");\n return mechanicRepository.save(mechanic);\n }",
"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 }",
"public TipoPk insert(Tipo dto) throws TipoDaoException;",
"int insertName(String nmNameLast, int idPerson);",
"public interface Bitacora_peticionLocalHome extends javax.ejb.EJBLocalHome {\n\t/**\n\t * Creates an instance from a key for Entity Bean: Bitacora_peticion\n\t */\n\t static final String JNDI_NAME=\"ejb/co/com/telefonica/atiempo/ejb/eb/Bitacora_peticionLocalHome\";\n\tpublic co.com.telefonica.atiempo.ejb.eb.Bitacora_peticionLocal create(\n\t\tjava.lang.Long bipe_id)\n\t\tthrows javax.ejb.CreateException;\n\t/**\n\t * Finds an instance using a key for Entity Bean: Bitacora_peticion\n\t */\n\tpublic co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.ejb\n\t\t.eb\n\t\t.Bitacora_peticionLocal findByPrimaryKey(\n\t\tco.com.telefonica.atiempo.ejb.eb.Bitacora_peticionKey primaryKey)\n\t\tthrows javax.ejb.FinderException;\n\t/**\n\t * Creates an instance from a key for Entity Bean: Bitacora_peticion\n\t */\n\tpublic co.com.telefonica.atiempo.ejb.eb.Bitacora_peticionLocal create(\n\t\tjava.lang.Long bipe_id,\n\t\tjava.lang.Long usua_id,\n\t\tjava.sql.Timestamp bipe_fecha_inicio,\n\t\tco.com.telefonica.atiempo.ejb.eb.ActividadLocal argFk_acti_2_bipe,\n\t\tco.com.telefonica.atiempo.ejb.eb.PeticionLocal argFk_peticion)\n\t\tthrows javax.ejb.CreateException;\n\n\t/**\n\t * @param idActividad\n\t * @param object\n\t * @param idPeticion\n\t * @param idUsuario\n\t * @param date\n\t * @param object2\n\t * @param object3\n\t * @param esReversa\n\t * @return\n\t */\n\tpublic co.com.telefonica.atiempo.ejb.eb.Bitacora_peticionLocal create(\n\t\tLong idActividad,\n\t\tLong idCausa,\n\t\tLong peticion,\n\t\tLong usuaId,\n\t\tDate bipeFechaInicio,\n\t\tDate bipeFechaFin,\n\t\tString bipeObservacion,\n\t\tShort esReversa)\n\t\tthrows CreateException;\n\n\tpublic java.util.Collection findbyNumeroPeticion(java.lang.Long idPeticion) throws javax.ejb.FinderException;\n//\tpublic java.util.Collection findFechaFin(java.lang.Long idPeticion) throws javax.ejb.FinderException;\n//\n\tpublic java.util.Collection findByPetiOrden(java.lang.Long idPeticion) throws javax.ejb.FinderException;\n\tpublic Bitacora_peticionLocal findByPeticionActividad(java.lang.Long idPeticion, java.lang.Long idActividad) throws javax.ejb.FinderException;\n\tpublic Bitacora_peticionLocal findByPeticionActividadUsuario(java.lang.Long idPeticion, java.lang.Long idActividad, java.lang.Long idUsuario)\n\t\tthrows javax.ejb.FinderException;\n//\t//public Bitacora_peticionLocal findNumPeticionActividad(java.lang.Long numPeticion) throws javax.ejb.FinderException;\n//\tpublic java.util.Collection findByPeticionFechaTerminoNula(java.lang.Long nroPeticion) throws javax.ejb.FinderException;\n//\tpublic Bitacora_peticionLocal findObsPeticionActividad(java.lang.Long numeroPeticion, java.lang.Long numeroActividad)\n//\t\tthrows javax.ejb.FinderException;\n//\tpublic Bitacora_peticionLocal findByCodigoObservacionPeticion(java.lang.Long peticion) throws javax.ejb.FinderException;\n//\tpublic Bitacora_peticionLocal findByIdPeticionAndMdfTerminada(java.lang.Long idPeticion) throws javax.ejb.FinderException;\n//\t\n\tpublic java.util.Collection findbyPeticionRol(java.lang.Long idPeticion, java.lang.Long idRol) throws javax.ejb.FinderException;\n//\tpublic java.util.Collection findByPeticionActividadNoNula(java.lang.Long idPeticion, java.lang.Long idActividad) throws javax.ejb.FinderException;\n\tpublic java.util.Collection findByPeticionActividadCerrada(java.lang.Long petiNumero, java.lang.Long actId) throws javax.ejb.FinderException;\n\tpublic java.util.Collection findPreviuosActivity(java.lang.Long petiNumero)\n\t\tthrows javax.ejb.FinderException;\n\tpublic java.util.Collection findbypeticionfechafin(java.lang.Long idPeticion)\n\t\tthrows javax.ejb.FinderException;\n\tpublic java.util.Collection findByOpenAct(java.lang.Long idActividad)\n\t\tthrows javax.ejb.FinderException;\n\tpublic co.com.telefonica.atiempo.ejb.eb.Bitacora_peticionLocal findbyMaxActivity(java.lang.Long idPeticion, java.lang.Long idActividad) throws javax.ejb.FinderException;\n}",
"public int addSickPerson(SickPerson sickPerson) throws SQLException;",
"public void ejbCreate() {\n\n }",
"public void adicionar() {\n String sql = \"insert into empresa(empresa, cnpj, endereco, telefone, email) values (?,?,?,?,?)\";\n try {\n pst = conexao.prepareStatement(sql);\n pst.setString(1, txtEmpNome.getText());\n pst.setString(2, txtEmpCNPJ.getText());\n pst.setString(3, txtEmpEnd.getText());\n pst.setString(4, txtEmpTel.getText());\n pst.setString(5, txtEmpEmail.getText());\n // validacao dos campos obrigatorios\n if ((txtEmpNome.getText().isEmpty()) || (txtEmpCNPJ.getText().isEmpty())) {\n JOptionPane.showMessageDialog(null, \"Preencha todos os campos obrigatórios\");\n } else {\n //a linha abaixo atualiza a tabela usuarios com os dados do formulario\n // a esttrutura abaixo confirma a inserção na tabela\n int adicionado = pst.executeUpdate();\n if (adicionado > 0) {\n JOptionPane.showMessageDialog(null, \"Empresa adicionada com sucesso\");\n txtEmpNome.setText(null);\n txtEmpEnd.setText(null);\n txtEmpTel.setText(null);\n txtEmpEmail.setText(null);\n txtEmpCNPJ.setText(null);\n }\n }\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }",
"@Override\r\n public void createNewEntity(String entityName) {\n\r\n }",
"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 }",
"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 interface ClienteDAO {\n public Cliente registrarCliente(Cliente cliente);\n}",
"public void create(Joueur joueur) {\n EntityManager em = EntityManagerHolder.getCurrentEntityManager();\n EntityTransaction tx = null;\n\n try {\n// session = HibernateUtil.getSessionFactory().getCurrentSession();\n// tx = session.beginTransaction();\n// session.persist(joueur);\n tx = em.getTransaction();\n em.persist(joueur);\n //declenche l'ajout d'un ou plusieurs elements -> synchronisation de la session et de la BDD\n\n System.out.println(\"Joueur créé avec succès\");\n } catch (Exception e) {\n\n e.printStackTrace();\n } finally {\n if (em != null) {\n em.close();\n }\n }\n }",
"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}"
]
| [
"0.6551312",
"0.6532561",
"0.64553714",
"0.6371315",
"0.6348985",
"0.629687",
"0.6294743",
"0.6288262",
"0.628412",
"0.6265861",
"0.6239593",
"0.62254846",
"0.6222187",
"0.6196842",
"0.61903894",
"0.61847955",
"0.6181854",
"0.6165012",
"0.6162576",
"0.61557615",
"0.6152212",
"0.61305743",
"0.61183304",
"0.6096844",
"0.6089423",
"0.6085106",
"0.6076911",
"0.60762995",
"0.6068728",
"0.6054399",
"0.6052419",
"0.6048593",
"0.6043688",
"0.6035357",
"0.6033473",
"0.60325724",
"0.6018315",
"0.6013233",
"0.60013545",
"0.5984756",
"0.598167",
"0.5981665",
"0.59809107",
"0.5971162",
"0.59681046",
"0.5960393",
"0.59584284",
"0.5955214",
"0.59536356",
"0.5950555",
"0.5942141",
"0.59367394",
"0.5934648",
"0.59309316",
"0.5917938",
"0.5914017",
"0.59118336",
"0.5910923",
"0.59084064",
"0.5906914",
"0.5900122",
"0.58832407",
"0.5879711",
"0.58790284",
"0.58771205",
"0.5873405",
"0.5870995",
"0.58673126",
"0.5861401",
"0.58523124",
"0.58521193",
"0.5847363",
"0.5845209",
"0.5844176",
"0.584185",
"0.584163",
"0.5841484",
"0.5838473",
"0.5833021",
"0.5832865",
"0.58315945",
"0.582434",
"0.5823939",
"0.58183604",
"0.5816498",
"0.5814853",
"0.58116704",
"0.58074164",
"0.5806512",
"0.5806452",
"0.5805852",
"0.5803611",
"0.58008367",
"0.5799161",
"0.579317",
"0.57848305",
"0.5783704",
"0.5783165",
"0.5781478",
"0.5778086",
"0.5774294"
]
| 0.0 | -1 |
Metodo que retorna el campo dto | public GrupoDTO getDto() {
return this.dto;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public PropertyDefDto getDto();",
"public abstract D convertToDto(T entity);",
"V toDto(E entity);",
"@Override\r\n\tpublic AbstractDto mapToDto() {\n\t\treturn null;\r\n\t}",
"D mapToDTO(E entity);",
"public abstract DTO toDTO(M model);",
"public default D toDto(E entity) {\n\t\tif (entity == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn DtoUtilService.staticDtoFromEntity(getDtoClass(), entity);\n\t\t}\n\t}",
"public AtendimentoJuridicoDTO toDTO(AtendimentoJuridicoEntity entity){\n\t\tAtendimentoJuridicoDTO dto = new AtendimentoJuridicoDTO();\n\t\tBeanUtils.copyProperties(entity, dto); \n\t\treturn dto ;\n\t}",
"public abstract T convertToEntity(D dto);",
"@Override\n\tpublic BaseFWDTOImpl toDTO() {\n\t\treturn null;\n\t}",
"PersonaDTO PersonaToPersonaDTO(Persona persona);",
"public ModelDto getModelDto() {\r\n\t\tlog.debug(\" getter modelDto=\"+modelDto);\r\n\t\treturn modelDto;\r\n\t}",
"public abstract M toModel(DTO dto);",
"public FilmTypeDto convertEntityToDto(FilmType entity){\n\t\tFilmTypeDto dto = new FilmTypeDto();\n\t\tif(entity!=null){\n\t\t\tdto.setId(entity.getId());\n\t\t\tdto.setVersion(entity.getVersion());\n\t\t\tdto.setDescription(entity.getDescription());\n\t\t}\n\t\treturn dto;\n\t}",
"public DatatypeDto instantiateDto(Datatype poso) {\n\t\tDatatypeDto dto = DatatypeDto.String;\n\t\treturn dto;\n\t}",
"default ShopDTO entityToDto(Shop entity) {\n ShopDTO dto = ShopDTO.builder()\n .productID(entity.getProductID())\n .product(entity.getProduct())\n .image(entity.getImage())\n .content(entity.getContent())\n .price(entity.getPrice())\n .count(entity.getCount())\n .regDate(entity.getRegDate())\n .modDate(entity.getModDate())\n .build();\n return dto;\n }",
"Persona PersonaDTOToPersona(PersonaDTO personaDTO);",
"AccountDTO toDTO(Account account);",
"public BUserDto convertEntityToDto(BUser entity){\n\t\tBUserDto dto = new BUserDto();\n\t\tif(entity!=null){\n\t\t\tdto.setId(entity.getId());\n\t\t\tdto.setUsername(entity.getUsername());\n\t\t}\n\t\treturn dto;\n\t}",
"ExerciseDTO convertToExerciseDTO(Exercise exercise);",
"public GetUsuarioDTO convierteDTO(Integer id){\n Optional<Usuario> usuario = usuarioRepository.findById(id);\n return usuario.map(usuarioDTOConverter::convertToDTO).orElseThrow(()->new UsuarioNotFoundException(id));\n }",
"public PersonaDTO(){}",
"public ConnectionDTO getDto() {\n return dto;\n }",
"public ReportDTO convertToDTO() {\n return new ReportDTO()\n .id(id)\n .email(email)\n .type(type)\n .content(content)\n .status(status)\n .reporter((reporter != null) ? reporter.convertToDTO() : null)\n .announcement(announcement.convertToDTO())\n .createdAt(createdAt);\n }",
"@Override\r\n\tpublic TableDTO getDTO(Table entity) {\n\t\treturn null;\r\n\t}",
"public Dto() {\n \t\n }",
"public ProductoDTO(){\r\n\t\t\r\n\t}",
"StudentDTO toStudentDTO(Student student);",
"@Override\r\n\tpublic MainDTO toDTO() {\n\t\tFamiliaresDTO familiaresDTO = new FamiliaresDTO();\r\n\t\tDomicilioDTO domicilioDTO = null;\r\n\t\tfamiliaresDTO.setIdfamiliar(this.getIdFamiliar());\r\n\t\tfamiliaresDTO.setNombre(this.getNombre());\r\n\t\tfamiliaresDTO.setApellidoPaterno(this.getApellidoPaterno());\r\n\t\tfamiliaresDTO.setApellidoMaterno(this.getAppelidoMaterno());\r\n\t\tfamiliaresDTO.setDireccion(this.getDireccion());\r\n\t\tfamiliaresDTO.setIdpaciente(this.getIdpaciente());\r\n\t\tfamiliaresDTO.setDependencia(this.getDependencia());\r\n\t\tdomicilioDTO = (DomicilioDTO) this.getDomicilio().toDTO();\r\n\t\tfamiliaresDTO.setDomicilio(domicilioDTO);\r\n\t\treturn familiaresDTO;\r\n\t}",
"public DTOType getDTOType() {\n return DTO_TYPE;\n }",
"private UserDto mapFromUserToDto(User user) {\n UserDto userDto = new UserDto();\n userDto.setId(user.getId());\n userDto.setUsername(user.getUserName());\n userDto.setName(String.format(\"%s %s\", user.getFirstName(), user.getLastName()));\n userDto.setEmail(user.getEmail());\n userDto.setAvatar(user.getAvatar());\n return userDto;\n }",
"protected abstract void processDTO();",
"public ProcessDataDTO buildDto(ProcessData grpc) throws JsonParseException, JsonMappingException, IOException {\n\t\tProcessDataDTO dto = new ProcessDataDTO();\n\t\tdto.setId(\"\".equals(grpc.getId()) ? null : grpc.getId());\n\t\tdto.setDataTypeId(grpc.getDataTypeId());\n\t\tdto.setThingGroupId(grpc.getThingGroupId());\n\t\tDate createdAt = new Date(grpc.getCreatedAt().getSeconds());\n\t\tdto.setCreatedAt(createdAt);\n\t\tdto.setPayload(grpc.getPayload());\n\t\t\n\t\treturn dto;\n\t}",
"public static UserDTO mapEntityIntoDTO(UserEntity entity) {\n \tif (entity == null) {\n \t\treturn null;\n \t}\n \n \tUserDTO dto = new UserDTO();\n \t\n \tdto.setLogin(entity.getLogin());\n\n \tdto.setPassword(entity.getPassword());\n \t// mapValue(entity, dto, \"password\");\n\n \t//dto.setQuota(entity.getQuota());\n \tModelDTOMapper.readEntityFieldToDto(dto, \"quota\", entity, \"quota\", new ConvertIntToLong());\n \t\n \t// dto.setEnabled(entity.getEnabled());\n \tModelDTOMapper.readEntityFieldToDto(dto, entity, \"enabled\");\n return dto;\n }",
"RunDTO toDto(Run run) {\n RunDTO result = new RunDTO();\n result.setId(0L);\n if (null != run) {\n this.fillDto(result, run);\n }\n return result;\n }",
"public static EmployeeDTO valueOf(Employee employee){\n EmployeeDTO employeeDTO = new EmployeeDTO();\n BeanUtils.copyProperties(employee, employeeDTO);\n// employeeDto.setId( employee.getId() );\n// employeeDto.setFirstName( employee.getFirstName() );\n\n return employeeDTO;\n\n }",
"public ProdutoDTO()\n {\n super();\n }",
"E mapToEntity(D dto);",
"OrderDto map(Order order);",
"E toEntity(V dto);",
"public MyNoteDto getCurrentMyNoteDto();",
"private static PlayerDto getPlayerDto(Player player) {\n return player != null ? PlayerDto.builder()._id(player.get_id()).build() : null;\n }",
"public static <Entity,Dto> Dto entityToDTO(Entity entity,Class<Dto> classDTO)\n\t{\n\t\tModelMapper mapper = new ModelMapper();\n\t\treturn mapper.map(entity, classDTO);\n\t}",
"TicketDTO ticketToTicketDTO(Ticket ticket);",
"public static ReadingDTO mapToDTO(Reading reading) {\n if (Objects.isNull(reading)) {\n return null;\n }\n ReadingDTO dto = newReadingDTO();\n dto.setDateTime(reading.getDateTime());\n dto.setValue(reading.getValue());\n return dto;\n }",
"public HojaDeVidaDTO getHojaDeVida() {return hojaDeVida;}",
"List<D> mapToDTO(List<E> entity);",
"public final UnitDTO getDTO(Player player) {\n if (player == Player.SYSTEM || this.isDetected(player)) {\n return new UnitDTO(this.getId(),\n this.details.getId(),\n this.owner.getDTO(),\n this.currentHitPoints,\n this.details.getMaxHitPoints(),\n this.currentMovementAllowance,\n this.details.getMaxMovementAllowance(),\n this.isCloaked(),\n this.getUnitType());\n }\n return null;\n }",
"public static SystemDTO entityToDTO(final System entity){\n\t\tfinal SystemDTO result = new SystemDTO();\n\t\t\n\t\tresult.setCode(entity.getCode());\n\t\tresult.setName(entity.getName());\n\t\tresult.setId(entity.getId());\n\t\t\n\t\treturn result;\n\t}",
"public OrderDTO toDto( Order order ) {\n\t\treturn transform.orderToDto( order );\n\t}",
"private TimeEntryDto convertTimeEntryToDto(final TimeEntry timeEntry) {\n\t\tfinal TimeEntryDto timeEntryDto = new TimeEntryDto();\n\t\ttimeEntryDto.setId(Optional.of(timeEntry.getId()));\n\t\ttimeEntryDto.setDate(this.dateFormat.format(timeEntry.getDate()));\n\t\ttimeEntryDto.setType(timeEntry.getType().toString());\n\t\ttimeEntryDto.setDescription(timeEntry.getDescription());\n\t\ttimeEntryDto.setLocation(timeEntry.getLocation());\n\t\ttimeEntryDto.setEmployeeId(timeEntry.getEmployee().getId());\n\n\t\treturn timeEntryDto;\n\t}",
"private ItemDTO convertIntoItemDTO(Item item) {\n if (null == item) {\n return null;\n }\n ItemDTO itemDTO = new ItemDTO();\n itemDTO.setObjectID(item.getObjectID());\n itemDTO.setTitle(item.getTitle());\n itemDTO.setDescription(item.getDescription());\n itemDTO.setType(item.getType());\n itemDTO.setPicture(item.getPicture().toString());\n itemDTO.setPicture(\"\");\n itemDTO.setStock(item.getStock());\n return itemDTO;\n }",
"public UserDto() {\n }",
"RealtorProductDTO getrealtorProductDTO(int sr_no);",
"private HistoryDTO convertEntityToDTO(History history) {\n\t\tHistoryDTO historyDto = modelMapper.map(history, HistoryDTO.class);\n\t\treturn historyDto;\n\t}",
"@Override\n\tpublic ExamDTO toDto(Exam exam) {\n\t\treturn null;\n\t}",
"public CambioComplementariosDTO() { }",
"private OfferedServiceDto convertToDto(OfferedService s) {\n\t\tif (s == null) {\n\t\t\tthrow new InvalidInputException(\"There is no such OfferedService!\");\n\t\t}\n\t\tOfferedServiceDto offerServiceDto = new OfferedServiceDto(s.getOfferedServiceId(), s.getPrice(),\n\t\t\t\ts.getName(),s.getDuration(), s.getReminderTime(),s.getReminderDate(), s.getDescription());\n\t\treturn offerServiceDto;\n\n\t}",
"CommentDto entityToDto(Comment comment);",
"public TransportDTO makeDTO(ResultSet RS) {\n TransportDTO output = null;\n Connection conn = Repository.getInstance().connect();\n OrderDAO OrderDAO = new OrderDAO();\n try {\n String date = RS.getString(2);\n int weight = RS.getInt(1);\n String driverID = RS.getString(5);\n String Truckplate = RS.getString(4);\n int transportID = RS.getInt(3);\n List<OrderDTO> Orders = new ArrayList<OrderDTO>();\n boolean wasDel = RS.getString(6).equals(\"true\");\n ResultSet contractsRS = getWithInt(\"TransportsOrders\", \"TransportID\", transportID,conn);\n while (contractsRS.next()) {\n int OrderID = contractsRS.getInt(1);\n Orders.add(OrderDAO.get(OrderID));\n }\n output = new TransportDTO(date, weight, driverID, Truckplate, Orders, wasDel, transportID);\n } catch (Exception e) {\n output = null;\n }\n finally{\n Repository.getInstance().closeConnection(conn);\n }\n return output;\n }",
"public DtoType getDto(EntityType entity, Class<DtoType> myClass) throws ClassNotFoundException, InstantiationException, IllegalAccessException;",
"AccountDTO coverAccountToEmpDTO(Account account);",
"public PersonaDTO obtenerPersona(Long idPersona) throws CustomErrorException {\n\t\tPersonaDTO personaDTO = new PersonaDTO();\n\t\ttry {\n\t\t\tpersonaDTO = Converter.toDto((Persona) gPersona.getById(idPersona)); \n\t\t} catch (CustomErrorException cer) {\n\t\t\tthrow cer;\n\t\t} catch (Exception e) {\n\t\t\tthrow new CustomErrorException(CustomErrorException.ERROR_SERVICIO,this.getClass().getSimpleName(),e.getStackTrace());\n\t\t}\n\n\t\treturn personaDTO;\n\t}",
"public GrupoUsuarioDTO() {\n }",
"public interface IReglaUtilDTO {\n\n\t/**\n\t * To business.\n\t * \n\t * @param reglaDTO\n\t * the regla dto\n\t * @return the regla\n\t * @throws TransferObjectException\n\t * the transfer object exception\n\t */\n\tRegla toBusiness(ReglaDTO reglaDTO) throws TransferObjectException;\n\n\t/**\n\t * To rest.\n\t * \n\t * @param regla\n\t * the regla\n\t * @return the regla dto\n\t * @throws TransferObjectException\n\t * the transfer object exception\n\t */\n\tReglaDTO toRest(Regla regla) throws TransferObjectException;\n\n\t/**\n\t * To rest info.\n\t * \n\t * @param regla\n\t * the regla\n\t * @return the regla dto\n\t * @throws TransferObjectException\n\t * the transfer object exception\n\t */\n\tReglaDTO toRestInfo(Regla regla) throws TransferObjectException;\n}",
"public static RoomDTO newDTO() {\n\n RoomDTO roomDTO = new RoomDTO();\n return roomDTO;\n }",
"public void crearPersona(PersonaDTO personaDTO);",
"public static EtudiantDto toDto(Etudiant stud) {\n\t\tUserDto uDto = UserDto.toUserDto(stud.getUser());\n\t\tEtudiantDto studDto = new EtudiantDto(stud.getId(), stud.getNom(), stud.getPrenom(), stud.getEmail(), stud.getTel(), uDto);\n\t\treturn studDto;\n\t}",
"@Test\n public void testConvertComputerToComputerDTO() {\n ComputerDTO computerDTO = new ComputerDTO();\n computerDTO.setId(1);\n computerDTO.setName(\"test\");\n ComputerDTO computerResult = DTOMapper.fromComputer(new Computer.Builder(\"test\").id(1L).build());\n assertEquals(computerDTO, computerResult);\n }",
"private UserDTO createUserDto(User userToReturn) {\n\t\tList<Account> accounts = userToReturn.getAccounts();\r\n\t\tList<AccountDTO> accountsDTO = new ArrayList<AccountDTO>(\r\n\t\t\t\taccounts != null ? accounts.size() : 0);\r\n\t\tif (accounts != null) {\r\n\t\t\tfor (Account account : accounts) {\r\n\t\t\t\taccountsDTO.add(new AccountDTO(account.getId(), account\r\n\t\t\t\t\t\t.getRib(), account.getOpeningDate(),\r\n\t\t\t\t\t\taccount.getSolde(), account.getType(), null, null,\r\n\t\t\t\t\t\tnew UserDTO(), null, null));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new UserDTO(userToReturn.getId(), userToReturn.getLogin(),\r\n\t\t\t\tuserToReturn.getPassword(), userToReturn.getFullName(),\r\n\t\t\t\taccountsDTO);\r\n\t}",
"public NameDTO() {\r\n this.firstName = \"\";\r\n this.lastName = \"\";\r\n }",
"@Override\n\tpublic ExperienceDTO domainToDto(Experience experience) {\n\t\treturn mapperFacade.map(experience, ExperienceDTO.class);\n\t}",
"private CategoryDTO getCategoryDto(){\n\t\tCategoryDTO category = new CategoryDTO(Long.valueOf(1L), \"categoryName\", \"categoryDesc\");\n\t\treturn category;\n\t}",
"private EmployeeDto toDto(Employee employee){\n\t\tEmployeeDto employeeDto = new EmployeeDto();\n\t\temployeeDto.id = employee.getId();\n\n\t\temployeeDto.name = employee.getName();\n\t\temployeeDto.email = employee.getEmail();\n\n\t\temployeeDto.jobTypeId = employee.getJobtype().getId();\n\n\t\temployeeDto.bossId = employee.getBossId();\n\n\t\temployeeDto.netPayment = employee.getNetPayment();\n\t\temployeeDto.grossPayment = employee.getGrossPayment();\n\t\temployeeDto.employerTotalCost = employee.getEmployerTotalCost();\n\t\temployeeDto.workHours = employee.getWorkHours();\n\n\t\temployeeDto.children = employee.getChildren();\n\n\t\temployeeDto.workStatus = employee.getWorkStatus().getStringValue();\n\n\t\temployeeDto.isEntrant = employee.isEntrant();\n\t\temployeeDto.isJustMarried = employee.isJustMarried();\n\t\temployeeDto.isSingleParent = employee.isSingleParent();\n\n\t\treturn employeeDto;\n\t}",
"public TcUnidadEdoDTO() {\n }",
"@Override\n\tpublic Medico createMedicoFromDto(MedicoDTO medicoDto) {\n\t\treturn null;\n\t}",
"public Object convListToDTO(List list) {\r\n\r\n\t\tObject retDTO = null;\r\n\t\ttry {\r\n\r\n\t\t\tListIterator iterator = list.listIterator();\r\n\t\t\twhile (iterator.hasNext()) {\r\n\r\n\t\t\t\tretDTO = iterator.next();\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t}\r\n\r\n\t\treturn retDTO;\r\n\r\n\t}",
"public PageDto getPageDto() {\n return pageDto;\n }",
"public ClientPropertyDto mapToDto(ClientProperty property)\r\n\t{\r\n\t\tClientPropertyDto dto = new ClientPropertyDto();\r\n\t\tdto.setKey(property.getKey());\r\n\t\tdto.setValue(property.getValue());\r\n\t\tdto.setId(property.getId());\r\n\t\tdto.setDelete(false);\r\n\t\tdto.setClient(clientMapper.mapToDto(property.getClient()));\r\n\r\n\t\treturn dto;\r\n\t}",
"public EmployeeResponse convertToDto(Employee employee) {\n return new EmployeeResponse(employee.getId(), employee.getName(), employee.getSalary().getValue());\n }",
"public static UserDTO getUserDTO(UserEntity userEntity) {\n\t\tUserDTO dto = null;\n\t\tif (userEntity != null) {\n\t\t\tdto = new UserDTO();\n\n\t\t\tdto.setUserId(userEntity.getUserId());\n\t\t\tdto.setInsertDate(userEntity.getInsertDate());\n\t\t\tdto.setUpdateDate(userEntity.getUpdateDate());\n\t\t\tdto.setName(userEntity.getUserName());\n\t\t\tdto.setEmail(userEntity.getUserEmail());\n\t\t\tdto.setPassword(userEntity.getUserPassword());\n\t\t\tdto.setIsActive(userEntity.getIsActive());\n\t\t\tdto.setLastLogin(userEntity.getLastLogin());\n\t\t}\n\t\treturn dto;\n\t}",
"WordDtoImpl convertFromDomainImpl(Word word);",
"public static UserDto getUserDtoById(Integer id) {\n\t\t// create a new UserDaoImpl\n\t\tud = new UserDaoImpl();\n\t\tlogger.info(\"UserDaoImpl created\");\n\n\t\t// get the record that with id as the primary key as a User Object\n\t\tUser user = ud.selectUserById(id);\n\t\tlogger.info(\"User selected from database\");\n\t\tlogger.debug(\"User: \" + user);\n\t\t// create the UserDto\n\t\tUserDto usr = new UserDto(user.getId(), user.getUsername(), user.getfName(), user.getlName(), user.getPriv(),\n\t\t\t\tuser.getActivation());\n\t\tlogger.info(\"UserDto created\");\n\t\tlogger.debug(\"UserDto: \" + usr);\n\t\tlogger.info(\"Returning UserDto\");\n\t\t// return the UserDto\n\t\treturn usr;\n\n\t}",
"private PostDTO buildReturnDto( Post post ) {\n PostDTO postDTO = postMapper.postToPostDto( post );\n postDTO.setPostUrl( buildPostUrl( post ) );\n postDTO.getUser().setAvatarUrl( avatarService.buildAvatarUrl( post.getUser() ) );\n //if post is a child post, set the parentPostUrl\n if ( post.getParent() != null ) postDTO.setParentPostUrl( buildPostUrl( post.getParent() ));\n if ( post.getChildren() != null ) {\n for ( int i = 0; i < post.getChildren().size(); i++ ) {\n PostDTO childDTO = postDTO.getChildren().get( i );\n Post child = post.getChildren().get( i );\n childDTO.setPostUrl( buildPostUrl( post.getChildren().get( i ) ) );\n childDTO.getUser().setAvatarUrl( avatarService.buildAvatarUrl( child.getUser() ) );\n childDTO.setParentPostUrl( buildParentPostUrl( child ) );\n }\n }\n return postDTO;\n }",
"@Deprecated\n CreatePdvDto(){}",
"@SuppressWarnings({\"unchecked\", \"rawtypes\"})\n public static Object convertToFieldOfDataTransferObject(Object dto, String prefix, Map<String, Object> record, Field field, String[] filter) {\n Object reValue = null;\n if (null != record && null != field) {\n String entityFieldPath = getEntityMappingFieldPath(field);\n if (!StringUtils.isEmpty(prefix)) {\n entityFieldPath = prefix + Constants.DOT + entityFieldPath;\n }\n\n Class<?> fieldType = MappingUtils.getFieldType(field);\n if (validate(fieldType)) {\n Object innerDTO = null;\n try {\n if (ObjectUtils.fieldIsCollection(field)) {\n Collection collection = ObjectUtils.getValueOfField(dto, field.getName(), Collection.class);\n if (null == collection) {\n collection = ObjectUtils.newInstanceCollection(field.getType());\n } else {\n for (Object obj : collection) {\n String keyOne = getKey(fieldType, obj);\n String keyTwo = getKey(entityFieldPath, fieldType, record);\n if (keyOne.equals(keyTwo)) {\n innerDTO = obj;\n break;\n }\n }\n }\n\n Object value = convertToDataTransferObject(innerDTO, entityFieldPath, record, fieldType, filter);\n\n if (null == innerDTO) {\n collection.add(value);\n }\n reValue = collection;\n } else {\n reValue = convertToDataTransferObject(null, entityFieldPath, record, fieldType, filter);\n }\n } catch (NoSuchMethodException e) {\n throw new ConstructorInvalidException(\"Cannot new collection instance for field \"\n + dto.getClass().getSimpleName() + \".\" + field.getName(), e);\n } catch (IllegalAccessException e) {\n throw new FieldInaccessibleException(\"Cannot get value for field \"\n + dto.getClass().getSimpleName() + \".\" + field.getName(), e);\n }\n } else if (MappingUtils.isKeepField(entityFieldPath, filter)) {\n Class<?> fieldConverter = getFieldConverterType(field);\n reValue = convertField(fieldConverter, record.get(entityFieldPath));\n }\n }\n return reValue;\n }",
"public static CustomerDetailsDto getCustomerDetailsDto() {\n\t\treturn new CustomerDetailsDto();\n\t}",
"List<PersonaDTO> PersonaListToPersonaDTOList(List<Persona> personaList);",
"private Empresa converterDtoParaEmpresa(CadastroPJDto cadastroPJDto) {\n\t\tEmpresa empresa = new Empresa();\n\t\tempresa.setCnpj(cadastroPJDto.getCnpj());\n\t\tempresa.setRazaoSocial(cadastroPJDto.getRazaoSocial());\n\n\t\treturn empresa;\n\t}",
"private User getUserDto(String userName, String role){\n User user = new User();\n user.setRole(role);\n user.setUserName(userName);\n return user;\n }",
"Account toDomain(AccountDTO accountDto);",
"public DataTableDto convertToDto(DataTable dataTable) {\n DataTableDto dataTableDto = modelMapper.map(dataTable, DataTableDto.class);\n return dataTableDto;\n }",
"@Override\n\tpublic List<PedidoDTO> toDto(List<Pedido> entityList) {\n\t\treturn null;\n\t}",
"public MemberDto copyEntityToDto(Member entity, MemberDto dto) {\r\n reflectMemberIdToDto(entity, dto);\r\n reflectMemberNameToDto(entity, dto);\r\n reflectFormalizedDatetimeToDto(entity, dto);\r\n reflectUpdateDatetimeToDto(entity, dto);\r\n\r\n return dto;\r\n }",
"public static BorrowOrderDto db2dto(BorrowOrder db) {\n BorrowOrderDto dto = new BorrowOrderDto();\n BorrowOrderConverter.db2dto(dto, db);\n return dto;\n }",
"public FeedbackDTO getFeedbackDTO() {\r\n\r\n\t\tFeedbackDTO feedbackdto = new FeedbackDTO();\r\n\t\tfeedbackdto.setFeedbackId(FEEDBACK_ID);\r\n\t\tfeedbackdto.setCandidateName(CANDIDATE_NAME);\r\n\t\tfeedbackdto.setInterviewerName(INTERVIEWER_NAME);\r\n\t\tfeedbackdto.setRound(ROUND);\r\n\t\tfeedbackdto.setExperience(EXPERIENCE);\r\n\t\tfeedbackdto.setJobRole(JOB_ROLE);\r\n\t\tfeedbackdto.setDateOfInterview(DATE_OF_INTERVIEW);\r\n\t\tfeedbackdto.setTechnicalSkill(TECHNICAL_SKILL);\r\n\t\tfeedbackdto.setOrganizationalSkill(ORGANIZATIONAL_SKILL);\r\n\t\tfeedbackdto.setEducationSkill(EDUCATIONAL_SKILL);\r\n\t\tfeedbackdto.setCommunicationSkill(COMMUNICATION_SKILL);\r\n\t\tfeedbackdto.setOverallRating(OVERALL_RATING);\r\n\t\tfeedbackdto.setCandidate(CANDIDATE_ID);\r\n\t\tfeedbackdto.setInterview(INTERVIEW_ID);\r\n\t\tfeedbackdto.setInterviewer(INTERVIEWER_ID);\r\n\t\tfeedbackdto.setInterviewResult(INTERVIEW_RESULT);\r\n\t\tfeedbackdto.setNextRound(NEXT_ROUND);\r\n\t\tfeedbackdto.setHrLeaderAbility(HR_ABILITY_SKILL);\r\n\t\treturn feedbackdto;\r\n\t}",
"public void setDto(PropertyDefDto dto);",
"public static UserDto createUserDtoFromUser(User user) {\n\t\tlogger.info(\"Creating UserDto from User\");\n\t\tlogger.debug(\"User: \" + user);\n\n\t\t// create the UserDto\n\t\tUserDto usr = new UserDto(user.getId(), user.getUsername(), user.getfName(), user.getlName(), user.getPriv(),\n\t\t\t\tuser.getActivation());\n\t\tlogger.info(\"UserDto created\");\n\t\tlogger.debug(\"UserDto: \" + usr);\n\t\tlogger.info(\"Returning UserDto\");\n\t\t// return the UserDto\n\t\treturn usr;\n\t}",
"public SkillDTO toDTO(Skill skill) {\n return toDTO(skill, 1);\n }",
"private IngredienteDTO converteIngredienteEntityEmDTO(final IngredienteEntity ingredienteEntity) {\n\n IngredienteDTO ingredienteDTO = new IngredienteDTO();\n\n ingredienteDTO.setCodigoIngrediente(ingredienteEntity.getCodigoIngrediente());\n ingredienteDTO.setNomeIngrediente(ingredienteEntity.getNomeIngrediente());\n ingredienteDTO.setValorIngrediente(ingredienteDTO.getValorIngrediente());\n\n return ingredienteDTO;\n }"
]
| [
"0.7425438",
"0.7335533",
"0.72756803",
"0.71999264",
"0.71743816",
"0.71066815",
"0.7060934",
"0.7059465",
"0.6932182",
"0.688085",
"0.6859538",
"0.6780312",
"0.67475474",
"0.67175174",
"0.6684684",
"0.6672762",
"0.6648645",
"0.66319066",
"0.66064495",
"0.66003",
"0.6571192",
"0.65515244",
"0.6551342",
"0.65039384",
"0.6474141",
"0.6464129",
"0.6444153",
"0.6429902",
"0.64128596",
"0.63874936",
"0.63815767",
"0.6381504",
"0.63784856",
"0.63702345",
"0.635447",
"0.6343478",
"0.63368046",
"0.63230866",
"0.63185734",
"0.6308965",
"0.6307111",
"0.63035977",
"0.6276073",
"0.6261109",
"0.62540185",
"0.62525225",
"0.62397444",
"0.6230932",
"0.6228438",
"0.622528",
"0.62039894",
"0.61988825",
"0.61967605",
"0.61956865",
"0.61935914",
"0.61927146",
"0.6175776",
"0.6172367",
"0.6169027",
"0.61600506",
"0.6153674",
"0.6152499",
"0.6140634",
"0.61365855",
"0.6105735",
"0.61055255",
"0.6095687",
"0.6091776",
"0.6084078",
"0.6068173",
"0.60677814",
"0.60532427",
"0.6044163",
"0.6040687",
"0.6035312",
"0.6026554",
"0.60206676",
"0.6018693",
"0.60159963",
"0.6010715",
"0.6006861",
"0.5989495",
"0.59690565",
"0.59661007",
"0.5954112",
"0.59487194",
"0.5946465",
"0.5940777",
"0.5936146",
"0.59346414",
"0.5933254",
"0.59328276",
"0.5932709",
"0.5927237",
"0.59234506",
"0.59170246",
"0.5906752",
"0.59000355",
"0.5898788",
"0.58957905"
]
| 0.66696596 | 16 |
Metodo que setea el campo dto | public void setDto(GrupoDTO dto) {
this.dto = dto;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setDto(PropertyDefDto dto);",
"public AtendimentoJuridicoDTO toDTO(AtendimentoJuridicoEntity entity){\n\t\tAtendimentoJuridicoDTO dto = new AtendimentoJuridicoDTO();\n\t\tBeanUtils.copyProperties(entity, dto); \n\t\treturn dto ;\n\t}",
"public abstract DTO toDTO(M model);",
"public PersonaDTO(){}",
"public abstract D convertToDto(T entity);",
"public abstract T convertToEntity(D dto);",
"public PropertyDefDto getDto();",
"public ProductoDTO(){\r\n\t\t\r\n\t}",
"public DatatypeDto instantiateDto(Datatype poso) {\n\t\tDatatypeDto dto = DatatypeDto.String;\n\t\treturn dto;\n\t}",
"Persona PersonaDTOToPersona(PersonaDTO personaDTO);",
"PersonaDTO PersonaToPersonaDTO(Persona persona);",
"public Dto() {\n \t\n }",
"D mapToDTO(E entity);",
"@Override\r\n\tpublic AbstractDto mapToDto() {\n\t\treturn null;\r\n\t}",
"V toDto(E entity);",
"public ProdutoDTO()\n {\n super();\n }",
"public DomicilioDTO(DomicilioEntity domicilioEntity) {\r\n if (domicilioEntity != null) {\r\n this.id = domicilioEntity.getId();\r\n this.precio = domicilioEntity.getPrecio();\r\n this.idZona = domicilioEntity.getIdZona();\r\n \r\n }\r\n }",
"public abstract M toModel(DTO dto);",
"public CambioComplementariosDTO() { }",
"public TcUnidadEdoDTO() {\n }",
"public void crearPersona(PersonaDTO personaDTO);",
"protected abstract void processDTO();",
"public NameDTO() {\r\n this.firstName = \"\";\r\n this.lastName = \"\";\r\n }",
"public default D toDto(E entity) {\n\t\tif (entity == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn DtoUtilService.staticDtoFromEntity(getDtoClass(), entity);\n\t\t}\n\t}",
"public GrupoUsuarioDTO() {\n }",
"public DTO(DTO other) {\n if (other.isSetDatas()) {\n Map<String,String> __this__datas = new HashMap<String,String>(other.datas);\n this.datas = __this__datas;\n }\n }",
"@SuppressWarnings({\"unchecked\", \"rawtypes\"})\n public static Object convertToFieldOfDataTransferObject(Object dto, String prefix, Map<String, Object> record, Field field, String[] filter) {\n Object reValue = null;\n if (null != record && null != field) {\n String entityFieldPath = getEntityMappingFieldPath(field);\n if (!StringUtils.isEmpty(prefix)) {\n entityFieldPath = prefix + Constants.DOT + entityFieldPath;\n }\n\n Class<?> fieldType = MappingUtils.getFieldType(field);\n if (validate(fieldType)) {\n Object innerDTO = null;\n try {\n if (ObjectUtils.fieldIsCollection(field)) {\n Collection collection = ObjectUtils.getValueOfField(dto, field.getName(), Collection.class);\n if (null == collection) {\n collection = ObjectUtils.newInstanceCollection(field.getType());\n } else {\n for (Object obj : collection) {\n String keyOne = getKey(fieldType, obj);\n String keyTwo = getKey(entityFieldPath, fieldType, record);\n if (keyOne.equals(keyTwo)) {\n innerDTO = obj;\n break;\n }\n }\n }\n\n Object value = convertToDataTransferObject(innerDTO, entityFieldPath, record, fieldType, filter);\n\n if (null == innerDTO) {\n collection.add(value);\n }\n reValue = collection;\n } else {\n reValue = convertToDataTransferObject(null, entityFieldPath, record, fieldType, filter);\n }\n } catch (NoSuchMethodException e) {\n throw new ConstructorInvalidException(\"Cannot new collection instance for field \"\n + dto.getClass().getSimpleName() + \".\" + field.getName(), e);\n } catch (IllegalAccessException e) {\n throw new FieldInaccessibleException(\"Cannot get value for field \"\n + dto.getClass().getSimpleName() + \".\" + field.getName(), e);\n }\n } else if (MappingUtils.isKeepField(entityFieldPath, filter)) {\n Class<?> fieldConverter = getFieldConverterType(field);\n reValue = convertField(fieldConverter, record.get(entityFieldPath));\n }\n }\n return reValue;\n }",
"public FacturaDTO(FacturaEntity entity) \n {\n if(entity != null)\n {\n this.costo = entity.getCosto();\n this.id = entity.getId();\n }\n \n }",
"E toEntity(V dto);",
"public ViviendaDTO(ViviendaEntity entity, String condicion)\r\n {\r\n if (entity!=null){\r\n this.idVivienda=entity.getIdVivienda();\r\n this.ciudad=entity.getCiudad();\r\n this.descripcion=entity.getDescripcion();\r\n this.direccion=entity.getDireccion();\r\n this.capacidad=entity.getCapacidad();\r\n this.valorDiario=entity.getValorDiario();\r\n this.imagen=entity.getImagen();\r\n }\r\n }",
"public static Object convertToDataTransferObject(Object dto, String prefix, Map<String, Object> record,\n Class<?> dtoType, String[] filter) {\n if (null != record && null != dtoType) {\n if (null == dto) {\n dto = newDataTransferObjectInstance(dtoType);\n }\n List<Field> dtoFields = ObjectUtils.getFields(dtoType, true);\n for (Field dtoField : dtoFields) {\n try {\n Object value = null;\n if (hasData(record, prefix, getEntityMappingFieldPath(dtoField))) {\n value = convertToFieldOfDataTransferObject(dto, prefix, record, dtoField, filter);\n }\n ObjectUtils.setValueForField(dto, dtoField.getName(), value, true);\n } catch (IllegalAccessException e) {\n throw new FieldInaccessibleException(\"Cannot set value for field \"\n + dtoType.getSimpleName() + \".\" + dtoField.getName(), e);\n }\n }\n }\n return dto;\n }",
"public BUserDto convertEntityToDto(BUser entity){\n\t\tBUserDto dto = new BUserDto();\n\t\tif(entity!=null){\n\t\t\tdto.setId(entity.getId());\n\t\t\tdto.setUsername(entity.getUsername());\n\t\t}\n\t\treturn dto;\n\t}",
"StudentDTO toStudentDTO(Student student);",
"public static UserDTO mapEntityIntoDTO(UserEntity entity) {\n \tif (entity == null) {\n \t\treturn null;\n \t}\n \n \tUserDTO dto = new UserDTO();\n \t\n \tdto.setLogin(entity.getLogin());\n\n \tdto.setPassword(entity.getPassword());\n \t// mapValue(entity, dto, \"password\");\n\n \t//dto.setQuota(entity.getQuota());\n \tModelDTOMapper.readEntityFieldToDto(dto, \"quota\", entity, \"quota\", new ConvertIntToLong());\n \t\n \t// dto.setEnabled(entity.getEnabled());\n \tModelDTOMapper.readEntityFieldToDto(dto, entity, \"enabled\");\n return dto;\n }",
"@Override\n\tpublic BaseFWDTOImpl toDTO() {\n\t\treturn null;\n\t}",
"public FilmTypeDto convertEntityToDto(FilmType entity){\n\t\tFilmTypeDto dto = new FilmTypeDto();\n\t\tif(entity!=null){\n\t\t\tdto.setId(entity.getId());\n\t\t\tdto.setVersion(entity.getVersion());\n\t\t\tdto.setDescription(entity.getDescription());\n\t\t}\n\t\treturn dto;\n\t}",
"E mapToEntity(D dto);",
"private Produto passarProdutoParaDto(ProdutoDto produtoDto) {\n\t\tProduto produto = new Produto();\n\t\tproduto.setNome(produtoDto.getNome());\n\t\tproduto.setQuantidade(produtoDto.getQuantidade());\n\t\tproduto.setValor(produtoDto.getValor());\n\t\t\n\t\treturn produto;\n\t}",
"public ViviendaDTO(ViviendaEntity entity){\r\n if (entity!=null){\r\n this.idVivienda=entity.getIdVivienda();\r\n this.anfitrion=new AnfitrionBasicDTO(entity.getAnfitrion());\r\n this.ciudad=entity.getCiudad();\r\n this.descripcion=entity.getDescripcion();\r\n this.direccion=entity.getDireccion();\r\n this.capacidad=entity.getCapacidad();\r\n this.valorDiario=entity.getValorDiario();\r\n this.imagen=entity.getImagen();\r\n this.numeroHabitaciones=entity.getHabitaciones().size();\r\n }\r\n }",
"ExerciseDTO convertToExerciseDTO(Exercise exercise);",
"public CambioComplementariosDTO(java.lang.String curpEmpleado,\n java.lang.String rfcEmpleado,\n java.lang.String primerApellido,\n java.lang.String segundoApellido,\n java.lang.String nombreEmpleado,\n java.lang.String clabeEmpleado,\n java.lang.String idBancoSar,\n java.util.Date ingresoGobFed, \n java.util.Date ingresoDependencia, \n java.util.Date terminoCargoSind, \n java.lang.String imssIssste, \n java.lang.String EMailOficial, \n java.lang.String EMailPersonal,\n java.lang.Integer idRusp, \n java.lang.String sistemaReparto, \n java.lang.String idTipoPago, \n java.lang.String idEdoCivil, \n java.lang.String idNacionalidad, \n java.lang.String idProfnCarrera, \n java.lang.Integer idNivelEscolar, \n java.lang.Integer idInstEducativa, \n java.lang.Integer idEspProtCivil, \n java.lang.Integer idInstProtcivil, \n java.util.Date fecNotDecPatr, \n java.util.Date fecIniDeclPatr, \n java.util.Date fecIngSpc, \n java.lang.String casoMuestra,\n java.lang.String discapacidad,\n java.lang.String estudiaSiNo,\n java.lang.String padreMadre,\n java.lang.String compatEmpleo,\n java.lang.String usuario,\n java.lang.Integer idInmuebleP,\n java.lang.String plazaTelOfc1,\n java.lang.String plazaExt1) { \n this.curpEmpleado = curpEmpleado;\n this.rfcEmpleado = rfcEmpleado;\n this.primerApellido = primerApellido;\n this.segundoApellido = segundoApellido;\n this.nombreEmpleado = nombreEmpleado;\n this.clabeEmpleado = clabeEmpleado;\n this.idBancoSar = idBancoSar;\n this.ingresoGobFed = ingresoGobFed;\n this.ingresoDependencia = ingresoDependencia;\n this.terminoCargoSind = terminoCargoSind;\n this.imssIssste = imssIssste;\n this.EMailOficial = EMailOficial;\n this.EMailPersonal = EMailPersonal;\n this.idRusp = idRusp;\n this.sistemaReparto = sistemaReparto;\n this.idTipoPago = idTipoPago;\n this.idEdoCivil = idEdoCivil;\n this.idNacionalidad = idNacionalidad;\n this.idProfnCarrera = idProfnCarrera;\n this.idNivelEscolar = idNivelEscolar;\n this.idInstEducativa = idInstEducativa;\n this.idEspProtCivil = idEspProtCivil;\n this.idInstProtcivil = idInstProtcivil;\n this.fecNotDecPatr = fecNotDecPatr;\n this.fecIniDeclPatr = fecIniDeclPatr;\n this.fecIngSpc = fecIngSpc;\n this.casoMuestra = casoMuestra;\n this.discapacidad = discapacidad;\n this.estudiaSiNo = estudiaSiNo;\n this.padreMadre = padreMadre;\n this.compatEmpleo = compatEmpleo;\n this.usuario = usuario;\n this.idInmuebleP = idInmuebleP;\n this.plazaTelOfc1 = plazaTelOfc1;\n this.plazaExt1 = plazaExt1;\n }",
"private Empresa converterDtoParaEmpresa(CadastroPJDto cadastroPJDto) {\n\t\tEmpresa empresa = new Empresa();\n\t\tempresa.setCnpj(cadastroPJDto.getCnpj());\n\t\tempresa.setRazaoSocial(cadastroPJDto.getRazaoSocial());\n\n\t\treturn empresa;\n\t}",
"private void copyDtoToEntity(UserDTO dto, User entity) {\n\t\tentity.setFullName(dto.getFullName());\n\t\tentity.setEmail(dto.getEmail());\n\t\tentity.setCpf(dto.getCpf());\n\t\tentity.setBirthDate(dto.getBirthDate());\n\t}",
"public EventoDTO(EventoEntity entity) {\n if(entity != null)\n {\n this.nombreEvento = entity.getNombreEvento();\n this.tipoEvento = entity.getTipoEvento();\n this.fechaEvento = entity.getFechaEvento();\n this.ubicacionLat = entity.getUbicacionLat();\n this.ubicacionLon = entity.getUbicacionLon();\n this.privado = entity.isPrivado();\n this.capacidad = entity.getCapacidad();\n this.distanciaVivienda = entity.getDistanciaVivienda();\n this.id = entity.getId();\n }\n }",
"public UserDto() {\n }",
"public Userdto(User user) {\n\t\tthis.fname = user.getFirstname();\n\t\tthis.lname = user.getLastname();\n\t\tthis.email = user.getEmail();\n\t}",
"public static EmployeeDTO valueOf(Employee employee){\n EmployeeDTO employeeDTO = new EmployeeDTO();\n BeanUtils.copyProperties(employee, employeeDTO);\n// employeeDto.setId( employee.getId() );\n// employeeDto.setFirstName( employee.getFirstName() );\n\n return employeeDTO;\n\n }",
"default ShopDTO entityToDto(Shop entity) {\n ShopDTO dto = ShopDTO.builder()\n .productID(entity.getProductID())\n .product(entity.getProduct())\n .image(entity.getImage())\n .content(entity.getContent())\n .price(entity.getPrice())\n .count(entity.getCount())\n .regDate(entity.getRegDate())\n .modDate(entity.getModDate())\n .build();\n return dto;\n }",
"D update(D dto);",
"public MarcaDTO(MarcaEntity marcaEntity) {\n if (marcaEntity != null) {\n this.id = marcaEntity.getId();\n this.nombreMarca = marcaEntity.getNombreMarca();\n this.logo = marcaEntity.getLogo();\n }\n }",
"@Override\n\tpublic Medico createMedicoFromDto(MedicoDTO medicoDto) {\n\t\treturn null;\n\t}",
"public HojaDeVidaDTO getHojaDeVida() {return hojaDeVida;}",
"public AseoDetailDTO(AseoEntity entity) {\r\n super(entity);\r\n this.banho = entity.getBanho();\r\n this.dientes = entity.getDientes();\r\n this.peluqueria = entity.getPeluqueria();\r\n\r\n if (entity.getVeterinaria() != null) {\r\n this.veterinaria = new VeterinariaDTO(entity.getVeterinaria());\r\n } else {\r\n entity.setVeterinaria(null);\r\n }\r\n }",
"protected void reflectFormalizedDatetimeToDto(Member entity, MemberDto dto) {\r\n dto.setFormalizedDatetime(extractFormalizedDatetimeFromEntity(entity));\r\n }",
"TicketDTO ticketToTicketDTO(Ticket ticket);",
"public BlogDetailDTO (BlogEntity entity) \r\n {\r\n super(entity);\r\n if(entity.getCliente()!=null)cliente = new ClienteDTO(entity.getCliente());\r\n if(entity.getEvento()!=null)evento = new EventoDTO(entity.getEvento());\r\n \r\n }",
"public PasswordChangeDTO() {}",
"public Object decorate(Object dtoValue) {\r\n return dtoValue;\r\n }",
"@Deprecated\n CreatePdvDto(){}",
"@Override\n\tpublic Izdavac convert(IzdavacDTO dto) {\n\t\tIzdavac izdavac=new Izdavac();\n\t\tif(dto.getId()!=null) {\n\t\t\tizdavac=izdavacService.findOne(dto.getId());\n\t\t\tif(izdavac==null) {\n\t\t\t\tthrow new IllegalStateException(\"greska izdavacDTO\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tizdavac.setAdresa(dto.getAdresa());\n\t\tizdavac.setId(dto.getId());\n\t\tizdavac.setNaziv(dto.getNaziv());\n\t\tizdavac.setTelefon(dto.getTelefon());\n\t\t\n\t\treturn izdavac;\n\t}",
"public Representante toEntity(RepresentanteDTO dto, Representante entity) {\n\n entity.setIdRepresentante(dto.getIdRepresentante());\n entity.setNome(dto.getNome());\n entity.setTelefone(dto.getTelefone());\n entity.setSexo(dto.getSexo());\n entity.setEmail(dto.getEmail());\n\n return entity;\n }",
"public static ReadingDTO mapToDTO(Reading reading) {\n if (Objects.isNull(reading)) {\n return null;\n }\n ReadingDTO dto = newReadingDTO();\n dto.setDateTime(reading.getDateTime());\n dto.setValue(reading.getValue());\n return dto;\n }",
"private UserDto mapFromUserToDto(User user) {\n UserDto userDto = new UserDto();\n userDto.setId(user.getId());\n userDto.setUsername(user.getUserName());\n userDto.setName(String.format(\"%s %s\", user.getFirstName(), user.getLastName()));\n userDto.setEmail(user.getEmail());\n userDto.setAvatar(user.getAvatar());\n return userDto;\n }",
"public CoordinadorDTO(CoordinadorEntity coordinadorEntity) {\n this.id_coodinador = coordinadorEntity.getId_coordinador();\n this.nombres = coordinadorEntity.getNombres();\n this.apellidos = coordinadorEntity.getApellidos();\n this.genero = coordinadorEntity.getGenero();\n this.email = coordinadorEntity.getEmail();\n this.tipo_documento_id = coordinadorEntity.getTipoDocumento();\n this.nro_documento = coordinadorEntity.getNro_documento();\n }",
"void crearCampania(GestionPrecioDTO campania);",
"AccountDTO toDTO(Account account);",
"protected void populateDto(Utente dto, ResultSet rs) throws SQLException\n\t{\n\t\tdto.setUteId( rs.getLong( COLUMN_UTE_ID ) );\n\t\tdto.setUteCognome( rs.getString( COLUMN_UTE_COGNOME ) );\n\t\tdto.setUteNome( rs.getString( COLUMN_UTE_NOME ) );\n\t\tdto.setUteEmail( rs.getString( COLUMN_UTE_EMAIL ) );\n\t\tdto.setUtePassword( rs.getString( COLUMN_UTE_PASSWORD ) );\n\t\tdto.setUteLastLogin( rs.getDate(COLUMN_UTE_LAST_LOGIN ) );\n\t\tdto.setUteCellulare( rs.getString( COLUMN_UTE_CELLULARE ) );\n\t\tdto.setUteSesso( rs.getString( COLUMN_UTE_SESSO ) );\n\t\tdto.setUteDataNascita( rs.getDate(COLUMN_UTE_DATA_NASCITA ) );\n\t\tdto.setUteTitolo( rs.getLong( COLUMN_UTE_TITOLO ) );\n\t\tdto.setFkPaesi( rs.getLong( COLUMN_FK_PAESI ) );\n\t\tdto.setUteCartaNumero( rs.getString( COLUMN_UTE_CARTA_NUMERO ) );\n\t\tdto.setUteCartaTitolare( rs.getString( COLUMN_UTE_CARTA_TITOLARE ) );\n\t\tdto.setUteCartaScadMese( rs.getString( COLUMN_UTE_CARTA_SCAD_MESE ) );\n\t\tdto.setUteCartaScadAnno( rs.getString( COLUMN_UTE_CARTA_SCAD_ANNO ) );\n\t\tdto.setUteCartaUsaPerLav( rs.getString( COLUMN_UTE_CARTA_USA_PER_LAV ) );\n\t\tdto.setUteCartaUsaPerPremio( rs.getString( COLUMN_UTE_CARTA_USA_PER_PREMIO ) );\n\t\tdto.setUteTipologia( rs.getLong( COLUMN_UTE_TIPOLOGIA ) );\n\t\tif (rs.wasNull()) {\n\t\t\tdto.setUteTipologiaNull( true );\n\t\t}\n\t\t\n\t\tdto.setUteIndirizzo( rs.getString( COLUMN_UTE_INDIRIZZO ) );\n\t\tdto.setFkComune( rs.getLong( COLUMN_FK_COMUNE ) );\n\t\tif (rs.wasNull()) {\n\t\t\tdto.setFkComuneNull( true );\n\t\t}\n\t\t\n\t\tdto.setUteAzienda( rs.getString( COLUMN_UTE_AZIENDA ) );\n\t\tdto.setFkComuneAzienda( rs.getLong( COLUMN_FK_COMUNE_AZIENDA ) );\n\t\tif (rs.wasNull()) {\n\t\t\tdto.setFkComuneAziendaNull( true );\n\t\t}\n\t\t\n\t\tdto.setUteTelefonoAzienda( rs.getString( COLUMN_UTE_TELEFONO_AZIENDA ) );\n\t\tdto.setUtePivaAzienda( rs.getString( COLUMN_UTE_PIVA_AZIENDA ) );\n\t\tdto.setUteFotoProfiloPath( rs.getString( COLUMN_UTE_FOTO_PROFILO_PATH ) );\n\t\tdto.setUtePagamentiOnline( rs.getString( COLUMN_UTE_PAGAMENTI_ONLINE ) );\n\t\tdto.setUteQuandoPagare( rs.getString( COLUMN_UTE_QUANDO_PAGARE ) );\n\t\tdto.setUteFumatore( rs.getString( COLUMN_UTE_FUMATORE ) );\n\t\tdto.setUtenteStelle( rs.getString( COLUMN_UTENTE_STELLE ) );\n\t\tdto.setUteCamereOspitiDisabili( rs.getString( COLUMN_UTE_CAMERE_OSPITI_DISABILI ) );\n\t\tdto.setUteRistorante( rs.getString( COLUMN_UTE_RISTORANTE ) );\n\t\tdto.setUteConnessioneInternet( rs.getString( COLUMN_UTE_CONNESSIONE_INTERNET ) );\n\t\tdto.setUteCameraNonfumatori( rs.getString( COLUMN_UTE_CAMERA_NONFUMATORI ) );\n\t\tdto.setUtePalestra( rs.getString( COLUMN_UTE_PALESTRA ) );\n\t\tdto.setUteCamereFamiliari( rs.getString( COLUMN_UTE_CAMERE_FAMILIARI ) );\n\t\tdto.setUteAnimali( rs.getString( COLUMN_UTE_ANIMALI ) );\n\t\tdto.setUteParcheggio( rs.getString( COLUMN_UTE_PARCHEGGIO ) );\n\t\tdto.setUteSpaBenessere( rs.getString( COLUMN_UTE_SPA_BENESSERE ) );\n\t\tdto.setUteWifi( rs.getString( COLUMN_UTE_WIFI ) );\n\t\tdto.setUtePiscinaCoperta( rs.getString( COLUMN_UTE_PISCINA_COPERTA ) );\n\t\tdto.setUteNavettaAeroportuale( rs.getString( COLUMN_UTE_NAVETTA_AEROPORTUALE ) );\n\t\tdto.setUteConnessioneWifiGratuita( rs.getString( COLUMN_UTE_CONNESSIONE_WIFI_GRATUITA ) );\n\t\tdto.setUteBar( rs.getString( COLUMN_UTE_BAR ) );\n\t\tdto.setUteDepositoBagagli( rs.getString( COLUMN_UTE_DEPOSITO_BAGAGLI ) );\n\t\tdto.setUteReception24ore( rs.getString( COLUMN_UTE_RECEPTION24ORE ) );\n\t\tdto.setUtePerChiPrenoti( rs.getString( COLUMN_UTE_PER_CHI_PRENOTI ) );\n\t\tdto.setFkPreferenzaValuta( rs.getLong( COLUMN_FK_PREFERENZA_VALUTA ) );\n\t\tif (rs.wasNull()) {\n\t\t\tdto.setFkPreferenzaValutaNull( true );\n\t\t}\n\t\t\n\t\tdto.setUteCartaTipo( rs.getInt( COLUMN_UTE_CARTA_TIPO ) );\n\t\tif (rs.wasNull()) {\n\t\t\tdto.setUteCartaTipoNull( true );\n\t\t}\n\t\t\n\t\tdto.setUteCap( rs.getString( COLUMN_UTE_CAP ) );\n\t\tdto.setUteCapAzienda( rs.getString( COLUMN_UTE_CAP_AZIENDA ) );\n\t}",
"@Override\r\n\tpublic TableDTO getDTO(Table entity) {\n\t\treturn null;\r\n\t}",
"public void crearCompraComic(CompraComicDTO compraComicDTO);",
"public Member copyDtoToEntity(MemberDto dto, Member entity) {\r\n reflectFormalizedDatetimeToEntity(dto, entity);\r\n reflectMemberIdToEntity(dto, entity);\r\n reflectMemberNameToEntity(dto, entity);\r\n reflectUpdateDatetimeToEntity(dto, entity);\r\n\r\n return entity;\r\n }",
"public GrupoDTO getDto() {\n\t\treturn this.dto;\n\t}",
"private CustomersDTO getDataFromInputToDTO(CustomersInputDTO inputCustomer, CustomersDTO dtoCustomer) {\n // set value for fields of DTO if input not null\n Arrays.asList(CustomersInputDTO.class.getDeclaredFields()).stream().forEach(field -> {\n if (field.getName().equals(ConstantsCustomers.FIELD_CUSTOMER_DATA)) {\n return;\n }\n String methodGet = METHOD_GET_PREFFIX\n .concat(CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_CAMEL, field.getName()));\n String methodSet = METHOD_SET_PREFFIX\n .concat(CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_CAMEL, field.getName()));\n try {\n Method inputMethod = CustomersInputDTO.class.getMethod(methodGet);\n if (inputMethod.invoke(inputCustomer) != null) {\n Method outMethod = CustomersDTO.class.getMethod(methodSet, inputMethod.getReturnType());\n outMethod.invoke(dtoCustomer, inputMethod.getReturnType().cast(inputMethod.invoke(inputCustomer)));\n }\n } catch (Exception e) {\n return;\n }\n });\n dtoCustomer.setUpdatedUser(jwtTokenUtil.getEmployeeIdFromToken());\n return dtoCustomer;\n }",
"public GetUsuarioDTO convierteDTO(Integer id){\n Optional<Usuario> usuario = usuarioRepository.findById(id);\n return usuario.map(usuarioDTOConverter::convertToDTO).orElseThrow(()->new UsuarioNotFoundException(id));\n }",
"public DTOType getDTOType() {\n return DTO_TYPE;\n }",
"public UserDTO(String username, String password){\n this.username = username;\n this.password = password;\n }",
"public Customer CopyDtoToEntity(CustomerInput userDto){\n Customer user = new Customer();\n user.setId(userDto.getId());\n user.setFirst_name(userDto.getFirst_name());\n user.setLast_name(userDto.getLast_name());\n user.setEmail(userDto.getEmail());\n user.setAddress_id(userDto.getAddress_id());\n user.setActive(userDto.getActive());\n user.setCreate_date(getCurrentDateTime());\n // user.setCreate_date(getCurrentDateTime());\n return user;\n }",
"private IngredienteDTO converteIngredienteEntityEmDTO(final IngredienteEntity ingredienteEntity) {\n\n IngredienteDTO ingredienteDTO = new IngredienteDTO();\n\n ingredienteDTO.setCodigoIngrediente(ingredienteEntity.getCodigoIngrediente());\n ingredienteDTO.setNomeIngrediente(ingredienteEntity.getNomeIngrediente());\n ingredienteDTO.setValorIngrediente(ingredienteDTO.getValorIngrediente());\n\n return ingredienteDTO;\n }",
"@Deprecated\n MerchandiseDTO() {\n }",
"@Override\n public D entityToDTO( final E entity )\n {\n //final String methodName = \"cachedDataToDTO\";\n //logMethodBegin( methodName, entity );\n Objects.requireNonNull( entity, \"entity argument cannot be null\" );\n D dto = super.entityToDTO( entity );\n /*\n * I think this is a good use of instanceof...although I am not convinced, I'll have to think about this...\n * If any stock DTO is a stock company container, it will be populated automatically with the stock company\n * information. No need for any sub cvl\n *\n * NEED TO SERIOUSLY THINK ABOUT A BETTER SOLUTION HERE....5/9/2017 Mike.\n *\n * Need to develop some sort of \"conversion\" registration so that subclasses can register \"converters\" to be\n * run on entity.\n *\n /*\n * StockPriceQuoteContainers contain everything in a StockPriceContainer so get that instead\n */\n /*\n if ( dto instanceof StockQuoteDTOContainer )\n {\n this.stockQuoteEntityService\n .setQuoteInformation( dto );\n }\n */\n /*\n * The quote contains the company name\n */\n /*\n else if ( dto instanceof StockCompanyEntityContainer )\n {\n this.stockCompanyEntityService\n .setCompanyInformation( (StockCompanyDTOContainer) dto );\n }\n if ( dto instanceof StockPriceQuoteDTOContainer )\n {\n this.stockPriceQuoteService\n .setStockPriceQuote( dto, ASYNCHRONOUS );\n }\n */\n\n /*\n * Convert the UUID to a string and get the notes source name for the UUID\n */\n if ( entity instanceof NotesSourceUuidContainer &&\n dto instanceof NotesSourceIdContainer )\n {\n final NotesSourceUuidContainer notesSourceUuidContainer = (NotesSourceUuidContainer)entity;\n if ( notesSourceUuidContainer.getNotesSourceEntity().isPresent() )\n {\n final NotesSourceIdContainer notesSourceIdContainer = (NotesSourceIdContainer)dto;\n final StockNoteSourceEntity stockNoteSourceEntity = notesSourceUuidContainer.getNotesSourceEntity().get();\n notesSourceIdContainer.setNotesSourceName( stockNoteSourceEntity.getName() );\n notesSourceIdContainer.setNotesSourceId( stockNoteSourceEntity.getUuid().toString() );\n }\n }\n\n if ( dto instanceof TagsContainer )\n {\n final TagsContainer tagsContainer = (TagsContainer)dto;\n tagsContainer.setTags( this.stockTagService.findStockTags( UUIDUtil.uuid( tagsContainer.getCustomerId() ),\n StockTagEntity.StockTagReferenceType.STOCK_TO_BUY,\n UUIDUtil.uuid( tagsContainer.getEntityId() ) ) );\n }\n //logMethodEnd( methodName, dto );\n return dto;\n }",
"public ViatgesDTO() {\n \n }",
"public UserDTO(int id, String fName, String lName, String email, String username, Date birthdate, Date created){\n this.id = id;\n this.firstName = fName;\n this.lastName = lName;\n this.email = email;\n this.username = username;\n this.birthdate = birthdate;\n this.created = created;\n }",
"public interface IReglaUtilDTO {\n\n\t/**\n\t * To business.\n\t * \n\t * @param reglaDTO\n\t * the regla dto\n\t * @return the regla\n\t * @throws TransferObjectException\n\t * the transfer object exception\n\t */\n\tRegla toBusiness(ReglaDTO reglaDTO) throws TransferObjectException;\n\n\t/**\n\t * To rest.\n\t * \n\t * @param regla\n\t * the regla\n\t * @return the regla dto\n\t * @throws TransferObjectException\n\t * the transfer object exception\n\t */\n\tReglaDTO toRest(Regla regla) throws TransferObjectException;\n\n\t/**\n\t * To rest info.\n\t * \n\t * @param regla\n\t * the regla\n\t * @return the regla dto\n\t * @throws TransferObjectException\n\t * the transfer object exception\n\t */\n\tReglaDTO toRestInfo(Regla regla) throws TransferObjectException;\n}",
"@Test\n public void testConvertComputerToComputerDTO() {\n ComputerDTO computerDTO = new ComputerDTO();\n computerDTO.setId(1);\n computerDTO.setName(\"test\");\n ComputerDTO computerResult = DTOMapper.fromComputer(new Computer.Builder(\"test\").id(1L).build());\n assertEquals(computerDTO, computerResult);\n }",
"@Override\n\tpublic Ingrediente builderToModel(IngredienteDto dto) {\n\t\tIngrediente ingrediente = new Ingrediente();\n\t\tingrediente.setId(dto.getId());\n\t\tingrediente.setNombre(dto.getNombre());\n\t\t\n\t\treturn ingrediente;\n\t}",
"public MemberDto copyEntityToDto(Member entity, MemberDto dto) {\r\n reflectMemberIdToDto(entity, dto);\r\n reflectMemberNameToDto(entity, dto);\r\n reflectFormalizedDatetimeToDto(entity, dto);\r\n reflectUpdateDatetimeToDto(entity, dto);\r\n\r\n return dto;\r\n }",
"private CustomersDTO buildDTOToCreate(CustomersDTO customerDto) {\n if (customerDto.getBusinessMainId() < 0) {\n customerDto.setBusinessMainId(0);\n }\n if (customerDto.getBusinessSubId() < 0) {\n customerDto.setBusinessSubId(0);\n }\n if (customerDto.getEmployeeId() == null) {\n customerDto.setEmployeeId(ConstantsCustomers.LONG_VALUE_0L);\n }\n if (customerDto.getDepartmentId() == null) {\n customerDto.setDepartmentId(ConstantsCustomers.LONG_VALUE_0L);\n }\n if (customerDto.getGroupId() == null) {\n customerDto.setGroupId(ConstantsCustomers.LONG_VALUE_0L);\n }\n if (customerDto.getScenarioId() == null) {\n customerDto.setScenarioId(ConstantsCustomers.LONG_VALUE_0L);\n }\n customerDto.setCreatedUser(jwtTokenUtil.getEmployeeIdFromToken());\n customerDto.setUpdatedUser(jwtTokenUtil.getEmployeeIdFromToken());\n return customerDto;\n }",
"public static SystemDTO entityToDTO(final System entity){\n\t\tfinal SystemDTO result = new SystemDTO();\n\t\t\n\t\tresult.setCode(entity.getCode());\n\t\tresult.setName(entity.getName());\n\t\tresult.setId(entity.getId());\n\t\t\n\t\treturn result;\n\t}",
"public static void providePOJOsFieldAndGetterSetter(\n final FileWriterWrapper writer,\n final Field field)\n throws IOException {\n String javaType = mapType(field.getOriginalDataType());\n\n writer.write(\" private \" + javaType + \" \" + field.getJavaName()\n + \" = null;\\n\\n\");\n\n writer.write(\" public \" + javaType + \" \" + field.getGetterName()\n + \"() {\\n\");\n writer.write(\" return \" + field.getJavaName() + \";\\n\");\n writer.write(\" }\\n\\n\");\n\n writer.write(\" public void \" + field.getSetterName() + \"(\"\n + javaType + \" newValue) {\\n\");\n writer.write(\" \" + field.getJavaName() + \" = newValue\"\n + \";\\n\");\n writer.write(\" }\\n\\n\");\n }",
"public void grabarUsuario(UsuarioDto dto){\n\t\tUsuario usuario = new Usuario();\n\t\t\n\t\t// Setarle los valores que vienen del dto\n\t\tusuario.setNombre(dto.getNombre());\n\t\tusuario.setApellido(dto.getApellido());\n\t\t\n\t\t// Grabo el producto\n\t\tusuarioDao.saveOrUpdate(usuario);\n\t\t\n\t\tlog.info(\"Se grabó el producto: \" + usuario.getId());\n\t\t\n\t\t// Le seto el id en el dto\n\t\tdto.setId(usuario.getId());\n\t}",
"protected void populateDto(ProductosPuntoVenta dto, ResultSet rs)\r\n throws SQLException {\r\n dto.setIdPuntoVenta(new Integer(rs.getInt(COLUMN_ID_PDV)));\r\n dto.setIdProducto(new Integer(rs.getInt(COLUMN_ID_PRODUCTO)));\r\n dto.setCantidad(rs.getInt(COLUMN_CANTIDAD));\r\n }",
"public interface DtoConverter<D extends BaseDto, E extends BaseEntity> {\n\n /**\n * Verilen {@link BaseEntity} nesne listesini {@link Set<BaseDto>}'e cevirmektedir.\n *\n * @param entityList {@link BaseEntity} listesi\n * @return Set\n */\n Set<D> convertToDtoSet(Collection<E> entityList);\n\n /**\n * Verilen {@link BaseEntity} nesne listesini {@link List<BaseDto>}'e cevirmektedir.\n *\n * @param entityList {@link BaseEntity} listesi\n * @return List\n */\n List<D> convertToDtoList(Collection<E> entityList);\n\n /**\n * Verilen {@link BaseEntity} nesnesini {@link BaseDto} nesnesine cevirme islemini\n * yapmaktadir.\n *\n * @param entity {@link BaseEntity}\n * @return D\n */\n D convertToDto(E entity);\n}",
"private HistoryDTO convertEntityToDTO(History history) {\n\t\tHistoryDTO historyDto = modelMapper.map(history, HistoryDTO.class);\n\t\treturn historyDto;\n\t}",
"public CategoriaDTO(Categoria categoriaObj) {\n\t\tid = categoriaObj.getId();\n\t\tnomeCategoria = categoriaObj.getNomeCategoria();\n\t}",
"public PropertySellerDetailDTO() {\n\n\t}",
"public ConnectionDTO getDto() {\n return dto;\n }",
"public FilmType convertDtoToEntity(FilmTypeDto dto){\n\t\tFilmType entity = new FilmType();\n\t\tif(dto!=null){\n\t\t\tentity.setId(dto.getId());\n\t\t\tentity.setVersion(dto.getVersion());\n\t\t\tentity.setDescription(dto.getDescription());\n\t\t}\n\t\treturn entity;\n\t}",
"private DTOFactory() {\r\n \t}",
"RunDTO toDto(Run run) {\n RunDTO result = new RunDTO();\n result.setId(0L);\n if (null != run) {\n this.fillDto(result, run);\n }\n return result;\n }",
"private LecturerDto mapDto(Lecturer lecturer) {\n return new LecturerDto(lecturer.getLecturerID(), lecturer.getFirstName(), lecturer.getLastName(), lecturer.getEmail(), lecturer.getType());\n }",
"protected void reflectFormalizedDatetimeToEntity(MemberDto dto, Member entity) {\r\n entity.setFormalizedDatetime(extractFormalizedDatetimeFromDto(dto));\r\n }"
]
| [
"0.72069097",
"0.66084915",
"0.6583233",
"0.65720934",
"0.6570669",
"0.65487176",
"0.6493415",
"0.6461897",
"0.64342",
"0.6414658",
"0.64091015",
"0.6404035",
"0.6379098",
"0.63572735",
"0.6342846",
"0.63359714",
"0.6281635",
"0.6280087",
"0.6264856",
"0.62616134",
"0.6222128",
"0.6194326",
"0.61921227",
"0.6149574",
"0.6142331",
"0.6141419",
"0.6109458",
"0.6102883",
"0.6097772",
"0.60972923",
"0.60937315",
"0.6084531",
"0.60612947",
"0.6041377",
"0.6038696",
"0.60359854",
"0.60326123",
"0.59945667",
"0.59799445",
"0.5970962",
"0.5966622",
"0.59621304",
"0.5938705",
"0.5935779",
"0.592185",
"0.5921088",
"0.5918114",
"0.5882886",
"0.5865885",
"0.58414954",
"0.5834276",
"0.58316094",
"0.5828188",
"0.58170944",
"0.5810659",
"0.580085",
"0.5800501",
"0.57997745",
"0.5796665",
"0.57963717",
"0.57881016",
"0.5773318",
"0.57621574",
"0.5758513",
"0.57573354",
"0.57564867",
"0.575264",
"0.57370645",
"0.5732397",
"0.57296497",
"0.57285476",
"0.57164574",
"0.57108057",
"0.5677864",
"0.56699324",
"0.56651163",
"0.5656609",
"0.56557935",
"0.56462044",
"0.56394714",
"0.56394494",
"0.56319755",
"0.5629299",
"0.5623962",
"0.5622398",
"0.5622049",
"0.5621028",
"0.56189895",
"0.5610617",
"0.56104475",
"0.5610066",
"0.5606232",
"0.56042504",
"0.5602698",
"0.56009895",
"0.5600503",
"0.55983406",
"0.5596008",
"0.5593327",
"0.5589397"
]
| 0.6465093 | 7 |
The mapper of config info. | public interface ConfigInfoAggrMapper extends Mapper {
/**
* To delete aggregated data in bulk, you need to specify a list of datum.
* The default sql:
* DELETE FROM config_info_aggr WHERE data_id=? AND group_id=? AND tenant_id=? AND datum_id IN (...)
*
* @param datumList datumList
* @return The sql of deleting aggregated data in bulk.
*/
String batchRemoveAggr(List<String> datumList);
/**
* Get count of aggregation config info.
* The default sql:
* SELECT count(*) FROM config_info_aggr WHERE data_id = ? AND group_id = ? AND tenant_id = ?
*
* @param size datum id list size
* @param isIn search condition
* @return The sql of getting count of aggregation config info.
*/
String aggrConfigInfoCount(int size, boolean isIn);
/**
* Find all data before aggregation under a dataId. It is guaranteed not to return NULL.
* The default sql:
* SELECT data_id,group_id,tenant_id,datum_id,app_name,content
* FROM config_info_aggr WHERE data_id=? AND group_id=? AND tenant_id=? ORDER BY datum_id
*
* @return The sql of finding all data before aggregation under a dataId.
*/
String findConfigInfoAggrIsOrdered();
/**
* Query aggregation config info.
* The default sql:
* SELECT data_id,group_id,tenant_id,datum_id,app_name,content FROM config_info_aggr WHERE data_id=? AND
* group_id=? AND tenant_id=? ORDER BY datum_id LIMIT startRow,pageSize
*
* @param startRow The start index.
* @param pageSize The size of page.
* @return The sql of querying aggregation config info.
*/
String findConfigInfoAggrByPageFetchRows(int startRow, int pageSize);
/**
* Find all aggregated data sets.
* The default sql:
* SELECT DISTINCT data_id, group_id, tenant_id FROM config_info_aggr
*
* @return The sql of finding all aggregated data sets.
*/
String findAllAggrGroupByDistinct();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private ModuleMapper() {\n mapper = new HashMap<String, String>();\n mapper.put(\"accounts\", \"Accounts\");\n mapper.put(\"acl_actions\", \"ACLActions\");\n mapper.put(\"acl_roles\", \"ACLRoles\");\n mapper.put(\"bugs\", \"Bugs\");\n mapper.put(\"calls\", \"Calls\");\n mapper.put(\"campaign_log\", \"CampaignLog\");\n mapper.put(\"campaign_trkrs\", \"CampaignTrackers\");\n mapper.put(\"campaigns\", \"Campaigns\");\n mapper.put(\"cases\", \"Cases\");\n mapper.put(\"contacts\", \"Contacts\");\n mapper.put(\"currencies\", \"Currencies\");\n mapper.put(\"document_revisions\", \"DocumentRevisions\");\n mapper.put(\"documents\", \"Documents\");\n mapper.put(\"eapm\", \"EAPM\");\n mapper.put(\"email_addresses\", \"EmailAddresses\");\n mapper.put(\"email_marketing\", \"EmailMarketing\");\n mapper.put(\"email_templates\", \"EmailTemplates\");\n mapper.put(\"emailman\", \"EmailMan\");\n mapper.put(\"emails\", \"Emails\");\n mapper.put(\"inbound_email\", \"InboundEmail\");\n mapper.put(\"job_queue\", \"SchedulersJobs\");\n mapper.put(\"leads\", \"Leads\");\n mapper.put(\"meetings\", \"Meetings\");\n mapper.put(\"notes\", \"Notes\");\n mapper.put(\"oauth_consumer\", \"OAuthKeys\");\n mapper.put(\"oauth_tokens\", \"OAuthTokens\");\n mapper.put(\"opportunities\", \"Opportunities\");\n mapper.put(\"project\", \"Project\");\n mapper.put(\"project_task\", \"ProjectTask\");\n mapper.put(\"prospect_lists\", \"ProspectLists\");\n mapper.put(\"prospects\", \"Prospects\");\n mapper.put(\"releases\", \"Releases\");\n mapper.put(\"roles\", \"Roles\");\n mapper.put(\"saved_search\", \"SavedSearch\");\n mapper.put(\"schedulers\", \"Schedulers\");\n mapper.put(\"sugarfeed\", \"SugarFeed\");\n mapper.put(\"tasks\", \"Tasks\");\n mapper.put(\"users\", \"Users\");\n }",
"public Map<String, ConfigItem<String, State>> getMap() {\n\t\treturn cfg;\n\t}",
"public Map<String, Mapper> getMappers() {\n return new HashMap<String, Mapper>(this.mappers);\n }",
"public Map<String, InterceptABTestModel> getConfigMap() {\n return Collections.unmodifiableMap(configMap);\n }",
"private static ConfigSource config()\n {\n return CONFIG_MAPPER_FACTORY.newConfigSource()\n .set(\"type\", \"mailchimp\")\n .set(\"auth_method\", \"api_key\")\n .set(\"apikey\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"access_token\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"list_id\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"email_column\", \"email\")\n .set(\"fname_column\", \"fname\")\n .set(\"lname_column\", \"lname\");\n }",
"Map<String, Object> exportConfiguration();",
"Map<Class<?>, Object> yangAugmentedInfoMap();",
"Map<Class<?>, Object> yangAugmentedInfoMap();",
"@Override\n\tpublic IBaseMapper<ZlnfCoopUser, ZlnfCoopUserExample, Integer> getMapper() {\n\t\treturn mapper;\n\t}",
"Map<String, Object> exportDefaultConfiguration();",
"Map getConnectionManagerMap();",
"public static ObjectMapper getMapper() {\n return MAPPER;\n }",
"public interface UserInfoMapper extends Mapper<UserInfo> {\n\n}",
"public Class<? extends AIngleMapper> getMapperClass() {\n return mapperClass;\n }",
"@Override\n public String getRefMapperConfig() {\n return null;\n }",
"@Override\n\tprotected Mapping getMapping() {\n\t\treturn new Mapping()\n\t\t\t.add(\"firstname\", driver.getFirstName())\n\t\t\t.add(\"lastname\", driver.getLastName())\n\t\t\t.add(\"dateofbirth\", driver.getDateOfBirth())\n\t\t\t.add(\"gender\", driver.getGender())\n\t\t\t.add(\"age\", computeAge())\n\t\t\t.add(\"numberOfAccidents\", driver.getNumberOfAccidents())\n\t\t\t.add(\"numberOfTickets\", driver.getNumberOfTickets());\n\t}",
"@Mapper\npublic interface UserInfoMapper extends BaseMapper<UserInfo> {\n}",
"Map<Long, Map<String, Parametro>> getParametrosConfigMap();",
"public Map getMapping() {\n return mapping;\n }",
"private OpenApiHandlerConfig(String configName) {\n config = Config.getInstance();\n mappedConfig = config.getJsonMapConfigNoCache(configName);\n setConfigData();\n setConfigMap();\n }",
"private Map getMapping() {\n return getIndexOperations().getMapping();\n }",
"public LcpConfigMap(LcpPacketFactory parent) {\n this.parent = parent;\n this.configFactories = new HashMap<Integer, ConfigFactory>();\n }",
"@Bean\n public MapperFactory mapperFactory() {\n\n //1. Build the mapperFactory\n DefaultMapperFactory mapperFactory = new DefaultMapperFactory.Builder().build();\n\n //2. Register all the configurable mappers\n mapperConfiguration.registerConfigurableMappers(mapperFactory);\n\n //3. Register all converters\n converterConfiguration.registerCustomConverters(mapperFactory);\n\n return mapperFactory;\n }",
"public Object\tgetConfiguration();",
"@Override\r\n\tpublic BaseMapper<T> getMapper() {\n\t\treturn comMessageMapper;\r\n\t}",
"public Mapping getMapping() {\n\t\t// FIXME Tranform list into mapping\n\t\treturn m;\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 static Mapper<String> name() {\n return NAME;\n }",
"public static Map<String, DSEMergeConfigurator> initializeConfiguration() {\n try {\n configuratorMapping = Maps.newHashMap();\n IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(CONFIGURATION_POINT);\n for (IExtension ext : extensionPoint.getExtensions()) {\n\n for (IConfigurationElement conf : ext.getConfigurationElements()) {\n String uri = conf.getAttribute(URI_ATTRIBUTE);\n DSEMergeConfigurator configurator;\n configurator = (DSEMergeConfigurator) conf.createExecutableExtension(CLASS_ATTRIBUTE);\n if (uri != null && configurator != null)\n configuratorMapping.put(uri, configurator);\n }\n }\n } catch (InvalidRegistryObjectException | CoreException e) {\n logger.error(e.getMessage(),e);\n }\n return configuratorMapping;\n }",
"public static Map<String, String> getMapping() {\r\n\t\treturn data.get();\r\n\t}",
"@Override\r\n\tpublic Object getMapper() {\n\t\treturn null;\r\n\t}",
"public String configurationInfo();",
"protected Map<String, Object> getConfigurationParameters(){\n\t\treturn configurationParameters;\n\t}",
"public static ProfilMapper profilMapper() {\r\n\t\tif (profilMapper == null) {\r\n\t\t\tprofilMapper = new ProfilMapper();\r\n\t\t}\r\n\t\t\r\n\t\treturn profilMapper;\r\n\t\t\r\n\t}",
"public Map<String, Object> getInfoMap()\n {\n Map<String, Object> paramMap = new HashMap<String, Object>();\n this.putInMap(paramMap);\n return paramMap;\n }",
"public Map<String, Object> getInfoMap() {\n\t\tMap<String, Object> paramMap = new HashMap<String, Object>();\n\t\tthis.putInMap(paramMap);\n\t\treturn paramMap;\n\t}",
"public static Map<String, String> getMapping() {\n\t\treturn ThreadContext.getMapping();\n\t}",
"public Map<String, Object> getStreamsConfig() {\n // returns a copy of the original properties\n return streamsConfig.originals();\n }",
"private void initMapNameMapping() {\n mMapNameMapping.clear();\n\n // Load the name mapping from the config\n ConfigurationSection mappingSection = getConfig().getConfigurationSection(MappingSectionName);\n if (mappingSection != null) {\n // Load and check the mapping found in the config\n Map<String, Object> configMap = mappingSection.getValues(false);\n for (Map.Entry<String, Object> entry : configMap.entrySet()) {\n mMapNameMapping.put(entry.getKey(), (String) entry.getValue());\n }\n } else {\n getLogger().warning(String.format(\"[%s] found no configured mapping, creating a default one.\", mPdfFile.getName()));\n }\n\n // If there are new worlds in the server add them to the mapping\n List<World> serverWorlds = getServer().getWorlds();\n for (World w : serverWorlds) {\n if (!mMapNameMapping.containsKey(w.getName())) {\n mMapNameMapping.put(w.getName(), w.getName());\n }\n }\n\n // Set the new mapping in the config\n getConfig().createSection(MappingSectionName, mMapNameMapping);\n }",
"public interface MapCreator {\n\t\n\t/**\n\t * @param configurationManager that holds references to general ledger source\n\t * and metadata about BPA sources.\n\t * @param sc a scanner to capture the BPA driver provided by the user to map to\n\t * each unique set of general ledger dimension(s) of interest.\n\t * @param mapName specifies the name to provide to the map destination created.\n\t * @return Boolean true if the mapping operation succeeded, false if the process\n\t * failed.\n\t */\n\tboolean createMap(ConfigurationManagerAbstract configurationManager, Scanner sc, String mapName);\n\n}",
"protected final Map<String, String> getConfiguration() {\r\n\t\treturn Collections.unmodifiableMap(configuration);\r\n\t}",
"protected final void configure(final MapperFactory factory) {\n\n factory.classMap(Case.class, CaseDTO.class).byDefault().register();\n\n factory.classMap(Case.class, CaseDetailsDTO.class).byDefault().register();\n\n factory\n .classMap(CaseGroup.class, CaseGroupDTO.class)\n .field(\"status\", \"caseGroupStatus\")\n .byDefault()\n .register();\n\n factory.classMap(CaseEvent.class, CaseEventDTO.class).byDefault().register();\n\n factory\n .classMap(Category.class, CategoryDTO.class)\n .field(\"categoryName\", \"name\")\n .byDefault()\n .register();\n\n factory.classMap(Response.class, ResponseDTO.class).byDefault().register();\n }",
"Map<String, Object> readConfig(Request request, String id);",
"public static ObjectMapper getObjectMapper() {\n return defaultMapper;\n }",
"protected MapperIF getBeanMapper() {\r\n\t\treturn beanMapper;\r\n\t}",
"public abstract IOpipeConfiguration config();",
"public org.LexGrid.naming.Mappings getMappings() {\n return mappings;\n }",
"public ObjectMappers() {\n\t\tthis.objectMappers = ImmutableList.of();\n\t}",
"MonitoringConfig( HealthEndpoint healthEndpoint, HealthStatusHttpMapper statusMapper, InfoEndpoint infoEndpoint ) {\n this.healthEndpoint = healthEndpoint;\n this.statusMapper = statusMapper;\n this.infoEndpoint = infoEndpoint;\n }",
"@Override\n\tpublic Object getMapper() {\n\t\treturn null;\n\t}",
"@Override\n public Optional<SourceMapper> sourceMapper() {\n return devContext().map(play.api.ApplicationLoader.DevContext::sourceMapper);\n }",
"public ObjectMapper getMapper() {\n return mapper;\n }",
"private static java.util.HashMap<Integer, Command> getMappings() {\n if (mappings == null) {\n synchronized (Command.class) {\n if (mappings == null) {\n mappings = new java.util.HashMap<Integer, Command>();\n }\n }\n }\n return mappings;\n }",
"public interface AdminMapper {\n}",
"public void dumpTypeMapping(Config config) throws FileNotFoundException {\n PrintStream stream = new PrintStream(\"type_mapping.txt\");\n\n // avoid \"unused\" warning\n dumpMap(stream, new HashMap<String, String>());\n //\n // Map<String, String> simpleAttrAtomicTypeMapping =\n // config.getSimpleAttrAtomicTypeMapping();\n // stream.println(\"AttrAtomicTypeMapping\");\n // dumpMap(stream, simpleAttrAtomicTypeMapping);\n // stream.println(\n // \"***********************************************************\");\n // stream.println();\n // stream.println();\n //\n // Map<String, String> simpleAttrAtomicTypePreConversionMapping = config\n // .getSimpleAttrAtomicTypePreConversionMapping();\n // stream.println(\"AttrAtomicTypePreConversionMapping\");\n // dumpMap(stream, simpleAttrAtomicTypePreConversionMapping);\n // stream.println(\n // \"***********************************************************\");\n // stream.println();\n // stream.println();\n //\n // Map<String, String> simpleAttrAtomicTypeConversionMapping =\n // config.getSimpleAttrAtomicTypeConversionMapping();\n // stream.println(\"AttrAtomicTypeConversionMapping\");\n // dumpMap(stream, simpleAttrAtomicTypeConversionMapping);\n // stream.println(\n // \"***********************************************************\");\n // stream.println();\n // stream.println();\n //\n // Map<String, String> simpleAttrAtomicTypePostConversionMapping =\n // config\n // .getSimpleAttrAtomicTypePostConversionMapping();\n // stream.println(\"AttrAtomicTypePostConversionMapping\");\n // dumpMap(stream, simpleAttrAtomicTypePostConversionMapping);\n // stream.println(\n // \"***********************************************************\");\n // stream.println();\n // stream.println();\n //\n // Map<String, String> simpleAttrListTypeMapping =\n // config.getSimpleAttrListTypeMapping();\n // stream.println(\"AttrListTypeMapping\");\n // dumpMap(stream, simpleAttrListTypeMapping);\n // stream.println(\n // \"***********************************************************\");\n // stream.println();\n // stream.println();\n //\n // Map<String, String> simpleAttrListTypePreConversionMapping =\n // config.getSimpleAttrListTypePreConversionMapping();\n // stream.println(\"AttrListTypePreConversionMapping\");\n // dumpMap(stream, simpleAttrListTypePreConversionMapping);\n // stream.println(\n // \"***********************************************************\");\n // stream.println();\n // stream.println();\n //\n // Map<String, String> simpleAttrListTypeConversionMapping =\n // config.getSimpleAttrListTypeConversionMappingNoItemValidation();\n // stream.println(\"AttrListTypeConversionMapping\");\n // dumpMap(stream, simpleAttrListTypeConversionMapping);\n // stream.println(\n // \"***********************************************************\");\n // stream.println();\n // stream.println();\n //\n // Map<String, String> simpleAttrListTypePostConversionMapping = config\n // .getSimpleAttrListTypePostConversionMapping();\n // stream.println(\"AttrListTypePostConversionMapping\");\n // dumpMap(stream, simpleAttrListTypePostConversionMapping);\n // stream.println(\n // \"***********************************************************\");\n // stream.println();\n // stream.println();\n //\n // Map<String, String> simpleDataAtomicTypeMapping =\n // config.getSimpleDataAtomicTypeMapping();\n // stream.println(\"DataAtomicTypeMapping\");\n // dumpMap(stream, simpleDataAtomicTypeMapping);\n // stream.println(\n // \"***********************************************************\");\n // stream.println();\n // stream.println();\n //\n // Map<String, String> simpleDataAtomicTypePreConversionMapping = config\n // .getSimpleDataAtomicTypePreConversionMapping();\n // stream.println(\"DataAtomicTypePreConversionMapping\");\n // dumpMap(stream, simpleDataAtomicTypePreConversionMapping);\n // stream.println(\n // \"***********************************************************\");\n // stream.println();\n // stream.println();\n //\n // Map<String, String> simpleDataAtomicTypeConversionMapping =\n // config.getSimpleDataAtomicTypeConversionMapping();\n // stream.println(\"DataAtomicTypeConversionMapping\");\n // dumpMap(stream, simpleDataAtomicTypeConversionMapping);\n // stream.println(\n // \"***********************************************************\");\n // stream.println();\n // stream.println();\n //\n // Map<String, String> simpleDataAtomicTypePostConversionMapping =\n // config\n // .getSimpleDataAtomicTypePostConversionMapping();\n // stream.println(\"DataAtomicTypePostConversionMapping\");\n // dumpMap(stream, simpleDataAtomicTypePostConversionMapping);\n // stream.println(\n // \"***********************************************************\");\n // stream.println();\n // stream.println();\n //\n // Map<String, String> simpleDataListTypeMapping =\n // config.getSimpleDataListTypeMapping();\n // stream.println(\"DataListTypeMapping\");\n // dumpMap(stream, simpleDataListTypeMapping);\n // stream.println(\n // \"***********************************************************\");\n // stream.println();\n // stream.println();\n //\n // Map<String, String> simpleDataListTypeConversionMapping =\n // config.getSimpleDataListTypeConversionMapping();\n // stream.println(\"DataListTypeConversionMapping\");\n // dumpMap(stream, simpleDataListTypeConversionMapping);\n // stream.println(\n // \"***********************************************************\");\n // stream.println();\n // stream.println();\n //\n stream.close();\n }",
"public JacksonAdapter() {\n simpleMapper = initializeObjectMapper(new ObjectMapper());\n //\n xmlMapper = initializeObjectMapper(new XmlMapper());\n xmlMapper.configure(ToXmlGenerator.Feature.WRITE_XML_DECLARATION, true);\n xmlMapper.setDefaultUseWrapper(false);\n //\n ObjectMapper flatteningMapper = initializeObjectMapper(new ObjectMapper())\n .registerModule(FlatteningSerializer.getModule(simpleMapper()))\n .registerModule(FlatteningDeserializer.getModule(simpleMapper()));\n jsonMapper = initializeObjectMapper(new ObjectMapper())\n // Order matters: must register in reverse order of hierarchy\n .registerModule(AdditionalPropertiesSerializer.getModule(flatteningMapper))\n .registerModule(AdditionalPropertiesDeserializer.getModule(flatteningMapper))\n .registerModule(FlatteningSerializer.getModule(simpleMapper()))\n .registerModule(FlatteningDeserializer.getModule(simpleMapper())); }",
"protected StreamsJacksonMapper() {\n super();\n registerModule(new StreamsJacksonModule(configuration.getDateFormats()));\n if ( configuration.getEnableScala()) {\n registerModule(new DefaultScalaModule());\n }\n configure();\n }",
"@Override\n public String mapping() {\n return StringUtils.lines(\n \"foo.bar.Baz -> foo.bar.Baz:\", \" java.lang.Object f1 -> a\", \" java.lang.String f2 -> a\");\n }",
"@Override\n\tpublic Map<String, String> getConfig() {\n\t\treturn null;\n\t}",
"public Mapping getMapping() {\n return mapping;\n }",
"public interface Mapper {\n\n\t/**\n\t * A {@link Mapper} is uniquely identified with a {@link String}. This\n\t * helps differentiating mapping XMLs produced with different mappers.\n\t * \n\t * @return the unique identifier of this mapper\n\t */\n\tpublic abstract String getMapperId();\n\t\n\t/**\n\t * Maps the cores from the APCG to the nodes from the NoC.\n\t * \n\t * @see MappingType\n\t * \n\t * @return a array of Strings containing the mappings (specially for multi-objective case) XML\n\t * \n\t * @throws TooFewNocNodesException\n\t */\n\tpublic abstract String[] map() throws TooFewNocNodesException;\n\n}",
"public static BokMapper getInstance(){\r\n\t\treturn BokMapper;\r\n\t}",
"@Override\n public SmarterMap fetchConf() {\n SmarterMap result = new SmarterMap();\n\n List<File> files = new LinkedList<>();\n File conf = new File(path);\n if (conf.isDirectory()) {\n for (File f : conf.listFiles()) {\n if (f.getName().endsWith(\".json\") || f.getName().endsWith(\".yaml\") || f.getName().endsWith(\".yml\")) {\n files.add(f);\n }\n }\n } else {\n files.add(conf);\n }\n\n for (File f : files) {\n if (f.isFile()) {\n String confFileName = f.getName().replaceAll(\"\\\\.[^.]*$\", \"\");\n SmarterMap c = Fwissr.parseConfFile(f);\n mergeConf(result, c, confFileName.split(\"\\\\.\"), TOP_LEVEL_CONF_FILES.contains(confFileName));\n }\n }\n\n return result;\n }",
"public abstract void Configure( DataMap<String, Serializable> configuration);",
"@Override\n\tpublic List<String> getMappings() {\n\t\treturn mappings;\n\t}",
"@Override\n\tpublic Map<String, String> getConf() {\n\t\treturn null;\n\t}",
"public Map<String, ModuleDTO> getModuleNameToDtoMap() {\n\t\treturn moduleNameToDtoMap;\n\t}",
"Map<String, String> getConfigProperties();",
"public SegmentationJobConfigurator colMap(List<String> sourceFields, List<String> targetFields,\n BufferedReader segSpecReader) throws IOException {\n List<ColumnMapping> mappings = new ArrayList<ColumnMapping>(groupKeys.size());\n StringBuilder metricsSB = new StringBuilder();\n int i = 0;\n\n for (String targetField : targetFields) {\n if (sourceFields.contains(targetField)) {\n if (groupKeys.containsKey(targetField)) {\n mappings.add(new ColumnMapping(sourceFields.indexOf(targetField), groupKeys.get(targetField)));\n } else if (metrics.contains(targetField)) {\n if (i++ > 0) {\n metricsSB.append(',');\n }\n metricsSB.append(sourceFields.indexOf(targetField));\n }\n\n }\n }\n\n metricsStr = metricsSB.toString();\n StringBuilder colMapSB = new StringBuilder();\n for (ColumnMapping mapping : mappings) {\n colMapSB.append(mapping.toString()).append('\\n');\n }\n colMapStr = colMapSB.toString();\n StringBuilder segSpecSB = new StringBuilder();\n String line = segSpecReader.readLine();\n while (line != null && !\"\".equals(line.trim())) {\n String[] vals = line.split(\"\\t\");\n segSpecSB.append(vals[0]).append('\\t').append(vals[1]).append('\\t');\n String[] segFields = vals[2].split(\",\");\n int c = 0;\n for (String segField : segFields) {\n segField = segField.trim().toLowerCase();\n if (sourceFields.contains(segField) && groupKeys.containsKey(segField)) {\n if (c++ > 0) {\n segSpecSB.append(',');\n }\n segSpecSB.append(sourceFields.indexOf(segField));\n }\n }\n segSpecSB.append('\\n');\n line = segSpecReader.readLine();\n }\n segSpecStr = segSpecSB.toString();\n return this;\n }",
"public abstract Configuration configuration();",
"@Mapper\npublic interface SpiderMapper {\n \n}",
"public String getMappingFilePath();",
"@Override\r\n\tpublic BaseMapper<T> getMapper() {\n\t\treturn orderMapper;\r\n\t}",
"public Map getJMSConnectorConfig()\n\t{\n\t\tMap params = getParams( \"jmsConnectorConfig\" );\n\t\t\n\t\treturn( params );\n\t}",
"public ResultSetMapper() {\n registerAttributeConverters();\n this.fieldNamingStrategy = new IdentityFieldNamingStrategy();\n logger.info(\"No specific field naming strategy has been set. It will default to the {} field naming strategy.\", this.fieldNamingStrategy);\n }",
"private void getExternalConfig()\n {\n String PREFIX = \"getExternalConfig override name [{}] value [{}]\";\n // Check to see if the ldap host has been overridden by a system property:\n String szValue = System.getProperty( EXT_LDAP_HOST );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.LDAP_HOST, szValue );\n LOG.info( PREFIX, GlobalIds.LDAP_HOST, szValue );\n }\n // Check to see if the ldap port has been overridden by a system property:\n szValue = System.getProperty( EXT_LDAP_PORT );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.LDAP_PORT, szValue );\n LOG.info( PREFIX, GlobalIds.LDAP_PORT, szValue );\n }\n\n // Check to see if the admin pool uid has been overridden by a system property:\n szValue = System.getProperty( EXT_LDAP_ADMIN_POOL_UID );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.LDAP_ADMIN_POOL_UID, szValue );\n // never display ldap admin userid name to log:\n LOG.info( \"getExternalConfig override name [{}]\", GlobalIds.LDAP_ADMIN_POOL_UID );\n }\n\n // Check to see if the admin pool pw has been overridden by a system property:\n szValue = System.getProperty( EXT_LDAP_ADMIN_POOL_PW );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.LDAP_ADMIN_POOL_PW, szValue );\n // never display password of any type to log:\n LOG.info( \"getExternalConfig override name [{}]\", GlobalIds.LDAP_ADMIN_POOL_PW );\n }\n\n // Check to see if the admin pool min connections has been overridden by a system property:\n szValue = System.getProperty( EXT_LDAP_ADMIN_POOL_MIN );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.LDAP_ADMIN_POOL_MIN, szValue );\n LOG.info( PREFIX, GlobalIds.LDAP_ADMIN_POOL_MIN, szValue );\n }\n\n // Check to see if the admin pool max connections has been overridden by a system property:\n szValue = System.getProperty( EXT_LDAP_ADMIN_POOL_MAX );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.LDAP_ADMIN_POOL_MAX, szValue );\n LOG.info( PREFIX, GlobalIds.LDAP_ADMIN_POOL_MAX, szValue );\n }\n\n // Check to see if the log pool uid has been overridden by a system property:\n szValue = System.getProperty( EXT_LDAP_LOG_POOL_UID );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.LDAP_LOG_POOL_UID, szValue );\n // never display ldap admin userid name to log:\n LOG.info( \"getExternalConfig override name [{}]\", GlobalIds.LDAP_LOG_POOL_UID );\n }\n\n // Check to see if the log pool pw has been overridden by a system property:\n szValue = System.getProperty( EXT_LDAP_LOG_POOL_PW );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.LDAP_LOG_POOL_PW, szValue );\n // never display password of any type to log:\n LOG.info( \"getExternalConfig override name [{}]\", GlobalIds.LDAP_LOG_POOL_PW );\n }\n\n // Check to see if the log pool min connections has been overridden by a system property:\n szValue = System.getProperty( EXT_LDAP_LOG_POOL_MIN );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.LDAP_LOG_POOL_MIN, szValue );\n LOG.info( PREFIX, GlobalIds.LDAP_LOG_POOL_MIN, szValue );\n }\n\n // Check to see if the log pool max connections has been overridden by a system property:\n szValue = System.getProperty( EXT_LDAP_LOG_POOL_MAX );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.LDAP_LOG_POOL_MAX, szValue );\n LOG.info( PREFIX, GlobalIds.LDAP_LOG_POOL_MAX, szValue );\n }\n\n // Check to see if ssl enabled parameter has been overridden by a system property:\n szValue = System.getProperty( EXT_ENABLE_LDAP_SSL );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.ENABLE_LDAP_SSL, szValue );\n LOG.info( PREFIX, GlobalIds.ENABLE_LDAP_SSL, szValue );\n }\n \n // Check to see if start tls enabled parameter has been overridden by a system property:\n szValue = System.getProperty( EXT_ENABLE_LDAP_STARTTLS );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.ENABLE_LDAP_STARTTLS, szValue );\n LOG.info( PREFIX, GlobalIds.ENABLE_LDAP_STARTTLS, szValue );\n }\n\n // Check to see if the ssl debug enabled parameter has been overridden by a system property:\n szValue = System.getProperty( EXT_ENABLE_LDAP_SSL_DEBUG );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.ENABLE_LDAP_SSL_DEBUG, szValue );\n LOG.info( PREFIX, GlobalIds.ENABLE_LDAP_SSL_DEBUG, szValue );\n }\n\n // Check to see if the trust store location has been overridden by a system property:\n szValue = System.getProperty( EXT_TRUST_STORE );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.TRUST_STORE, szValue );\n LOG.info( PREFIX, GlobalIds.TRUST_STORE, szValue );\n }\n\n // Check to see if the trust store password has been overridden by a system property:\n szValue = System.getProperty( EXT_TRUST_STORE_PW );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.TRUST_STORE_PW, szValue );\n // never display password value to log:\n LOG.info( \"getExternalConfig override name [{}]\", GlobalIds.TRUST_STORE_PW );\n }\n\n // Check to see if the trust store onclasspath parameter has been overridden by a system property:\n szValue = System.getProperty( EXT_TRUST_STORE_ONCLASSPATH );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.TRUST_STORE_ON_CLASSPATH, szValue );\n LOG.info( PREFIX, GlobalIds.TRUST_STORE_ON_CLASSPATH, szValue );\n }\n\n // Check to see if the suffix has been overridden by a system property:\n szValue = System.getProperty( EXT_CONFIG_SUFFIX );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.SUFFIX, szValue );\n LOG.info( PREFIX, GlobalIds.SUFFIX, szValue );\n\n }\n\n // Check to see if the config realm name has been overridden by a system property:\n szValue = System.getProperty( EXT_CONFIG_REALM );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.CONFIG_REALM, szValue );\n LOG.info( PREFIX, GlobalIds.CONFIG_REALM, szValue );\n }\n\n // Check to see if the config node dn has been overridden by a system property:\n szValue = System.getProperty( EXT_CONFIG_ROOT_DN );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.CONFIG_ROOT_PARAM, szValue );\n LOG.info( PREFIX, GlobalIds.CONFIG_ROOT_PARAM, szValue );\n }\n\n // Check to see if the ldap server type has been overridden by a system property:\n szValue = System.getProperty( EXT_SERVER_TYPE );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.SERVER_TYPE, szValue );\n LOG.info( PREFIX, GlobalIds.SERVER_TYPE, szValue );\n }\n\n // Check to see if ARBAC02 checking enforced in service layer:\n szValue = System.getProperty( EXT_IS_ARBAC02 );\n if( StringUtils.isNotEmpty( szValue ))\n {\n Boolean isArbac02 = Boolean. valueOf( szValue );\n config.setProperty( GlobalIds.IS_ARBAC02, isArbac02.booleanValue() );\n LOG.info( PREFIX, GlobalIds.IS_ARBAC02, isArbac02.booleanValue() );\n }\n }",
"public ConfigMapDTO getMapProperty(final String name) {\n \t\treturn mapProperties.get(name);\n \t}",
"public SimpleXMLPipelineConfiguration() {\n configurations = new HashMap();\n }",
"@Override\n\tpublic Map<String, String> getConfigParams(IFloodlightModule module) {\n\t Map<String, String> retMap = configParams.get(module.getClass());\n\t if (retMap == null) {\n\t // Return an empty map if none exists so the module does not\n\t // need to null check the map\n\t retMap = new HashMap<String, String>();\n\t configParams.put(module.getClass(), retMap);\n\t }\n\n\t // also add any configuration parameters for superclasses, but\n\t // only if more specific configuration does not override it\n\t for (Class<? extends IFloodlightModule> c : configParams.keySet()) {\n\t if (c.isInstance(module)) {\n\t for (Map.Entry<String, String> ent : configParams.get(c).entrySet()) {\n\t if (!retMap.containsKey(ent.getKey())) {\n\t retMap.put(ent.getKey(), ent.getValue());\n\t }\n\t }\n\t }\n\t }\n\n\t return retMap;\n\t}",
"Map<String, String> getEndpointMap();",
"public Mapping[] getMapping() {\n return mMapping;\n }",
"public Map<String, Integer> getMappings() {\n return mappingPredicateToInt;\n }",
"public interface AppConfigs {\n\n Double getDouble(String s);\n\n Double getDouble(String s, Double aDouble);\n\n Float getFloat(String s);\n\n Float getFloat(String s, Float aFloat);\n\n Integer getInt(String s);\n\n Integer getInt(String s, Integer integer);\n\n Long getLong(String s);\n\n Long getLong(String s, Long aLong);\n\n String getString(String s);\n\n String getString(String s, String s1);\n\n java.util.Map<String, String> toMap();\n\n Boolean getBoolean(String s);\n\n Boolean getBoolean(String s, boolean s1);\n}",
"public HALMapper() {\n registerModule(DEFAULT_HAL_MODULE);\n }",
"public java.util.Map<java.lang.Integer, java.lang.Integer> getInfoMap() {\n return internalGetInfo().getMap();\n }",
"public interface SettingsMap\n{\n\n /**\n * Adds a {@link ConfigFunction} to this settings map, so that it can be read back\n * using {@link #getConfigFunctions(Object, boolean)}.\n *\n * @param functions The function to add.\n */\n void addConfigFunctions(Collection<? extends ConfigFunction<?>> functions);\n\n /**\n * Gets all ConfigFunctions in this configuration. If this reader doesn't\n * support ConfigFunctions, an empty list will be returned.\n *\n * @param <T> The type of the config functions.\n * @param holder The holder of all config functions.\n * @param useFallback True if the {@link #setFallback(SettingsMap)\n * fallback reader} must be used, false otherwise.\n * @return The config functions.\n */\n <T> List<ConfigFunction<T>> getConfigFunctions(T holder, boolean useFallback);\n\n /**\n * Gets the name of this config file. For worlds, this is the world name,\n * for biomes this is the biome name, etc.\n *\n * @return The name of this config file.\n */\n String getName();\n\n /**\n * Gets all settings in this config file in an unparsed state.\n *\n * @return The raw settings.\n */\n Collection<RawSettingValue> getRawSettings();\n\n /**\n * Reads a setting. If the setting does not exist, the default value for the\n * setting is returned.\n * @param <S> Type of the value of the setting.\n * @param setting The setting to read.\n * @return The setting value.\n */\n <S> S getSetting(Setting<S> setting);\n\n /**\n * Reads a setting. This method allows you to provide another default\n * value. If the setting has an invalid value, a message is logged and\n * the default value is returned.\n * @param <S> Type of the value of the setting.\n * @param setting The setting to read.\n * @param defaultValue Default value for the setting.\n * @return The value of the setting.\n */\n <S> S getSetting(Setting<S> setting, S defaultValue);\n\n /**\n * Gets whether the reader has a value of the given setting. If this\n * method returns false, trying to get the setting will return the default\n * value.\n * @param setting The setting to check for.\n * @return The setting.\n */\n boolean hasSetting(Setting<?> setting);\n\n /**\n * Gets whether the config file is newly created.\n *\n * <p>This is used for backwards compatibility of settings files. When a\n * new setting is introduced, and its default value doesn't match the old\n * behavior, the default value must be changed to match the old\n * behavior for old configs.\n *\n * <p>An example of this is SurfaceAndGroundControl, that should not\n * create stone on the surface of existing Extreme Hills biomes, but\n * should create stone on new Extreme Hills biomes.\n * @return True if this\n */\n boolean isNewConfig();\n\n /**\n * Adds a setting to this map, overwriting existing settings with the same name.\n * @param <S> Type of the value of the setting.\n * @param setting The setting to set.\n * @param value The value of the setting.\n * @param comments Comments for the setting. Each comment is written on its\n * own line.\n */\n <S> void putSetting(Setting<S> setting, S value, String... comments);\n\n /**\n * Adds a raw setting to this map. If this setting has a type of\n * {@link ValueType#PLAIN_SETTING}, it will overwrite existing settings with\n * the same name. \n * @param value Raw value for the setting.\n */\n void addRawSetting(RawSettingValue value);\n\n /**\n * Renames an old setting. If the old setting isn't found, this does\n * nothing.\n *\n * @param oldName Name of the old setting.\n * @param newSetting The new setting.\n */\n void renameOldSetting(String oldName, Setting<?> newSetting);\n\n /**\n * When {@link #getSetting(Setting, Object)} can't read a setting, it will\n * ask this reader to provide the setting value instead. This essentially\n * makes the given reader a fallback.\n *\n * @param reader The reader to fall back.\n */\n void setFallback(SettingsMap reader);\n\n /**\n * Adds a big title to the config file. New setting added after this title\n * will be placed below this title.\n * @param title The title text.\n * @param comments Comments directly after the title.\n */\n void smallTitle(String title, String... comments);\n\n /**\n * Adds a small title to the config file. New setting added after this title\n * will be placed below this title.\n * @param title The title text.\n * @param comments Comments directly after the title.\n */\n void bigTitle(String title, String... comments);\n\n}",
"public java.util.Map<java.lang.Integer, java.lang.Integer> getInfoMap() {\n return internalGetInfo().getMap();\n }",
"private FieldSetMapper<IdentityCard2> createIdentityCard2FieldSetMapper() {\r\n\t\tBeanWrapperFieldSetMapper<IdentityCard2> fieldSetMapper = new BeanWrapperFieldSetMapper<>();\r\n\t\tfieldSetMapper.setTargetType(IdentityCard2.class);\r\n\t\treturn fieldSetMapper;\r\n\t}",
"public Map<String, Object> getComponentConfiguration() {\n\t\tSystem.out.println(\"WordReader.getComponentConfiguration\");\n\t\treturn null;\n\t}",
"@Mapper\npublic interface GridMapper {\n int addGrid(Map gridMap);\n\n int updateGrid(Map gridMap);\n\n int deleteGrid(Map gridMap);\n\n List listGrid(Map gridMap);\n\n Map getGrid(Map idMap);\n\n List allGridByType(Map map);\n\n int countGrid();\n int countGridByUser(Map map);\n\n List getTopImage();\n}",
"@Bean\n\tpublic ObjectMapper mapper() {\n\t\treturn new ObjectMapper();\n\t}",
"@Override\n public Map<String, ConfiguredVariableItem> getConfiguration() {\n return config;\n }",
"public interface Config {\n\t\t/**\n\t\t * the IdentityX policy which should be used for authentication\n\t\t *\n\t\t * @return the policy name\n\t\t */\n\t\t@Attribute(order = 100, validators = { RequiredValueValidator.class })\n\t\tString policyName();\n\n\t\t/**\n\t\t * the IdentityX application to be used\n\t\t *\n\t\t * @return the application Id\n\t\t */\n\t\t@Attribute(order = 200, validators = { RequiredValueValidator.class })\n\t\tString applicationId();\n\t\t\n\t\t\n\t\t/**\n\t\t * the IdentityX Description to be used\n\t\t *\n\t\t * @return the transactionDescription\n\t\t */\n\t\t@Attribute(order = 300, validators = { RequiredValueValidator.class })\n\t\tdefault String transactionDescription() {\n\t\t\treturn \"OpenAM has Requested an Authentication\";\n\t\t}\n\t}",
"abstract public Map<ScrapMode, List<String>> getScrapConfigurations();",
"public final Caseless getMapping() {\n\t\treturn mappedto;\n\t}",
"public interface Mapper<T, T2> {\n\n /**\n * Sets the source object.\n *\n * @param source the source instance.\n * @return a <b>IOMap</b> instance.\n */\n Mapper<T, T2> from(T source);\n\n /**\n * Sets the target class.\n *\n * @param target the target class.\n * @return a <b>IOMap</b> instance.\n */\n Mapper<T, T2> to(Class<T2> target);\n\n /**\n * Sets an ignorable object with the ignorable fields for mapping operation.\n *\n * @param ignorable the ignorable instance.\n * @return a <b>IOMap</b> instance.\n */\n Mapper<T, T2> ignoring(Ignorable ignorable);\n\n /**\n * Sets a customizable object with the fields for the explicit mapping.\n *\n * @param customizable the customizable instance.\n * @return a <b>IOMap</b> instance.\n */\n Mapper<T, T2> relate(Customizable customizable);\n\n /**\n * Starts with the building target object\n *\n * @return a target object instance.\n */\n T2 build();\n\n}",
"@Override\r\n\tpublic Mapper<Keyword> getMapper() {\n\t\treturn null;\r\n\t}",
"private void parseConfigurations() {\n\t\ttry {\n\t\t\tJsonNode propertiesNode = rawConfig.getProperties();\n\t\t\t\n\t\t\tif(propertiesNode != null && propertiesNode.size() > 0) {\n\t\t\t\tBeanInfoWrapper wrapper = new BeanInfoWrapper(this.beanClazz);\n\t\t\t\tIterator<Map.Entry<String, JsonNode>> it = propertiesNode.fields();\n\n\t\t\t\twhile(it.hasNext()) {\n\t\t\t\t\tMap.Entry<String, JsonNode> entry = it.next();\n\t\t\t\t\tString propName = entry.getKey();\n\t\t\t\t\tPropertyDescriptor propDesc = wrapper.getPropertyDesc(propName);\n\t\t\t\t\tif(propDesc == null) {\n\t\t\t\t\t\tthrow new ConfigException(\"Failed to found the property name='\" + propName + \", in class '\" + beanClazz + \"'\");\n\t\t\t\t\t}\n\t\t\t\t\tProperty prop = new Property(this.beanClazz, propDesc);\n\t\t\t\t\tValueNode valueNode = getNodeValue(prop.getType(), entry.getValue(), prop.getContentParamType(), prop.getKeyParamType());\n\t\t\t\t\t\n\t\t\t\t\tproperties.put(prop, valueNode);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(ValueUtils.notEmpty(rawConfig.getDestroyMethod())) {\n\t\t\t\tdestroyMethod = beanClazz.getMethod(rawConfig.getDestroyMethod());\n\t\t\t}\n\t\t\t\n\t\t\tif(ValueUtils.notEmpty(rawConfig.getInitMethod())) {\n\t\t\t\tinitMethod = beanClazz.getMethod( rawConfig.getInitMethod());\n\t\t\t}\n\t\t} catch (NoSuchMethodException e) {\n\t\t\tthrow new ConfigException(\"Failed to found the method in the class '\" + beanClazz.getClass() + \"'\", e);\n\t\t\t\n\t\t} catch (SecurityException e) {\n\t\t\tthrow new ConfigException(\"Failed to access the method in the class '\" + beanClazz.getClass() + \"'\", e);\n\t\t}\n\t\t\n\t}",
"@Mapper\r\npublic interface GridMapper {\r\n int addGrid(Map gridMap);\r\n\r\n int updateGrid(Map gridMap);\r\n\r\n int deleteGrid(Map gridMap);\r\n\r\n List listGrid(Map gridMap);\r\n\r\n Map getGrid(Map idMap);\r\n\r\n List allGridByType(Map map);\r\n\r\n int countGrid();\r\n int countGridByUser(Map map);\r\n\r\n List getTopImage();\r\n}",
"public interface SysConfigMapper extends IBaseMapper<SysConfig> {\n\n public Integer updateSysConfig(@Param(\"key\") String key, @Param(\"sysValue\") String sysValue);\n\n public List<SysConfig> getAll();\n\n}"
]
| [
"0.64379644",
"0.6198716",
"0.617621",
"0.5878331",
"0.58723307",
"0.58603406",
"0.581771",
"0.581771",
"0.5808729",
"0.5793494",
"0.57912606",
"0.57454056",
"0.5708901",
"0.5653942",
"0.5602082",
"0.5586549",
"0.5571551",
"0.55578154",
"0.5541061",
"0.5506989",
"0.55051345",
"0.546469",
"0.54563725",
"0.5438058",
"0.5431028",
"0.5416795",
"0.54097486",
"0.53996086",
"0.539499",
"0.5392023",
"0.5386816",
"0.5381189",
"0.53702646",
"0.5366839",
"0.5364817",
"0.535418",
"0.5340599",
"0.5289577",
"0.5288769",
"0.52741706",
"0.52728695",
"0.526403",
"0.5238552",
"0.5234716",
"0.5233832",
"0.52314204",
"0.5226023",
"0.5218314",
"0.5214795",
"0.5209737",
"0.5206927",
"0.5203834",
"0.5199959",
"0.5194683",
"0.5192093",
"0.51816934",
"0.5173125",
"0.51668257",
"0.51598924",
"0.5153884",
"0.5139514",
"0.5128113",
"0.51234853",
"0.51154745",
"0.5111374",
"0.50963414",
"0.5095301",
"0.5091415",
"0.50895",
"0.50889647",
"0.5087512",
"0.5079607",
"0.50792795",
"0.5077068",
"0.50646967",
"0.5056799",
"0.5055241",
"0.50436455",
"0.50406396",
"0.5035032",
"0.5032418",
"0.5030827",
"0.5028497",
"0.50252324",
"0.50227916",
"0.5015578",
"0.5014478",
"0.5014065",
"0.5013118",
"0.50060546",
"0.5000833",
"0.4994244",
"0.4983178",
"0.49779236",
"0.497713",
"0.49753082",
"0.49752456",
"0.49751",
"0.49695024",
"0.4965855"
]
| 0.5214726 | 49 |
To delete aggregated data in bulk, you need to specify a list of datum. The default sql: DELETE FROM config_info_aggr WHERE data_id=? AND group_id=? AND tenant_id=? AND datum_id IN (...) | String batchRemoveAggr(List<String> datumList); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void deleteBatch(List<Integer> list) {\n\t\tEmployeeExample employeeExample=new EmployeeExample();\n\t\tCriteria createCriteria = employeeExample.createCriteria();\n\t\tcreateCriteria.andEmpIdIn(list);\n\t\temployeeMapper.deleteByExample(employeeExample);\n\t}",
"int deleteByPrimaryKeyBulk(@Param(\"ids\") List<Long> ids);",
"@Override\n\tpublic void deleteInBatch(Iterable<Audit> entities) {\n\t\t\n\t}",
"@Override\n\tpublic String deleteBatch(List<Map<String, Object>> entityMap)\n\t\t\tthrows DataAccessException {\n\t\treturn null;\n\t}",
"void deleteByDomainIds(List<String> domainIds) throws SrdmDataAccessException;",
"public java.util.List<Long> deleteByHoppyIds(java.util.List<Long> hoppyIds) throws DataAccessException;",
"public void deleteAllGeneListAnalysisResultsForGeneList(int gene_list_id, Connection conn) throws SQLException {\r\n\r\n\t\tString select = \"select analysis_id \"+\r\n\t\t\t\t\"from gene_list_analyses \"+\r\n\t\t\t\t\"where gene_list_id = ?\";\r\n \t\r\n \t\tPreparedStatement pstmt = conn.prepareStatement(select,\r\n \tResultSet.TYPE_SCROLL_INSENSITIVE,\r\n \tResultSet.CONCUR_UPDATABLE);\r\n\t\tpstmt.setInt(1, gene_list_id);\r\n\r\n pstmt.executeUpdate();\r\n\t\tResultSet rs = pstmt.executeQuery();\r\n\r\n while (rs.next()) {\r\n\t\t\tdeleteGeneListAnalysisResult(rs.getInt(1), conn);\r\n\t\t}\r\n\t\tpstmt.close();\r\n \t}",
"int deleteByExample(ConfigDataExample example);",
"int batchDelete(List<Integer> ids);",
"@Override\r\n\tpublic void deleteBatchNos(List<String> contractnos) {\n\t\tsuper.baseMapper.deleteBatchNos(contractnos);\r\n\t}",
"public int batchDelete(String[] list) {\n\treturn projectmapper.batchDelete(list);\n}",
"@Override\n public int deleteByEventAndDataElementUIds(@NonNull String eventUid,\n @NonNull List<String> dataElementUids) {\n\n List<String> argumentValues = new ArrayList<>();\n argumentValues.add(eventUid);\n argumentValues.addAll(dataElementUids);\n String[] argumentValuesArray = argumentValues.toArray(new String[argumentValues.size()]);\n\n // execute and clear bindings\n //int delete = databaseAdapter.delete(\"\",\"\",\"\")..executeUpdateDelete(\n // TrackedEntityDataValueModel.TABLE, deleteRowStatement);\n\n String inArguments = TextUtils.join(\n \",\", Collections.nCopies(dataElementUids.size(), \"?\"));\n\n int delete = databaseAdapter.delete(TrackedEntityDataValueModel.TABLE,\n TrackedEntityDataValueModel.Columns.EVENT + \" = ? AND \" +\n TrackedEntityDataValueModel.Columns.DATA_ELEMENT + \" in (\" +\n inArguments + \");\", argumentValuesArray);\n\n return delete;\n }",
"@Override\r\n public void damdelete(Integer[] da_id) {\n userMapper.damdelete(da_id);\r\n }",
"@Override\n\tpublic void delete(List<Field> entity) {\n\t\t\n\t}",
"@Override\n\tpublic Integer delProjectBatch(List<ProjectInfo> projList) {\n\t\treturn sqlSession.update(\"cn.sep.samp2.project.delProjectBatch\", projList);\n\t}",
"public void deleteAll(UUID accId) {\n txMgr.doInTransaction(() -> {\n Set<UUID> notebooksIds = datasourcesIdx.delete(accId);\n\n datasourceTbl.deleteAll(notebooksIds);\n });\n }",
"@Override\n\tpublic ResultWrapper<Boolean> deleteMultiple(Map<String, List<Integer>> map) {\n\t\tResultWrapper<Boolean> rs = new ResultWrapper<Boolean>();\n\t\tList<Integer> listofIds = map.get(\"deleteMultiple\");\n\t\tIterator<Integer> itr = listofIds.iterator();\n\t\ttry {\n\t\t\twhile (itr.hasNext()) {\n\t\t\t\tInteger todoId = itr.next();\n\t\t\t\ttodosRepo.deleteById(todoId);\n\t\t\t}\n\t\t\trs.succeedDeleted(true);\n\t\t\treturn rs;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\trs.fail(false, \" Exception Occurs \"+e);\n\t\t\treturn rs;\n\t\t}\n\n\t}",
"@Override\n\tpublic void dbDelete(PreparedStatement pstmt) {\n\n\t\ttry \n\t\t{\n\t\t\tpstmt.setInt(1, getParent());\n\t\t\tpstmt.setInt(2, getParentType().getValue()); \t\t\t// owner_type\n\t\t\tpstmt.setString(3, this.predefinedPeriod.getKey() ); \t\t\t// period key\n\n\t\t\tpstmt.addBatch();\n\n\t\t} catch (SQLException e) {\n\t\t\tLogger logger = LogManager.getLogger(StateInterval.class.getName());\n\t\t\tlogger.error(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\t\t\t\n\n\t}",
"@Delete\n void deleteEggDaily(EggDaily... eggDaily);",
"public void deleteAnonGeneListAnalysisResult(int analysis_id, DataSource pool) throws SQLException {\r\n\r\n\t\tlog.info(\"in deleteGeneListAnalysisResult\");\r\n\t\t\r\n\r\n\t\tGeneListAnalysis thisGLA = getAnonGeneListAnalysis(analysis_id, pool);\r\n\r\n\t\t//\r\n\t\t// Had to do it this way because you can't delete the parameter_groups record before deleting the\r\n\t\t// gene_list_analyses record (it's a one-to-many)\r\n\t\t//\r\n\r\n \tString query1 = \r\n\t\t\t\"delete from gene_list_analyses \"+\r\n\t\t\t\"where analysis_id = ? \";\r\n\r\n\t\tString query2 =\r\n \t\"delete from parameter_values pv \"+\r\n \t\"where parameter_group_id = ?\";\r\n\r\n\t\tString query3 = \r\n \t\"delete from parameter_groups pg \"+\r\n \t\"where parameter_group_id = ?\";\r\n\r\n \t\tPreparedStatement pstmt = null;\r\n Connection conn=null;\r\n\t\ttry {\r\n conn=pool.getConnection();\r\n conn.setAutoCommit(false);\r\n\t\t\tint paramGroupID = thisGLA.getParameter_group_id();\r\n\r\n\t\t\tpstmt = conn.prepareStatement(query1,\r\n \tResultSet.TYPE_SCROLL_INSENSITIVE,\r\n \tResultSet.CONCUR_UPDATABLE);\r\n \tpstmt.setInt(1, analysis_id);\r\n \tpstmt.executeUpdate();\r\n\r\n\t\t\tpstmt = conn.prepareStatement(query2,\r\n \tResultSet.TYPE_SCROLL_INSENSITIVE,\r\n \tResultSet.CONCUR_UPDATABLE);\r\n \tpstmt.setInt(1, paramGroupID);\r\n \tpstmt.executeUpdate();\r\n\r\n\t\t\tpstmt = conn.prepareStatement(query3,\r\n \tResultSet.TYPE_SCROLL_INSENSITIVE,\r\n \tResultSet.CONCUR_UPDATABLE);\r\n \tpstmt.setInt(1, paramGroupID);\r\n \tpstmt.executeUpdate();\r\n pstmt.close();\r\n\t\t\tconn.commit();\r\n conn.close();\r\n conn=null;\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlog.error(\"In exception of deleteGeneListAnalysisResult\", e);\r\n\t\t\tconn.rollback();\r\n\t\t\tthrow e;\r\n\t\t} finally {\r\n\t\t\t//log.debug(\"in finally clause of deleteGeneListAnalysisResult\");\r\n\t\t\t\r\n\t\t\t//log.debug(\"after closing pstmt in finally clause of deleteGeneListAnalysisResult\");\r\n if(conn!=null && !conn.isClosed()){\r\n try{\r\n conn.close();\r\n conn=null;\r\n }catch(SQLException e){}\r\n }\r\n\t\t}\r\n\r\n\t\t\r\n\t}",
"@Override\n\tpublic void delete(List<Long> ids) {\n\t}",
"@Override\r\n\tpublic void delete(List<MonitoredSupermarket> msList, int userId) throws SQLException {\r\n\t\tcon = ConnectionPoolManager.getPoolManagerInstance().getConnectionFromPool();\r\n\t\tPreparedStatement ps = null;\r\n\r\n\t\tString query = \"delete from monitored_supermarket where id_user = ? and id_supermarket = ?\";\r\n\r\n\t\tint insertsNumber = msList.size();\r\n\t\t\r\n\t\ttry{\r\n\t\t\tps = con.prepareStatement(query);\r\n\r\n\t\t\tfor(int i = 0; i < insertsNumber; i++){\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tps.setInt(1, userId);\r\n\t\t\t\t\tps.setInt(2, msList.get(i).getId_supermarket().getId_supermarket());\r\n\t\t\t\t\tps.executeUpdate();\r\n\t\t\t\t}catch (SQLException e) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t} \t\r\n\t\t\t}\r\n\t\t} finally{\r\n\t\t\tConnectionPoolManager.getPoolManagerInstance().returnConnectionToPool(con);\r\n\t\t}\r\n\t\t\r\n\t\treturn;\r\n\r\n\t}",
"@Transactional\n\tpublic void deleteBatch(List<Integer> ids) {\n\t\temployeeMapper.deleteBatch(ids);\n\t}",
"public abstract void delete(Iterable<Long> ids);",
"public void deleteMulti(String ids);",
"@Override\r\n\tpublic void deleteBatch(Integer[] bankcardid) {\n\t\tbankcardMapper.deleteBatch(bankcardid);\r\n\t}",
"public void delete(Long[] ids) throws ProcessingException;",
"@Override\n\tpublic int batchDeleteInfo(List<Integer> list) {\n\t\treturn tBankInfoMapper.batchDeleteInfo(list);\n\t}",
"@Test\n @Prepare(autoImport = true, autoClearExistsData = true)\n public void testdeleteById() throws Exception {\n\n int[] ids = { 111123456, 111123457, 111123458, 111123459 };\n for (int id : ids) {\n inventoryOutDao.deleteById(id);\n }\n for (int id : ids) {\n assertNull(inventoryOutDao.getById(id));\n }\n\n // List<InventoryOutDO> list = inventoryOutDao.list(new\n // InventoryOutDO());\n // assertResultListSorted(list, \"id\");\n }",
"public int deleteList(String[] deleteRows, User user) throws Exception;",
"@Test\n public void testMetricDeletion() throws Exception {\n Aggregation agg1 = new DefaultAggregation(ImmutableList.of(\"dim1\", \"dim2\", \"dim3\"),\n ImmutableList.of(\"dim1\"));\n Aggregation agg2 = new DefaultAggregation(ImmutableList.of(\"dim1\", \"dim3\"),\n ImmutableList.of(\"dim3\"));\n\n int resolution = 1;\n Cube cube = getCube(\"testDeletion\", new int[] {resolution},\n ImmutableMap.of(\"agg1\", agg1, \"agg2\", agg2));\n\n Map<String, String> agg1Dims = new LinkedHashMap<>();\n agg1Dims.put(\"dim1\", \"1\");\n agg1Dims.put(\"dim2\", \"1\");\n agg1Dims.put(\"dim3\", \"1\");\n\n Map<String, String> agg2Dims = new LinkedHashMap<>();\n agg2Dims.put(\"dim1\", \"1\");\n agg2Dims.put(\"dim3\", \"1\");\n\n\n // write some data\n writeInc(cube, \"metric1\", 1, 1, agg1Dims);\n writeInc(cube, \"metric2\", 3, 3, agg2Dims);\n\n // verify data is there\n verifyCountQuery(cube, 0, 15, resolution, \"metric1\", AggregationFunction.SUM,\n agg1Dims, ImmutableList.of(),\n ImmutableList.of(\n new TimeSeries(\"metric1\", new HashMap<>(), timeValues(1, 1))));\n verifyCountQuery(cube, 0, 15, resolution, \"metric2\", AggregationFunction.SUM,\n agg2Dims, ImmutableList.of(),\n ImmutableList.of(\n new TimeSeries(\"metric2\", new HashMap<>(), timeValues(3, 3))));\n\n // delete metrics from agg2\n Predicate<List<String>> predicate =\n aggregates -> Collections.indexOfSubList(aggregates, new ArrayList<>(agg2Dims.keySet())) == 0;\n CubeDeleteQuery query =\n new CubeDeleteQuery(0, 15, resolution, agg2Dims, Collections.emptySet(), predicate);\n cube.delete(query);\n\n // agg1 data should still be there\n verifyCountQuery(cube, 0, 15, resolution, \"metric1\", AggregationFunction.SUM,\n agg1Dims, ImmutableList.of(),\n ImmutableList.of(\n new TimeSeries(\"metric1\", new HashMap<>(), timeValues(1, 1))));\n // agg2 data should get deleted\n verifyCountQuery(cube, 0, 15, resolution, \"metric2\", AggregationFunction.SUM,\n agg2Dims, ImmutableList.of(), ImmutableList.of());\n\n // delete metrics remain for agg1\n predicate = aggregates -> Collections.indexOfSubList(aggregates, new ArrayList<>(agg1Dims.keySet())) == 0;\n query = new CubeDeleteQuery(0, 15, resolution, agg1Dims, Collections.emptySet(), predicate);\n cube.delete(query);\n verifyCountQuery(cube, 0, 15, resolution, \"metric1\", AggregationFunction.SUM,\n agg1Dims, ImmutableList.of(), ImmutableList.of());\n }",
"@Override\n\tpublic int deleteBatch(String[] idArr) {\n\t\treturn 0;\n\t}",
"public void delAll(List list);",
"@Override\r\n\tpublic void batchDelete(String[] ids) {\n\t\tfor(int i=0;i<ids.length;i++)\r\n\t\t\tdelete(ids[i]);\t\r\n\t}",
"void deleteMulti(String[] pids);",
"@Override\n\tpublic void deleteInBatch(Iterable<Translator> entities) {\n\t\t\n\t}",
"@Override\r\n\tpublic void deleteInBatch(Iterable<Employee> arg0) {\n\t\t\r\n\t}",
"@DeleteMapping(\"/data-set-operations/{id}\")\n @Timed\n public ResponseEntity<Void> deleteDataSetOperation(@PathVariable Long id) {\n log.debug(\"REST request to delete DataSetOperation : {}\", id);\n dataSetOperationRepository.delete(id);\n dataSetOperationSearchRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"void delete(Iterable<? extends T> entities);",
"@Override\r\n\tpublic void deleteAllInBatch() {\n\t\t\r\n\t}",
"private void deleteExec(){\r\n\t\tList<HashMap<String,String>> selectedDatas=ViewUtil.getSelectedData(jTable1);\r\n\t\tif(selectedDatas.size()<1){\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Please select at least 1 item to delete\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tint options = 1;\r\n\t\tif(selectedDatas.size() ==1 ){\r\n\t\t\toptions = JOptionPane.showConfirmDialog(null, \"Are you sure to delete this Item ?\", \"Info\",JOptionPane.YES_NO_OPTION);\r\n\t\t}else{\r\n\t\t\toptions = JOptionPane.showConfirmDialog(null, \"Are you sure to delete these \"+selectedDatas.size()+\" Items ?\", \"Info\",JOptionPane.YES_NO_OPTION);\r\n\t\t}\r\n\t\tif(options==1){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tfor(HashMap<String,String> map:selectedDatas){\r\n\t\t\t\r\n\t\t\tdiscountService.deleteDiscountByMap(NameConverter.convertViewMap2PhysicMap(map, \"Discount\"));\r\n\t\t}\r\n\t\tthis.initDatas();\r\n\t}",
"@ContextCheck(compile = true)\n\tpublic static void checkDeleteAll(OperatorContextChecker checker) {\n\t\tHBASEPutDelete.compileTimeChecks(checker, \"HBASEDelete\");\n\t\tOperatorContext context = checker.getOperatorContext();\n\t\tSet<String> params = context.getParameterNames();\n\t\tif (params.contains(DELETE_ALL_PARAM_NAME)) {\n\t\t\tif (params.contains(HBASEOperator.STATIC_COLQ_NAME)\n\t\t\t\t\t|| params.contains(HBASEPutDelete.COL_QUAL_PARAM_NAME)) {\n\t\t\t\t// we're okay--\n\t\t\t} else {\n\t\t\t\tchecker.setInvalidContext(\"Parameter \" + DELETE_ALL_PARAM_NAME\n\t\t\t\t\t\t+ \" requires that either \"\n\t\t\t\t\t\t+ HBASEOperator.STATIC_COLQ_NAME + \" or \"\n\t\t\t\t\t\t+ HBASEPutDelete.COL_QUAL_PARAM_NAME + \" be set.\", null);\n\t\t\t}\n\t\t}\n\t}",
"public void deleteData(Dataset ds, ArrayList<Data> listData, ArrayList<DataHeader> listHeader, ArrayList<DataOperation> listOperation, ArrayList<Integer>[] listRowAndCol, boolean sync){\n setCursor(new Cursor(Cursor.WAIT_CURSOR));\n ArrayList v = new ArrayList();\n ArrayList<DataOperation> listOperationToUpdate = new ArrayList();\n ArrayList<Visualization> listVisualizationToUpdate = new ArrayList();\n ArrayList<DataOperation> listOperationToDel = new ArrayList();\n ArrayList<Visualization> listVisualizationToDel = new ArrayList();\n // remember selected cells\n ArrayList<Data> oldListData = new ArrayList();\n for(Iterator<Data> d = listData.iterator();d.hasNext();){\n oldListData.add((Data)d.next().clone());\n }\n for(Iterator<Integer> i=listRowAndCol[0].iterator();i.hasNext();){\n int id = i.next();\n for(int j=0; j<dataset.getNbCol(); j++){\n Data data = dataset.getData(id, j);\n if(data != null)\n oldListData.add((Data)data.clone());\n }\n }\n for(Iterator<Integer> j=listRowAndCol[1].iterator();j.hasNext();){\n int id = j.next();\n for(int i=0; i<dataset.getNbRows(); i++){\n Data data = dataset.getData(i, id);\n if(data != null && oldListData.indexOf(data) == -1)\n oldListData.add((Data)data.clone());\n }\n }\n // controller\n CopexReturn cr = this.controller.deleteData(false, ds, listData, listRowAndCol[0], listRowAndCol[1],listOperation, v);\n if (cr.isError()){\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n displayError(cr, getBundleString(\"TITLE_DIALOG_ERROR\"));\n return;\n }else if (cr.isWarning()){\n v = new ArrayList();\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n boolean isOk = displayError(cr, getBundleString(\"TITLE_DIALOG_CONFIRM\"));\n if (isOk){\n setCursor(new Cursor(Cursor.WAIT_CURSOR));\n cr = this.controller.deleteData(true, ds, listData, listRowAndCol[0], listRowAndCol[1],listOperation, v);\n if (cr.isError()){\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n displayError(cr, getBundleString(\"TITLE_DIALOG_ERROR\"));\n return;\n }\n }\n if(v.isEmpty()){\n //delete\n }else{\n Dataset newDs = (Dataset)v.get(0);\n ArrayList[] tabDel = (ArrayList[])v.get(1);\n listOperationToUpdate = (ArrayList<DataOperation>)tabDel[0];\n listOperationToDel = (ArrayList<DataOperation>)tabDel[1];\n listVisualizationToUpdate = (ArrayList<Visualization>)tabDel[2];\n listVisualizationToDel = (ArrayList<Visualization>)tabDel[3];\n updateDataset(newDs);\n }\n }else{\n if(v.isEmpty()){\n //delete\n }else{\n Dataset newDs = (Dataset)v.get(0);\n ArrayList[] tabDel = (ArrayList[])v.get(1);\n listOperationToUpdate = (ArrayList<DataOperation>)tabDel[0];\n listOperationToDel = (ArrayList<DataOperation>)tabDel[1];\n listVisualizationToUpdate = (ArrayList<Visualization>)tabDel[2];\n listVisualizationToDel = (ArrayList<Visualization>)tabDel[3];\n updateDataset(newDs);\n }\n }\n datasetModif = true;\n updateMenuData();\n datasetTable.addUndo(new DeleteUndoRedo(datasetTable, this, controller, oldListData,listData, listHeader, listRowAndCol, listOperation, listOperationToUpdate, listOperationToDel,listVisualizationToUpdate, listVisualizationToDel));\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n //log\n ArrayList<Integer> listIdRows = listRowAndCol[0];\n ArrayList<Integer> listIdColumns = listRowAndCol[1];\n dataProcessToolPanel.logDeleteDatas(dataset, listData, listRowAndCol[0], listRowAndCol[1],listOperation);\n cr = this.controller.exportHTML();\n if(cr.isError()){\n displayError(cr, getBundleString(\"TITLE_DIALOG_ERROR\"));\n }\n if(sync){\n dataProcessToolPanel.addSyncDeleteData(listData, listHeader, listOperation, listRowAndCol);\n }\n }",
"@Override\n\tpublic void deleteByPrimaryKeys(String ids) throws Exception {\n\t\tList<String> list = new ArrayList<String>();\n\t\t\n\t\tString[] strings = ids.split(\",\");\n\t\tfor (String string : strings) {\n\t\t\tlist.add(string);\n\t\t}\n\t\tstorageMapper.deleteByPrimaryKeys(list);\n\t}",
"@Override\r\n\tpublic CustomResult deleteBatch(String[] ids) throws Exception{\n\t\tint i = materialConsumeMapper.deleteBatch(ids);\r\n\t\tif(i>0){\r\n\t\t\treturn CustomResult.ok();\r\n\t\t}else{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public void deleteGeneListAnalysisResult(int analysis_id, Connection conn) throws SQLException {\r\n\r\n\t\tlog.info(\"in deleteGeneListAnalysisResult\");\r\n\t\tconn.setAutoCommit(false);\r\n\r\n\t\tGeneListAnalysis thisGLA = getGeneListAnalysis(analysis_id, conn);\r\n\r\n\t\t//\r\n\t\t// Had to do it this way because you can't delete the parameter_groups record before deleting the\r\n\t\t// gene_list_analyses record (it's a one-to-many)\r\n\t\t//\r\n\r\n \tString query1 = \r\n\t\t\t\"delete from gene_list_analyses \"+\r\n\t\t\t\"where analysis_id = ? \";\r\n\r\n\t\tString query2 =\r\n \t\"delete from parameter_values pv \"+\r\n \t\"where parameter_group_id = ?\";\r\n\r\n\t\tString query3 = \r\n \t\"delete from parameter_groups pg \"+\r\n \t\"where parameter_group_id = ?\";\r\n\r\n \t\tPreparedStatement pstmt = null;\r\n \t\r\n\t\ttry {\r\n\t\t\tint paramGroupID = thisGLA.getParameter_group_id();\r\n\r\n\t\t\tpstmt = conn.prepareStatement(query1,\r\n \tResultSet.TYPE_SCROLL_INSENSITIVE,\r\n \tResultSet.CONCUR_UPDATABLE);\r\n \tpstmt.setInt(1, analysis_id);\r\n \tpstmt.executeUpdate();\r\n\r\n\t\t\tpstmt = conn.prepareStatement(query2,\r\n \tResultSet.TYPE_SCROLL_INSENSITIVE,\r\n \tResultSet.CONCUR_UPDATABLE);\r\n \tpstmt.setInt(1, paramGroupID);\r\n \tpstmt.executeUpdate();\r\n\r\n\t\t\tpstmt = conn.prepareStatement(query3,\r\n \tResultSet.TYPE_SCROLL_INSENSITIVE,\r\n \tResultSet.CONCUR_UPDATABLE);\r\n \tpstmt.setInt(1, paramGroupID);\r\n \tpstmt.executeUpdate();\r\n\t\t\tconn.commit();\r\n\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlog.error(\"In exception of deleteGeneListAnalysisResult\", e);\r\n\t\t\tconn.rollback();\r\n\t\t\tthrow e;\r\n\t\t} finally {\r\n\t\t\tlog.debug(\"in finally clause of deleteGeneListAnalysisResult\");\r\n\t\t\tpstmt.close();\r\n\t\t\tlog.debug(\"after closing pstmt in finally clause of deleteGeneListAnalysisResult\");\r\n\t\t}\r\n\r\n\t\tconn.setAutoCommit(true);\r\n\t}",
"@Override\n\tpublic ResultMessage deleteMany(ArrayList<String> idList) {\n\t\tString sql=\"delete from paymentlist where ID=?\";\n\t\ttry {\n\t\t\tfor(int i=0;i<idList.size();i++){\n\t\t\tstmt=con.prepareStatement(sql);\n\t\t\tstmt.setString(1, idList.get(i));\n\t\t\tstmt.executeUpdate();\n\t\t\t}\n\t\t\treturn ResultMessage.Success;\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn ResultMessage.NotExist;\n\t\t}\t\t\t\n\t}",
"@Override\r\n public void deleteCopAnalysis(String copAnalysisIDs) throws DataAccessException {\r\n LOG.debug(\"method deleteCopAnalysis start!\");\r\n hibernateTemplate.bulkUpdate(CustomerConstant.BATCH_REMOVE_COPANALY_HQL + copAnalysisIDs);\r\n LOG.debug(\"method deleteCopAnalysis end!\");\r\n }",
"@Override\n\tpublic String deleteBulk() throws Throwable {\n\t\treturn null;\n\t}",
"public void deleteAll() {\n try (Connection connection = dataSource.getConnection();\n Statement statement = connection.createStatement()) {\n statement.execute(INIT.DELETE_ALL.toString());\n } catch (SQLException e) {\n logger.error(e.getMessage(), e);\n }\n }",
"public void deleteEpicsData(EpicsType epicsType, int run);",
"public boolean bulkDelete(EntityManager em, Class clazz,\n\t\t\tCollection<Long> ids);",
"public static boolean deleteReqList(String keyList[]) {\r\n\tif (keyList.length >0){\r\n\t\tint size = keyList.length;\r\n\t\tfor(int i = 0; i<size; i++){\r\n\t\t\tLong id = Long.valueOf(keyList[i]);\r\n\t\t\tif (updateStatusGroupReq(id, Constant.GROUP_FREE_REQ)){\r\n\t\t\t\treqDao.deleteReq(id);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n}",
"@Override\n\tpublic void deleteAllInBatch() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAllInBatch() {\n\t\t\n\t}",
"public void deleteTaskStateData() throws DataLayerException\r\n\t{\r\n\t\ttaskStateDao.deleteAll();\r\n\t}",
"@Override\n\tpublic Integer delArticle(String ids) {\n\t\tfinal String[] idss = ids.split(\",\");\n\t\tStringBuffer deleteSQL = new StringBuffer(\"\");\n\t\tdeleteSQL.append(\" delete from notice where noticeid = ?\");\n\t\tBatchPreparedStatementSetter setter = new BatchPreparedStatementSetter() {\n\t\t\tpublic void setValues(PreparedStatement ps, int i) throws SQLException {\n\t\t\t\tps.setInt(1, Integer.valueOf(idss[i]));\n\t\t\t}\n\n\t\t\tpublic int getBatchSize() {\n\t\t\t\treturn idss.length;\n\t\t\t}\n\t\t};\n\t\tint[] i = this.jdbcTemplate.batchUpdate(deleteSQL.toString(), setter);\n\t\treturn i.length;\n\t}",
"@Transactional\n public void delete(Iterable<Long> ids) {\n List<DevStudio> toDelete = getDevStudioRepository().findAll(ids);\n getDevStudioRepository().deleteInBatch(toDelete);\n }",
"@Override\n\tpublic String deleteBatch(List<? extends Number> ids, Model m) throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String deleteBatch(List<? extends Number> ids, Model m) throws Exception {\n\t\treturn null;\n\t}",
"public int deleteBatchByPK(Long[] pkArray){\n \tif(pkArray==null||pkArray.length<=0)\n \t\treturn 0;\n \tint rows = 0;\n \trows = super.deleteBatch(\"Resourcesvalue.deleteByPK\", pkArray);\n \treturn rows;\n }",
"@Override\r\n\tpublic void delete(Long[] ids) {\n\t\tfor (Long id : ids) {\r\n\t\t\ttestRecordDao.delete(id);\r\n\t\t}\r\n\t}",
"public void deleteOptions(long setId, String attribute, String[] values) throws ServerException;",
"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 void multiDeleteSPEntries(List<SalePurchase> spEntriesParam) {\n\t\tfor(SalePurchase st : spEntriesParam){\n\t\t\tsalePurchaseEntries.remove(st.getSPId());\n\t\t}\n\t}",
"public void deleteDataInProgramTable() throws SQLException {\n\t\tdeleteDataInUserTable();\n\t\tdeleteDataInPeriodTable();\n\t\tdeleteData(\"group_stage\",\"STAGE_\"+idCondition);\n\t\tdeleteData(\"jp_group\",idCondition);\n\t\tdeleteData(\"program\",idCondition);\n\t}",
"@Override\r\n\tpublic void delete(TQssql sql) {\n\r\n\t}",
"@LogExceptions\n public void deleteAll(String month, String year) throws SQLException {\n Connection conn = DatabaseConnection.getConnection();\n try(PreparedStatement stmt = \n conn.prepareStatement(SELECT_EVENT_MONTH_YEAR))\n {\n stmt.setString(1, month);\n stmt.setString(2, year); \n try(ResultSet rs = stmt.executeQuery()) {\n while(rs.next()) {\n delete(rs.getInt(1));\n }\n } \n }\n }",
"@Override\n\tpublic void deleteSanCtn(Map<String, String> params) throws SQLException {\n\t\t\n\t}",
"public void deleteFromID(String liste_del, int[] id_suppression) {\r\n for (int i = 0; i < id_suppression.length; i++) {\r\n this.executeUpdate(\"DELETE FROM \" + liste_del + \" WHERE id = \" + id_suppression[i]);\r\n }\r\n }",
"int deleteByExample(TbaDeliveryinfoCriteria example);",
"public void deleteDataSource(Integer[] sysIds) throws Exception {\n\t\tdataSourceMapper.deleteDataSource(sysIds);\n\t}",
"int deleteByExample(SeGroupExample example);",
"public void DeleteAllActivityUser(iconnectionpool connectionPool, String id){\n try{\n Connection con=null;\n //get connection from Pool\n con=connectionPool.getConnection();\n Statement stmt=con.createStatement(); \n String sql=\"delete from similarplaces where id_user=\"+id;\n stmt.executeUpdate(sql); \n }catch(Exception e){}\n }",
"public int deleteDictDataByIds(String[] ids);",
"public abstract void deleteAll();",
"@Override\npublic void deleteAll(Iterable<? extends Formation> entities) {\n\t\n}",
"@Query(\"DELETE FROM train_stations\")\n\tvoid deleteAll();",
"@Override\n\tpublic String deleteBatchHtcgScheme(List<Map<String, Object>> list)\n\t\t\tthrows DataAccessException {\n\t\t try {\n\t\t\t\t\n\t\t\t\thtcgSchemeMapper.deleteBatchHtcgScheme(list);\n\t\t\t\t\n\t\t\t\treturn \"{\\\"msg\\\":\\\"删除成功.\\\",\\\"state\\\":\\\"true\\\"}\";\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tlogger.error(e.getMessage(), e);\n\t\t\t\tthrow new SysException(\"{\\\"error\\\":\\\"删除失败\\\"}\");\n\t\t\t}\n\t}",
"int deleteByExample(BpmInstanciaHistoricaExample example);",
"@Override\r\n\tpublic void delete(Iterable<? extends Candidat> entities) {\n\r\n\t}",
"int deleteByExample(CfgSearchRecommendExample example);",
"@Override\n\tpublic void delete(String[] ids) throws Exception {\n\t\t\n\t}",
"public boolean delete(Object[] obj) {\n\t\tString sql=\"delete from services where ServiceID=?\";\n\t\tDbManager db=new DbManager();\n\n\t\treturn db.execute(sql, obj);\n\t}",
"int deleteByExample(DataSyncExample example);",
"public <T> boolean deleteAll(Class<T> entityClass, Collection<String> ids);",
"@Override\r\n\tpublic DataWrapper<Void> deleteNoticeByIdList(String token, String[] id) {\n\t\treturn null;\r\n\t}",
"public void deleteAll();",
"public abstract void delete(DataAction data, DataRequest source) throws ConnectorOperationException;",
"int deleteAllComponents(RecordSet inputRecords);",
"@Override\n\tpublic void deleteByIds(String ids) throws SQLException {\n\t\tproductDao.deleteByIds(ids);\n\t}",
"public static void b(ContentResolver contentResolver, ArrayList<String> arrayList) {\n if (arrayList.size() > 0) {\n ArrayList arrayList2 = new ArrayList();\n Iterator<String> it = arrayList.iterator();\n while (it.hasNext()) {\n String next = it.next();\n if (next != null) {\n String str = TextUtils.isEmpty(next) ? \"number\" : \"normalized_number\";\n ContentProviderOperation.Builder newDelete = ContentProviderOperation.newDelete(CallLog.Calls.CONTENT_URI);\n arrayList2.add(newDelete.withSelection(\"firewalltype <> 0 AND \" + str + \" = ?\", new String[]{next}).build());\n }\n }\n try {\n String authority = CallLog.Calls.CONTENT_URI.getAuthority();\n if (TextUtils.isEmpty(authority)) {\n authority = \"call_log\";\n }\n contentResolver.applyBatch(authority, arrayList2);\n } catch (Exception e) {\n Log.e(\"AntiSpamLogOperator\", \"delete call log failed, \" + e);\n }\n }\n f1433b.set(false);\n }",
"@Override\n\t@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)\n\tpublic void delDevPlan(Map<String, Object> map) throws AppException {\n\t\tString deveids = map.get(\"deveids\")==null?\"\":map.get(\"deveids\").toString();\n\t\t\n\t\tif(\"\".equals(deveids)){\n\t\t\tthrow new AppException(\"信息主键没找到!\");\n\t\t}\n\t\tString[] devs = deveids.split(\",\"); \n\t\tfor(int i=0;i<devs.length;i++){\n\t\t\tint id = Integer.parseInt(devs[i]);\n\t\t\tproDevelopDao.delete(id);\n\t\t}\n\t}",
"@Delete\n void delete(Task... task);",
"int delete(T data) throws SQLException, DaoException;",
"public DResult delete(byte[] row, long startId) throws IOException;",
"String getDeleteStatement(\r\n TypedKeyValue<List<String>, List<String>> fieldsAndValues,\r\n String tableName, String key);",
"int deleteByExample(DashboardGoodsExample example);",
"@Override\n public void deleteIdPs(String tenantDomain) throws IdentityProviderManagementException {\n\n // Invoking the pre listeners.\n Collection<IdentityProviderMgtListener> listeners = IdPManagementServiceComponent.getIdpMgtListeners();\n for (IdentityProviderMgtListener listener : listeners) {\n if (listener.isEnable() && !listener.doPreDeleteIdPs(tenantDomain)) {\n return;\n }\n }\n\n // Delete metadata strings of each IDP\n int tenantId = IdentityTenantUtil.getTenantId(tenantDomain);\n List<IdentityProvider> identityProviders = getIdPs(tenantDomain);\n for (IdentityProvider identityProvider : identityProviders) {\n deleteMetadataStrings(identityProvider.getIdentityProviderName(), tenantId);\n }\n\n dao.deleteIdPs(tenantId);\n\n // Invoking the post listeners.\n for (IdentityProviderMgtListener listener : listeners) {\n if (listener.isEnable() && !listener.doPostDeleteIdPs(tenantDomain)) {\n return;\n }\n }\n }",
"@Override\r\n\tpublic void deleteByIds(int[] ids) {\n\t\tdao.deleteByIds(ids);\r\n\t}"
]
| [
"0.5981244",
"0.5909718",
"0.58937013",
"0.58784103",
"0.5850785",
"0.5796152",
"0.57104325",
"0.57037556",
"0.57014847",
"0.5676952",
"0.5600085",
"0.55535066",
"0.55484635",
"0.55134034",
"0.54883015",
"0.54850096",
"0.548146",
"0.54522425",
"0.5442424",
"0.5432496",
"0.5431008",
"0.54300237",
"0.54099196",
"0.5407582",
"0.53984976",
"0.5398253",
"0.539046",
"0.5355391",
"0.53517765",
"0.5340461",
"0.53330433",
"0.5330765",
"0.53247905",
"0.5296771",
"0.5292804",
"0.52892953",
"0.5285425",
"0.5270762",
"0.52629995",
"0.5259525",
"0.5253924",
"0.5253694",
"0.5250796",
"0.52486587",
"0.5241646",
"0.5240905",
"0.5236207",
"0.5230923",
"0.5209123",
"0.5190144",
"0.51896924",
"0.51876736",
"0.5176141",
"0.51711863",
"0.51711863",
"0.51709795",
"0.5157175",
"0.515701",
"0.51424444",
"0.51424444",
"0.51394314",
"0.5138527",
"0.51371485",
"0.5127742",
"0.51139647",
"0.51123667",
"0.5106169",
"0.5100402",
"0.5099838",
"0.509298",
"0.5091508",
"0.50906533",
"0.5068377",
"0.50667334",
"0.50570965",
"0.50489175",
"0.5042051",
"0.50410765",
"0.50362325",
"0.5030428",
"0.50226104",
"0.50111955",
"0.49995068",
"0.49936906",
"0.49868092",
"0.4985615",
"0.498246",
"0.49815482",
"0.4981242",
"0.49809864",
"0.49799904",
"0.4978899",
"0.49764752",
"0.49738252",
"0.4965774",
"0.49655595",
"0.49624616",
"0.49609908",
"0.49561653",
"0.49541825"
]
| 0.7173046 | 0 |
Get count of aggregation config info. The default sql: SELECT count() FROM config_info_aggr WHERE data_id = ? AND group_id = ? AND tenant_id = ? | String aggrConfigInfoCount(int size, boolean isIn); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Transactional(readOnly = true)\n public long countByCriteria(OssConfigCriteria criteria) {\n log.debug(\"count by criteria : {}\", criteria);\n createQueryWrapper(criteria);\n return ossConfigRepository.selectCount(this);\n }",
"@Transactional(readOnly = true)\n public long countByQueryWrapper(QueryWrapper queryWrapper) {\n log.debug(\"count by queryWrapper : {}\", queryWrapper);\n return ossConfigRepository.selectCount(queryWrapper);\n }",
"@Override\n\tpublic int selectCount(Map<String, Object> params) {\n\t\treturn this.tableConfigDao.selectCount(params);\n\t}",
"int countByExample(ConfigDataExample example);",
"public Object countTRptConfigStatuss(final SearchFilter<TRptConfigStatus> searchFilter) {\n\t\tLOGGER.info(\"=========== Count TRptConfigStatus ===========\");\n\n\t\tfinal OperatorInfo operatorInfo = searchFilter.getOperatorInfo();\n\t\tfinal TRptConfigStatus tRptConfigStatus = searchFilter.getEntityClass();\n\t\tfinal LogicalOperatorEnum logOpEnum = operatorInfo.getLogicalOperator();\n\t\tfinal JPAQuery jpaCountQuery = new JPAQuery(\"tRptConfigStatusentity\", tRptConfigStatus);\n\n\t\t/*if (tRptConfigStatus.getTRptConfigStatus() == null) {\n\t\t\tjpaCountQuery.bind(TRPTCONFIGSTATUS, new TRptConfigStatus());\n\t\t} else {\n\t\t\tLOGGER.info(\"tRptConfigStatus {}\", tRptConfigStatus.getTRptConfigStatus());\n\n\t\t\tjpaCountQuery.bind(TRPTCONFIGSTATUS, tRptConfigStatus.getTRptConfigStatus());\n\t\t}*/\n\n\t\tjpaCountQuery.setJPAql(JPACOUNTQL);\n\t\tjpaCountQuery.setRestrictionExpressionStrings(RESTRICTIONS);\n\t\tjpaCountQuery.setLogicalOperatorEnum(logOpEnum);\n\n\t\treturn genericDAO.findEntities(jpaCountQuery, -1, -1);\n\t}",
"@Override\n public long dynamicQueryCount(DynamicQuery dynamicQuery,\n Projection projection) throws SystemException {\n return banking_organizationPersistence.countWithDynamicQuery(dynamicQuery,\n projection);\n }",
"public int getSolutionsOverviewCountFromConfig() throws Exception\n {\n DMLogger.methodStarted();\n int result = getSolutionsOverviewNamesFromConfig().size();\n DMLogger.methodFinished( result );\n return result;\n }",
"Long getAllCount();",
"public interface ConfigInfoAggrMapper extends Mapper {\n \n /**\n * To delete aggregated data in bulk, you need to specify a list of datum.\n * The default sql:\n * DELETE FROM config_info_aggr WHERE data_id=? AND group_id=? AND tenant_id=? AND datum_id IN (...)\n *\n * @param datumList datumList\n * @return The sql of deleting aggregated data in bulk.\n */\n String batchRemoveAggr(List<String> datumList);\n \n /**\n * Get count of aggregation config info.\n * The default sql:\n * SELECT count(*) FROM config_info_aggr WHERE data_id = ? AND group_id = ? AND tenant_id = ?\n *\n * @param size datum id list size\n * @param isIn search condition\n * @return The sql of getting count of aggregation config info.\n */\n String aggrConfigInfoCount(int size, boolean isIn);\n \n /**\n * Find all data before aggregation under a dataId. It is guaranteed not to return NULL.\n * The default sql:\n * SELECT data_id,group_id,tenant_id,datum_id,app_name,content\n * FROM config_info_aggr WHERE data_id=? AND group_id=? AND tenant_id=? ORDER BY datum_id\n *\n * @return The sql of finding all data before aggregation under a dataId.\n */\n String findConfigInfoAggrIsOrdered();\n \n /**\n * Query aggregation config info.\n * The default sql:\n * SELECT data_id,group_id,tenant_id,datum_id,app_name,content FROM config_info_aggr WHERE data_id=? AND\n * group_id=? AND tenant_id=? ORDER BY datum_id LIMIT startRow,pageSize\n *\n * @param startRow The start index.\n * @param pageSize The size of page.\n * @return The sql of querying aggregation config info.\n */\n String findConfigInfoAggrByPageFetchRows(int startRow, int pageSize);\n \n /**\n * Find all aggregated data sets.\n * The default sql:\n * SELECT DISTINCT data_id, group_id, tenant_id FROM config_info_aggr\n *\n * @return The sql of finding all aggregated data sets.\n */\n String findAllAggrGroupByDistinct();\n}",
"@Override\n public long dynamicQueryCount(DynamicQuery dynamicQuery)\n throws SystemException {\n return banking_organizationPersistence.countWithDynamicQuery(dynamicQuery);\n }",
"int getAggregateFunctionsCount();",
"private String getPropsQueryCounts(BuildParams buildParams) {\n String baseQuery;\n if (buildParams.isEnvProps()) {\n baseQuery = BuildQueries.BUILD_ENV_PROPS_COUNT;\n } else {\n baseQuery = BuildQueries.BUILD_SYSTEM_PROPS_COUNT;\n }\n return baseQuery;\n }",
"public Integer getAllCount() {\n\t\tString sql=\"select count(*) from statistics\";\n\t\tint count = (int)getCount(sql);\n\t\treturn count;\n\t}",
"@Override\n\tpublic Long countByProperties(String tenantId, String userId,\n\t\t\tString serverId, String serverName, String status, Integer zoneId,\n\t\t\tInteger aggregateId, String hostId, String serverIp,\n\t\t\tDate startDate, Date endDate) throws Exception {\n\t\treturn (long) 5;\n\t}",
"public int getExamConfigsCount()\n throws com.liferay.portal.kernel.exception.SystemException {\n return _examConfigLocalService.getExamConfigsCount();\n }",
"@Override\n public int getDeviceConfigurationCount() {\n int product = 1;\n\n for (CloudConfigurationDimension dimension : getDimensions()) {\n product *= dimension.getEnabledTypes().size();\n }\n\n return product;\n }",
"public int size() {\n return configMap.size();\n }",
"public int countByDataCollectionId(long dataCollectionId);",
"@Override\r\n\tpublic int getReportingUrlCreationInfoCount(Object obj){\n\t\ttry {\r\n\t\t\tMap<?, ?> map = (HashMap) obj;\r\n\t\t\tLong count = null;\r\n\t\t\tif (map != null && map.get(\"mapKey\") != null){\r\n\t\t\t\t// Condition Codes\r\n\t\t\t\tcount = (Long) getSession().createQuery(\"select count(*) from ReportingUrlCreation ruc\" +\r\n\t\t\t\t\t\t\" where ruc.status = 'A' and ruc.entityKey like :entityKey\")\r\n\t\t\t\t\t\t.setParameter(\"entityKey\", \"%\" + map.get(\"mapKey\") + \"%\")\r\n\t\t\t\t\t\t.uniqueResult();\r\n\t\t\t} else {\r\n\t\t\t\tcount = (Long) getSession().createQuery(\"select count(*) from ReportingUrlCreation ruc\" +\r\n\t\t\t\t\t\t\" where ruc.status = 'A' \")\r\n\t\t\t\t\t\t.uniqueResult();\r\n\t\t\t}\r\n\t\t\treturn count.intValue();\r\n\t\t} catch (RuntimeException re) {\r\n\t\t\tre.printStackTrace();\r\n\t\t\tthrow re;\r\n\t\t}\r\n\t}",
"public int countByDataPackId(long dataPackId);",
"int getDashboardFiltersCount();",
"int getEducationsCount();",
"@Override\n public long dynamicQueryCount(DynamicQuery dynamicQuery,\n Projection projection) throws SystemException {\n return libroPersistence.countWithDynamicQuery(dynamicQuery, projection);\n }",
"int getGroupCountByStructureId(Integer structureId);",
"public long dynamicQueryCount(\n com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)\n throws com.liferay.portal.kernel.exception.SystemException {\n return _examConfigLocalService.dynamicQueryCount(dynamicQuery);\n }",
"public String getCollectConditionForCount()\n\t{\n\t\tfor (int i = 0; i < _searchKeyList.size(); i++)\n\t\t{\n\t\t\tKey ky = (Key)_searchKeyList.get(i) ;\n\t\t\tif (ky.getTableGroup() > 0)\n\t\t\t{\n\t\t\t\treturn (\"COUNT(*)\") ;\n\t\t\t}\n\t\t}\n\t\t//#CM708973\n\t\t// Return '*' as all item acquisition when data is not set in the key value. \n\t\treturn null ;\n\n\t}",
"@Override\n public int countByQuery(Ares2ClusterQuery query) {\n return ares2ClusterExtMapper.countByQuery(query);\n }",
"int getStatMetadataCount();",
"public static int countQueryAgent(Configuration conf, String countQuery) throws Exception {\n Connection conn = null;\n Statement stmt = null;\n ResultSet rs = null;\n try {\n conn = getConnection(conf);\n stmt = conn.createStatement();\n rs = stmt.executeQuery(countQuery);\n if (!rs.next()) {\n return 0;\n }\n return rs.getInt(1);\n } finally {\n closeResources(conn, stmt, rs);\n }\n }",
"int getListSnIdCount();",
"int getAndConditionGroupsCount();",
"int getGroupCount();",
"public int getCount() {\n return cp.getmImageIds(gridType).length;\n\n }",
"long countByExample(CmIndustryConfigExample example);",
"int getServiceAccountsCount();",
"public int countByUUID_G(String uuid, long groupId);",
"public int countByUUID_G(String uuid, long groupId);",
"@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_LINKGROUP);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"public Long getCountAllResults() {\n\n //create a querybuilder for count\n QueryBuilder queryBuilderCount = dao.getQueryBuilder()\n .from(dao.getEntityClass(), (joinBuilder != null ? joinBuilder.getRootAlias() : null))\n .join(joinBuilder)\n .add(getCurrentQueryRestrictions())\n .debug(debug);\n\n Long rowCount;\n //added distinct verification\n if (joinBuilder != null && joinBuilder.isDistinct()) {\n rowCount = queryBuilderCount.countDistinct(joinBuilder.getRootAlias());\n } else {\n rowCount = queryBuilderCount.count();\n }\n\n return rowCount;\n }",
"@Override\n public int getBanking_organizationsCount() throws SystemException {\n return banking_organizationPersistence.countAll();\n }",
"public int countByUUID_G(java.lang.String uuid, long groupId);",
"public Integer getTotalCountForType(DasType type) throws DataSourceException {\n return null;\n }",
"@Override\n\tpublic long dynamicQueryCount(DynamicQuery dynamicQuery,\n\t\tProjection projection) {\n\t\treturn itemPublicacaoPersistence.countWithDynamicQuery(dynamicQuery,\n\t\t\tprojection);\n\t}",
"@Value.Default\n public int maxQueryAggregates() {\n return ConfigDefaults.ADVANCED_MAX_QUERY_AGGREGATES;\n }",
"public int countByc_g(long groupId, long companyId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"int getHdfsMetricsCount();",
"long getDbCount();",
"@Override\n\tpublic Long count() {\n\t\treturn SApplicationcategorydao.count(\"select count(*) from \"+tablename+\" t\");\n\t}",
"@Override\n public long dynamicQueryCount(DynamicQuery dynamicQuery)\n throws SystemException {\n return libroPersistence.countWithDynamicQuery(dynamicQuery);\n }",
"int getSnInfoCount();",
"int getSnInfoCount();",
"int getSnInfoCount();",
"Integer getConnectorCount();",
"@Override\n\tpublic int queryCount(Map<String, Object> condition) throws Exception {\n\t\treturn exWarehouseMapper.queryCount(condition);\n\t}",
"public long countAllDbAccessionIds() throws MiddlewareQueryException {\r\n try {\r\n SQLQuery query = getSession().createSQLQuery(Marker.COUNT_ALL_DB_ACCESSION_IDS);\r\n BigInteger result = (BigInteger) query.uniqueResult();\r\n if (result != null) {\r\n return result.longValue();\r\n } else {\r\n return 0L;\r\n }\r\n } catch (HibernateException e) {\r\n \tlogAndThrowException(\"Error with countAllDbAccessionIds() query from Marker: \" + e.getMessage(), e);\r\n }\r\n return 0L;\r\n }",
"private int getCounts(String table, String aggregateAttribute, String componentId) throws AnalyticsException {\n List<AggregateField> fields = new ArrayList<AggregateField>();\n fields.add(new AggregateField(new String[] { aggregateAttribute }, \"sum\", TestConstants.REQUEST_COUNT));\n AggregateRequest aggregateRequest = new AggregateRequest();\n aggregateRequest.setFields(fields);\n aggregateRequest.setAggregateLevel(0);\n aggregateRequest.setParentPath(new ArrayList<String>());\n aggregateRequest.setGroupByField(TestConstants.COMPONENT_ID);\n aggregateRequest.setQuery(TestConstants.COMPONENT_ID + \":\\\"\" + componentId + \"\\\"\");\n aggregateRequest.setTableName(table);\n AnalyticsIterator<Record> resultItr = this.analyticsDataAPI.searchWithAggregates(-1234, \n aggregateRequest);\n return ((Double) resultItr.next().getValue(TestConstants.REQUEST_COUNT)).intValue();\n }",
"public int getTotalCount(ConProcess conProcess) throws AppException;",
"Long queryCount(ProductSearchParm productSearchParm);",
"@Override\n public Long countByCriteria(String[] layerList, String[] taxonList, String[] indicList,String colum) {\n //Build the query string base on parameters\n StringBuilder query = new StringBuilder();\n query.append(\"Select count(distinct \"+colum+\") from ait.taxon_info_index where \");\n \n //If there is geografical criteria\n if(layerList.length>0 && !layerList[0].equals(\"\")){\n query.append(\"(\");\n for(int i = 0;i<layerList.length;i++){\n String[] aux = layerList[i].split(\"~\");\n String layer = aux[0];\n String polygon = aux[1];\n if(i==layerList.length-1){ //last element\n query.append(\"(layer_table = '\"+layer+\"' and polygom_id = \"+polygon+\")\");\n }\n else{\n query.append(\"(layer_table = '\"+layer+\"' and polygom_id = \"+polygon+\") or \");\n }\n }\n query.append(\")\");\n }\n \n //If there is taxonomy criteria\n if(taxonList.length>0 && !taxonList[0].equals(\"\")){\n if(layerList.length>0 && !layerList[0].equals(\"\")){\n query.append(\" and (\");\n }\n else{\n query.append(\"(\");\n }\n for(int i = 0;i<taxonList.length;i++){\n //Get the name and taxonomical level of the specified taxon\n TaxonIndex ti = taxonIndexDAO.getTaxonIndexByName(taxonList[i]);\n if(ti.getTaxon_id()!=null){\n //To search in the specified taxonomyField\n String levelColum;\n switch (ti.getTaxon_range().intValue()) {\n case 1:\n levelColum = TaxonomicalRange.KINGDOM.getFieldName();\n break;\n case 2:\n levelColum = TaxonomicalRange.PHYLUM.getFieldName();\n break;\n case 3:\n levelColum = TaxonomicalRange.CLASS.getFieldName();\n break;\n case 4:\n levelColum = TaxonomicalRange.ORDER.getFieldName();\n break;\n case 5:\n levelColum = TaxonomicalRange.FAMILY.getFieldName();\n break;\n case 6:\n levelColum = TaxonomicalRange.GENUS.getFieldName();\n break;\n case 7:\n levelColum = TaxonomicalRange.SPECIFICEPITHET.getFieldName();\n break;\n default:\n levelColum = TaxonomicalRange.SCIENTIFICNAME.getFieldName();\n break;\n }\n if(i==taxonList.length-1){ //last element\n query.append(\"(\"+levelColum+\" = \"+ti.getTaxon_id()+\")\");\n }\n else{\n query.append(\"(\"+levelColum+\" = \"+ti.getTaxon_id()+\") or \");\n }\n }\n else{ //If the taxon doesn't exist on data base\n String levelColum = TaxonomicalRange.KINGDOM.getFieldName();\n if(i==taxonList.length-1){ //last element\n query.append(\"(\"+levelColum+\" = \"+-1+\")\");\n }\n else{\n query.append(\"(\"+levelColum+\" = \"+-1+\") or \");\n }\n }\n }\n query.append(\")\");\n }\n \n //If there is indicators criteria\n if(indicList.length>0 && !indicList[0].equals(\"\")){\n if((taxonList.length>0 && !taxonList[0].equals(\"\"))||(layerList.length>0 && !layerList[0].equals(\"\"))){\n query.append(\" and (\");\n }\n else{\n query.append(\"(\");\n }\n for(int i = 0;i<indicList.length;i++){\n if(i==indicList.length-1){ //last element\n query.append(\"(indicator_id = \"+indicList[i]+\")\");\n }\n else{\n query.append(\"(indicator_id = \"+indicList[i]+\") or \");\n }\n }\n query.append(\")\");\n }\n \n //Execute query\n return taxonInfoIndexDAO.countTaxonsByQuery(query.toString());\n }",
"int getChannelStatisticsCount();",
"public String getCount() {\r\n \t\r\n \tBoolean anyAges = Boolean.FALSE;\r\n \tBoolean anyAssayTypes = Boolean.FALSE;\r\n \tint count = 0;\r\n \t\r\n \tfor (String age: ages) {\r\n \t\tif (age.endsWith(\"ANY\")) {\r\n \t\t\tanyAges = Boolean.TRUE;\r\n \t\t}\r\n \t}\r\n \t\r\n \tfor (String type: assayTypes) {\r\n \t\tif (type.equals(\"ANY\")) {\r\n \t\t\tanyAssayTypes = Boolean.TRUE;\r\n \t\t}\r\n \t}\r\n \t\r\n \t// No Restrictions on Ages or AssayTypes, count everything\r\n \tif (anyAssayTypes && anyAges) {\r\n \tcount = record.getPairs().size(); \t\t\r\n \t}\r\n \t\r\n \t// There are restrictions on ages only, iterate and count appropriately.\r\n \t\r\n \telse if (anyAssayTypes) {\r\n \t\tfor (GxdLitAssayTypeAgePair pair: record.getPairs()) {\r\n \t\t\tfor (String age: ages) {\r\n \t\t\t\tif (pair.getAge().equals(age)) {\r\n \t\t\t\t\tcount ++;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t\r\n \t// There are restrictions on assayTypes only, iterate and count appropriately.\r\n \t\r\n \telse if (anyAges) {\r\n \t\tfor (GxdLitAssayTypeAgePair pair: record.getPairs()) {\r\n \t\t\tfor (String type: assayTypes) {\r\n \t\t\t\tif (pair.getAssayType().equals(type)) {\r\n \t\t\t\t\tcount ++;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t\r\n \telse {\r\n \t\tfor (GxdLitAssayTypeAgePair pair: record.getPairs()) {\r\n \t\t\tfor (String type: assayTypes) {\r\n \t\t\t\tfor (String age: ages) {\r\n \t\t\t\t\tif (pair.getAssayType().equals(type) && pair.getAge().equals(age)) {\r\n \t\t\t\t\t\tcount ++;\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n\r\n \treturn \"\" + count;\r\n \t\r\n }",
"int getMetricValuesCount();",
"@Query(value = \"SELECT COUNT(*) FROM coupons\", nativeQuery = true)\n int countAllCoupons();",
"int getDetailsCount();",
"int getDetailsCount();",
"@Override\n\tpublic int regionAllcount() throws Exception {\n\t\treturn dao.regionAllcount();\n\t}",
"@Override\r\n\tpublic int totalCount() {\n\t\treturn sqlSession.selectOne(namespace + \".totalCount\");\r\n\t}",
"@Override\r\n\tpublic int totalCount() {\n\t\treturn sqlSession.selectOne(namespace + \".totalCount\");\r\n\t}",
"@Override\n\tpublic long dynamicQueryCount(\n\t\tcom.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,\n\t\tcom.liferay.portal.kernel.dao.orm.Projection projection)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn _kpiEntryLocalService.dynamicQueryCount(dynamicQuery, projection);\n\t}",
"int getDatabasesCount();",
"public int getSoupKitchenCount() {\n\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT COUNT(*) FROM cs6400_sp17_team073.Soup_kitchen\";\n\n Integer skcount = jdbc.queryForObject(sql,params,Integer.class);\n\n return skcount;\n }",
"public int countAll() throws SystemException {\n\t\tLong count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_ANNOTATIONINFO);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tif (count == null) {\n\t\t\t\t\tcount = Long.valueOf(0);\n\t\t\t\t}\n\n\t\t\t\tFinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY, count);\n\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}",
"@Override\n\tpublic long dynamicQueryCount(DynamicQuery dynamicQuery) {\n\t\treturn itemPublicacaoPersistence.countWithDynamicQuery(dynamicQuery);\n\t}",
"int getInfoCount();",
"int getInfoCount();",
"int getInfoCount();",
"int getTotalCount();",
"int getQueriesCount();",
"@Override\n\tpublic int countAll() throws SystemException {\n\t\tLong count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_ADDRESSCHANGEREQDETAILS);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tFinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tFinderCacheUtil.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}",
"int getIndexEndpointsCount();",
"@Override\n\tpublic Long count(Map<String, Object> params) {\n\t\tString hql=\"select count(*) from \"+tablename+\" t\";\n\t\treturn SApplicationcategorydao.count(hql, params);\n\t}",
"@Value.Default\n public int maxServiceCallAggregates() {\n return ConfigDefaults.ADVANCED_MAX_QUERY_AGGREGATES;\n }",
"@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)\n\tpublic long dynamicQueryCount(DynamicQuery dynamicQuery);",
"int getEventMetadataCount();",
"public int countByGroupId(long groupId);",
"public int countByGroupId(long groupId);",
"public static int getImportMeteoDataConfigCount(String key) throws MissingResourceException {\n\t\t\n\t\tint configcount = 0;\n\t\ttry {\n\t\t\tmdDoc = setDocument(mdDoc, Constants.METEO_DATA_CONFIG_FILE_NAME);\n\t\t\t\n\t\t\tif (mdDoc.getElementsByTagName(key) != null) {\n\t\t\t\tconfigcount = mdDoc.getElementsByTagName(key).getLength();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch (ParserConfigurationException ex) {\n\t\t\tlogger.error(\"Errore nella lettura del file di configurazione \" + Constants.METEO_DATA_CONFIG_FILE_NAME);\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tcatch (SAXException ex) {\n\t\t\tlogger.error(\"Errore nella lettura del file di configurazione \" + Constants.METEO_DATA_CONFIG_FILE_NAME);\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tlogger.error(\"Errore nella lettura del file di configurazione \" + Constants.METEO_DATA_CONFIG_FILE_NAME);\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\treturn configcount;\n\t}",
"public int countByDataSectionId(long dataSectionId);",
"int getEntryCount();",
"public String getNumContentResources4Sql()\r\n \t{\r\n \t\treturn \"select count(IN_COLLECTION) from CONTENT_COLLECTION where IN_COLLECTION = ?\";\r\n \t}",
"public int countTotalByFilter() throws SQLException, IOException {\n\n ArrayList<Object> prmList = new ArrayList<Object>();\n StringBuffer sqlBuffer = new StringBuffer();\n sqlBuffer.append(\" SELECT \");\n sqlBuffer.append(\" COUNT(*) \");\n\n sqlBuffer.append(\" FROM \");\n sqlBuffer.append(\" npo_data_prevent ndp \");\n sqlBuffer.append(\" INNER JOIN \");\n\n sqlBuffer.append(\" npo_property_prevent npp \");\n sqlBuffer.append(\" ON \");\n sqlBuffer.append(\" ndp.property_id = npp.id \");\n\n sqlBuffer.append(getBaseSQL(prmList));\n\n this.setSql(sqlBuffer.toString());\n\n PreparedStatement ps = null;\n ResultSet rs = null;\n int result;\n try {\n Connection c = this.getConnection();\n ps = c.prepareStatement(this.getSql());\n int i = 1;\n for (int j = 0; j < prmList.size(); j++) {\n psSetObject(ps, i++, prmList.get(j));\n }\n rs = ps.executeQuery();\n rs.next();\n result = rs.getInt(1);\n } finally {\n close(ps, rs);\n }\n\n return result;\n }",
"@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_USERSTATISTICS);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}",
"@Override\n public long dynamicQueryCount(\n com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,\n com.liferay.portal.kernel.dao.orm.Projection projection)\n throws com.liferay.portal.kernel.exception.SystemException {\n return _balloonUserTrackingLocalService.dynamicQueryCount(dynamicQuery,\n projection);\n }",
"@GET\n @Path(\"count\")\n public Response getDeviceCount() {\n try {\n Integer count = DeviceMgtAPIUtils.getDeviceManagementService().getDeviceCount();\n return Response.status(Response.Status.OK).entity(count).build();\n } catch (DeviceManagementException e) {\n String msg = \"Error occurred while fetching the device count.\";\n log.error(msg, e);\n return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build();\n }\n }",
"int getSessionCount();"
]
| [
"0.5805236",
"0.577191",
"0.5746143",
"0.56814075",
"0.5644817",
"0.56445575",
"0.56130534",
"0.55020785",
"0.5466048",
"0.54579383",
"0.5436548",
"0.5431812",
"0.5414966",
"0.5397372",
"0.5391002",
"0.536997",
"0.53655165",
"0.5365209",
"0.5354888",
"0.5351099",
"0.53436273",
"0.53346384",
"0.5327577",
"0.53060013",
"0.5287308",
"0.52812076",
"0.52604955",
"0.52228373",
"0.5221586",
"0.5221321",
"0.5198437",
"0.519426",
"0.5193717",
"0.519358",
"0.5188029",
"0.5186303",
"0.5186303",
"0.5173804",
"0.5171037",
"0.5171037",
"0.5171037",
"0.5171037",
"0.5171037",
"0.51687175",
"0.5164883",
"0.5161397",
"0.5157503",
"0.51505554",
"0.5143314",
"0.5141736",
"0.5140757",
"0.51370025",
"0.51303077",
"0.51265574",
"0.5115535",
"0.5115535",
"0.5115535",
"0.5099526",
"0.50980735",
"0.5097843",
"0.50963753",
"0.5094754",
"0.50935537",
"0.50898945",
"0.5088264",
"0.5084341",
"0.5080892",
"0.5068959",
"0.50682676",
"0.50682676",
"0.5066154",
"0.50599027",
"0.50599027",
"0.5055385",
"0.5055305",
"0.50536245",
"0.5050028",
"0.5049994",
"0.5049548",
"0.5049548",
"0.5049548",
"0.5046488",
"0.5045136",
"0.50363964",
"0.502212",
"0.5012566",
"0.49919906",
"0.499193",
"0.49913645",
"0.49859157",
"0.49859157",
"0.49748653",
"0.49688473",
"0.4968059",
"0.4966862",
"0.495845",
"0.4957668",
"0.49545842",
"0.49537888",
"0.49432972"
]
| 0.71709615 | 0 |
Find all data before aggregation under a dataId. It is guaranteed not to return NULL. The default sql: SELECT data_id,group_id,tenant_id,datum_id,app_name,content FROM config_info_aggr WHERE data_id=? AND group_id=? AND tenant_id=? ORDER BY datum_id | String findConfigInfoAggrIsOrdered(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.util.List<DataEntry> filterFindByGroupId(long groupId);",
"public java.util.List<DataEntry> findByGroupId(long groupId);",
"private void preProcessData() {\n\n // Group employees by department\n if (employeesByDepartments == null) {\n\n employeesByDepartments = new HashMap<>();\n\n dataSet.stream().forEach(employee -> {\n\n if (!employeesByDepartments.containsKey(employee.getDepartment()))\n employeesByDepartments.put(employee.getDepartment(), new HashSet<>());\n Set<EmployeeAggregate> employees = employeesByDepartments.get(employee.getDepartment());\n employees.add(employee);\n });\n }\n\n // Find out minimum, and maximum age of the employees\n if (minAge == 0) minAge = dataSet.stream().map(EmployeeAggregate::getAge).min(Integer::compare).get();\n if (maxAge == 0) maxAge = dataSet.stream().map(EmployeeAggregate::getAge).max(Integer::compare).get();\n\n // Group employees by age\n if (employeesByAgeRange == null) {\n\n employeesByAgeRange = new HashMap<>();\n\n // Work out age ranges\n Set<Range> ranges = new HashSet<>();\n int currTopBoundary = (int) Math.ceil((double) maxAge / (double) AGE_RANGE_INCREMENT) * AGE_RANGE_INCREMENT;\n\n while (currTopBoundary >= minAge) {\n Range range = new Range(currTopBoundary - AGE_RANGE_INCREMENT, currTopBoundary);\n ranges.add(range);\n employeesByAgeRange.put(range, new HashSet<>());\n currTopBoundary -= AGE_RANGE_INCREMENT;\n }\n\n // Group employees\n dataSet.stream().forEach(employee -> {\n for (Range range : ranges) {\n if (range.inRange(employee.getAge())) {\n\n employeesByAgeRange.get(range).add(employee);\n\n break;\n }\n }\n });\n }\n }",
"public interface ConfigInfoAggrMapper extends Mapper {\n \n /**\n * To delete aggregated data in bulk, you need to specify a list of datum.\n * The default sql:\n * DELETE FROM config_info_aggr WHERE data_id=? AND group_id=? AND tenant_id=? AND datum_id IN (...)\n *\n * @param datumList datumList\n * @return The sql of deleting aggregated data in bulk.\n */\n String batchRemoveAggr(List<String> datumList);\n \n /**\n * Get count of aggregation config info.\n * The default sql:\n * SELECT count(*) FROM config_info_aggr WHERE data_id = ? AND group_id = ? AND tenant_id = ?\n *\n * @param size datum id list size\n * @param isIn search condition\n * @return The sql of getting count of aggregation config info.\n */\n String aggrConfigInfoCount(int size, boolean isIn);\n \n /**\n * Find all data before aggregation under a dataId. It is guaranteed not to return NULL.\n * The default sql:\n * SELECT data_id,group_id,tenant_id,datum_id,app_name,content\n * FROM config_info_aggr WHERE data_id=? AND group_id=? AND tenant_id=? ORDER BY datum_id\n *\n * @return The sql of finding all data before aggregation under a dataId.\n */\n String findConfigInfoAggrIsOrdered();\n \n /**\n * Query aggregation config info.\n * The default sql:\n * SELECT data_id,group_id,tenant_id,datum_id,app_name,content FROM config_info_aggr WHERE data_id=? AND\n * group_id=? AND tenant_id=? ORDER BY datum_id LIMIT startRow,pageSize\n *\n * @param startRow The start index.\n * @param pageSize The size of page.\n * @return The sql of querying aggregation config info.\n */\n String findConfigInfoAggrByPageFetchRows(int startRow, int pageSize);\n \n /**\n * Find all aggregated data sets.\n * The default sql:\n * SELECT DISTINCT data_id, group_id, tenant_id FROM config_info_aggr\n *\n * @return The sql of finding all aggregated data sets.\n */\n String findAllAggrGroupByDistinct();\n}",
"public DataEntry[] filterFindByGroupId_PrevAndNext(\n\t\t\tlong dataEntryId, long groupId,\n\t\t\tcom.liferay.portal.kernel.util.OrderByComparator<DataEntry>\n\t\t\t\torderByComparator)\n\t\tthrows NoSuchDataEntryException;",
"public java.util.List<DataEntry> findByGroupId(\n\t\tlong groupId, int start, int end);",
"public java.util.List<DataEntry> filterFindByGroupId(\n\t\tlong groupId, int start, int end);",
"private void prepareData() {\n eventList = databaseHandler.getLatestDistinctEvents(prefs.getString(KEY_SORT_FIELD, \"name\"),\n prefs.getBoolean(KEY_SORT_ORDER_ASCENDING, true));\n\n // Send list to adapter\n eventLogAdapter.updateData(eventList);\n }",
"public List<DataValue> getDataListByDeviceIdAndSensorTypeAndDateSortedByTimestamp(DataValue dataVal) throws Exception;",
"public java.util.List<DataEntry> findAll();",
"public java.util.List<DataEntry> findByDataSetId(long dataSetId);",
"public java.util.List<DataEntry> findByDataPackId(long dataPackId);",
"public org.eclipse.stardust.engine.api.runtime.DataQueryResult\n getAllData(org.eclipse.stardust.engine.api.query.DataQuery query)\n throws org.eclipse.stardust.common.error.WorkflowException;",
"public DataEntry fetchByUUID_G(String uuid, long groupId);",
"public List<ApplicationSummary> searchApplicationSummariesUseSameData(String dataID, String applicationID){\r\n\t\t// sparql\r\n\t\tString sparql = \"SELECT ?application\\r\\n \" \r\n\t\t\t\t\t +\t\"WHERE {\"\r\n\t\t\t\t\t + \"?application onto:hasData onto:\" + dataID + \".\\r\\n\"\r\n\t\t\t\t\t + \"FILTER (?application != onto:\"+ applicationID +\")\";\t\t\t\t\r\n\t\t// end where\r\n\t\tsparql += \"}\";\r\n\t\t\r\n\t\t// test\r\n\t\tString jsonString = findJsonResult(sparql);\r\n\t\tSystem.out.println(\"searchApplicationSummariesUseSameData:\" + jsonString);\r\n\t\t\r\n\t\t// result\r\n\t\tJSONObject json;\r\n\t\ttry {\r\n\t\t\tjson = new JSONObject(jsonString);\r\n\t\t\tJSONArray jsonArray = json.getJSONObject(\"results\").getJSONArray(\"bindings\");\r\n\t\t\tList<ApplicationSummary> list = new ArrayList<ApplicationSummary>();\r\n\t\t\tfor (int i = 0; i < jsonArray.length(); i++) {\r\n\t\t\t\tJSONObject jsonObject = (JSONObject) jsonArray.get(i);\r\n\t\t\t\tApplicationSummary applicationSummary = new ApplicationSummary();\r\n\t\t\t\tif (jsonObject.has(\"application\")) {\r\n\t\t\t\t\tapplicationSummary = findApplicationSummaryByApplicationID(jsonObject.getJSONObject(\"application\").getString(\"value\").split(\"#\")[1]);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tlist.add(applicationSummary);\r\n\t\t\t}\r\n\t\t\treturn list;\r\n\r\n\t\t} catch (JSONException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public java.util.List<DataEntry> filterFindByGroupId(\n\t\tlong groupId, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<DataEntry>\n\t\t\torderByComparator);",
"public List<Object[]> gatherData() {\n String testDir = System.getProperty(\"test.dir\");\n logger.info(\"Data from: \" + testDir);\n String testFilter = System.getProperty(\"test.filter\");\n List<Object[]> result = new ArrayList<Object[]>();\n File testDirFile = new File(testDir);\n File rootConfigFile = new File(testDirFile, \"config.properties\");\n Properties rootProp = new Properties();\n InputStream rootIn = null;\n try {\n rootIn = new FileInputStream(rootConfigFile);\n rootProp.load(rootIn);\n } catch (IOException e) {\n // if we can't get root properties, we just take empty root\n // properties\n rootProp = new Properties();\n } finally {\n IOUtils.closeQuietly(rootIn);\n }\n\n File[] childFiles = null;\n if (testFilter == null) {\n childFiles = testDirFile.listFiles();\n } else {\n String[] wildcards = testFilter.split(\";\");\n childFiles = testDirFile\n .listFiles((FilenameFilter) new WildcardFileFilter(\n wildcards));\n }\n int idx = 0;\n for (File child : childFiles) {\n if (child.isDirectory() && directoryContainsConfig(child)) {\n File configFile = new File(child, \"config.properties\");\n Properties prop = new Properties();\n InputStream in = null;\n try {\n in = new FileInputStream(configFile);\n prop.load(in);\n \n String parent = prop.getProperty(PARENT_CFG);\n if(parent != null) {\n \tFile parentFile = new File(child, parent);\n \tif(parentFile.exists()) {\n \t\tprop.clear();\n \t\tprop.load(new FileInputStream(parentFile));\n \t\tprop.load(new FileInputStream(configFile));\n \t}\n }\n \n if (isSupportedTestType(prop)) {\n Object[] data = extractDataFromConfig(configFile,\n rootProp, prop);\n result.add(data);\n String testName = idx + \"-\" + data[1].toString();\n ((BaseSignatureTestData)data[2]).setUniqueUnitTestName(testName);\n idx++;\n }\n } catch (IOException e) {\n logger.warn(\n \"Could not run test with config:\"\n + configFile.getAbsolutePath(), e);\n } finally {\n if (in != null)\n IOUtils.closeQuietly(in);\n }\n }\n }\n return result;\n }",
"private static void dataFiltering() {\n\t\tDataGenerationMngr dtgen = new DataGenerationMngr();\n\t\tdtgen.genenrateData();\n\n\t\t// Perform Java and Gradle code diff in between commit and save the diff\n\t\t// information in database\n\n\t}",
"public DataEntry[] findByGroupId_PrevAndNext(\n\t\t\tlong dataEntryId, long groupId,\n\t\t\tcom.liferay.portal.kernel.util.OrderByComparator<DataEntry>\n\t\t\t\torderByComparator)\n\t\tthrows NoSuchDataEntryException;",
"public java.util.List<DataEntry> findByGroupId(\n\t\tlong groupId, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<DataEntry>\n\t\t\torderByComparator,\n\t\tboolean useFinderCache);",
"public void loadGraph() {\n\t\tJSONArray data = null;\n\n\t\tswitch (mApp.getCurrentGroupBy()) {\n\t\tcase DATE:\n\n\t\t\tdata = DataBaseUtil.fetchEntriesByDateInJSON(mContext, mType.getId());\n\t\t\tbreak;\n\n\t\tcase MAX:\n\n\t\t\tdata = DataBaseUtil.fetchEntriesByMaxInJSON(mContext, mType.getId());\n\t\t\tbreak;\n\n\t\tcase NONE:\n\t\t\tdata = DataBaseUtil.fetchEntriesInJSON(mContext, mType.getId());\n\t\t\tbreak;\n\t\t}\n\t\tloadGraph(data);\n\t}",
"public java.util.List<DataEntry> findByGroupId(\n\t\tlong groupId, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<DataEntry>\n\t\t\torderByComparator);",
"public ArrayList<String> processQueryAggregatedObject(String id) {\n final MongoCondition condition = MongoCondition.idCondition(id);\n LOGGER.debug(\"The JSON condition is: {}\", condition);\n ArrayList<String> response = mongoDBHandler.find(aggregationDataBaseName,\n aggregationCollectionName,\n condition);\n return response;\n }",
"public java.util.List<DataEntry> findByDataSectionId(long dataSectionId);",
"java.lang.String getDataId();",
"java.lang.String getDataId();",
"List<ConfigData> selectByExample(ConfigDataExample example);",
"public java.util.List<DataEntry> findByDataPackId(\n\t\tlong dataPackId, int start, int end);",
"public static Set<Integer> getAppsLauchDateNull(int envId) {\n\t\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria healthCheckCriteria = session.createCriteria(HealthCheckEntity.class, \"health\");\n\t\thealthCheckCriteria.createCriteria(\"health.component\", \"component\");\n\t\thealthCheckCriteria.add(Restrictions.isNull(\"health.createdDate\"));\n\t\thealthCheckCriteria.add(Restrictions.eq(\"health.environment.environmentId\", envId));\n\t\t\n\t\tProjectionList projectionList = Projections.projectionList();\n projectionList.add(Projections.property(\"component.componentId\"));\n healthCheckCriteria.setProjection(projectionList);\n \n Set<Integer> compSet = new HashSet<Integer>();\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Integer> resultList = (List<Integer>) healthCheckCriteria.list();\n\t\tcompSet.addAll(resultList); \n\t\ttxn.commit();\n\t\treturn compSet; \n\t}",
"private HashMap<String, ArrayList<String>> getInstanceIdsPerClientId(TSDBData[] tsdbData) {\n logger.trace(\"BEGIN HashMap<String,ArrayList<String>> getInstanceIdsPerClientId(TSDBData[] tsdbData)\");\n HashMap<String, ArrayList<String>> map = new HashMap<String, ArrayList<String>>();\n for (TSDBData obj : tsdbData) {\n ArrayList<String> columns = obj.getColumns();\n ArrayList<ArrayList<Object>> points = obj.getPoints();\n int clientidIndex = -1;\n int instanceidIndex = -1;\n for (int i = 0; i < columns.size(); i++) {\n if (columns.get(i).equals(\"clientId\"))\n clientidIndex = i;\n else if (columns.get(i).equals(\"instanceId\"))\n instanceidIndex = i;\n }\n for (int i = 0; i < points.size(); i++) {\n String clientId = points.get(i).get(clientidIndex).toString();\n String InstanceId = points.get(i).get(instanceidIndex).toString();\n if (!(map.containsKey(clientId))) {\n map.put(clientId, new ArrayList<String>());\n if (!(map.get(clientId).contains(InstanceId))) {\n map.get(clientId).add(InstanceId);\n }\n } else {\n if (!(map.get(clientId).contains(InstanceId))) {\n map.get(clientId).add(InstanceId);\n }\n\n }\n }\n }\n logger.trace(\"END HashMap<String,ArrayList<String>> getInstanceIdsPerClientId(TSDBData[] tsdbData)\");\n return map;\n }",
"List<ChunkID> findAllChunkId() throws DataBaseException;",
"public void fetchData(View view){\n if (lastSelectedCategoryId != categoryId){\n // If the user has chosen a new category, then save its value\n lastSelectedCategoryId = categoryId;\n } else {\n Log.d(\"ANALYZE \", \" ANTI SPAM :(\");\n // If it's the old category, then do not do anything\n return;\n }\n\n // clear all old data!\n monthsValuesMap.clear();\n // put all months with ZERO values for sum\n for (int i = 0; i < 12; i++ ){\n monthsValuesMap.put(i, 0F);\n }\n\n final Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n // get today and clear time of day - 0h : 00m : 00s\n calendar.set(Calendar.HOUR_OF_DAY, 0); // ! clear would not reset the hour of day !\n calendar.clear(Calendar.MINUTE);\n calendar.clear(Calendar.SECOND);\n calendar.set(Calendar.MILLISECOND, 250);\n // get start of the month\n calendar.set(Calendar.DAY_OF_MONTH, 1);\n // get start of the year\n calendar.set(Calendar.MONTH, 0);\n\n long startOfYearInMs = calendar.getTimeInMillis();\n\n // get last month in the year\n calendar.set(Calendar.MONTH, 11);\n\n long endOfYearInMs = calendar.getTimeInMillis();\n\n DatabaseReference reference = firebaseDatabase.getReference(Constants.FIREBASE_LOCATION_USER_TRANSACTIONS + \"/\"\n + PreferenceManager.getDefaultSharedPreferences(context).getString(Constants.KEY_PREF_EMAIL_PARSED, null) + \"/\"\n + \"0\" + \"/\"\n + Constants.EXPENSE_TRANSACTION_TYPE + \"/\"\n + categoryId + \"/\");\n\n fetchDataQuery = reference.orderByKey().startAt(Long.toString(startOfYearInMs)).endAt(Long.toString(endOfYearInMs));\n if (fetchDataQuery != null){\n fetchDataQuery.keepSynced(true);\n }\n\n\n fetchDataQuery.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n // for every month TIMESTAMP\n for (DataSnapshot timestamp : dataSnapshot.getChildren()){\n Float sumOfChildes = 0f;\n\n // for every TRANSACTION in this TIMESTAMP\n for (DataSnapshot transaction : timestamp.getChildren() ){\n // add the transactions VALUE to the sum\n sumOfChildes = sumOfChildes + (float) transaction.getValue(Transaction.class).getTrAmount();\n }\n\n Log.d(\"ANALYZE\", \"onDataChange -> timestamp.getKey : \" + timestamp.getKey() + \"\\t sumOfChildes : \" + sumOfChildes + \"\\t calendar.getTimeInMillis : \" + calendar.getTimeInMillis());\n\n // set calendars time to be == TIMESTAMPs key (e.g. beginning of the month)\n calendar.setTimeInMillis(Long.valueOf(timestamp.getKey()));\n // put the sum of transactions amounts in the HashMap with KEY = MONTH of the year\n monthsValuesMap.put( calendar.get(Calendar.MONTH), sumOfChildes);\n monthBeginMap.put(calendar.get(Calendar.MONTH), calendar.getTimeInMillis());\n\n Log.d(\"ANALYZE\", \"onDataChange -> monthsValuesMap.size \" + monthsValuesMap.size() + \"\\t monthBeginMap.size : \" + monthBeginMap.size());\n }\n\n // pass all months data to setupBarChart()\n setupBarChart(monthsValuesMap, false);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }",
"public List listaCarneMensalidadesAgrupado(String id_pessoa, String datas) {\n String and = \"\";\n\n if (id_pessoa != null) {\n and = \" AND func_titular_da_pessoa(M.id_beneficiario) IN (\" + id_pessoa + \") \\n \";\n }\n\n// String text\n// = \" -- CarneMensalidadesDao->listaCarneMensalidadesAgrupado(new Pessoa(), new Date()) \\n\\n\"\n// + \" SELECT P.ds_nome AS titular, \\n \"\n// + \" S.matricula, \\n \"\n// + \" S.categoria, \\n \"\n// + \" M.id_pessoa AS id_responsavel, \\n \"\n// + \" sum(nr_valor - nr_desconto_ate_vencimento) AS valor, \\n\"\n// + \" M.dt_vencimento AS vencimento \\n\"\n// + \" FROM fin_movimento AS M \\n\"\n// + \" INNER JOIN pes_pessoa AS P ON P.id = M.id_pessoa \\n\"\n// + \" INNER JOIN pes_pessoa AS B ON B.id = M.id_beneficiario \\n\"\n// + \" LEFT JOIN soc_socios_vw AS S ON S.codsocio = M.id_pessoa \\n\"\n// + \" WHERE is_ativo = true \\n\"\n// + \" AND id_baixa IS NULL \\n\"\n// + \" AND to_char(M.dt_vencimento, 'MM/YYYY') IN (\" + datas + \")\\n\"\n// + \" AND M.id_servicos NOT IN (SELECT id_servicos \\n\"\n// + \" FROM fin_servico_rotina \\n\"\n// + \" WHERE id_rotina = 4 \\n\"\n// + \") \\n\"\n// + and\n// + \" GROUP BY P.ds_nome, \\n\"\n// + \" S.matricula, \\n\"\n// + \" S.categoria, \\n\"\n// + \" M.id_pessoa, \\n\"\n// + \" M.dt_vencimento \\n\"\n// + \" ORDER BY P.ds_nome, \\n\"\n// + \" M.id_pessoa\";\n String queryString = \"\"\n + \"( \\n\"\n + \" -- CarneMensalidadesDao->listaCarneMensalidadesAgrupado(new Pessoa(), new Date()) \\n\"\n + \" \\n\"\n + \" SELECT P.ds_nome AS titular, \\n\"\n + \" S.matricula AS matricula, \\n\"\n + \" S.categoria AS categoria, \\n\"\n + \" M.id_pessoa AS id_responsavel, \\n\"\n + \" sum(nr_valor - nr_desconto_ate_vencimento) AS valor, \\n\"\n + \" M.dt_vencimento AS vencimento, \\n\"\n + \" '' AS servico , \\n\"\n + \" 0 AS quantidade \\n\"\n + \" FROM fin_movimento AS M \\n\"\n + \" INNER JOIN pes_pessoa AS P ON P.id = M.id_pessoa \\n\"\n + \" INNER JOIN pes_pessoa AS B ON B.id = M.id_beneficiario \\n\"\n + \" LEFT JOIN soc_socios_vw AS S ON S.codsocio = M.id_pessoa \\n\"\n + \" WHERE is_ativo = true \\n\"\n + \" AND id_baixa IS NULL \\n\"\n + \" AND to_char(M.dt_vencimento, 'MM/YYYY') IN (\" + datas + \") \\n\"\n + \" AND M.id_servicos NOT IN (SELECT id_servicos \\n\"\n + \" FROM fin_servico_rotina \\n\"\n + \" WHERE id_rotina = 4 \\n\"\n + \") \\n\"\n + and\n + \" GROUP BY P.ds_nome, \\n\"\n + \" S.matricula, \\n\"\n + \" S.categoria, \\n\"\n + \" M.id_pessoa, \\n\"\n + \" M.dt_vencimento \\n\"\n + \") \\n\"\n + \" \\n\"\n + \" \\n\"\n + \"UNION \\n\"\n + \" \\n\"\n + \" \\n\"\n + \" \\n\"\n + \"( \\n\"\n + \" SELECT P.ds_nome AS titular, \\n\"\n + \" S.matricula AS matricula, \\n\"\n + \" S.categoria AS categoria, \\n\"\n + \" M.id_pessoa AS id_responsavel, \\n\"\n + \" sum(nr_valor - nr_desconto_ate_vencimento) AS valor,\\n\"\n + \" '01/01/1900' AS vencimento, \\n\"\n + \" SE.ds_descricao AS servico, \\n\"\n + \" count(*) AS quantidade \\n\"\n + \" FROM fin_movimento AS M \\n\"\n + \" INNER JOIN fin_servicos AS SE ON SE.id = M.id_servicos \\n\"\n + \" INNER JOIN pes_pessoa AS P ON P.id = M.id_pessoa \\n\"\n + \" INNER JOIN pes_pessoa AS B ON B.id = M.id_beneficiario \\n\"\n + \" LEFT JOIN soc_socios_vw AS S ON S.codsocio = M.id_pessoa \\n\"\n + \" WHERE is_ativo = true \\n\"\n + \" AND id_baixa IS NULL \\n\"\n + \" AND to_char(M.dt_vencimento, 'MM/YYYY') IN (\" + datas + \")\\n\"\n + \" AND M.id_servicos NOT IN (SELECT id_servicos \\n\"\n + \" FROM fin_servico_rotina \\n\"\n + \" WHERE id_rotina = 4 \\n\"\n + \") \\n\"\n + and\n + \" GROUP BY P.ds_nome, \\n\"\n + \" S.matricula, \\n\"\n + \" S.categoria, \\n\"\n + \" M.id_pessoa, \\n\"\n + \" SE.ds_descricao\\n\"\n + \") \\n\"\n + \" ORDER BY 1,4,6\";\n try {\n Query query = getEntityManager().createNativeQuery(queryString);\n return query.getResultList();\n } catch (Exception e) {\n e.getMessage();\n }\n return new ArrayList();\n }",
"public Cursor getAllRowData() {\n String where = null;\n Cursor c = \tdb.query(true, DATA_TABLE, null,\n where, null, null, null, null, null);\n if (c != null) {\n c.moveToFirst();\n }\n return c;\n }",
"@Override\n\tpublic List<Map<String, Object>> findInfoById(long id) {\n\t\treturn gwgyDataDao.findInfoById(id);\n\t}",
"public List<DataNodeId> getDataNodeIds();",
"public DataEntry fetchByGroupId_First(\n\t\tlong groupId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<DataEntry>\n\t\t\torderByComparator);",
"String findConfigInfoAggrByPageFetchRows(int startRow, int pageSize);",
"public HashMap<String,String> filterDataForVerification(HashMap<String, String> data)\n {\n\n HashMap<String, String> fillter = new HashMap<String, String>();\n\n //add medical condition description\n String medicalConditionDescription =\n getMedicalConditionDescription(data.get(\"medical_condition_id\"));\n fillter.put(\"medical_condition_description\", medicalConditionDescription);\n\n\n //add medication name\n String medicationName = getMedicationName( data.get(\"medication_num\"));\n\n fillter.put(\"medication_name\", medicationName);\n\n for (String key : data.keySet()) {\n if (key.equals(\"first_name\") || key.equals(\"last_name\") || key.equals(\"street\") ||\n key.equals(\"home_phone_number\") || key.equals(\"email_address\")\n || key.equals(\"house_number\") || key.equals(\"contact_phone\") ||\n key.equals(\"zip_code\") || key.equals(\"birth_date\") || key.equals(\"city\") ||\n key.equals(\"mobile_phone_number\") || key.equals(\"state\")\n || key == \"dosage\")\n fillter.put(key,data.get(key));\n\n if (key.equals(\"gender\"))\n fillter.put(key,convertCodeToGender(data.get(key)));\n }\n return fillter;\n }",
"@Override\n\tpublic List<String> getDataByGroupcode(String paramString)\n\t{\n\t\treturn null;\n\t}",
"public int[] replaceDataAll(\n @NotNull String libraryName,\n @NotNull String datasetName,\n @NotNull List<Map<String, Object>> data\n ) throws Exception {\n int deletedCount = deleteDataAll(libraryName, datasetName);\n int insertedCount = insertData(libraryName, datasetName, data);\n return new int[] { insertedCount, deletedCount };\n }",
"@Override\n\t@Transactional(propagation = Propagation.REQUIRED)\n\tpublic void compareDataSource(QualityQuery data) throws Exception {\n\t\tList<DataSourceResult> resultList = metaDataFetchService.listFromColumnResult(data);\n\t\tmetaDataModifyService.mergeDqDataSourceResult(data.getBatchId(), resultList);\n\t}",
"@Override\r\n\tpublic Collection selectALLData(Connection con) {\n\t\treturn select(con);\r\n\t}",
"public void queryDataFromDatabase() {\n AppDatabase database = Room.databaseBuilder(this, AppDatabase.class, DB_NAME).allowMainThreadQueries().build();\n runningdao = database.getRunningdataDAO();\n List<Runningdata> runningdata_list = runningdao.getAllRuningdata();\n for (int i = 0; i < runningdata_list.size(); i++) {\n int oldId = runningdata_list.get(i).getId();\n String oldStarttime = runningdata_list.get(i).getStarttime();\n double oldDistance = runningdata_list.get(i).getDistance();\n double oldCalorie = runningdata_list.get(i).getCalorie();\n System.out.println(\"Database shows here: \"+\"i:\"+i+\"oldId:\"+oldId +\"oldStarttime\"+oldStarttime+\"oldDistance\"+oldDistance+\"oldCalorie\"+oldCalorie);\n }\n // delete data from database by ID\n //runningdao.deleteById(10);\n }",
"public List<ChunkMetadata> getVisibleMetadataList(\n String deviceId, String measurementId, TSDataType dataType) {\n List<ChunkMetadata> chunkMetadataList = new ArrayList<>();\n if (metadatasForQuery.containsKey(deviceId)\n && metadatasForQuery.get(deviceId).containsKey(measurementId)) {\n for (IChunkMetadata chunkMetaData : metadatasForQuery.get(deviceId).get(measurementId)) {\n // filter: if a device'measurement is defined as float type, and data has been persistent.\n // Then someone deletes the timeseries and recreate it with Int type. We have to ignore\n // all the stale data.\n if (dataType == null || dataType.equals(chunkMetaData.getDataType())) {\n chunkMetadataList.add((ChunkMetadata) chunkMetaData);\n }\n }\n }\n return chunkMetadataList;\n }",
"public java.util.List<DataEntry> findAll(int start, int end);",
"@Override\n public List<Map<String, Object>> getGridTreeData(\n Map<String, String> conditionMap) {\n return null;\n }",
"public java.util.List<DataEntry> findByDataPackId(\n\t\tlong dataPackId, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<DataEntry>\n\t\t\torderByComparator,\n\t\tboolean useFinderCache);",
"@Override\n\tpublic List<Integer> queryAllGroupId(int groupId) {\n\t\tList<Integer> inList=new ArrayList<Integer>();\n\t\tList<BmsGroupEntity> list=selectList(\"com.jiuyescm.bms.base.group.mapper.BmsGroupMapper.queryAllGroupId\", groupId);\n\t\tfor(BmsGroupEntity entity:list){\n\t\t\tif(groupId!=entity.getId()){\n\t\t\t\tinList.add(entity.getId());\n\t\t\t}\n\t\t}\n\t\treturn inList;\n\t}",
"public List<AggregateRecord> getData() {\n return data;\n }",
"@Override\n public List<DataDict> select(String condt)\n {\n List<DataDict> ddictList = null;\n ddictList = new LinkedList<DataDict>();\n try\n {\n String sql = \"select dict_id, dict_parent_id, dict_index , dict_name , dict_value from data_dict \";\n condt.trim();\n if (!condt.isEmpty())\n sql += \" where \" + condt;\n\n DBUtil db = new DBUtil();\n if (!db.openConnection())\n {\n System.out.print(\"fail to connect database\");\n return null;\n }\n ResultSet rst = db.execQuery(sql);\n\n if (rst != null)\n {\n while (rst.next())\n {\n DataDict ddict = new DataDict();\n ddict.setId(rst.getInt(\"dict_id\"));\n ddict.setSuperId(rst.getInt(\"dict_parent_id\"));\n ddict.setIndex(rst.getInt(\"dict_index\"));\n ddict.setName(rst.getString(\"dict_name\"));\n ddict.setValue(rst.getString(\"dict_value\"));\n ddictList.add(ddict);\n }\n }\n db.close(rst);\n db.close();\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n finally\n {\n\n }\n\n return ddictList;\n }",
"public void initializeData() {\n _currentDataAll = _purityReportData.getAll();\n }",
"public ArrayList getDimensions(String grpId) {\r\n ArrayList finalList = new ArrayList();\r\n// PbBussGrpResourceBundle resBundle = new PbBussGrpResourceBundle();\r\n try {\r\n\r\n PbReturnObject retObj = null;\r\n String finalQuery = null;\r\n String[] colNames = null;\r\n Object obj[] = new Object[1];\r\n obj[0] = grpId;\r\n String sql = getResourceBundle().getString(\"getBusinessGroupDimList\");\r\n finalQuery = buildQuery(sql, obj);\r\n retObj = execSelectSQL(finalQuery);\r\n colNames = retObj.getColumnNames();\r\n for (int i = 0; i < retObj.getRowCount(); i++) {\r\n BusinessGrpsTreeTable dimension = new BusinessGrpsTreeTable();\r\n dimension.setDimensionName(retObj.getFieldValueString(i, colNames[1]));\r\n dimension.setDimensionId(String.valueOf(retObj.getFieldValueInt(i, colNames[0])));\r\n ArrayList tableList = new ArrayList();\r\n\r\n tableList = getTableList(String.valueOf(retObj.getFieldValueInt(i, colNames[0])), grpId);\r\n dimension.setDimTableList(tableList);\r\n ArrayList membersList = new ArrayList();\r\n membersList = getMembersList(String.valueOf(retObj.getFieldValueInt(i, colNames[0])), grpId);\r\n dimension.setDimMembersList(membersList);\r\n ArrayList hierarchyList = new ArrayList();\r\n hierarchyList = getHeirarchyList(String.valueOf(retObj.getFieldValueInt(i, colNames[0])), grpId);\r\n dimension.setDimHierarchyList(hierarchyList);\r\n //.println.println(\"hierarchy list==\" + hierarchyList.size());\r\n finalList.add(dimension);\r\n }\r\n } catch (Exception e) {\r\n logger.error(\"Exception:\", e);\r\n }\r\n\r\n return finalList;\r\n }",
"public void getData() {\n\t\tcurrentDate = model.getCurrentDate();\n\t\tLocalDate firstDateOfMonth = LocalDate.of(currentDate.getYear(), currentDate.getMonthValue(), 1);\n\t\tevents = EventProcessor.filterEvents(model.getEvents(), firstDateOfMonth, firstDateOfMonth.plusMonths(1).minusDays(1));\n\t}",
"@Override\r\n\tpublic String[] getData(String[] sql) {\n\t\treturn null;\r\n\t}",
"protected List<DataObject> getDataObjectsByDql(String dql) {\r\n\r\n\t\tList<DataObject> emcDataObjectList = new ArrayList<DataObject>();\r\n\r\n\t\ttry {\r\n\r\n\t\t\tQueryResult queryResult = this.getQueryResult(dql);\r\n\r\n\t\t\tDataPackage resultDp = queryResult.getDataPackage();\r\n\r\n\t\t\tList<DataObject> dataObjects = resultDp.getDataObjects();\r\n\r\n\t\t\tint numberOfObjects = dataObjects.size();\r\n\r\n\t\t\tlogger.info(INFO_NUMBER_OF_ITENS.concat(String\r\n\t\t\t\t\t.valueOf(numberOfObjects)));\r\n\r\n\t\t\tfor (DataObject dObj : dataObjects) {\r\n\r\n\t\t\t\temcDataObjectList.add(dObj);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (ServiceException e) {\r\n\r\n\t\t\tlogger.error(ERROR_SERVICO_EMC.concat(e.getLocalizedMessage()));\r\n\r\n\t\t}\r\n\r\n\t\treturn emcDataObjectList;\r\n\r\n\t}",
"@JsonIgnore\n @Override\n public List<DataSet> getDataSets()\n {\n if (getFetchOptions() != null && getFetchOptions().hasDataSets())\n {\n return dataSets;\n }\n else\n {\n throw new NotFetchedException(\"Data sets have not been fetched.\");\n }\n }",
"@Override\n\tpublic List<Object[]> fetchActiveAlgmntsData(Date effEdDt,Short tenantId){\n\t\tList<Object> paramList = new ArrayList<Object>();\n\t\tparamList.add(effEdDt);\n\t\tparamList.add(tenantId);\n\t\t\n\t\treturn genericDAO.findEntitiesByNamedQueryMultiCond(\"FetchActiveAlgmntsData\", paramList, 0, -1);\n\t}",
"ConfigData selectByPrimaryKey(Integer id);",
"public java.util.List<DataEntry> findByDataSetId(\n\t\tlong dataSetId, int start, int end);",
"@Override\n public Map<String, Object> queryTaskGroupById(User loginUser, Integer id) {\n Map<String, Object> result = new HashMap<>();\n if (isNotAdmin(loginUser, result)) {\n return result;\n }\n TaskGroup taskGroup = taskGroupMapper.selectById(id);\n result.put(Constants.DATA_LIST, taskGroup);\n putMsg(result, Status.SUCCESS);\n return result;\n }",
"@Override\n public List<Object> getHomeGroupMemberSelectData(\n Map<String, Object> conditionMap) {\n return null;\n }",
"public DataEntry fetchByDataPackId_First(\n\t\tlong dataPackId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<DataEntry>\n\t\t\torderByComparator);",
"@Override\r\n protected DataSource selectAnyDataSource() {\n if (dataSourcesMtApp.isEmpty()) {\r\n List<MasterTenant> masterTenants = masterTenantRepo.findAll();\r\n LOG.info(\">>>> selectAnyDataSource() -- Total tenants:\" + masterTenants.size());\r\n for (MasterTenant masterTenant : masterTenants) {\r\n dataSourcesMtApp.put(masterTenant.getTenantId(),\r\n DataSourceUtil.createAndConfigureDataSource(masterTenant));\r\n }\r\n }\r\n return this.dataSourcesMtApp.values().iterator().next();\r\n }",
"protected String buildDataQuery() {\n StringBuilder sql = new StringBuilder(\"select\");\n String delim = \" \";\n for (String vname : getColumnNames()) {\n sql.append(delim).append(vname);\n delim = \", \";\n }\n \n Element ncElement = getNetcdfElement();\n \n String table = ncElement.getAttributeValue(\"dbTable\");\n if (table == null) {\n String msg = \"No database table defined. Must set 'dbTable' attribute.\";\n _logger.error(msg);\n throw new TSSException(msg);\n }\n sql.append(\" from \" + table);\n \n String predicate = ncElement.getAttributeValue(\"predicate\");\n if (predicate != null) sql.append(\" where \" + predicate);\n \n //Order by time.\n String tname = getTimeVarName();\n sql.append(\" order by \"+tname+\" ASC\");\n \n return sql.toString();\n }",
"private void getContactDataBefore() {\n int i = 0;\n List<String> list = new ArrayList<>();\n\n Cursor c1 = getContentResolver()\n .query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n\n if ((c1 != null) && c1.moveToFirst()) {\n\n // add contact id's to the mIDs list\n do {\n String id = c1.getString(c1.getColumnIndexOrThrow(ContactsContract.Contacts._ID));\n String name = c1.getString(c1.getColumnIndexOrThrow(ContactsContract.Contacts.DISPLAY_NAME));\n\n // query all contact numbers corresponding to current id\n Cursor c2 = getContentResolver()\n .query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n new String[]{ContactsContract.CommonDataKinds.Phone.NUMBER},\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"=?\",\n new String[]{id}, null);\n\n if (c2 != null && c2.moveToFirst()) {\n // Log.d(\"DEBUG\",\"name =\" + name);\n list = new ArrayList<>();\n\n if (idsHash.containsKey(name)) {\n list = idsHash.get(name);\n } else {\n mIDs.add(id);\n mNames.add(name);\n mNumbers.add(c2.getString(c2\n .getColumnIndexOrThrow(ContactsContract.CommonDataKinds.Phone.NUMBER)));\n }\n\n list.add(id);\n idsHash.put(name, list);\n\n c2.close();\n } else {\n c2.close();\n }\n\n i++;\n } while (c1.moveToNext() && i < c1.getCount());\n\n c1.close();\n }\n }",
"public List<DataSet> findDataSetEntities() {\n return findDataSetEntities(true, -1, -1);\n }",
"@Override\n public ArrayList<PepDetailsHistory> getGroupingHistoryDetails(String groupingId) throws PEPPersistencyException{\n LOGGER.info(\"inside getGroupingHistoryDetails()\");\n List<PepDetailsHistory> pepList = new ArrayList<PepDetailsHistory>();\n Session session = this.sessionFactory.openSession();\n Query query = null; \n query = session.createSQLQuery(xqueryConstants.getGroupingHistoryDetails());\n query.setParameter(0,groupingId); \n query.setFetchSize(100);\n List<Object[]> rows = query.list();\n SimpleDateFormat formatter1 = new SimpleDateFormat(\"MM/dd/yyyy HH:mm\");\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssZZZ\");\n Date date = null;\n Date date1 = null;\n String createdOn = \"\";\n String updatedDate = \"\"; \n try{\n \tProperties prop =PropertyLoader.getPropertyLoader(ImageConstants.LOAD_IMAGE_PROPERTY_FILE);\n for(Object[] row: rows){ \n PepDetailsHistory pepHist = new PepDetailsHistory();\n pepHist.setPepOrinNumber(row[0]!=null?row[0].toString():null); \n if(null != row[6]){\n \tif(\"01\".equalsIgnoreCase(row[6].toString())){\n \t\tpepHist.setHistoryStatus(\"Was Initiated\");\n \t}\n \tif(\"02\".equalsIgnoreCase(row[6].toString())){\n \t\tpepHist.setHistoryStatus(\"Was Completed\");\n \t}\n\t\t\t\tif(\"03\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Approved\");\n\t\t\t\t}\n\t\t\t\tif(\"04\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Failed RRD Check\");\n\t\t\t\t}\n\t\t\t\tif(\"05\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Deactivated\");\n\t\t\t\t}\n\t\t\t\tif(\"06\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Closed\");\n\t\t\t\t}\n\t\t\t\tif(\"07\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Rejected By DCA\");\n\t\t\t\t}\n\t\t\t\tif(\"08\".equalsIgnoreCase(row[6].toString())){\n\t\t\t\t\tpepHist.setHistoryStatus(\"Was Ready For Review\");\n\t\t\t\t}\n \t\n }else{\n \tpepHist.setHistoryStatus(\"\");\n }\n pepHist.setPepUpdatedBy(row[5]!=null?row[5].toString():null); \n if(row[2]!=null){ \t\n \tdate = formatter.parse(row[2].toString());\n \tcreatedOn = formatter1.format(date);\n \tpepHist.setCreatedOn(createdOn!=null?createdOn.toString():null);\n }\n if(row[4]!=null){\n \tdate1 = formatter.parse(row[4].toString());\n \tupdatedDate = formatter1.format(date1);\n \tpepHist.setUpdateDate(updatedDate!=null?updatedDate.toString():null);\n } \n pepHist.setCreatedBy(row[1]!=null?row[1].toString():null); \n if(null != row[3]){\n \tString imageStateCode=row[3] == null? \"\" : row[3].toString();\n String imageStateDesc = prop.getProperty(\"Image\"+imageStateCode);\n \n String imageState = imageStateDesc == null ? \"\": imageStateDesc.toString();\n pepHist.setUpdatedStatus(imageState);\n }else{\n \tpepHist.setUpdatedStatus(\"\");\n }\n pepList.add(pepHist); \n }\n }catch(Exception e){\n \tLOGGER.error(\"inside getGroupingHistoryDetails \",e);\n }finally{ \n session.close();\n } \n return (ArrayList<PepDetailsHistory>) pepList; \n }",
"public java.util.List<DataEntry> findByDataPackId(\n\t\tlong dataPackId, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<DataEntry>\n\t\t\torderByComparator);",
"@Test\n\tvoid findAllFilteredNonExistingGroup() {\n\t\tinitSpringSecurityContext(\"fdaugan\");\n\t\tfinal TableItem<UserOrgVo> tableItem = resource.findAll(null, \"any\", null, newUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(0, tableItem.getRecordsTotal());\n\t}",
"private void fetchParseData() {\n // Look for group containing current user\n ParseQuery<ParseObject> query = new ParseQuery<ParseObject>(ParseConstants.CLASS_GROUPS);\n query.whereEqualTo(ParseConstants.KEY_GROUP_MEMBER_IDS, mCurrentUser.getObjectId());\n query.getFirstInBackground(new GetCallback<ParseObject>() {\n @Override\n public void done(ParseObject group, ParseException e) {\n handleParseData(group);\n }\n });\n }",
"private static void buildList() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif (connection == null || connection.isClosed()) \r\n\t\t\t\tconnection = DataSourceManager.getConnection();\r\n\t\t\t\r\n\t\t\tstatement = connection.prepareStatement(LOAD_ALL);\r\n\t \tresultset = statement.executeQuery();\r\n\t \t\r\n\t \tgroups = getCollectionFromResultSet(resultset);\r\n\t \tresultset.close();\r\n\t statement.close();\r\n\t\t\t\r\n\t\t} catch (ClassNotFoundException | SQLException e) {\r\n\t\t\tlog.fatal(e.toString());\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\t\r\n\t}",
"public rowAndData getPushStatisticsEventData(EventStatisticsData eventStatisticsData, boolean flag, int id) {\n\t\tSIMCardInfo si = new SIMCardInfo(getApplicationContext());\n\t\tString imei = si.getIMEI();\n\t\tif (imei == null) {\n\t\t\timei = \"\";\n\t\t}\n\n\t\tContext c = getApplicationContext();\n\n\t\tMap map = new HashMap();\n\t\t//insert cv\n\t\tContentValues cv = new ContentValues();\n\n\t\tmap.put(\"dv\", imei);\n\t\tmap.put(\"rv\", getMyUIVersion());\n\t\tmap.put(\"pm\", getProductModel());\n\t\tLog.d(\"NewPushService\", \"ipAddress:\" + IpAddress);\n\t\tmap.put(\"ip\", IpAddress);\n\t\tmap.put(\"nt\", PhoneInfoUtil.getNetType(getApplicationContext()));\n\t\tmap.put(\"bht\", TimeUtils.getCurrentTime());\n\n\t\tcv.put(\"deviceId\", imei);\n\t\tcv.put(\"romVersion\", getMyUIVersion());\n\t\tcv.put(\"productModel\", getProductModel());\n\n\t\tcv.put(\"ipAddress\", TextUtils.isEmpty(IpAddress) ? \"0\" : IpAddress);\n\t\tcv.put(\"netType\", PhoneInfoUtil.getNetType(getApplicationContext()));\n\t\tcv.put(\"behaviorTime\", TimeUtils.getCurrentTime());\n\n\t\tif (!TextUtils.isEmpty(eventStatisticsData.getBehavior())) {\n\t\t\tmap.put(\"bh\", eventStatisticsData.getBehavior());\n\t\t\tcv.put(\"behavior\", eventStatisticsData.getBehavior());\n\t\t}\n\t\tif (!TextUtils.isEmpty(eventStatisticsData.getAppId())) {\n\t\t\tmap.put(\"apid\", eventStatisticsData.getAppId());\n\t\t\tcv.put(\"appId\", eventStatisticsData.getAppId());\n\t\t}\n\t\tif (!TextUtils.isEmpty(eventStatisticsData.getAppSrc())) {\n\t\t\tmap.put(\"apsr\", eventStatisticsData.getAppSrc());\n\t\t\tcv.put(\"appSrc\", eventStatisticsData.getAppSrc());\n\t\t}\n\t\tif (!TextUtils.isEmpty(eventStatisticsData.getPackageName())) {\n\t\t\tmap.put(\"pk\", eventStatisticsData.getPackageName());\n\t\t\tcv.put(\"packageName\", eventStatisticsData.getPackageName());\n\t\t}\n\t\tif (!TextUtils.isEmpty(eventStatisticsData.getClient())) {\n\t\t\tmap.put(\"cli\", eventStatisticsData.getClient());\n\t\t\tcv.put(\"client\", eventStatisticsData.getClient());\n\t\t}\n\t\tif (!TextUtils.isEmpty(eventStatisticsData.getListenArea())) {\n\t\t\tmap.put(\"lsar\", eventStatisticsData.getListenArea());\n\t\t\tcv.put(\"listenArea\", eventStatisticsData.getListenArea());\n\t\t}\n\t\tif (!TextUtils.isEmpty(eventStatisticsData.getListenContextId())) {\n\t\t\tmap.put(\"lscid\", eventStatisticsData.getListenContextId());\n\t\t\tcv.put(\"listenContextId\", eventStatisticsData.getListenContextId());\n\t\t}\n\t\tif (!TextUtils.isEmpty(eventStatisticsData.getListenContextSrc())) {\n\t\t\tmap.put(\"lscsrc\", eventStatisticsData.getListenContextSrc());\n\t\t\tcv.put(\"listenContextSrc\", eventStatisticsData.getListenContextSrc());\n\t\t}\n\t\tif (!TextUtils.isEmpty(eventStatisticsData.getClientVersion())) {\n\t\t\tmap.put(\"cliv\", eventStatisticsData.getClientVersion());\n\t\t\tcv.put(\"clientVersion\", eventStatisticsData.getClientVersion());\n\t\t}\n\t\tif (!TextUtils.isEmpty(eventStatisticsData.getReferenceId())) {\n\t\t\tmap.put(\"ref\", eventStatisticsData.getReferenceId());\n\t\t\tcv.put(\"referenceId\", eventStatisticsData.getReferenceId());\n\t\t}\n\t\tif (!TextUtils.isEmpty(eventStatisticsData.getAppName())) {\n\t\t\tmap.put(\"apnm\", eventStatisticsData.getAppName());\n\t\t\tcv.put(\"appName\", eventStatisticsData.getAppName());\n\t\t}\n\t\tif (!TextUtils.isEmpty(eventStatisticsData.getAppVersion())) {\n\t\t\tmap.put(\"apvn\", eventStatisticsData.getAppVersion());\n\t\t\tcv.put(\"appVersion\", eventStatisticsData.getAppVersion());\n\t\t}\n\t\tcv.put(\"mark\", \"0\");\n\n\t\tlong row = -1;\n\t\tif (flag == true) {\n\t\t\t//insert to db\n\t\t\ttry {\n\t\t\t\tmyDBUtil = myDBUtil.open();\n\t\t\t\trow = myDBUtil.add(\"EventStatisticsDB\", cv);\n\t\t\t\tmyDBUtil.close();\n\t\t\t\tLog.d(\"NewPushService\", \"insert row is\" + row);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tLog.d(\"NewPushService\", \"inserto db fail\");\n\t\t\t}\n\t\t} else {\n\t\t\trow = id;\n\t\t}\n\n\t\tJSONObject cmdtextjs = new JSONObject(map);\n\t\tString registerstr = cmdtextjs.toString();\n\t\tLog.d(TAG, \"000 JSONObject to String:\" + registerstr);\n\t\tbyte[] cInfoRegister = ByteOrStringHelper.StringToByte(registerstr);\n\t\tLog.d(TAG, \"111 String to byte;s length:\" + cInfoRegister.length);\n\t\tString data = new String(cInfoRegister);\n\t\tLog.d(TAG, \"222 byte to string:\" + data);\n\n\t\treturn new rowAndData(row, data);\n\t}",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n loader.setVisibility(View.GONE);\n //recyclerView.setVisibility(View.VISIBLE);\n reportList.clear();\n for(DataSnapshot report: dataSnapshot.getChildren()){\n Report r = report.getValue(Report.class);\n if (r != null) {\n r.key = report.getKey();\n }\n reportList.add(r);\n }\n if(reportList.size()>10){\n show_more.setVisibility(View.VISIBLE);\n }\n Collections.sort(reportList,new TimeCompare());\n calculate(startDate,endDate);\n Log.d(\"Size \", String.valueOf(reportList.size()));\n// transferData();\n populate_data();\n }",
"public java.util.List<DataEntry> findByDataSetId(\n\t\tlong dataSetId, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<DataEntry>\n\t\t\torderByComparator);",
"@Override\n\tpublic String getAData(String userId, String projectId, String dataId) {\n\t\treturn fileDao.getAData(userId, projectId, dataId);\n\t}",
"public DataEntry fetchByDataSetId_First(\n\t\tlong dataSetId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<DataEntry>\n\t\t\torderByComparator);",
"private void queryLimitedToFirst(JSONArray data) {\n \tString strURL = String.format(\"https://%s.firebaseio.com\", appName); // = \"https://%@.firebaseio.com\" + appName;\n \tint nLimit = 0;\n\n if ( data.length() >= 2 )\n {\n \ttry {\n\t\t\t\tstrURL = data.getString(0);\n\t\t\t\tnLimit = data.getInt(1);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"queryLimitedToFirst : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n\n Firebase urlRef = new Firebase(strURL);\n\n if(isUsed != true)\n isUsed = true;\n // Read data and react to changes\n urlRef.limitToFirst(nLimit).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot snapshot) {\n JSONObject resultObj;\n\t\t\t\ttry {\n HashMap result = snapshot.getValue(HashMap.class);\n if (result == null)\n resultObj = new JSONObject();\n else\n resultObj = new JSONObject(result);\n\t PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n\t //pluginResult.setKeepCallback(true);\n\t mCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"limitToFirst(limit).addListenerForSingleValueEvent failed: \" + firebaseError.getMessage());\n PluginResult pluginResult = new PluginResult(Status.ERROR, \"queryLimitedToFirst failded: \" + firebaseError.getMessage());\n mCallbackContext.sendPluginResult(pluginResult);\n }\n });\n }",
"public void loadToCache(int dataType, int id) {\r\n\t\tsynchronized (queue) {\r\n\t\t\tfor (OnDemandData onDemandData = (OnDemandData) queue\r\n\t\t\t\t\t.getFront(); onDemandData != null; onDemandData = (OnDemandData) queue.getNext())\r\n\t\t\t\tif (onDemandData.dataType == dataType && onDemandData.ID == id)\r\n\t\t\t\t\treturn;\r\n\r\n\t\t\tOnDemandData onDemandData_1 = new OnDemandData();\r\n\t\t\tonDemandData_1.dataType = dataType;\r\n\t\t\tonDemandData_1.ID = id;\r\n\t\t\tonDemandData_1.incomplete = true;\r\n\t\t\tsynchronized (aClass19_1370) {\r\n\t\t\t\taClass19_1370.insertBack(onDemandData_1);\r\n\t\t\t}\r\n\t\t\tqueue.insertBack(onDemandData_1);\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void queryData() {\n\t\t\n\t}",
"private void evaluateData () {\n long rows = DatabaseUtils.longForQuery(sqliteDBHelper.openSqlDatabaseReadable(), \"SELECT COUNT(*) FROM \" + SqliteDBStructure.DATA_AGGREGATE\r\n + \" JOIN \" + SqliteDBStructure.INFO_AT_ACCESSTIME + \" ON \"\r\n + SqliteDBStructure.DATA_AGGREGATE + \".\" + SqliteDBStructure.ACCESS_TIME + \" = \" + SqliteDBStructure.INFO_AT_ACCESSTIME + \".\" + SqliteDBStructure.ACCESS_TIME, null);\r\n // calculate the amount of tasks (thread) depending on the MaxBatchSize\r\n tasks = rows >= MaxBatchSize? (int)(rows/MaxBatchSize + 1):1;\r\n // set the amount of finished tasks to 0\r\n finished = 0;\r\n // send the amount of task to the main activity so it can be displayed in the progress dialog\r\n sendTaskAmount(tasks + 1);\r\n // create a thread pool with tasks amount of threads\r\n final ExecutorService executorService = Executors.newFixedThreadPool(tasks);\r\n // create a list which holds all the tasks to be executed\r\n final List<ProcessingDataHandler> taskList = new LinkedList<>();\r\n // for each task create a batch of MaxBatchSize rows to evaluate\r\n for (int i = 0; i < tasks; i++) {\r\n // pass the offset (where to start) and the limit (how many rows)\r\n taskList.add(new ProcessingDataHandler(i*MaxBatchSize, MaxBatchSize));\r\n }\r\n // invoke all the task at once\r\n new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n try {\r\n executorService.invokeAll(taskList);\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }).start();\r\n\r\n updateProgressDialog();\r\n }",
"@Override\n public ArrayList<SamleImageDetails> getGroupingSampleImageLinks(String groupingId) throws PEPPersistencyException{\n \tLOGGER.info(\"inside getSampleImageLinksDetails()dao impl\");\n \tList<SamleImageDetails> sampleImgList = new ArrayList<SamleImageDetails>();\n \tSession session = this.sessionFactory.openSession();\n Query query = null; \n query = session.createSQLQuery(xqueryConstants.getGroupingSampleImageLinks());\n query.setParameter(0, groupingId); \n query.setFetchSize(1);\n List<Object[]> rows = query.list();\n try{\n for(Object[] row : rows){ \t\n \tSamleImageDetails sampleImage = new SamleImageDetails(); \t\n \tsampleImage.setOrinNo(row[0]!=null?row[0].toString():null);\n \tsampleImage.setImageId(row[1]!=null?row[1].toString():null);\n \tif(row[2]!=null){\n \t\tsampleImage.setImageName(row[2]!=null?row[2].toString():null);\n \t}else {\n \t\tsampleImage.setImageName(\"\");\n \t}\n \tif(row[3] !=null){\n \t\tsampleImage.setOriginalImageName(row[3]!=null?row[3].toString():null);\n \t}else{\n \t\tsampleImage.setOriginalImageName(\"\");\n \t} \t\n \tsampleImage.setImageShotType(row[4]!=null?row[4].toString():null);\n \tif(row[5] !=null){\n \t\t\tsampleImage.setLinkStatus(row[5]!=null?row[5].toString():null);\n \t\t \t\t\n \t}\n \tif(row[7] !=null){ \t\t\t\n \t\t\tsampleImage.setImageStatus(row[7]!=null?row[7].toString():null);\n \t} \n \t\n \tsampleImgList.add(sampleImage);\n }\n }catch(Exception e){\n \tLOGGER.error(\"inside getGroupingSampleImageLinks \",e);\n \te.printStackTrace();\n }\n finally{ \n \t session.close();\n }\n \treturn (ArrayList<SamleImageDetails>) sampleImgList; \n \t\n }",
"public static int getAllDefDataIdOfGroupMembers(ContentResolver cr, ArrayList<Long> dataList, String title, String dataType) {\n int size = 0;\n if (\"sms\".equals(dataType)) {\n size = queryDefDataIdInGroup2(cr, dataList, title, Phone.CONTENT_ITEM_TYPE);\n } else if (\"email\".equals(dataType)) {\n size = queryDefDataIdInGroup2(cr, dataList, title, Email.CONTENT_ITEM_TYPE);\n }\n return size;\n }",
"void populateData();",
"public java.util.List<DataEntry> findByDataCollectionId(\n\t\tlong dataCollectionId, int start, int end);",
"private void loadCriteriaList() {\n DataBaseManager DBM = new DataBaseManager();\n criteriaList = DBM.loadCriteriaList(pantallaIdentificacion.this);\n }",
"public Set<String> getDataObjectIds() {\n\t\treturn dataObjectIds;\n\t}",
"@Test\n public void noFilteringAllowsRepeatedResults() {\n final Dataset dataset = new Dataset(\"TEST1\", \"sql\");\n\n List<String> entry1 = new ArrayList<>();\n entry1.add(\"abcd\");\n entry1.add(\"123\");\n\n List<String> entry2 = new ArrayList<>();\n entry2.add(\"wxyz\");\n entry2.add(\"789\");\n\n List<String> entry3 = new ArrayList<>();\n entry3.add(\"wxyz\"); // same key as entry2\n entry3.add(\"456\");\n\n List<String> entry4 = new ArrayList<>();\n entry4.add(\"efgh\");\n entry4.add(\"001\");\n\n List<List<String>> queryResults = new ArrayList<>();\n queryResults.add(entry1);\n queryResults.add(entry2);\n queryResults.add(entry3);\n queryResults.add(entry4);\n\n // given\n dataset.populateCache(queryResults, 100L);\n\n // when\n final List<String> result1 = dataset.getCachedResult();\n final List<String> result2 = dataset.getCachedResult();\n final List<String> result3 = dataset.getCachedResult();\n final List<String> result4 = dataset.getCachedResult();\n\n // then\n assertEquals(\"Wrong result 1\", entry1, result1);\n assertEquals(\"Wrong result 2\", entry2, result2);\n assertEquals(\"Wrong result 3\", entry3, result3);\n assertEquals(\"Wrong result 4\", entry4, result4);\n\n // and\n try {\n dataset.getCachedResult();\n fail(\"Expected to run out of data\");\n\n } catch (IllegalStateException ex) {\n assertEquals(\"Wrong error\", \"No more data available for dataset: TEST1\", ex.getMessage());\n }\n\n // and\n assertEquals(\"Wrong cache size\", Optional.of(4), dataset.getMetrics().getCacheSize());\n assertEquals(\"Wrong timing\", Optional.of(100L), dataset.getMetrics().getTimingMilliseconds());\n assertEquals(\"Wrong cache requested\", Optional.of(5), dataset.getMetrics().getCacheRequested());\n assertEquals(\"Wrong filtered out\", Optional.empty(), dataset.getMetrics().getFilteredOut());\n }",
"public java.util.List<DataEntry> findByDataSetId(\n\t\tlong dataSetId, int start, int end,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<DataEntry>\n\t\t\torderByComparator,\n\t\tboolean useFinderCache);",
"protected void readAllData() {\n \n String query = buildDataQuery();\n \n try {\n ResultSet rs = executeQuery(query);\n ResultSetMetaData md = rs.getMetaData();\n \n //Construct the internal data containers\n _dataMap = new LinkedHashMap<String,double[]>();\n _textDataMap = new LinkedHashMap<String,String[]>();\n \n //Make containers to collect data as we get it from the ResultSet\n int ncol = md.getColumnCount();\n ResizableDoubleArray[] dataArrays = new ResizableDoubleArray[ncol]; //tmp holder for numeric data\n List<String>[] textDataLists = new List[ncol]; //tmp holder for text data\n for (int i=0; i<ncol; i++) {\n dataArrays[i] = new ResizableDoubleArray();\n textDataLists[i] = new ArrayList<String>();\n }\n\n //Define a Calendar so we get our times in the GMT time zone.\n Calendar cal = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n \n //Read data from the result set into the ResizableDoubleArray-s which are already in the _dataArrayMap.\n while (rs.next()) { \n for (int i=0; i<ncol; i++) {\n double d = Double.NaN;\n //Check type and read as appropriate\n //TODO: check for other variation of time and text types\n int typeID = md.getColumnType(i+1); \n \n if (typeID == java.sql.Types.TIMESTAMP) { //TODO: test for DATE and TIME types?\n //We need to convert timestamps to numerical values.\n Timestamp ts = rs.getTimestamp(i+1, cal);\n d = ts.getTime();\n } else if (typeID == java.sql.Types.VARCHAR || typeID == java.sql.Types.CHAR) {\n //Text column. Save strings apart from other data.\n //They will appear as NaNs in the numeric data values.\n String s = rs.getString(i+1);\n textDataLists[i].add(s);\n } else d = rs.getDouble(i+1);\n \n dataArrays[i].addElement(d);\n }\n }\n \n //Extract the primitive arrays from the ResizableDoubleArray-s and put in data map.\n //Segregate the text data. Don't bother to save \"data\" (NaNs) for String types.\n for (int i=0; i<ncol; i++) {\n String name = md.getColumnName(i+1);\n int typeID = md.getColumnType(i+1);\n if (typeID == java.sql.Types.VARCHAR || typeID == java.sql.Types.CHAR) { \n String[] text = new String[1];\n text = (String[]) textDataLists[i].toArray(text);\n _textDataMap.put(name, text);\n } else {\n double[] data = dataArrays[i].getElements();\n _dataMap.put(name, data);\n }\n }\n \n } catch (SQLException e) {\n String msg = \"Unable to process database query: \" + query;\n _logger.error(msg, e);\n throw new TSSException(msg, e);\n } \n \n }",
"@Override\r\n\tpublic List<DataPack> queryOil() {\n\t\tList<DataPack> queryOil = homePageDao.queryOil();\r\n\t\t\r\n\t\treturn queryOil;\r\n\t}",
"public DataEntry fetchByDataCollectionId_First(\n\t\tlong dataCollectionId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<DataEntry>\n\t\t\torderByComparator);",
"public DataEntry fetchByDataSectionId_First(\n\t\tlong dataSectionId,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator<DataEntry>\n\t\t\torderByComparator);",
"@Override\n public List<KeepercontainerTbl> doQuery() throws DalException {\n List<KeepercontainerTbl> allDcKeeperContainers = dao.findActiveByDcName(dcName, KeepercontainerTblEntity.READSET_FULL);\n List<KeepercontainerTbl> allDcOrgKeeperContainers = allDcKeeperContainers.stream().filter(keepercontainer -> keepercontainer.getKeepercontainerOrgId() == clusterOrgId).collect(Collectors.toList());\n\n List<KeepercontainerTbl> dcOrgKeeperContainersInUsed;\n if (allDcOrgKeeperContainers.isEmpty() && clusterOrgId != XPipeConsoleConstant.DEFAULT_ORG_ID) {\n logger.info(\"cluster {} with org id {} is going to find keepercontainers in normal pool\",\n clusterName, clusterOrgId);\n allDcOrgKeeperContainers = allDcKeeperContainers.stream().filter(keepercontainer -> keepercontainer.getKeepercontainerOrgId() == XPipeConsoleConstant.DEFAULT_ORG_ID).collect(Collectors.toList());\n\n // find keepers in used in normal org\n dcOrgKeeperContainersInUsed = dao.findKeeperContainerByCluster(dcName, XPipeConsoleConstant.DEFAULT_ORG_ID,\n KeepercontainerTblEntity.READSET_KEEPER_COUNT_BY_CLUSTER);\n } else {\n // find keepers in used in cluster org\n dcOrgKeeperContainersInUsed = dao.findKeeperContainerByCluster(dcName, clusterOrgId,\n KeepercontainerTblEntity.READSET_KEEPER_COUNT_BY_CLUSTER);\n }\n\n setCountAndSortForAllKeeperContainers(allDcOrgKeeperContainers, dcOrgKeeperContainersInUsed);\n allDcOrgKeeperContainers = filterKeeperFromSameAvailableZone(allDcOrgKeeperContainers, dcName);\n logger.info(\"find keeper containers: {}\", allDcOrgKeeperContainers);\n return allDcOrgKeeperContainers;\n }",
"private void loadDataset(int datasetId) {\r\n SelectionManager.Busy_Task(true, true);\r\n DivaClientService.registerMainDataset(datasetId,\r\n new AsyncCallback<DatasetInformation>() {\r\n @Override\r\n public void onFailure(Throwable caught) {\r\n Selection_Manager.connError();\r\n }\r\n\r\n @Override\r\n public void onSuccess(DatasetInformation datasetInfos) {\r\n init = true;\r\n reload = false;\r\n loadingAnalysis(datasetInfos);\r\n }\r\n });\r\n }",
"private List<T> findRange(RequestData requestData) {\n javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery();\n cq.select(cq.from(getEntityClass()));\n javax.persistence.Query q = getEntityManager().createQuery(cq);\n q.setMaxResults(requestData.getLength());\n q.setFirstResult(requestData.getStart());\n return q.getResultList();\n }",
"private void getContactList() {\r\n\r\n\t\tgroupData.clear();\r\n\t\tchildData.clear();\r\n\t\tDataHelper dataHelper = new DataHelper(ContactsActivity.this);\r\n\t\tdataHelper.openDatabase();\r\n\t\tgroupData = dataHelper.queryZoneAndCorpInfo(childData);\r\n\t\tdataHelper.closeDatabase();\r\n\t\thandler.sendEmptyMessage(1);\r\n\r\n\t\tif (groupData == null || groupData.size() == 0) {\r\n\t\t\tDataTask task = new DataTask(ContactsActivity.this);\r\n\t\t\ttask.execute(Constants.KServerurl + \"GetAllOrgList\", \"\");\r\n\t\t}\r\n\t}",
"@Override\n\tpublic GroupSet getAllGroups() throws DataBackendException\n {\n GroupSet groupSet = new GroupSet();\n Connection con = null;\n\n try\n {\n \n con = Transaction.begin();\n\n List<Group> groups = doSelectAllGroups(con);\n\n for (Group group : groups)\n {\n // Add dependent objects if they exist\n ((TorqueAbstractSecurityEntity)group).retrieveAttachedObjects(con, getLazyLoading());\n\n groupSet.add(group);\n }\n\n Transaction.commit(con);\n con = null;\n }\n catch (TorqueException e)\n {\n throw new DataBackendException(\"Error retrieving group information\", e);\n }\n finally\n {\n if (con != null)\n {\n Transaction.safeRollback(con);\n }\n }\n\n return groupSet;\n }",
"public ChunkIdDBSource(DataSource ds, int groupID) throws BlockingException {\n\t\tthis.ds = ds;\n\t\tthis.groupID = groupID;\n\n\t\ttry {\n\t\t\tconn = ds.getConnection();\n\t\t\t// check to see if there is any data on the table for this group.\n\t\t\tPreparedStatement stmt = conn.prepareStatement(CHECK_SQL);\n\t\t\tstmt.setInt(1, groupID);\n\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\tif (rs.next() && rs.getInt(1) > 0)\n\t\t\t\texists = true;\n\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t\tconn.close();\n\t\t} catch (SQLException ex) {\n\t\t\tthrow new BlockingException(ex.toString());\n\t\t}\n\t}",
"private void loadDataFromFirebase() {\n\n db.collection(\"users\").document(userId).collection(\"sleep\")\n .orderBy(\"dateTime\", Query.Direction.ASCENDING)\n .get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n\n for (QueryDocumentSnapshot querySnapshot : task.getResult()) {\n\n timestampToDate = querySnapshot.getTimestamp(\"dateTime\").toDate();\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\", Locale.ENGLISH);\n dayDate = sdf.format(timestampToDate);\n sensorPressure = querySnapshot.getBoolean(\"sensorPressure\");\n sleepDateTimeData.add(new SleepDateTimeData(dayDate, sensorPressure, timestampToDate));\n i++;\n }\n\n accumulateData();\n\n }\n\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(SleepActivity.this, \"Problem ---1---\", Toast.LENGTH_SHORT).show();\n Log.w(\"!---1---\", e.getMessage());\n }\n });\n }",
"public void searchGroupByCode(String id) {\r\n System.out.println(\"conectado con model ---> metodo searchGroupByCode\");\r\n //TODO\r\n }"
]
| [
"0.55510163",
"0.5472381",
"0.52298176",
"0.5168289",
"0.5153954",
"0.49809712",
"0.48958686",
"0.48393098",
"0.4813079",
"0.47696418",
"0.47309634",
"0.47158718",
"0.4697585",
"0.46834558",
"0.46638367",
"0.46422812",
"0.46338537",
"0.46261883",
"0.46124375",
"0.46064663",
"0.46054772",
"0.45747763",
"0.45578492",
"0.4550019",
"0.4546118",
"0.4546118",
"0.44831496",
"0.44596043",
"0.44563186",
"0.44298014",
"0.4428841",
"0.44111982",
"0.4406181",
"0.44038087",
"0.44017276",
"0.43991777",
"0.4395063",
"0.43941855",
"0.43815067",
"0.43735024",
"0.43644375",
"0.43507117",
"0.43466052",
"0.43376347",
"0.43364692",
"0.43270797",
"0.43205342",
"0.43147004",
"0.4313213",
"0.43087983",
"0.4304832",
"0.4303957",
"0.43003288",
"0.42985687",
"0.42966568",
"0.42932534",
"0.42900303",
"0.42878994",
"0.42832768",
"0.42710507",
"0.4265001",
"0.42608568",
"0.4255953",
"0.42544857",
"0.42516539",
"0.42438638",
"0.42421362",
"0.4240808",
"0.42355588",
"0.4235314",
"0.42303795",
"0.4230312",
"0.42139614",
"0.4208048",
"0.4193252",
"0.4191471",
"0.41894284",
"0.41830546",
"0.41807058",
"0.4178674",
"0.41783756",
"0.4176978",
"0.41763613",
"0.41726556",
"0.41720378",
"0.41637638",
"0.4158137",
"0.41570446",
"0.41565168",
"0.4154435",
"0.41543728",
"0.41520745",
"0.4146403",
"0.41435865",
"0.41420045",
"0.413624",
"0.41293082",
"0.41243967",
"0.4123751",
"0.41171148",
"0.41164646"
]
| 0.0 | -1 |
Query aggregation config info. The default sql: SELECT data_id,group_id,tenant_id,datum_id,app_name,content FROM config_info_aggr WHERE data_id=? AND group_id=? AND tenant_id=? ORDER BY datum_id LIMIT startRow,pageSize | String findConfigInfoAggrByPageFetchRows(int startRow, int pageSize); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface ConfigInfoAggrMapper extends Mapper {\n \n /**\n * To delete aggregated data in bulk, you need to specify a list of datum.\n * The default sql:\n * DELETE FROM config_info_aggr WHERE data_id=? AND group_id=? AND tenant_id=? AND datum_id IN (...)\n *\n * @param datumList datumList\n * @return The sql of deleting aggregated data in bulk.\n */\n String batchRemoveAggr(List<String> datumList);\n \n /**\n * Get count of aggregation config info.\n * The default sql:\n * SELECT count(*) FROM config_info_aggr WHERE data_id = ? AND group_id = ? AND tenant_id = ?\n *\n * @param size datum id list size\n * @param isIn search condition\n * @return The sql of getting count of aggregation config info.\n */\n String aggrConfigInfoCount(int size, boolean isIn);\n \n /**\n * Find all data before aggregation under a dataId. It is guaranteed not to return NULL.\n * The default sql:\n * SELECT data_id,group_id,tenant_id,datum_id,app_name,content\n * FROM config_info_aggr WHERE data_id=? AND group_id=? AND tenant_id=? ORDER BY datum_id\n *\n * @return The sql of finding all data before aggregation under a dataId.\n */\n String findConfigInfoAggrIsOrdered();\n \n /**\n * Query aggregation config info.\n * The default sql:\n * SELECT data_id,group_id,tenant_id,datum_id,app_name,content FROM config_info_aggr WHERE data_id=? AND\n * group_id=? AND tenant_id=? ORDER BY datum_id LIMIT startRow,pageSize\n *\n * @param startRow The start index.\n * @param pageSize The size of page.\n * @return The sql of querying aggregation config info.\n */\n String findConfigInfoAggrByPageFetchRows(int startRow, int pageSize);\n \n /**\n * Find all aggregated data sets.\n * The default sql:\n * SELECT DISTINCT data_id, group_id, tenant_id FROM config_info_aggr\n *\n * @return The sql of finding all aggregated data sets.\n */\n String findAllAggrGroupByDistinct();\n}",
"Page<Map<String, Object>> getAggregatedValues(AggregationInfo aggregationInfo, Pageable pageable);",
"public StringBuilder adminQueryConsumeGroupSetting(HttpServletRequest req) throws Exception {\n StringBuilder sBuilder = new StringBuilder(512);\n BdbConsumeGroupSettingEntity queryEntity =\n new BdbConsumeGroupSettingEntity();\n try {\n queryEntity\n .setConsumeGroupName(WebParameterUtils.validGroupParameter(\"groupName\",\n req.getParameter(\"groupName\"),\n TBaseConstants.META_MAX_GROUPNAME_LENGTH,\n false, null));\n queryEntity\n .setCreateUser(WebParameterUtils.validStringParameter(\"createUser\",\n req.getParameter(\"createUser\"),\n TBaseConstants.META_MAX_USERNAME_LENGTH,\n false, null));\n queryEntity\n .setEnableBind(WebParameterUtils.validIntDataParameter(\"enableBind\",\n req.getParameter(\"enableBind\"),\n false, -2, 0));\n queryEntity\n .setAllowedBrokerClientRate(WebParameterUtils.validIntDataParameter(\"allowedBClientRate\",\n req.getParameter(\"allowedBClientRate\"),\n false, -2, 0));\n List<BdbConsumeGroupSettingEntity> resultEntities =\n brokerConfManager.confGetBdbConsumeGroupSetting(queryEntity);\n SimpleDateFormat formatter =\n new SimpleDateFormat(TBaseConstants.META_TMP_DATE_VALUE);\n sBuilder.append(\"{\\\"result\\\":true,\\\"errCode\\\":0,\\\"errMsg\\\":\\\"OK\\\",\\\"count\\\":\")\n .append(resultEntities.size()).append(\",\\\"data\\\":[\");\n int j = 0;\n for (BdbConsumeGroupSettingEntity entity : resultEntities) {\n if (j++ > 0) {\n sBuilder.append(\",\");\n }\n sBuilder.append(\"{\\\"groupName\\\":\\\"\").append(entity.getConsumeGroupName())\n .append(\"\\\",\\\"enableBind\\\":\").append(entity.getEnableBind())\n .append(\",\\\"allowedBClientRate\\\":\").append(entity.getAllowedBrokerClientRate())\n .append(\",\\\"attributes\\\":\\\"\").append(entity.getAttributes())\n .append(\"\\\",\\\"lastBindUsedDate\\\":\\\"\").append(entity.getLastBindUsedDate())\n .append(\"\\\",\\\"createUser\\\":\\\"\").append(entity.getCreateUser())\n .append(\"\\\",\\\"createDate\\\":\\\"\").append(formatter.format(entity.getCreateDate()))\n .append(\"\\\"}\");\n }\n sBuilder.append(\"]}\");\n } catch (Exception e) {\n sBuilder.delete(0, sBuilder.length());\n sBuilder.append(\"{\\\"result\\\":false,\\\"errCode\\\":400,\\\"errMsg\\\":\\\"\")\n .append(e.getMessage()).append(\"\\\",\\\"count\\\":0,\\\"data\\\":[]}\");\n }\n return sBuilder;\n }",
"String aggrConfigInfoCount(int size, boolean isIn);",
"@Override\n\tpublic void getGroupAndCount(RpcController controller, ExpandAggregationRequest request,\n\t\t\tRpcCallback<ExpandAggregationResponse> done) {\n\t\tInternalScanner scanner = null;\n\t\ttry {\n\t\t\t// 通过protobuf传来的Scan,scan已经添加groupBy column和count lie\n\t\t\tScan scan = ProtobufUtil.toScan(request.getScan());\n\t\t\tscanner = environment.getRegion().getScanner(scan);\n\t\t\tList<ExpandCell> groupList = request.getGroupColumnsList();\n\t\t\tList<ExpandCell> countList = request.getCountColumnsList();\n\t\t\tboolean hashNext = false;\n\t\t\tList<Cell> results = new ArrayList<Cell>();\n\t\t\tArrayList<TempRow> rows = new ArrayList<TempRow>();\n\t\t\tdo {\n\t\t\t\thashNext = scanner.next(results);//id 4\n\t\t\t\tTempRow tempRow = new TempRow();\n\t\t\t\tfor (Cell cell : results) {\n\t\t\t\t\tString family = Bytes.toString(cell.getFamilyArray(), cell.getFamilyOffset(),\n\t\t\t\t\t\t\tcell.getFamilyLength());\n\t\t\t\t\tString qualify = Bytes.toString(cell.getQualifierArray(), cell.getQualifierOffset(),\n\t\t\t\t\t\t\tcell.getQualifierLength());\n\t\t\t\t\tfor (ExpandCell gCell : groupList) {\n\t\t\t\t\t\tif (family.equals(gCell.getFamily()) && qualify.equals(gCell.getQualify())) {\n\t\t\t\t\t\t\tString value = Bytes.toString(cell.getValueArray(), cell.getValueOffset(),\n\t\t\t\t\t\t\t\t\tcell.getValueLength());\n\t\t\t\t\t\t\tSystem.out.println(value);\n\t\t\t\t\t\t\ttempRow.setKey(value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (Cell cell : results) {\n\t\t\t\t\tString family = Bytes.toString(cell.getFamilyArray(), cell.getFamilyOffset(),\n\t\t\t\t\t\t\tcell.getFamilyLength());\n\t\t\t\t\tString qualify = Bytes.toString(cell.getQualifierArray(), cell.getQualifierOffset(),\n\t\t\t\t\t\t\tcell.getQualifierLength());\n\t\t\t\t\tfor (ExpandCell gCell : countList) {\n\t\t\t\t\t\tif (family.equals(gCell.getFamily()) && qualify.equals(gCell.getQualify())) {\n\t\t\t\t\t\t\tString value = Bytes.toString(cell.getValueArray(), cell.getValueOffset(),\n\t\t\t\t\t\t\t\t\tcell.getValueLength());\n\t\t\t\t\t\t\ttempRow.setValue(value);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trows.add(tempRow);\n\t\t\t} while (hashNext);\n\t\t\tArrayList<ResultRow> ResultRows = analyzeRow(rows);\n\t\t\tArrayList<RpcResultRow> rpcResultRows = changeToRpcResultRow(ResultRows);\n\t\t\tWxsGroupByProto3.ExpandAggregationResponse.Builder responsBuilder = WxsGroupByProto3.ExpandAggregationResponse\n\t\t\t\t\t.newBuilder();\n\t\t\tfor (RpcResultRow rpcResultRow : rpcResultRows) {\n\t\t\t\tresponsBuilder.addResults(rpcResultRow);\n\t\t\t}\n\t\t\tdone.run(responsBuilder.build());\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tscanner.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}",
"public List<Statistic> queryPageData(Integer startIndex, Integer pagesize) {\n\t\tString sql=\"select * from statistics order by creat_date desc limit ?,? \";\n\t\treturn getList(sql,startIndex,pagesize);\n\t}",
"@Override\n public Map<String, Object> queryAllTaskGroup(User loginUser, Integer pageNo, Integer pageSize) {\n return this.doQuery(loginUser, pageNo, pageSize, loginUser.getId(), null, null);\n }",
"@Value.Default\n public int maxQueryAggregates() {\n return ConfigDefaults.ADVANCED_MAX_QUERY_AGGREGATES;\n }",
"public StringBuilder adminQueryConsumerGroupInfo(HttpServletRequest req) throws Exception {\n StringBuilder sBuilder = new StringBuilder(512);\n BdbConsumerGroupEntity webConsumerGroupEntity =\n new BdbConsumerGroupEntity();\n try {\n webConsumerGroupEntity\n .setGroupTopicName(WebParameterUtils.validStringParameter(\"topicName\",\n req.getParameter(\"topicName\"),\n TBaseConstants.META_MAX_TOPICNAME_LENGTH,\n false, null));\n webConsumerGroupEntity\n .setConsumerGroupName(WebParameterUtils.validGroupParameter(\n \"groupName\",\n req.getParameter(\"groupName\"),\n TBaseConstants.META_MAX_GROUPNAME_LENGTH,\n false, null));\n webConsumerGroupEntity\n .setRecordCreateUser(WebParameterUtils.validStringParameter(\"createUser\",\n req.getParameter(\"createUser\"),\n TBaseConstants.META_MAX_USERNAME_LENGTH,\n false, null));\n List<BdbConsumerGroupEntity> webConsumerGroupEntities =\n brokerConfManager.confGetBdbAllowedConsumerGroupSet(webConsumerGroupEntity);\n SimpleDateFormat formatter =\n new SimpleDateFormat(TBaseConstants.META_TMP_DATE_VALUE);\n int j = 0;\n sBuilder.append(\"{\\\"result\\\":true,\\\"errCode\\\":0,\\\"errMsg\\\":\\\"OK\\\",\\\"count\\\":\")\n .append(webConsumerGroupEntities.size()).append(\",\\\"data\\\":[\");\n for (BdbConsumerGroupEntity entity : webConsumerGroupEntities) {\n if (j++ > 0) {\n sBuilder.append(\",\");\n }\n sBuilder.append(\"{\\\"topicName\\\":\\\"\").append(entity.getGroupTopicName())\n .append(\"\\\",\\\"groupName\\\":\\\"\").append(entity.getConsumerGroupName())\n .append(\"\\\",\\\"createUser\\\":\\\"\").append(entity.getRecordCreateUser())\n .append(\"\\\",\\\"createDate\\\":\\\"\").append(formatter.format(entity.getRecordCreateDate()))\n .append(\"\\\"}\");\n }\n sBuilder.append(\"]}\");\n } catch (Exception e) {\n sBuilder.delete(0, sBuilder.length());\n sBuilder.append(\"{\\\"result\\\":false,\\\"errCode\\\":400,\\\"errMsg\\\":\\\"\")\n .append(e.getMessage()).append(\"\\\",\\\"count\\\":0,\\\"data\\\":[]}\");\n }\n return sBuilder;\n }",
"GroupQueryBuilder page(int firstResult, int maxResults) throws UnsupportedQueryCriterium;",
"@Override\n\tpublic DataGrid dataGrid(Query query) {\n\t\tDataGrid<SysActionLog> dg = new DataGrid<SysActionLog>();\n\t\tdg.setTotal(sysActionLogDao.getRecordCount(query.getQueryParams()));\n\t\tdg.setRows(sysActionLogDao.queryByCondition(query));\n\t\treturn dg;\n\t}",
"public JSONObject getGSTR2Summary(JSONObject params) throws ServiceException, JSONException {\n JSONObject object = new JSONObject();\n JSONObject jMeta = new JSONObject();\n JSONArray jarrColumns = new JSONArray();\n JSONArray jarrRecords = new JSONArray();\n JSONArray dataJArr = new JSONArray();\n JSONArray array = new JSONArray();\n JSONArray array1 = new JSONArray();\n String start = params.optString(\"start\");\n String limit = params.optString(\"limit\");\n String companyId = params.optString(\"companyid\");\n Company company = null;\n KwlReturnObject companyResult = null;\n if (params.optBoolean(\"isforstore\", false)) {\n /**\n * If request for Section combo box\n */\n return object = getGSTR2ReportSectionCombo();\n }\n companyResult = accountingHandlerDAOobj.getObject(Company.class.getName(), companyId);\n company = (Company) companyResult.getEntityList().get(0);\n params.put(\"isPurchase\", true);\n JSONObject reqParams = params;\n /* * before starting sectional data need to get column no for Product Tax\n * Class (HSN)\n */\n int colnum = 0;\n HashMap fieldparams = new HashMap<>();\n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyId, Constants.Acc_Product_Master_ModuleId, \"Custom_\" + Constants.HSN_SACCODE));\n KwlReturnObject kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n List<FieldParams> fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n colnum = fieldParams.getColnum();\n }\n reqParams.put(\"hsncolnum\", colnum);\n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyId, Constants.Acc_Product_Master_ModuleId, \"Custom_\" + Constants.GSTProdCategory));\n kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n colnum = fieldParams.getColnum();\n }\n params.put(\"taxclasscolnum\", colnum);\n /**\n * get State column no for Invoice module\n */\n int colnumforstate = fieldManagerDAOobj.getColumnFromFieldParams(Constants.STATE, companyId, Constants.Acc_Vendor_Invoice_ModuleId, 0);\n params.put(\"statecolnum\", colnumforstate);\n /**\n * Get Local state Value\n */\n String entityId = params.optString(\"entityid\");\n params.put(\"companyid\", companyId);\n params.put(\"entityid\", entityId);\n String localState = fieldManagerDAOobj.getStateForEntity(params);\n params.put(\"localState\", localState);\n params.put(\"entityState\", localState);\n /**\n * Get Entity Value and its column no for invoice\n */\n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyId, Constants.Acc_Vendor_Invoice_ModuleId, \"Custom_\" + Constants.ENTITY));\n String fieldid = \"\";\n kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n colnum = fieldParams.getColnum();\n fieldid = fieldParams.getId();\n }\n String entityValue = params.optString(\"entity\");\n String ids = fieldManagerDAOobj.getIdsUsingParamsValueWithoutInsert(fieldid, entityValue);\n reqParams.put(\"invoiceentitycolnum\", colnum);\n reqParams.put(\"invoiceentityValue\", ids);\n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyId, Constants.Acc_Make_Payment_ModuleId, \"Custom_\" + Constants.ENTITY));\n kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n colnum = fieldParams.getColnum();\n fieldid = fieldParams.getId();\n }\n ids = fieldManagerDAOobj.getIdsUsingParamsValueWithoutInsert(fieldid, entityValue);\n reqParams.put(\"paymententitycolnum\", colnum);\n reqParams.put(\"paymententityValue\", ids);\n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyId, Constants.Acc_Debit_Note_ModuleId, \"Custom_\" + Constants.ENTITY));\n kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n colnum = fieldParams.getColnum();\n fieldid = fieldParams.getId();\n }\n ids = fieldManagerDAOobj.getIdsUsingParamsValueWithoutInsert(fieldid, entityValue);\n reqParams.put(\"cnentitycolnum\", colnum);\n reqParams.put(\"cnentityValue\", ids);\n\n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyId, Constants.Acc_GENERAL_LEDGER_ModuleId, \"Custom_\" + Constants.ENTITY));\n kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n colnum = fieldParams.getColnum();\n fieldid = fieldParams.getId();\n }\n ids = fieldManagerDAOobj.getIdsUsingParamsValueWithoutInsert(fieldid, entityValue);\n reqParams.put(\"jeentitycolnum\", colnum);\n reqParams.put(\"jeentityValue\", ids);\n \n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyId, Constants.Acc_Credit_Note_ModuleId, \"Custom_\" + Constants.ENTITY));\n kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n colnum = fieldParams.getColnum();\n fieldid = fieldParams.getId();\n }\n ids = fieldManagerDAOobj.getIdsUsingParamsValue(fieldid, entityValue);\n reqParams.put(\"cnentitycolnum\", colnum);\n reqParams.put(\"cnentityValue\", ids);\n reqParams.put(\"Report_type\",\"gstr2\");\n reqParams.put(\"isGSTR1\",false);\n try {\n /**\n * Put Asset Disposal/ Acquire Invoice Dimension column number\n * details\n */\n putAssetInvoiceDimensionColumnDetails(params, reqParams);\n /**\n * Put Lease Sales Invoice Dimension column number details\n */\n putLeaseInvoiceDimensionColumnDetails(params, reqParams);\n getColumnModelForGSTSummary(jarrRecords, jarrColumns, params);\n \n JSONObject header= new JSONObject();\n header.put(\"typeofinvoice\", \"<b>\" + GSTRConstants.GSTR2_ToBeReconciledWithTheGSTPortal + \"</b>\");\n params.put(\"isViewRenderer\", false);\n dataJArr.put(header);\n \n reqParams.put(\"entitycolnum\", reqParams.optString(\"invoiceentitycolnum\"));\n reqParams.put(\"entityValue\", reqParams.optString(\"invoiceentityValue\"));\n /**\n * Add Additional parameter to reqParams\n */\n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"registrationType\", Constants.GSTRegType_Regular + \",\" + Constants.GSTRegType_Regular_ECommerce);\n params.put(\"CustomerType\", Constants.CUSTVENTYPE_NA + \",\" + Constants.CUSTVENTYPE_DEEMED_EXPORT + \",\" + Constants.CUSTVENTYPE_SEZ+ \",\" + Constants.CUSTVENTYPE_SEZWOPAY);\n params.put(\"taxClassType\", FieldComboData.TaxClass_Percenatge);\n// params.put(\"zerorated\", false);\n params.put(\"typeofjoinisleft\", true);\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_B2B);\n JSONObject b2bobj = getB2BInvoiceDetails(params, null);\n JSONObject B2B = new JSONObject();\n B2B = b2bobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(B2B);\n \n /**\n * CDN Invoices\n */\n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"entitycolnum\", reqParams.optString(\"cnentitycolnum\"));\n params.put(\"registrationType\",Constants.GSTRegType_Regular+\",\"+Constants.GSTRegType_Regular_ECommerce);\n params.put(\"entityValue\", reqParams.optString(\"cnentityValue\"));\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_CDN);\n JSONObject cdnrobj = getCDNRInvoiceDetails(params, null);\n JSONObject CDNR = new JSONObject();\n CDNR = cdnrobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(CDNR);\n\n \n JSONObject header1= new JSONObject();\n header1.put(\"typeofinvoice\", \"<b>\" + GSTRConstants.GSTR2_ToBeUploadedOnTheGSTPortal + \"</b>\");\n dataJArr.put(header1); \n /**\n * B2B Unregistered Invoice\n */\n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"registrationType\",Constants.GSTRegType_Unregistered);\n params.put(\"CustomerType\", Constants.CUSTVENTYPE_NA + \",\" + Constants.CUSTVENTYPE_DEEMED_EXPORT + \",\" + Constants.CUSTVENTYPE_SEZ+ \",\" + Constants.CUSTVENTYPE_SEZWOPAY);\n params.put(\"taxClassType\", FieldComboData.TaxClass_Percenatge);\n// params.put(\"zerorated\", false);\n params.put(\"typeofjoinisleft\", true);\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_B2B_unregister);\n b2bobj = getB2BInvoiceDetails(params, null);\n B2B = new JSONObject();\n B2B = b2bobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(B2B);\n /**\n * Import of Services\n */\n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"CustomerType\", Constants.CUSTVENTYPE_Import);\n// params.put(\"taxClassType\", FieldComboData.TaxClass_Percenatge);\n params.put(\"isServiceProduct\", true);\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_ImpServices);\n params.put(GSTRConstants.ADD_LANDEDCOST_JOIN_FOR_IMPORT_INVOICES, true);\n params.put(\"excludetaxClassType\", true);\n params.put(\"typeofjoinisleft\", true);\n JSONObject exportobj = getB2BInvoiceDetails(params, null);\n JSONObject EXPORT = new JSONObject();\n EXPORT = exportobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(EXPORT);\n /**\n * Import of Goods\n */\n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"CustomerType\", Constants.CUSTVENTYPE_Import);\n// params.put(\"taxClassType\", FieldComboData.TaxClass_Percenatge);\n params.put(\"isServiceProduct\", false);\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_ImpGoods);\n params.put(GSTRConstants.ADD_LANDEDCOST_JOIN_FOR_IMPORT_INVOICES, true);\n params.put(\"typeofjoinisleft\", true);\n params.put(\"excludetaxClassType\", true);\n exportobj = getB2BInvoiceDetails(params, null);\n EXPORT = new JSONObject();\n EXPORT = exportobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(EXPORT);\n \n\n /**\n * CDN Unregistered\n */\n JSONObject CDNUR = new JSONObject();\n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"entitycolnum\", reqParams.optString(\"cnentitycolnum\"));\n params.put(\"registrationType\", Constants.GSTRegType_Unregistered);\n params.put(\"entityValue\", reqParams.optString(\"cnentityValue\"));\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_CDN_unregister);\n JSONObject cdnurobj = getCDNRInvoiceDetails(params, null);\n CDNUR = new JSONObject();\n CDNUR = cdnurobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(CDNUR);\n\n /**\n * NIL Rated\n */\n \n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"goodsreceiptentitycolnum\", reqParams.optString(\"invoiceentitycolnum\"));\n params.put(\"goodsreceiptentityValue\", reqParams.optString(\"invoiceentityValue\"));\n params.put(\"entitycolnum\", reqParams.optString(\"invoiceentitycolnum\"));\n params.put(\"entityValue\", reqParams.optString(\"invoiceentityValue\"));\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_nilRated);\n params.put(\"registrationType\", Constants.GSTRegType_Composition);\n params.put(\"typeofjoinisleft\", true);\n JSONObject exemptComposition = getExemptPurchaseInvoiceDetails(params);\n JSONObject exempComp = exemptComposition.getJSONArray(\"summaryArr\").getJSONObject(0);\n double sumTaxableAmt= 0.0,sumTotalAmt=0.0;\n int noOfInvoices=0;\n sumTaxableAmt = exempComp.optDouble(\"sumTaxableAmt\");\n sumTotalAmt = exempComp.optDouble(\"sumTotalAmt\");\n noOfInvoices=exempComp.optInt(\"numberofinvoices\");\n params.remove(\"registrationType\");\n params.put(\"taxClassType\", FieldComboData.TaxClass_Exempted + \",\" + FieldComboData.TaxClass_Non_GST_Product);\n params.put(\"typeofjoinisleft\", true);\n exportobj = getExemptPurchaseInvoiceDetails(params);\n JSONObject EXEMPT = new JSONObject();\n EXEMPT = exportobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n sumTaxableAmt += EXEMPT.optDouble(\"sumTaxableAmt\");\n sumTotalAmt += EXEMPT.optDouble(\"sumTotalAmt\");\n noOfInvoices += EXEMPT.optInt(\"numberofinvoices\");\n /**\n * For Product Tax Class 0%\n */\n params.put(\"taxClassType\", FieldComboData.TaxClass_ZeroPercenatge);\n params.put(\"typeofjoinisleft\", true);\n params.put(GSTRConstants.IS_PRODUCT_TAX_ZERO, true);\n exportobj = getExemptPurchaseInvoiceDetails(params);\n params.remove(GSTRConstants.IS_PRODUCT_TAX_ZERO);\n EXEMPT = new JSONObject();\n EXEMPT = exportobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n sumTaxableAmt += EXEMPT.optDouble(\"sumTaxableAmt\");\n sumTotalAmt += EXEMPT.optDouble(\"sumTotalAmt\");\n noOfInvoices += EXEMPT.optInt(\"numberofinvoices\");\n \n EXEMPT.put(\"sumTaxableAmt\", sumTaxableAmt);\n EXEMPT.put(\"sumTotalAmt\",sumTotalAmt);\n EXEMPT.put(\"numberofinvoices\", noOfInvoices);\n dataJArr.put(EXEMPT);\n\n// JSONObject summaryObj = new JSONObject();\n// summaryObj.put(\"numberofinvoices\", 0);\n// summaryObj.put(\"typeofinvoice\", \"ISD Credit\");\n// summaryObj.put(\"sumTaxableAmt\", 0);\n// summaryObj.put(\"sumTaxAmt\", 0);\n// summaryObj.put(\"sumTotalAmt\", 0);\n// dataJArr.put(summaryObj);\n\n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"entitycolnum\", reqParams.optString(\"paymententitycolnum\"));\n params.put(\"entityValue\", reqParams.optString(\"paymententityValue\"));\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_AdvancePaid);\n JSONObject atobj = getTaxLiabilityOnAdvance(params);\n JSONObject AT = new JSONObject();\n AT = atobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(AT);\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_AdvanceAdjust);\n JSONObject atadjobj = getAdjustedAdvance(params);\n JSONObject ATADJ = new JSONObject();\n ATADJ = atadjobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(ATADJ);\n//\n// summaryObj = new JSONObject();\n// summaryObj.put(\"numberofinvoices\", 0);\n// summaryObj.put(\"typeofinvoice\", \"ITC Reversal\");\n// summaryObj.put(\"sumTaxableAmt\", 0);\n// summaryObj.put(\"sumTaxAmt\", 0);\n// summaryObj.put(\"sumTotalAmt\", 0);\n// dataJArr.put(summaryObj);\n// /**\n// * HSN summary of Inward supplies\n// */\n// params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n// params.put(\"entitycolnum\", reqParams.optString(\"invoiceentitycolnum\"));\n// params.put(\"entityValue\", reqParams.optString(\"invoiceentityValue\"));\n// params.put(\"typeofinvoice\", \"HSN summary of Inward supplies\");\n// exportobj = getHSNSummarydetails(params);\n// EXPORT = new JSONObject();\n// EXPORT = exportobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n// dataJArr.put(EXPORT);\n\n JSONArray pagedJson = new JSONArray();\n pagedJson = dataJArr;\n if (!StringUtil.isNullOrEmpty(start) && !StringUtil.isNullOrEmpty(limit)) {\n pagedJson = StringUtil.getPagedJSON(pagedJson, Integer.parseInt(start), Integer.parseInt(limit));\n }\n object.put(\"totalCount\", dataJArr.length());\n object.put(\"columns\", jarrColumns);\n object.put(\"coldata\", pagedJson);\n jMeta.put(\"totalProperty\", \"totalCount\");\n jMeta.put(\"root\", \"coldata\");\n jMeta.put(\"fields\", jarrRecords);\n object.put(\"metaData\", jMeta);\n if (params.optBoolean(\"isExport\")) {\n object.put(\"data\", dataJArr);\n object.put(\"columns\", jarrColumns);\n }\n } catch (JSONException ex) {\n throw ServiceException.FAILURE(ex.getMessage(), ex);\n }\n return object;\n }",
"public PageObject findAll(String jdzyId,String enterpriseCode,final int... rowStartIdxAndCount);",
"@Override\n protected void validateConfig() {\n super.validateConfig();\n final int iterations = commonConfig.getIterations();\n queryInstancesAggregates = new MetricAggregates(iterations);\n firstResponseAggregates = new MetricAggregates(iterations);\n firstFrameAggregates = new MetricAggregates(iterations);\n totalAggregates = new MetricAggregates(iterations);\n transferRateAggregates = new MetricAggregates(iterations);\n frameRateAggregates = new MetricAggregates(iterations);\n }",
"public EODataSource queryDataSource();",
"public PageBeanFieldConfigurationItem getFieldConfigurationItems(Long id, Long startAt, Integer maxResults) throws RestClientException {\n Object postBody = null;\n // verify the required parameter 'id' is set\n if (id == null) {\n throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, \"Missing the required parameter 'id' when calling getFieldConfigurationItems\");\n }\n // create path and map variables\n final Map<String, Object> uriVariables = new HashMap<String, Object>();\n uriVariables.put(\"id\", id);\n String path = UriComponentsBuilder.fromPath(\"/rest/api/3/fieldconfiguration/{id}/fields\").buildAndExpand(uriVariables).toUriString();\n \n final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();\n final HttpHeaders headerParams = new HttpHeaders();\n final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"startAt\", startAt));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"maxResults\", maxResults));\n\n final String[] accepts = { \n \"application/json\"\n };\n final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);\n final String[] contentTypes = { };\n final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);\n\n String[] authNames = new String[] { \"OAuth2\", \"basicAuth\" };\n\n ParameterizedTypeReference<PageBeanFieldConfigurationItem> returnType = new ParameterizedTypeReference<PageBeanFieldConfigurationItem>() {};\n return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);\n }",
"public String queryAllProjectListPaging(Map<String, Object> parameter) {\n return new SQL() {{\n SELECT(\"p.*\");\n SELECT(\"u.user_name as user_name\");\n SELECT(\"(SELECT COUNT(*) FROM t_escheduler_process_definition AS def WHERE def.project_id = p.id) AS def_count\");\n SELECT(\"(SELECT COUNT(*) FROM t_escheduler_process_definition def, t_escheduler_process_instance inst WHERE def.id = inst.process_definition_id AND def.project_id = p.id AND inst.state=1 ) as inst_running_count\");\n FROM(TABLE_NAME + \" p\");\n JOIN(\"t_escheduler_user u on p.user_id = u.id\");\n\n Object searchVal = parameter.get(\"searchVal\");\n if(searchVal != null && StringUtils.isNotEmpty(searchVal.toString())){\n WHERE( \" p.name like concat('%', #{searchVal}, '%') \");\n }\n WHERE(\" p.flag = 1\");\n ORDER_BY(\"p.create_time desc limit #{offset},#{pageSize} \");\n }}.toString();\n }",
"Aggregators retrieveAggregators() throws RepoxException;",
"public PageBeanFieldConfiguration getAllFieldConfigurations(Long startAt, Integer maxResults, List<Long> id, Boolean isDefault) throws RestClientException {\n Object postBody = null;\n String path = UriComponentsBuilder.fromPath(\"/rest/api/3/fieldconfiguration\").build().toUriString();\n \n final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();\n final HttpHeaders headerParams = new HttpHeaders();\n final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"startAt\", startAt));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"maxResults\", maxResults));\n queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf(\"multi\".toUpperCase()), \"id\", id));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"isDefault\", isDefault));\n\n final String[] accepts = { \n \"application/json\"\n };\n final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);\n final String[] contentTypes = { };\n final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);\n\n String[] authNames = new String[] { \"OAuth2\", \"basicAuth\" };\n\n ParameterizedTypeReference<PageBeanFieldConfiguration> returnType = new ParameterizedTypeReference<PageBeanFieldConfiguration>() {};\n return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);\n }",
"public JSONObject getGSTComputationSummaryReport(JSONObject params) throws ServiceException, JSONException {\n JSONObject object = new JSONObject();\n JSONObject jMeta = new JSONObject();\n JSONArray jarrColumns = new JSONArray();\n JSONArray jarrRecords = new JSONArray();\n JSONArray dataJArr = new JSONArray();\n JSONArray array = new JSONArray();\n JSONArray array1 = new JSONArray();\n String start = params.optString(\"start\");\n String limit = params.optString(\"limit\");\n String companyId = params.optString(\"companyid\");\n /**\n * Put all required parameter for GST report\n */\n getEntityDataForRequestedModule(params);\n getColNumForRequestedModules(params);\n getLocalStateOfEntity(params);\n /**\n * Get Column Model\n */\n params.put(GSTR3BConstants.DETAILED_VIEW_REPORT, true);\n params.put(\"reportid\", Constants.GSTR3B_Summary_Report);\n getColumnModelForGSTRComputation(jarrRecords, jarrColumns, params);\n JSONObject jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_1(params);\n jSONObject.put(\"section\", \"4.1\");\n jSONObject.put(\"level\", 0);\n jSONObject.put(\"leaf\", false);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"heading\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_1);\n jSONObject.put(\"typeofsales\", \"Reg. sales\");\n jSONObject.put(\"enableViewDetail\", true);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_1_1(params);\n jSONObject.put(\"section\", \"4.2\");\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_1_1);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_1_2(params);\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_1_2);\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"section\", \"4.3\");\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_1_3(params);\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_1_3);\n jSONObject.put(\"section\", \"4.4\");\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_2(params);\n jSONObject.put(\"section\", \"5.1\");\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"level\", 0);\n jSONObject.put(\"leaf\", false);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"heading\", \"Inter State Unregistered Sales\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_2);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_2_2(params);\n jSONObject.put(\"section\", \"7.1\");\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"level\", 0);\n jSONObject.put(\"leaf\", false);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"heading\", \"Other Unregistered Sales\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_2_2);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_3(params);\n jSONObject.put(\"section\", \"6.1\");\n jSONObject.put(\"level\", 0);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", false);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"heading\", \"Zero Rated Supplies\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_3);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_3_1(params);\n jSONObject.put(\"section\", \"6.2\");\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n// jSONObject.put(\"heading\", \"Zero Rated Supplies\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_3_1);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_4(params);\n jSONObject.put(\"section\", \"8.1\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_4);\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_4_1(params);\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_4_1);\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"section\", \"8.2\");\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_4_2(params);\n jSONObject.put(\"section\", \"8.3\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_4_2);\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_7(params);\n jSONObject.put(\"section\", \"9.1\");\n jSONObject.put(\"heading\", \"DN\");\n jSONObject.put(\"level\", 0);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", false);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_7);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_7_1(params);\n jSONObject.put(\"section\", \"9.2\");\n// jSONObject.put(\"heading\", \"DN\");\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_7_1);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_7_2(params);\n jSONObject.put(\"section\", \"9.3\");\n jSONObject.put(\"enableViewDetail\", true);\n// jSONObject.put(\"heading\", \"DN\");\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_7_2);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_7_3(params);\n jSONObject.put(\"section\", \"9.4\");\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"heading\", \"CN\");\n jSONObject.put(\"level\", 0);\n jSONObject.put(\"leaf\", false);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_7_3);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_7_4(params);\n jSONObject.put(\"section\", \"9.5\");\n jSONObject.put(\"enableViewDetail\", true);\n// jSONObject.put(\"heading\", \"CN\");\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_7_4);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_7_5(params);\n jSONObject.put(\"section\", \"9.6\");\n jSONObject.put(\"enableViewDetail\", true);\n// jSONObject.put(\"heading\", \"CN\");\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_7_5);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_8(params);\n jSONObject.put(\"section\", \"9.7\");\n jSONObject.put(\"heading\", \"Refund\");\n jSONObject.put(\"level\", 0);\n jSONObject.put(\"leaf\", false);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_8);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_9(params);\n jSONObject = jSONObject.optJSONObject(\"gstr3Obj\");\n jSONObject.put(\"section\", \"11.1\");\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"heading\", \"Advance\");\n jSONObject.put(\"level\", 0);\n jSONObject.put(\"leaf\", false);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_9);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_9_1(params);\n jSONObject = jSONObject.optJSONObject(\"gstr3Obj\");\n jSONObject.put(\"section\", \"11.2\");\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_9_1);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_9_2(params);\n jSONObject = jSONObject.optJSONObject(\"gstr3Obj\");\n jSONObject.put(\"section\", \"11.3\");\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_9_2);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_10(params);\n jSONObject = jSONObject.optJSONObject(\"gstr3Obj\");\n jSONObject.put(\"section\", \"11.4\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_10);\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"fmt\", \"T\");\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_10_1(params);\n jSONObject = jSONObject.optJSONObject(\"gstr3Obj\");\n jSONObject.put(\"section\", \"11.5\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_10_1);\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Sales_Section_10_2(params);\n jSONObject = jSONObject.optJSONObject(\"gstr3Obj\");\n jSONObject.put(\"section\", \"11.6\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_10_2);\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n dataJArr.put(jSONObject);\n /**\n * Total (Define Formula) Sales\n */\n jSONObject = new JSONObject();\n JSONObject reqParams = new JSONObject(params, JSONObject.getNames(params));\n reqParams.put(\"dataArr\", dataJArr);\n jSONObject = getTotalForGSTR3B(reqParams);\n JSONObject salesSummaryTotal = new JSONObject(jSONObject.toString());\n jSONObject.put(\"typeofsales\", \"Total Of Sales\");\n jSONObject.put(\"section\", \"11.7\");\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n dataJArr.put(jSONObject);\n\n JSONArray purchasesArr = new JSONArray();\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Purchase_Section_1(params);\n jSONObject.put(\"section\", \"4.1\");\n jSONObject.put(\"heading\", \"Registered Purchases\");\n jSONObject.put(\"level\", 0);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", false);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_1);\n purchasesArr.put(jSONObject);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Purchase_Section_1_1(params);\n jSONObject.put(\"section\", \"4.2\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_1_1);\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n purchasesArr.put(jSONObject);\n dataJArr.put(jSONObject);\n\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Purchase_Section_3(params);\n jSONObject.put(\"section\", \"4.3\");\n jSONObject.put(\"heading\", \"Import\");\n jSONObject.put(\"level\", 0);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", false);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_3);\n purchasesArr.put(jSONObject);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Purchase_Section_3_1(params);\n jSONObject.put(\"section\", \"4.4\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_3_1);\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n purchasesArr.put(jSONObject);\n dataJArr.put(jSONObject);\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Purchase_Section_3_2(params);\n jSONObject.put(\"section\", \"4.5\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_3_2);\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n purchasesArr.put(jSONObject);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Purchase_Section_4(params);\n jSONObject.put(\"section\", \"4.6\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_4);\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n purchasesArr.put(jSONObject);\n dataJArr.put(jSONObject);\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Purchase_Section_5(params);\n jSONObject.put(\"section\", \"4.7\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_5);\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n purchasesArr.put(jSONObject);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject.put(\"section\", \"4.8\");\n jSONObject.put(\"heading\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_8);\n jSONObject.put(\"level\", 0);\n jSONObject.put(\"leaf\", false);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"typeofsales\", \"ISD Invoices\");\n purchasesArr.put(jSONObject);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject.put(\"section\", \"4.9\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_8_1);\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n purchasesArr.put(jSONObject);\n dataJArr.put(jSONObject);\n jSONObject = new JSONObject();\n jSONObject.put(\"section\", \"4.10\");\n jSONObject.put(\"heading\", \"TDS (Tax Deduct at Source)\");\n jSONObject.put(\"level\", 0);\n jSONObject.put(\"leaf\", false);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_9);\n purchasesArr.put(jSONObject);\n dataJArr.put(jSONObject);\n jSONObject = new JSONObject();\n jSONObject.put(\"section\", \"4.11\");\n jSONObject.put(\"heading\", \"TCS (Tax Collected at source)\");\n jSONObject.put(\"level\", 0);\n jSONObject.put(\"leaf\", false);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_10);\n purchasesArr.put(jSONObject);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Purchase_Section_11(params);\n// jSONObject = jSONObject.optJSONObject(\"gstr3Obj\");\n jSONObject.put(\"section\", \"4.12\");\n jSONObject.put(\"heading\", \"Advance payments\");\n jSONObject.put(\"level\", 0);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", false);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_11);\n purchasesArr.put(jSONObject);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Purchase_Section_12(params);\n// jSONObject = jSONObject.optJSONObject(\"gstr3Obj\");\n jSONObject.put(\"section\", \"4.13\");\n jSONObject.put(\"heading\", \"Advance adjustment\");\n jSONObject.put(\"level\", 0);\n jSONObject.put(\"leaf\", false);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_12);\n purchasesArr.put(jSONObject);\n dataJArr.put(jSONObject);\n\n /**\n * Define total.\n */\n jSONObject = new JSONObject();\n reqParams = new JSONObject(params, JSONObject.getNames(params));\n reqParams.put(\"isPurchase\", true);\n reqParams.put(\"dataArr\", purchasesArr);\n jSONObject = getTotalForGSTR3B(reqParams);\n JSONObject purchaseSummaryTotal = new JSONObject(jSONObject.toString());\n jSONObject.put(\"typeofsales\", \"Total Of Purchases\");\n jSONObject.put(\"section\", \"4.14\");\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n dataJArr.put(jSONObject);\n// /**\n// * 11.1.\n// */\n// jSONObject = new JSONObject();\n// jSONObject.put(\"heading\", \"Input Tax Credit Reversal/Reclaim\");\n// jSONObject.put(\"level\", 0);\n// jSONObject.put(\"leaf\", false);\n// jSONObject.put(\"fmt\", \"B\");\n// jSONObject.put(\"section\", \"11.1\");\n// dataJArr.put(jSONObject);\n//\n// /**\n// * Amount in terms of rule 2(2) of ITC Rules.\n// */\n// jSONObject = new JSONObject();\n// jSONObject.put(\"section\", \"11.2\");\n// jSONObject.put(\"typeofsales\", \"Amount in terms of rule 2(2) of ITC Rules\");\n// jSONObject.put(\"level\", 1);\n// jSONObject.put(\"leaf\", true);\n// jSONObject.put(\"fmt\", \"T\");\n// dataJArr.put(jSONObject);\n//\n// /**\n// * Amount in terms of rule 4(1)(j) (ii) of ITC Rules.\n// */\n// jSONObject = new JSONObject();\n// jSONObject.put(\"section\", \"11.3\");\n// jSONObject.put(\"typeofsales\", \"Amount in terms of rule 4(1)(j) (ii) of ITC Rules\");\n// jSONObject.put(\"level\", 1);\n// jSONObject.put(\"leaf\", true);\n// jSONObject.put(\"fmt\", \"T\");\n// dataJArr.put(jSONObject);\n// /**\n// * Amount in terms of rule 7 (1) (m) of ITC Rules.\n// */\n// jSONObject = new JSONObject();\n// jSONObject.put(\"section\", \"11.4\");\n// jSONObject.put(\"typeofsales\", \"Amount in terms of rule 7 (1) (m) of ITC Rules\");\n// jSONObject.put(\"level\", 1);\n// jSONObject.put(\"leaf\", true);\n// jSONObject.put(\"fmt\", \"T\");\n// dataJArr.put(jSONObject);\n// /**\n// * Amount in terms of rule 8(1) (h) of the ITC Rules.\n// */\n// jSONObject = new JSONObject();\n// jSONObject.put(\"section\", \"11.5\");\n// jSONObject.put(\"typeofsales\", \"Amount in terms of rule 8(1) (h) of the ITC Rules\");\n// jSONObject.put(\"level\", 1);\n// jSONObject.put(\"leaf\", true);\n// jSONObject.put(\"fmt\", \"T\");\n// dataJArr.put(jSONObject);\n// /**\n// * Amount in terms of rule 7 (2)(a) of ITC Rules.\n// */\n// jSONObject = new JSONObject();\n// jSONObject.put(\"section\", \"11.6\");\n// jSONObject.put(\"typeofsales\", \"Amount in terms of rule 7 (2)(a) of ITC Rules\");\n// jSONObject.put(\"level\", 1);\n// jSONObject.put(\"leaf\", true);\n// jSONObject.put(\"fmt\", \"T\");\n// dataJArr.put(jSONObject);\n// /**\n// * Amount in terms of rule 7(2)(b) of ITC Rules .\n// */\n// jSONObject = new JSONObject();\n// jSONObject.put(\"section\", \"11.7\");\n// jSONObject.put(\"typeofsales\", \"Amount in terms of rule 7(2)(b) of ITC Rules\");\n// jSONObject.put(\"level\", 1);\n// jSONObject.put(\"leaf\", true);\n// jSONObject.put(\"fmt\", \"T\");\n// dataJArr.put(jSONObject);\n// /**\n// * On account of amount paid subsequent to reversal of ITC.\n// */\n// jSONObject = new JSONObject();\n// jSONObject.put(\"section\", \"11.8\");\n// jSONObject.put(\"typeofsales\", \"On account of amount paid subsequent to reversal of ITC\");\n// jSONObject.put(\"level\", 1);\n// jSONObject.put(\"leaf\", true);\n// jSONObject.put(\"fmt\", \"T\");\n// dataJArr.put(jSONObject);\n// /**\n// * Any other liability (Specify).\n// */\n// jSONObject = new JSONObject();\n// jSONObject.put(\"section\", \"11.9\");\n// jSONObject.put(\"typeofsales\", \"Any other liability (Specify)\");\n// jSONObject.put(\"level\", 1);\n// jSONObject.put(\"leaf\", true);\n// jSONObject.put(\"fmt\", \"T\");\n// dataJArr.put(jSONObject);\n \n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Purchase_Section_11_10(params);\n jSONObject.put(\"section\", \"4.15\");\n jSONObject.put(\"level\", 0);\n jSONObject.put(\"fmt\", \"B\");\n// jSONObject.put(\"leaf\", true);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"heading\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_11_10);\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_11_10);\n JSONObject ReversedITCObj = new JSONObject(jSONObject.toString());\n dataJArr.put(jSONObject);\n \n jSONObject = new JSONObject();\n jSONObject.put(\"section\", \"4.16\");\n jSONObject.put(\"heading\", \"ITC Reclaimed\");\n jSONObject.put(\"typeofsales\", \"ITC Reclaimed\");\n jSONObject.put(\"level\", 0);\n// jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"B\");\n dataJArr.put(jSONObject);\n /**\n * ITC claimed on mismatched/duplication of invoices/debit notes.\n */\n// jSONObject = new JSONObject();\n// jSONObject.put(\"section\", \"12.1\");\n// jSONObject.put(\"heading\", \"Addition & Reduction\");\n// jSONObject.put(\"level\", 0);\n// jSONObject.put(\"leaf\", false);\n// jSONObject.put(\"fmt\", \"B\");\n// jSONObject.put(\"typeofsales\", \"ITC claimed on mismatched/duplication of invoices/debit notes\");\n// dataJArr.put(jSONObject);\n// /**\n// * Tax liability on mismatched credit notes.\n// */\n// jSONObject = new JSONObject();\n// jSONObject.put(\"section\", \"12.2\");\n// jSONObject.put(\"typeofsales\", \"Tax liability on mismatched credit notes \");\n// jSONObject.put(\"level\", 1);\n// jSONObject.put(\"leaf\", true);\n// jSONObject.put(\"fmt\", \"T\");\n// dataJArr.put(jSONObject);\n// /**\n// * Reclaim on account of rectification of mismatched invoices/debit\n// * notes .\n// */\n// jSONObject = new JSONObject();\n// jSONObject.put(\"section\", \"12.3\");\n// jSONObject.put(\"typeofsales\", \"Reclaim on account of rectification of mismatched invoices/debit notes \");\n// jSONObject.put(\"level\", 1);\n// jSONObject.put(\"leaf\", true);\n// jSONObject.put(\"fmt\", \"T\");\n// dataJArr.put(jSONObject);\n// /**\n// * Reclaim on account of rectification of mismatched credit note.\n// */\n// jSONObject = new JSONObject();\n// jSONObject.put(\"section\", \"12.4\");\n// jSONObject.put(\"typeofsales\", \"Reclaim on account of rectification of mismatched credit note\");\n// jSONObject.put(\"level\", 1);\n// jSONObject.put(\"leaf\", true);\n// jSONObject.put(\"fmt\", \"T\");\n// dataJArr.put(jSONObject);\n// /**\n// * Negative tax liability from previous tax periods.\n// */\n// jSONObject = new JSONObject();\n// jSONObject.put(\"section\", \"12.5\");\n// jSONObject.put(\"typeofsales\", \"Negative tax liability from previous tax periods\");\n// jSONObject.put(\"level\", 1);\n// jSONObject.put(\"leaf\", true);\n// jSONObject.put(\"fmt\", \"T\");\n// dataJArr.put(jSONObject);\n// /**\n// * Tax paid on advance in earlier tax periods and adjusted with tax on\n// * supplies made in current tax period.\n// */\n// jSONObject = new JSONObject();\n// jSONObject.put(\"section\", \"12.6\");\n// jSONObject.put(\"typeofsales\", \"Tax paid on advance in earlier tax periods and adjusted with tax on supplies made in current tax period\");\n// jSONObject.put(\"level\", 1);\n// jSONObject.put(\"leaf\", true);\n// jSONObject.put(\"fmt\", \"T\");\n// dataJArr.put(jSONObject);\n\n /**\n * GST Payable.\n */\n jSONObject = new JSONObject();\n// jSONObject.put(\"section\", \"14.1\");\n jSONObject.put(\"heading\", \"GST Payable\");\n jSONObject.put(\"level\", 0);\n jSONObject.put(\"leaf\", false);\n jSONObject.put(\"fmt\", \"B\");\n dataJArr.put(jSONObject);\n\n// salesSummaryTotal.put(\"section\", \"14.2\");\n salesSummaryTotal.put(\"typeofsales\", \"Total Sales (Summary)\");\n salesSummaryTotal.put(\"level\", 1);\n salesSummaryTotal.put(\"leaf\", true);\n salesSummaryTotal.put(\"fmt\", \"T\");\n dataJArr.put(salesSummaryTotal);\n\n// purchaseSummaryTotal.put(\"section\", \"14.3\");\n purchaseSummaryTotal.put(\"typeofsales\", \"Total Purchases (Summary)\");\n purchaseSummaryTotal.put(\"level\", 1);\n purchaseSummaryTotal.put(\"leaf\", true);\n purchaseSummaryTotal.put(\"fmt\", \"T\");\n dataJArr.put(purchaseSummaryTotal);\n\n jSONObject = new JSONObject();\n jSONObject.put(\"typeofsales\", \"Total GST Payable [11.7-(4.14-4.15+4.16)]\");\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount(salesSummaryTotal.optDouble(\"taxableamt\", 0.0) - purchaseSummaryTotal.optDouble(\"taxableamt\", 0.0)+ReversedITCObj.optDouble(\"taxableamt\", 0.0), companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount(salesSummaryTotal.optDouble(\"igst\", 0.0) - purchaseSummaryTotal.optDouble(\"igst\", 0.0)+ReversedITCObj.optDouble(\"igst\", 0.0), companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount(salesSummaryTotal.optDouble(\"cgst\", 0.0) - purchaseSummaryTotal.optDouble(\"cgst\", 0.0)+ReversedITCObj.optDouble(\"cgst\", 0.0), companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount(salesSummaryTotal.optDouble(\"csgst\", 0.0) - purchaseSummaryTotal.optDouble(\"csgst\", 0.0)+ReversedITCObj.optDouble(\"csgst\", 0.0), companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount(salesSummaryTotal.optDouble(\"sgst\", 0.0) - purchaseSummaryTotal.optDouble(\"sgst\", 0.0)+ReversedITCObj.optDouble(\"sgst\", 0.0), companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount(salesSummaryTotal.optDouble(\"totaltax\", 0.0) - purchaseSummaryTotal.optDouble(\"totaltax\", 0.0)+ReversedITCObj.optDouble(\"totaltax\", 0.0), companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount(salesSummaryTotal.optDouble(\"totalamount\", 0.0) - purchaseSummaryTotal.optDouble(\"totalamount\", 0.0)+ReversedITCObj.optDouble(\"totalamount\", 0.0), companyId));\n dataJArr.put(jSONObject);\n \n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Purchase_Section_13_1(params);\n jSONObject.put(\"section\", \"4.17\");\n jSONObject.put(\"heading\", \"Ineligible ITC\");\n jSONObject.put(\"level\", 0);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", false);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_13_1);\n dataJArr.put(jSONObject);\n \n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Purchase_Section_6(params);\n jSONObject.put(\"section\", \"5.1\");\n jSONObject.put(\"heading\", \"Composition\");\n jSONObject.put(\"level\", 0);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", false);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_6);\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Purchase_Section_7(params);\n jSONObject.put(\"level\", 0);\n jSONObject.put(\"section\", \"5.2\");\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"heading\", \"Exempted\");\n jSONObject.put(\"leaf\", false);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_7);\n \n dataJArr.put(jSONObject);\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Purchase_Section_7_1(params);\n jSONObject.put(\"section\", \"5.3\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_7_1);\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"fmt\", \"T\");\n dataJArr.put(jSONObject);\n \n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Purchase_Section_7_2(params);\n jSONObject.put(\"section\", \"5.4\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_7_2);\n jSONObject.put(\"level\", 1);\n jSONObject.put(\"leaf\", true);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"fmt\", \"T\");\n dataJArr.put(jSONObject);\n\n jSONObject = new JSONObject();\n jSONObject = getGSTComputation_Purchase_Section_2(params);\n jSONObject.put(\"section\", \"5.5\");\n jSONObject.put(\"heading\", \"Unregistered\");\n jSONObject.put(\"level\", 0);\n jSONObject.put(\"enableViewDetail\", true);\n jSONObject.put(\"leaf\", false);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"typeofsales\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_2);\n dataJArr.put(jSONObject);\n \n JSONArray pagedJson = new JSONArray();\n pagedJson = dataJArr;\n if (!StringUtil.isNullOrEmpty(start) && !StringUtil.isNullOrEmpty(limit)) {\n pagedJson = StringUtil.getPagedJSON(pagedJson, Integer.parseInt(start), Integer.parseInt(limit));\n }\n object.put(\"totalCount\", dataJArr.length());\n object.put(\"columns\", jarrColumns);\n object.put(\"coldata\", pagedJson);\n jMeta.put(\"totalProperty\", \"totalCount\");\n jMeta.put(\"root\", \"coldata\");\n jMeta.put(\"fields\", jarrRecords);\n object.put(\"metaData\", jMeta);\n if (params.optBoolean(\"isExport\")) {\n object.put(\"data\", dataJArr);\n object.put(\"columns\", jarrColumns);\n }\n return object;\n }",
"@Override\n\t\tprotected GetConfigRes doInBackground(Void... params) {\n\t\t\treturn JsonOA.getConfigInfo(\"all\");\n\t\t}",
"@Override\r\n\tpublic ArrayList<VendorConfig> extractData(ResultSet rs) throws SQLException, DataAccessException {\n\t\t\r\n\t\tlogger.info(\"extractData()....COUNT of RS:\"+rs.getFetchSize());\r\n\t\tif(rs.next()) {\r\n\t\t\tVendorConfig storeCfg = new VendorConfig();\r\n\t\t\t//String[] categories = rs.getString(i++).split(\",\");\r\n\t\t\t//logger.info(\"categories::\"+categories);\r\n\t\t\tstoreCfg.setVendorId(rs.getString(\"vendor_id\"));\r\n\t\t\tstoreCfg.setCategories(rs.getString(\"categories\"));\r\n\t\t\tstoreCfg.setDeliveryFlag(rs.getByte(\"delivery_flag\"));\r\n\t\t\tstoreCfg.setDeliveryStartTime(rs.getTime(\"delivery_start_time\"));\r\n\t\t\tstoreCfg.setDeliveryEndTime(rs.getTime(\"delivery_end_time\"));\r\n\t\t\tstoreCfg.setStoreStartTime(rs.getTime(\"store_hours_start\"));\r\n\t\t\tstoreCfg.setStoreEndTime(rs.getTime(\"store_hours_end\"));\r\n\t\t\tstoreCfg.setStoreOpenDays(rs.getString(\"store_days\"));\r\n\t\t\tstoreCfg.setShopName(rs.getString(\"shop_name\"));\r\n\t\t\tstoreCfg.setCategoryDescription(rs.getString(\"shop_cat_desc\"));\r\n\t\t\tstoreCfg.setStatus(rs.getString(\"shop_status\"));\r\n\t\t\tstoreCfg.setDeliveryLocationId(rs.getString(\"delivery_loc_id\"));\r\n\t\t\tstoreCfg.setPhone(rs.getString(\"phone\"));\r\n\t\t\tstoreCfg.setEmail(rs.getString(\"email\"));\r\n\t\t\tstoreCfg.setAddress(rs.getString(\"address\"));\r\n\t\t\tstoreCfg.setShopLogoLink(rs.getString(\"shop_logo_link\"));\r\n\t\t\tstoreCfg.setAboutUs(rs.getString(\"about_us\"));\r\n\t\t\tstoreCfg.setFeaturesOne(rs.getString(\"features_one\"));\r\n\t\t\tstoreCfg.setFeaturesTwo(rs.getString(\"features_two\"));\r\n\t\t\tstoreCfg.setFeaturesThree(rs.getString(\"features_three\"));\r\n\t\t\tstoreCfg.setFeaturesFour(rs.getString(\"features_four\"));\r\n\t\t\tstoreCfg.setFeaturesFive(rs.getString(\"features_five\"));\r\n\t\t\tstoreCfg.setFeaturesSix(rs.getString(\"features_six\"));\r\n\t\t\tstoreCfg.setAboutShopLogoLink(rs.getString(\"about_shop_logo_link\"));\r\n\t\t\tstoreCfg.setCountry_code(rs.getString(\"country_code\"));\r\n\t\t\t//delivery_flag, delivery_start_time, delivery_end_time, delivery_loc_id, store_hours_start, store_hours_end, store_days\r\n\t\t\tvendorConfigs.add(storeCfg);\r\n\t\t}\r\n\t\t\r\n\t\treturn vendorConfigs;\r\n\t}",
"@SuppressWarnings(\"unused\")\n public static String queryTaskSummariesOracle() {\n return OPENING_SCRIPT_TAG\n + \"SELECT \"\n + commonSelectFieldsOracle()\n + \"<if test=\\\"addAttachmentColumnsToSelectClauseForOrdering\\\">\"\n + \", a2.CLASSIFICATION_ID, a2.CLASSIFICATION_KEY, a2.CHANNEL, a2.REF_VALUE, a2.RECEIVED\"\n + \"</if>\"\n + \"<if test=\\\"addClassificationNameToSelectClauseForOrdering\\\">, c2.NAME </if>\"\n + \"<if test=\\\"addAttachmentClassificationNameToSelectClauseForOrdering\\\">, ac2.NAME </if>\"\n + \"<if test=\\\"addWorkbasketNameToSelectClauseForOrdering\\\">, w2.NAME </if>\"\n + \"<if test=\\\"joinWithUserInfo\\\">, u2.LONG_NAME </if>\"\n + \"FROM TASK t2 \"\n + \"<if test=\\\"joinWithAttachments\\\">LEFT JOIN ATTACHMENT a2 ON t2.ID = a2.TASK_ID </if>\"\n + \"<if test=\\\"joinWithSecondaryObjectReferences\\\">LEFT JOIN OBJECT_REFERENCE o2 \"\n + \"ON t2.ID = o2.TASK_ID </if>\"\n + \"<if test=\\\"joinWithClassifications\\\">LEFT JOIN CLASSIFICATION c2 \"\n + \"ON t2.CLASSIFICATION_ID = c2.ID </if>\"\n + \"<if test=\\\"joinWithAttachmentClassifications\\\">LEFT JOIN CLASSIFICATION ac2 \"\n + \"ON a2.CLASSIFICATION_ID = ac2.ID </if>\"\n + \"<if test=\\\"joinWithWorkbaskets\\\">LEFT JOIN WORKBASKET w2 \"\n + \"ON t2.WORKBASKET_ID = w2.ID </if>\"\n + \"<if test=\\\"joinWithUserInfo\\\">LEFT JOIN USER_INFO u2 ON t2.owner = u2.USER_ID </if>\"\n + \"WHERE t2.rowid = (SELECT <if test=\\\"useDistinctKeyword\\\">DISTINCT</if> t.rowid \"\n + \"FROM TASK t \"\n + \"<if test=\\\"joinWithAttachments\\\">LEFT JOIN ATTACHMENT a ON t.ID = a.TASK_ID </if>\"\n + \"<if test=\\\"joinWithSecondaryObjectReferences\\\">LEFT JOIN OBJECT_REFERENCE o \"\n + \"ON t.ID = o.TASK_ID </if>\"\n + \"<if test=\\\"joinWithClassifications\\\">LEFT JOIN CLASSIFICATION c \"\n + \"ON t.CLASSIFICATION_ID = c.ID </if>\"\n + \"<if test=\\\"joinWithAttachmentClassifications\\\">LEFT JOIN CLASSIFICATION ac \"\n + \"ON a.CLASSIFICATION_ID = ac.ID </if>\"\n + \"<if test=\\\"joinWithWorkbaskets\\\">LEFT JOIN WORKBASKET w \"\n + \"ON t.WORKBASKET_ID = w.ID </if>\"\n + \"<if test=\\\"joinWithUserInfo\\\">LEFT JOIN USER_INFO u ON t.owner = u.USER_ID </if>\"\n + OPENING_WHERE_TAG\n + commonTaskWhereStatement()\n + \"<if test='selectAndClaim == true'> AND t.STATE = 'READY' </if>\"\n + CLOSING_WHERE_TAG\n + \"<if test='!orderByOuter.isEmpty()'>\"\n + \"ORDER BY <foreach item='item' collection='orderByOuter' separator=',' >${item}</foreach>\"\n + \"</if> \"\n + \"fetch first 1 rows only \"\n + \") FOR UPDATE\"\n + CLOSING_SCRIPT_TAG;\n }",
"@Override\n\tpublic List<Object[]> getCRConfig(Short tenantId) {\n\t\tStringBuilder query = new StringBuilder().append(QueryConstants.ALIGMENT_CR_CONFIG);\n\t\tList<Object> queryParam = new ArrayList<Object>();\n\t\tqueryParam.add(tenantId);\n\t\treturn genericDAO.findEntitiesByBuildQueries(query.toString(), queryParam, 0, -1);\t\t\n\t}",
"List<Commodity> selectAll(@Param(\"beginRow\") int beginRow,@Param(\"pageSize\") int pageSize);",
"private static void init() throws AggregatorException {Populator Configuration\n\n// //ASIN Populator\n// PopulatorData asinPopulator = new PopulatorData(ASINPopulator.class.getName(),\n// new ArrayList<String>());\n// configuration.put(\"ASINPopulator\", asinPopulator);\n//\n// //Title Populator\n// ArrayList<String> titlePopulatorDependencies = new ArrayList<String>();\n// titlePopulatorDependencies.add(\"/ItemLookupResponse/Items/Item/Accessories/Accessory/ASIN\");\n// titlePopulatorDependencies.add(\"/ItemLookupResponse/Items/Item/SimilarProducts/SimilarProduct/ASIN\");\n// titlePopulatorDependencies.add(\"/ItemSearchResponse/Items/Item/Accessories/Accessory/ASIN\");\n// titlePopulatorDependencies.add(\"/ItemSearchResponse/Items/Item/SimilarProducts/SimilarProduct/ASIN\");\n// titlePopulatorDependencies.add(\"/SimilarityLookupResponse/Items/Item/Accessories/Accessory/ASIN\");\n// titlePopulatorDependencies.add(\"/SimilarityLookupResponse/Items/Item/SimilarProducts/SimilarProduct/ASIN\");\n// PopulatorData titlePopulator = new PopulatorData(TitlePopulator.class.getName(),\n// titlePopulatorDependencies);\n// configuration.put(\"TitlePopulator\", titlePopulator);\n//\n// \n }",
"public List <ConfigurationPojo> findByApplication(String application)\n throws ExecutionException, InterruptedException {\n CollectionReference configurations = com.google.firebase.cloud.FirestoreClient.getFirestore().collection(\"CONFIGURATIONS\");\n // Create a query against the collection.\n Query query = configurations.whereEqualTo(\"application\", application);\n // retrieve query results asynchronously using query.get()\n ApiFuture<QuerySnapshot> querySnapshot = query.get();\n List<ConfigurationPojo> configurationPojoList= toList(querySnapshot.get().getDocuments());\n return configurationPojoList;\n }",
"@Override\n\tpublic JSONObject getUserByPage(String param) {\n\t\tJSONObject data = new JSONObject();\n\t\tJSONObject result = new JSONObject();\n\t\tMainUtility mainUtil = new MainUtility();\n\t\tJSONObject jsonParams = mainUtil.stringToJson(param);\n\t\tStringBuilder builder = new StringBuilder();\n\t\tStringBuilder builderGetTotal = new StringBuilder();\n\n\t\tbuilder.append(\"SELECT user_id, user_login, full_name, email, group_id \"\n\t\t\t\t+ \"FROM crm_user \"\n\t\t\t\t+ \"WHERE group_id IN (2,3) \");\n\t\tbuilderGetTotal.append(\"SELECT COUNT(1) FROM crm_user \"\n\t\t\t\t+ \"WHERE group_id IN (2,3) \");\n\t\tif (jsonParams.get(\"user_login\") != null && !\"\".equals(jsonParams.get(\"user_login\").toString())) {\n\t\t\tbuilder.append(\" AND user_login LIKE N'%\" + jsonParams.get(\"user_login\").toString() + \"%'\");\n\t\t\tbuilderGetTotal\n\t\t\t\t\t.append(\" AND user_login LIKE N'%\" + jsonParams.get(\"user_login\").toString() + \"%'\");\n\t\t}\n\t\tif (jsonParams.get(\"full_name\") != null && !\"\".equals(jsonParams.get(\"full_name\").toString())) {\n\t\t\tbuilder.append(\" AND full_name LIKE N'%\" + jsonParams.get(\"full_name\").toString() + \"%'\");\n\t\t\tbuilderGetTotal\n\t\t\t.append(\" AND full_name LIKE N'%\" + jsonParams.get(\"full_name\").toString() + \"%'\");\n\t\t}\n\t\tif (jsonParams.get(\"email\") != null && !\"\".equals(jsonParams.get(\"email\").toString())) {\n\t\t\tbuilder.append(\" AND email LIKE N'%\" + jsonParams.get(\"email\").toString() + \"%'\");\n\t\t\tbuilderGetTotal\n\t\t\t.append(\" AND email LIKE N'%\" + jsonParams.get(\"email\").toString() + \"%'\");\n\t\t}\n\t\t// sortby\n\t\tif (jsonParams.get(\"sortField\") != null && !\"\".equals(jsonParams.get(\"sortField\").toString())) {\n\t\t\tswitch (jsonParams.get(\"sortField\").toString()) {\n\t\t\tdefault:\n\t\t\t\tbuilder.append(\" ORDER BY crm_user.created_date DESC\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// sortOrder chỉ là descend và ascend hoặc rỗng\n\t\t\tif (jsonParams.get(\"sortOrder\") != null && \"descend\".equals(jsonParams.get(\"sortOrder\").toString())) {\n\t\t\t\tbuilder.append(\" DESC\");\n\t\t\t}\n\t\t\tif (jsonParams.get(\"sortOrder\") != null && \"ascend\".equals(jsonParams.get(\"sortOrder\").toString())) {\n\t\t\t\tbuilder.append(\" ASC\");\n\t\t\t}\n\t\t}\n\t\t// lấy các biến từ table (limit, offset)\n\t\tmainUtil.getLimitOffset(builder, jsonParams);\n\t\ttry {\n\t\t\tint totalRow = this.jdbcTemplate.queryForObject(builderGetTotal.toString(), Integer.class);\n\t\t\tList<Map<String, Object>> listUser = this.jdbcTemplate.queryForList(builder.toString());\n\t\t\tJSONObject results = new JSONObject();\n\t\t\tresults.put(\"results\", listUser);\n\t\t\tresults.put(\"total\", totalRow);\n\t\t\tdata.put(\"data\", results);\n\t\t\tdata.put(\"success\", true);\n\t\t} catch (Exception e) {\n\t\t\tdata.put(\"success\", false);\n\t\t\tdata.put(\"err\", e.getMessage());\n\t\t\tdata.put(\"msg\", \"Lấy danh sách người dùng thất bại\");\n\t\t}\n\t\treturn data;\n\t}",
"@Ignore\n @Test\n public void aggregationQuery() throws IOException {\n String result = explain(String.format(\"{\\\"query\\\":\\\"\" +\n \"SELECT address, CASE WHEN gender='0' THEN 'aaa' ELSE 'bbb' END AS a2345, count(age) \" +\n \"FROM %s \" +\n \"GROUP BY terms('field'='address','execution_hint'='global_ordinals'), a2345\\\"}\", TestsConstants.TEST_INDEX_ACCOUNT));\n String expectedOutput = Files.toString(\n new File(getResourcePath() + \"src/test/resources/expectedOutput/aggregation_query_explain.json\"), StandardCharsets.UTF_8)\n .replaceAll(\"\\r\", \"\");\n\n assertThat(removeSpaces(result), equalTo(removeSpaces(expectedOutput)));\n }",
"private static void buildList() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif (connection == null || connection.isClosed()) \r\n\t\t\t\tconnection = DataSourceManager.getConnection();\r\n\t\t\t\r\n\t\t\tstatement = connection.prepareStatement(LOAD_ALL);\r\n\t \tresultset = statement.executeQuery();\r\n\t \t\r\n\t \tgroups = getCollectionFromResultSet(resultset);\r\n\t \tresultset.close();\r\n\t statement.close();\r\n\t\t\t\r\n\t\t} catch (ClassNotFoundException | SQLException e) {\r\n\t\t\tlog.fatal(e.toString());\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\t\r\n\t}",
"public StringBuilder adminQueryBlackGroupInfo(HttpServletRequest req) throws Exception {\n StringBuilder sBuilder = new StringBuilder(512);\n BdbBlackGroupEntity webBlackGroupEntity =\n new BdbBlackGroupEntity();\n try {\n webBlackGroupEntity\n .setTopicName(WebParameterUtils.validStringParameter(\"topicName\",\n req.getParameter(\"topicName\"),\n TBaseConstants.META_MAX_TOPICNAME_LENGTH,\n false, null));\n webBlackGroupEntity\n .setBlackGroupName(WebParameterUtils.validGroupParameter(\"groupName\",\n req.getParameter(\"groupName\"),\n TBaseConstants.META_MAX_GROUPNAME_LENGTH,\n false, null));\n webBlackGroupEntity\n .setCreateUser(WebParameterUtils.validStringParameter(\"createUser\",\n req.getParameter(\"createUser\"),\n TBaseConstants.META_MAX_USERNAME_LENGTH,\n false, null));\n List<BdbBlackGroupEntity> webBlackGroupEntities =\n brokerConfManager.confGetBdbBlackConsumerGroupSet(webBlackGroupEntity);\n SimpleDateFormat formatter =\n new SimpleDateFormat(TBaseConstants.META_TMP_DATE_VALUE);\n sBuilder.append(\"{\\\"result\\\":true,\\\"errCode\\\":0,\\\"errMsg\\\":\\\"OK\\\",\\\"count\\\":\")\n .append(webBlackGroupEntities.size()).append(\",\\\"data\\\":[\");\n int j = 0;\n for (BdbBlackGroupEntity entity : webBlackGroupEntities) {\n if (j++ > 0) {\n sBuilder.append(\",\");\n }\n sBuilder.append(\"{\\\"topicName\\\":\\\"\").append(entity.getTopicName())\n .append(\"\\\",\\\"groupName\\\":\\\"\").append(entity.getBlackGroupName())\n .append(\"\\\",\\\"createUser\\\":\\\"\").append(entity.getCreateUser())\n .append(\"\\\",\\\"createDate\\\":\\\"\").append(formatter.format(entity.getCreateDate()))\n .append(\"\\\"}\");\n }\n sBuilder.append(\"]}\");\n } catch (Exception e) {\n sBuilder.delete(0, sBuilder.length());\n sBuilder.append(\"{\\\"result\\\":false,\\\"errCode\\\":400,\\\"errMsg\\\":\\\"\")\n .append(e.getMessage()).append(\"\\\",\\\"count\\\":0,\\\"data\\\":[]}\");\n }\n return sBuilder;\n }",
"public StringBuilder adminQueryGroupFilterCondInfo(HttpServletRequest req) throws Exception {\n StringBuilder sBuilder = new StringBuilder(512);\n BdbGroupFilterCondEntity webGroupFilterCondEntity =\n new BdbGroupFilterCondEntity();\n try {\n webGroupFilterCondEntity\n .setTopicName(WebParameterUtils.validStringParameter(\"topicName\",\n req.getParameter(\"topicName\"),\n TBaseConstants.META_MAX_TOPICNAME_LENGTH,\n false, null));\n webGroupFilterCondEntity\n .setConsumerGroupName(WebParameterUtils.validGroupParameter(\"groupName\",\n req.getParameter(\"groupName\"),\n TBaseConstants.META_MAX_GROUPNAME_LENGTH,\n false, null));\n webGroupFilterCondEntity\n .setCreateUser(WebParameterUtils.validStringParameter(\"createUser\",\n req.getParameter(\"createUser\"),\n TBaseConstants.META_MAX_USERNAME_LENGTH,\n false, null));\n webGroupFilterCondEntity\n .setControlStatus(WebParameterUtils.validIntDataParameter(\"condStatus\",\n req.getParameter(\"condStatus\"),\n false,\n TBaseConstants.META_VALUE_UNDEFINED,\n 0));\n Set<String> filterCondSet =\n WebParameterUtils.checkAndGetFilterCondSet(req.getParameter(\"filterConds\"), true, false, sBuilder);\n List<BdbGroupFilterCondEntity> webGroupCondEntities =\n brokerConfManager.confGetBdbAllowedGroupFilterCondSet(webGroupFilterCondEntity);\n SimpleDateFormat formatter =\n new SimpleDateFormat(TBaseConstants.META_TMP_DATE_VALUE);\n int j = 0;\n sBuilder.append(\"{\\\"result\\\":true,\\\"errCode\\\":0,\\\"errMsg\\\":\\\"OK\\\",\\\"data\\\":[\");\n for (BdbGroupFilterCondEntity entity : webGroupCondEntities) {\n if (!filterCondSet.isEmpty()) {\n String filterItems = entity.getAttributes();\n if (filterItems.length() == 2\n && filterItems.equals(TServerConstants.TOKEN_BLANK_FILTER_CONDITION)) {\n continue;\n } else {\n boolean allInc = true;\n for (String filterCond : filterCondSet) {\n if (!filterItems.contains(filterCond)) {\n allInc = false;\n break;\n }\n }\n if (!allInc) {\n continue;\n }\n }\n }\n if (j++ > 0) {\n sBuilder.append(\",\");\n }\n sBuilder.append(\"{\\\"topicName\\\":\\\"\").append(entity.getTopicName())\n .append(\"\\\",\\\"groupName\\\":\\\"\").append(entity.getConsumerGroupName())\n .append(\"\\\",\\\"condStatus\\\":\").append(entity.getControlStatus());\n if (entity.getAttributes().length() <= 2) {\n sBuilder.append(\",\\\"filterConds\\\":\\\"\\\"\");\n } else {\n sBuilder.append(\",\\\"filterConds\\\":\\\"\")\n .append(entity.getAttributes())\n .append(\"\\\"\");\n }\n sBuilder.append(\",\\\"createUser\\\":\\\"\").append(entity.getCreateUser())\n .append(\"\\\",\\\"createDate\\\":\\\"\").append(formatter.format(entity.getCreateDate()))\n .append(\"\\\"}\");\n }\n sBuilder.append(\"],\\\"count\\\":\").append(j).append(\"}\");\n } catch (Exception e) {\n sBuilder.delete(0, sBuilder.length());\n sBuilder.append(\"{\\\"result\\\":false,\\\"errCode\\\":400,\\\"errMsg\\\":\\\"\")\n .append(e.getMessage()).append(\"\\\",\\\"count\\\":0,\\\"data\\\":[]}\");\n }\n return sBuilder;\n }",
"@Value.Default\n public int maxServiceCallAggregates() {\n return ConfigDefaults.ADVANCED_MAX_QUERY_AGGREGATES;\n }",
"@Override\n public JSONObject getGSTRuleSetup(JSONObject requestParams) throws ServiceException, ParseException, com.krawler.utils.json.base.JSONException {\n JSONObject finalReturnObj = new JSONObject();\n try {\n String storeRec = \"\";\n JSONObject jMeta = new JSONObject();\n JSONArray jarrColumns = new JSONArray();\n JSONArray jarrRecords = new JSONArray();\n JSONObject jobjTemp = new JSONObject();\n JSONArray dataJArr = new JSONArray();\n JSONArray pagedJson = new JSONArray();\n\n /**\n * Create Column model\n */\n HashMap<String, Object> fieldParamsRequestMap = new HashMap<>();\n ArrayList fieldParamsfilter_names = new ArrayList();\n ArrayList fieldParamsfilter_params = new ArrayList();\n\n KwlReturnObject KWLObj = accountingHandlerDAOobj.getObject(Company.class.getName(), requestParams.optString(Constants.companyKey));\n Company company = (Company) KWLObj.getEntityList().get(0);\n String countryid = company.getCountry().getID();\n requestParams.put(\"countryid\", countryid);\n\n fieldParamsfilter_names.add(Constants.FIELDPARAMS_ISACTIVATE);\n fieldParamsfilter_params.add(1);\n fieldParamsfilter_names.add(Constants.GST_CONFIG_TYPE);\n fieldParamsfilter_params.add(Constants.GST_CONFIG_ISFORGST);\n fieldParamsfilter_names.add(Constants.moduleid);\n fieldParamsfilter_params.add(Constants.GSTModule);\n fieldParamsfilter_names.add(\"companyid\");\n fieldParamsfilter_params.add(requestParams.optString(\"companyid\"));\n fieldParamsRequestMap.put(Constants.filterNamesKey, fieldParamsfilter_names);\n fieldParamsRequestMap.put(Constants.filterParamsKey, fieldParamsfilter_params);\n KwlReturnObject result = accEntityGstDao.getChildFieldParamsForGSTRule(fieldParamsRequestMap);\n List<FieldParams> fieldParamses = result.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n jobjTemp = new JSONObject();\n jobjTemp.put(\"header\", fieldParams.getFieldlabel());\n jobjTemp.put(\"dataIndex\", \"shippedLoc\" + fieldParams.getGSTMappingColnum());\n jobjTemp.put(\"align\", \"center\");\n jobjTemp.put(\"width\", 150);\n jobjTemp.put(\"pdfwidth\", 150);\n jarrColumns.put(jobjTemp);\n //Records\n jobjTemp = new JSONObject();\n jobjTemp.put(\"name\", \"shippedLoc\" + fieldParams.getGSTMappingColnum());\n jarrRecords.put(jobjTemp);\n }\n\n JSONObject params = new JSONObject();\n params.put(\"termType\", 7);\n params.put(\"companyid\", requestParams.optString(\"companyid\"));\n params.put(\"isInput\", requestParams.optBoolean(\"isSales\"));\n /**\n * get GST master\n */\n\n KwlReturnObject kwlReturnObject = accEntityGstDao.getGSTTermDetails(params);\n List<LineLevelTerms> lineLevelTerms = kwlReturnObject.getEntityList();\n Map<String, String> GSTTermMap = new HashMap();\n for (LineLevelTerms lineLevelTerms1 : lineLevelTerms) {\n /**\n * Create Map for Term Id,Name\n */\n jobjTemp = new JSONObject();\n jobjTemp.put(\"header\", lineLevelTerms1.getTerm());\n jobjTemp.put(\"dataIndex\", lineLevelTerms1.getId());\n jobjTemp.put(\"align\", \"center\");\n jobjTemp.put(\"width\", 150);\n jobjTemp.put(\"renderer\", \"WtfGlobal.gstdecimalRenderer\");\n jobjTemp.put(\"pdfwidth\", 150);\n jarrColumns.put(jobjTemp);\n //Records\n jobjTemp = new JSONObject();\n jobjTemp.put(\"name\", lineLevelTerms1.getId());\n jarrRecords.put(jobjTemp);\n }\n /**\n * ERP-34044\n */\n if(countryid.equals(String.valueOf(Constants.indian_country_id))){\n jobjTemp = new JSONObject();\n jobjTemp.put(\"header\",\"\" );\n jobjTemp.put(\"dataIndex\", \"groupTerm\");\n jarrColumns.put(jobjTemp);\n //Records\n jobjTemp = new JSONObject();\n jobjTemp.put(\"name\", \"groupTerm\");\n jarrRecords.put(jobjTemp);\n }\n /**\n * get rule data from table\n */\n requestParams.put(\"df\", authHandler.getDateOnlyFormat());\n JSONObject dataObj = getEntityRuleSetup(requestParams);\n dataJArr = dataObj.optJSONArray(\"dataArr\");\n\n pagedJson = dataJArr;\n finalReturnObj.put(\"totalCount\", dataJArr.length());\n finalReturnObj.put(\"columns\", jarrColumns);\n finalReturnObj.put(\"coldata\", pagedJson);\n jMeta.put(\"totalProperty\", \"totalCount\");\n jMeta.put(\"root\", \"coldata\");\n jMeta.put(\"fields\", jarrRecords);\n finalReturnObj.put(\"metaData\", jMeta);\n boolean isExport = false;\n if (requestParams.has(\"isExport\")) {\n isExport = Boolean.parseBoolean(requestParams.optString(\"isExport\"));\n }\n if (isExport) {\n finalReturnObj.put(\"data\", dataJArr);\n }\n } catch (ServiceException | com.krawler.utils.json.base.JSONException ex) {\n Logger.getLogger(AccGstServiceImpl.class.getName()).log(Level.INFO, ex.getMessage());\n } catch (SessionExpiredException ex) {\n Logger.getLogger(AccGstServiceImpl.class.getName()).log(Level.SEVERE, null, ex);\n }\n return finalReturnObj;\n }",
"public String queryProjectListPaging(Map<String, Object> parameter) {\n return new SQL() {{\n SELECT(\"p.*\");\n SELECT(\"u.user_name as user_name\");\n SELECT(\"(SELECT COUNT(*) FROM t_escheduler_process_definition AS def WHERE def.project_id = p.id) AS def_count\");\n SELECT(\"(SELECT COUNT(*) FROM t_escheduler_process_definition def, t_escheduler_process_instance inst WHERE def.id = inst.process_definition_id AND def.project_id = p.id AND inst.state=1 ) as inst_running_count\");\n FROM(TABLE_NAME + \" p\");\n JOIN(\"t_escheduler_user u on u.id=p.user_id\");\n WHERE(\"p.id in \" +\n \"(select project_id from \"+ RELEATION_TABLE_NAME+\" where user_id=#{userId} \" +\n \"union select id as project_id from \"+ TABLE_NAME+\" where user_id=#{userId})\");\n\n Object searchVal = parameter.get(\"searchVal\");\n if(searchVal != null && StringUtils.isNotEmpty(searchVal.toString())){\n WHERE( \" p.name like concat('%', #{searchVal}, '%') \");\n }\n WHERE(\" p.flag = 1\");\n ORDER_BY(\"p.create_time desc limit #{offset},#{pageSize} \");\n }}.toString();\n }",
"@GET\n @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })\n @ApiOperation(value = \"Get a list of aggregators.\", httpMethod = \"GET\", response = Aggregator.class, responseContainer = \"List\")\n @ApiResponses(value = {\n @ApiResponse(code = 200, message = \"OK (Response containing a list of aggregators)\"),\n @ApiResponse(code = 400, message = \"InvalidArgumentsException\")\n })\n public Response getAggregatorList(@ApiParam(value = \"Index where to start from(negative not allowed)\", defaultValue = \"0\") @DefaultValue(\"0\") @QueryParam(\"offset\") int offset,\n @ApiParam(value = \"Number of aggregators requested(-1 to get all)\", defaultValue = \"-1\") @DefaultValue(\"-1\") @QueryParam(\"number\") int number) throws Exception, InvalidArgumentsException {\n\n if (offset < 0)\n throw new InvalidArgumentsException(\"Offset negative values not allowed!\");\n\n List<Aggregator> aggregatorsListSorted;\n try {\n aggregatorsListSorted = dataManager.getAggregatorsListSorted(offset, number);\n } catch (IndexOutOfBoundsException e) {\n throw new InvalidArgumentsException(\"Invalid argument: \" + e.getMessage());\n }\n\n return Response.status(200).entity(new GenericEntity<List<Aggregator>>(aggregatorsListSorted) {\n }).build();\n }",
"@Override\n\tpublic List<Config_Entity> get_all_config() {\n\t\treturn config.get_all_config();\n\t}",
"public void loadGraph() {\n\t\tJSONArray data = null;\n\n\t\tswitch (mApp.getCurrentGroupBy()) {\n\t\tcase DATE:\n\n\t\t\tdata = DataBaseUtil.fetchEntriesByDateInJSON(mContext, mType.getId());\n\t\t\tbreak;\n\n\t\tcase MAX:\n\n\t\t\tdata = DataBaseUtil.fetchEntriesByMaxInJSON(mContext, mType.getId());\n\t\t\tbreak;\n\n\t\tcase NONE:\n\t\t\tdata = DataBaseUtil.fetchEntriesInJSON(mContext, mType.getId());\n\t\t\tbreak;\n\t\t}\n\t\tloadGraph(data);\n\t}",
"public JSONObject getGSTComputationDetailReport(JSONObject params) throws ServiceException, JSONException {\n JSONObject object = new JSONObject();\n JSONObject jMeta = new JSONObject();\n JSONArray jarrColumns = new JSONArray();\n JSONArray jarrRecords = new JSONArray();\n JSONArray dataJArr = new JSONArray();\n String start = params.optString(\"start\");\n String limit = params.optString(\"limit\");\n String companyId = params.optString(\"companyid\");\n params.put(\"companyid\", companyId);\n /**\n * Put all required parameter for GST report\n */\n getEntityDataForRequestedModule(params);\n getColNumForRequestedModules(params);\n getLocalStateOfEntity(params);\n \n params.put(GSTR3BConstants.DETAILED_VIEW_REPORT, true);\n String section = params.optString(\"section\");\n accGSTReportService.getColumnModelForGSTR3BDetails(jarrRecords, jarrColumns, params);\n JSONObject dataObj = new JSONObject();\n params.put(GSTR3BConstants.DETAILED_VIEW_REPORT, true);\n switch (section) {\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_1:\n dataObj = getGSTComputation_Sales_Section_1(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_1_1:\n dataObj = getGSTComputation_Sales_Section_1_1(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_1_2:\n dataObj = getGSTComputation_Sales_Section_1_2(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_1_3:\n dataObj = getGSTComputation_Sales_Section_1_3(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_2:\n dataObj = getGSTComputation_Sales_Section_2(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_2_2:\n dataObj = getGSTComputation_Sales_Section_2_2(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_3:\n dataObj = getGSTComputation_Sales_Section_3(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_3_1:\n dataObj = getGSTComputation_Sales_Section_3_1(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_4:\n dataObj = getGSTComputation_Sales_Section_4(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_4_1:\n dataObj = getGSTComputation_Sales_Section_4_1(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_4_2:\n dataObj = getGSTComputation_Sales_Section_4_2(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_7:\n dataObj = getGSTComputation_Sales_Section_7(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_7_1:\n dataObj = getGSTComputation_Sales_Section_7_1(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_7_2:\n dataObj = getGSTComputation_Sales_Section_7_2(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_7_3:\n dataObj = getGSTComputation_Sales_Section_7_3(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_7_4:\n dataObj = getGSTComputation_Sales_Section_7_4(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_7_5:\n dataObj = getGSTComputation_Sales_Section_7_5(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_8:\n dataObj = getGSTComputation_Sales_Section_8(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_9:\n dataObj = getGSTComputation_Sales_Section_9(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_9_1:\n dataObj = getGSTComputation_Sales_Section_9_1(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_9_2:\n dataObj = getGSTComputation_Sales_Section_9_2(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_10:\n dataObj = getGSTComputation_Sales_Section_10(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_10_1:\n dataObj = getGSTComputation_Sales_Section_10_1(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_SALES_10_2:\n dataObj = getGSTComputation_Sales_Section_10_2(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_1:\n dataObj = getGSTComputation_Purchase_Section_1(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_1_1:\n dataObj = getGSTComputation_Purchase_Section_1_1(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_2:\n dataObj = getGSTComputation_Purchase_Section_2(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_3:\n dataObj = getGSTComputation_Purchase_Section_3(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_3_1:\n dataObj = getGSTComputation_Purchase_Section_3_1(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_3_2:\n dataObj = getGSTComputation_Purchase_Section_3_2(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_4:\n dataObj = getGSTComputation_Purchase_Section_4(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_5:\n dataObj = getGSTComputation_Purchase_Section_5(params);\n break;\n\n case GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_6:\n dataObj = getGSTComputation_Purchase_Section_6(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_7:\n dataObj = getGSTComputation_Purchase_Section_7(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_7_1:\n dataObj = getGSTComputation_Purchase_Section_7_1(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_7_2:\n dataObj = getGSTComputation_Purchase_Section_7_2(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_11:\n dataObj = getGSTComputation_Purchase_Section_11(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_12:\n dataObj = getGSTComputation_Purchase_Section_12(params);\n break;\n case GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_11_10:\n dataObj = getGSTComputation_Purchase_Section_11_10(params);\n break; \n case GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_13_1:\n dataObj = getGSTComputation_Purchase_Section_13_1(params);\n break; \n }\n\n dataJArr = dataObj.has(\"data\") ? dataObj.optJSONArray(\"data\") : new JSONArray();\n JSONArray pagedJson = new JSONArray();\n pagedJson = dataJArr;\n if (!StringUtil.isNullOrEmpty(start) && !StringUtil.isNullOrEmpty(limit)) {\n pagedJson = StringUtil.getPagedJSON(pagedJson, Integer.parseInt(start), Integer.parseInt(limit));\n }\n object.put(\"totalCount\", dataJArr.length());\n object.put(\"columns\", jarrColumns);\n object.put(\"coldata\", pagedJson);\n jMeta.put(\"totalProperty\", \"totalCount\");\n jMeta.put(\"root\", \"coldata\");\n jMeta.put(\"fields\", jarrRecords);\n object.put(\"metaData\", jMeta);\n return object;\n }",
"@Override\npublic JsonArray queryStatistics(String date, Employee em) throws Exception {\n\tint [] montharr= {31,28,31,30,31,30,31,31,30,31,30,31};\n\tSystem.out.println(date);\n\tint year;\n\tint month;\n\tif(date.length()==0){\n\t\tmonth = new Date().getMonth()+1;\n\t\tyear= new Date().getYear()+1900;\n\t}else{\n\t\tString[] s=date.split(\"-\");\n\t\tyear=Integer.parseInt(s[0]);\n\t\tmonth=Integer.parseInt(s[1]);\n\t}\n\t\n\t\n\tList<Map<String,Object>> lstMap = new LinkedList<Map<String,Object>>();\n\tfor (int i = 1; i <=montharr[month-1] ; i++) {\n\t\tStringBuffer buffer =new StringBuffer(\"select SUM(c.golds) from consumption c,machineinfo m where c.fmachineid=m.id and m.state!=-1 and c.type=-1 and m.empid=\")\n\t\t\t\t.append(em.getId()).append(\" and year(c.createtime) =\").append(year)\n\t\t\t\t.append(\" and month(c.createtime) =\").append(month).append(\" and day(c.createtime) =\").append(i);;\n\t\t\t\tSystem.out.println(buffer);\n\t\t\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\t\t\tList<Object> lst = databaseHelper.getResultListBySql(buffer.toString());\n\t\t\t\t\n\t\t\t\tmap.put(\"nums\", lst==null?\"0\":lst.size()==0?\"0\":lst.get(0)==null?\"0\":lst.get(0).toString());\n\t\t\t\tmap.put(\"time\", i+\"日\");\n\t\t\t\tmap.put(\"month\", month);\n\t\t\t\tlstMap.add(map);\n\t}\n\tString result = new Gson().toJson(lstMap);\n\tJsonArray jarr = (JsonArray) new JsonParser().parse(result);\n\treturn jarr;\n}",
"AggregationBuilder buildAggregation();",
"@Override\n protected void printAggregates() {\n printRetrieveStudyAggregates(queryInstancesAggregates, firstResponseAggregates,\n firstFrameAggregates, totalAggregates, transferRateAggregates, frameRateAggregates);\n }",
"public DbIterator iterator() {\n \t\tArrayList<Tuple> tuples = new ArrayList<Tuple>(); //tuples to return\n TupleDesc desc;\n String[] names;\n\t \tType[] types;\n\t \t// these will be the TupleDesc to return\n\t \tif (gbfield == Aggregator.NO_GROUPING){\n\t \t\tnames = new String[] {\"aggregateVal\"};\n\t \t\ttypes = new Type[] {Type.INT_TYPE};\n\t \t} else {\n\t \t\tnames = new String[] {\"groupVal\", \"aggregateVal\"};\n\t \t\ttypes = new Type[] {gbfieldtype, Type.INT_TYPE};\n\t \t}\n\t \tdesc = new TupleDesc(types, names);\n\t \t\n\t \tTuple toAdd;\n\t \t// iterate over the GROUP BY entries and make the tuples\n\t \tIterator<Map.Entry<Field, Integer>> it = gbcount.entrySet().iterator();\n\t \tMap.Entry<Field, Integer> nextfield;\n\t \tint aggregateVal = 0;\n\t \twhile(it.hasNext()) {\n\t \t\tnextfield = it.next();\n\t \t\taggregateVal = nextfield.getValue();\n\t \t\ttoAdd = new Tuple(desc);\n\t \t\tif(gbfield == Aggregator.NO_GROUPING) {\n\t \t\t\ttoAdd.setField(0, new IntField(aggregateVal));\n\t \t\t} else {\n\t \t\t\ttoAdd.setField(0, nextfield.getKey());\n\t \t\t\ttoAdd.setField(1, new IntField(aggregateVal));\n\t \t\t}\n\t \t\ttuples.add(toAdd);\n\t \t}\n\t \treturn new TupleIterator(desc, tuples);\n }",
"@Override\n\tpublic List<Goods> selectPage(int page, int rows) {\n\t\tString sql=\"select g.g_id gid,g.gt_id gtid,g.g_name gname,g.g_date gdate,g.g_picture gpicture,g.g_price gprice,g.g_star gstar,g.g_info ginfo ,gt.gt_name gtname from goods g,goodstype gt where g.gt_id=gt.gt_id limit ?,?\";\n\t\treturn queryAll(sql,Goods.class,new Object[]{(page-1)*rows,rows});\n\t\t\n\t}",
"@Override\n public ResultSet getResultsForAllPaged(String onyen, String assignment, String type, String course, String section, String year, String season, int page, int pageSize) throws SQLException {\n StringBuilder statement = new StringBuilder();\n int count = 0;\n statement.append(\"SELECT * FROM (\\n\");\n if (onyen != null && !onyen.isEmpty()) {\n count++;\n statement.append(\"SELECT * FROM result WHERE assignment_submission_id IN (SELECT id FROM assignment_submission WHERE user_uid IN (SELECT uid FROM user WHERE onyen = ?))\");\n }\n if (assignment != null && !assignment.isEmpty()) {\n if (count > 0) {\n statement.append(\"\\nUNION ALL\\n\");\n }\n count++;\n statement.append(\"SELECT * FROM result WHERE assignment_submission_id IN (SELECT id FROM assignment_submission WHERE assignment_catalog_id IN (SELECT id FROM assignment_catalog WHERE name = ?))\");\n }\n if (type != null && !type.isEmpty()) {\n if (count > 0) {\n statement.append(\"\\nUNION ALL\\n\");\n }\n count++;\n statement.append(\"SELECT * FROM result WHERE assignment_submission_id IN (SELECT id FROM assignment_submission WHERE assignment_catalog_id IN (SELECT id FROM assignment_catalog WHERE assignment_type_id IN (SELECT id FROM assignment_type WHERE name = ?)))\");\n }\n if (course != null && !course.isEmpty()) {\n if (count > 0) {\n statement.append(\"\\nUNION ALL\\n\");\n }\n count++;\n statement.append(\"SELECT * FROM result WHERE assignment_submission_id IN (SELECT id FROM assignment_submission WHERE assignment_catalog_id IN (SELECT id FROM assignment_catalog WHERE course_id IN (SELECT id FROM course WHERE name = ?)))\");\n }\n if (section != null && !section.isEmpty()) {\n count++;\n if (count > 0) {\n statement.append(\"\\nUNION ALL\\n\");\n }\n statement.append(\"SELECT * FROM result WHERE assignment_submission_id IN (SELECT id FROM assignment_submission WHERE assignment_catalog_id IN (SELECT id FROM assignment_catalog WHERE course_id IN (SELECT id FROM course WHERE section = ?)))\");\n }\n if (year != null && !year.isEmpty()) {\n if (count > 0) {\n statement.append(\"\\nUNION ALL\\n\");\n }\n count++;\n statement.append(\"SELECT * FROM result WHERE assignment_submission_id IN (SELECT id FROM assignment_submission WHERE assignment_catalog_id IN (SELECT id FROM assignment_catalog WHERE course_id IN (SELECT id FROM course WHERE term_id IN (SELECT id FROM term WHERE year = ?))))\");\n }\n if (season != null && !season.isEmpty()) {\n if (count > 0) {\n statement.append(\"\\nUNION ALL\\n\");\n }\n count++;\n statement.append(\"SELECT * FROM result WHERE assignment_submission_id IN (SELECT id FROM assignment_submission WHERE assignment_catalog_id IN (SELECT id FROM assignment_catalog WHERE course_id IN (SELECT id FROM course WHERE term_id IN (SELECT id FROM term WHERE season = ?))))\");\n }\n if (count > 0) {\n statement.append(\")\\n AS result GROUP BY id HAVING count(*) = \").append(count);\n } else {\n statement.setLength(0);\n statement.append(\"SELECT * FROM result\");\n }\n statement.append(\"\\nORDER BY date DESC\");\n statement.append(\"\\nLIMIT \").append(pageSize);\n if(page > 0) {\n statement.append(\"\\nOFFSET \").append(page * pageSize);\n }\n statement.append(\";\");\n //System.out.println(statement.toString());\n PreparedStatement pstmt = connection.prepareStatement(statement.toString());\n int i = 1;\n if (onyen != null && !onyen.isEmpty()) {\n pstmt.setString(i++, onyen);\n }\n if (assignment != null && !assignment.isEmpty()) {\n pstmt.setString(i++, assignment);\n }\n if (type != null && !type.isEmpty()) {\n pstmt.setString(i++, type);\n }\n if (course != null && !course.isEmpty()) {\n pstmt.setString(i++, course);\n }\n if (section != null && !section.isEmpty()) {\n pstmt.setInt(i++, Integer.parseInt(section));\n }\n if (year != null && !year.isEmpty()) {\n pstmt.setInt(i++, Integer.parseInt(year));\n }\n if (season != null && !season.isEmpty()) {\n pstmt.setString(i, season);\n }\n //System.out.println(pstmt.toString());\n return pstmt.executeQuery();\n }",
"List<AggregatedStatistics> getSnapshotsInInterval(EventInterval eventInterval, Date startDate,\n Date endDate);",
"@Override\n\tpublic List<?> selectPage(Map<String, Object> params) {\n\t\treturn this.tableConfigDao.selectPage(params);\n\t}",
"public List<Object[]> gatherData() {\n String testDir = System.getProperty(\"test.dir\");\n logger.info(\"Data from: \" + testDir);\n String testFilter = System.getProperty(\"test.filter\");\n List<Object[]> result = new ArrayList<Object[]>();\n File testDirFile = new File(testDir);\n File rootConfigFile = new File(testDirFile, \"config.properties\");\n Properties rootProp = new Properties();\n InputStream rootIn = null;\n try {\n rootIn = new FileInputStream(rootConfigFile);\n rootProp.load(rootIn);\n } catch (IOException e) {\n // if we can't get root properties, we just take empty root\n // properties\n rootProp = new Properties();\n } finally {\n IOUtils.closeQuietly(rootIn);\n }\n\n File[] childFiles = null;\n if (testFilter == null) {\n childFiles = testDirFile.listFiles();\n } else {\n String[] wildcards = testFilter.split(\";\");\n childFiles = testDirFile\n .listFiles((FilenameFilter) new WildcardFileFilter(\n wildcards));\n }\n int idx = 0;\n for (File child : childFiles) {\n if (child.isDirectory() && directoryContainsConfig(child)) {\n File configFile = new File(child, \"config.properties\");\n Properties prop = new Properties();\n InputStream in = null;\n try {\n in = new FileInputStream(configFile);\n prop.load(in);\n \n String parent = prop.getProperty(PARENT_CFG);\n if(parent != null) {\n \tFile parentFile = new File(child, parent);\n \tif(parentFile.exists()) {\n \t\tprop.clear();\n \t\tprop.load(new FileInputStream(parentFile));\n \t\tprop.load(new FileInputStream(configFile));\n \t}\n }\n \n if (isSupportedTestType(prop)) {\n Object[] data = extractDataFromConfig(configFile,\n rootProp, prop);\n result.add(data);\n String testName = idx + \"-\" + data[1].toString();\n ((BaseSignatureTestData)data[2]).setUniqueUnitTestName(testName);\n idx++;\n }\n } catch (IOException e) {\n logger.warn(\n \"Could not run test with config:\"\n + configFile.getAbsolutePath(), e);\n } finally {\n if (in != null)\n IOUtils.closeQuietly(in);\n }\n }\n }\n return result;\n }",
"protected List<Aggregation> getAggregations(QueryContext queryContext) {\n\t\t\n\t\tif (_log.isDebugEnabled()) {\n\t\t\t_log.debug(\"Getting aggregations.\");\n\t\t}\n\n\t\tif (_aggregationBuilders == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tList<Aggregation> aggregations = new ArrayList<Aggregation>();\n\t\t\t\t\n\t\tfor (AggregationsBuilder aggregationBuilder : _aggregationBuilders) {\n\n\t\t\tif (_log.isDebugEnabled()) {\n\t\t\t\t_log.debug(\n\t\t\t\t\t\"Executing \" +\n\t\t\t\t\t\taggregationBuilder.getClass().getName());\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\taggregations.addAll(\n\t\t\t\t\taggregationBuilder.buildAggregation(queryContext));\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\t_log.error(e.getMessage(), e);\n\t\t\t}\n\t\t}\n\n\t\treturn aggregations;\n\t}",
"private static void DoGroupBy()\n\t{\n\n\t\tArrayList<Attribute> inAtts = new ArrayList<Attribute>();\n\t\tinAtts.add(new Attribute(\"Int\", \"o_orderkey\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"o_custkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderstatus\"));\n\t\tinAtts.add(new Attribute(\"Float\", \"o_totalprice\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderdate\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderpriority\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_clerk\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"o_shippriority\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Str\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Float\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att4\"));\n\n\t\tArrayList<String> groupingAtts = new ArrayList<String>();\n\t\tgroupingAtts.add(\"o_orderdate\");\n\t\tgroupingAtts.add(\"o_orderstatus\");\n\n\t\tHashMap<String, AggFunc> myAggs = new HashMap<String, AggFunc>();\n\t\tmyAggs.put(\"att1\", new AggFunc(\"none\",\n\t\t\t\t\"Str(\\\"status: \\\") + o_orderstatus\"));\n\t\tmyAggs.put(\"att2\", new AggFunc(\"none\", \"Str(\\\"date: \\\") + o_orderdate\"));\n\t\tmyAggs.put(\"att3\", new AggFunc(\"avg\", \"o_totalprice * Int (100)\"));\n\t\tmyAggs.put(\"att4\", new AggFunc(\"sum\", \"Int (1)\"));\n\n\t\t// run the selection operation\n\t\ttry\n\t\t{\n\t\t\tnew Grouping(inAtts, outAtts, groupingAtts, myAggs, \"orders.tbl\", \"out.tbl\", \"g++\", \"cppDir/\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}",
"public PagingOutput<DerivedProjectDataSetOutputModel> queryDerivedDataSet(QueryDerivedDataSetApi.Input input) {\n Where where = Where\n .create()\n .equal(\"projectId\", input.getProjectId())\n .equal(\"dataSetId\", input.getDataSetId())\n .equal(\"sourceFlowId\", input.getSourceFlowId())\n .equal(\"sourceJobId\", input.getSourceJobId());\n\n if (input.getSourceType() == null) {\n where.notEqual(\"sourceType\", null, false);\n } else {\n where.equal(\"sourceType\", input.getSourceType());\n }\n\n where.orderBy(\"createdTime\", OrderBy.desc);\n\n PagingOutput<ProjectDataSetMySqlModel> page = projectDataSetRepo.paging(where.build(ProjectDataSetMySqlModel.class), input);\n\n List<DerivedProjectDataSetOutputModel> list = page\n .getList()\n .parallelStream()\n .map(this::buildDerivedProjectDataSetOutputModel)\n .collect(Collectors.toList());\n\n return PagingOutput.of(page.getTotal(), list);\n\n }",
"Data<List<Pins>> getSearchPins(String query, Integer limit);",
"public void setMaxResult() {\n try {\n StringBuilder sql = new StringBuilder(\"select count(*) from LAPTOP_DATA a, LAPTOP_CONFIGURATION b where a.ID = b.LAPTOP_DATA_ID AND 1=1 \");\n ArrayList param = new ArrayList();\n if(laptop != null){\n if(laptop.getWeb() != null && !\"\".equals(laptop.getWeb())){\n sql.append(\" AND web = ? \");\n param.add(laptop.getWeb());\n }\n\n if(laptop.getBrand() != null && !\"\".equals(laptop.getBrand())){\n if(\"null\".equals(laptop.getBrand())){\n sql.append(\" AND brand is null \");\n }else{\n sql.append(\" AND brand = ? \");\n param.add(laptop.getBrand());\n }\n }\n\n if(laptop.getName() != null && !\"\".equals(laptop.getName())){\n sql.append(\" AND lower(name) like ? \");\n param.add(\"%\" + laptop.getName().toLowerCase() + \"%\");\n }\n\n if(laptop.getModel() != null && !\"\".equals(laptop.getModel())){\n if(\"null\".equals(laptop.getModel().toLowerCase())){\n sql.append(\" AND model is null \");\n }else{\n sql.append(\" AND lower(model) like ? \");\n param.add(laptop.getModel().toLowerCase());\n }\n }\n\n if(laptop.getChip() != null && !\"\".equals(laptop.getChip())){\n if(\"null\".equals(laptop.getChip())){\n sql.append(\" AND chip is null \");\n }else{\n sql.append(\" AND chip = ? \");\n param.add(laptop.getChip());\n }\n }\n\n if(laptop.getSpeed() != null && !\"\".equals(laptop.getSpeed())){\n if(\"null\".equals(laptop.getSpeed().toLowerCase())){\n sql.append(\" AND speed is null \");\n }else{\n sql.append(\" AND speed = ? \");\n param.add(laptop.getSpeed());\n }\n }\n\n if(laptop.getStorage() != null && !\"\".equals(laptop.getStorage())){\n if(\"null\".equals(laptop.getStorage())){\n sql.append(\" AND storage is null \");\n }else{\n sql.append(\" AND storage = ? \");\n param.add(laptop.getStorage());\n }\n }\n\n if(laptop.getHddType() != null && !\"\".equals(laptop.getHddType())){\n if(\"null\".equals(laptop.getHddType())){\n sql.append(\" AND hdd_Type is null \");\n }else{\n sql.append(\" AND hdd_Type = ? \");\n param.add(laptop.getHddType());\n }\n }\n\n if(laptop.getRam() != null && !\"\".equals(laptop.getRam())){\n if(\"null\".equals(laptop.getRam())){\n sql.append(\" AND ram is null \");\n }else{\n sql.append(\" AND ram = ? \");\n param.add(laptop.getRam());\n }\n }\n\n if(laptop.getVga() != null && !\"\".equals(laptop.getVga())){\n if(\"null\".equals(laptop.getVga())){\n sql.append(\" AND vga is null \");\n }else{\n sql.append(\" AND vga = ? \");\n param.add(laptop.getVga());\n }\n }\n\n if(laptop.getScreen() != null && !\"\".equals(laptop.getScreen())){\n if(\"null\".equals(laptop.getScreen().toLowerCase())){\n sql.append(\" AND screen is null \");\n }else{\n sql.append(\" AND screen = ? \");\n param.add(laptop.getScreen());\n }\n }\n\n if(laptop.getTouchscreen() != null && !\"\".equals(laptop.getTouchscreen())){\n if(\"null\".equals(laptop.getTouchscreen())){\n sql.append(\" AND touchscreen is null \");\n }else{\n sql.append(\" AND touchscreen = ? \");\n param.add(laptop.getTouchscreen());\n }\n }\n\n if(laptop.getOs() != null && !\"\".equals(laptop.getOs())){\n if(\"null\".equals(laptop.getOs())){\n sql.append(\" AND os is null \");\n }else{\n sql.append(\" AND os = ? \");\n param.add(laptop.getOs());\n }\n }\n\n if(laptop.getDvd() != null && !\"\".equals(laptop.getDvd())){\n if(\"null\".equals(laptop.getDvd())){\n sql.append(\" AND dvd is null \");\n }else{\n sql.append(\" AND dvd = ? \");\n param.add(laptop.getDvd());\n }\n }\n \n if(laptop.getBattery() != null && !\"\".equals(laptop.getBattery())){\n if(\"null\".equals(laptop.getBattery())){\n sql.append(\" AND battery is null \");\n }else{\n sql.append(\" AND battery = ? \");\n param.add(laptop.getBattery());\n }\n }\n\n if(laptop.getApprove() != null && \"on\".equals(laptop.getApprove())){\n sql.append(\" and approve = 'N' \");\n }\n if(laptop.getToday() != null && \"on\".equals(laptop.getToday())){\n sql.append(\" and Cast(a.last_update as date) = CAST(getdate() as date) \");\n }\n }\n\n SQLQuery query = getSession().createSQLQuery(sql.toString());\n for (int i = 0; i < param.size(); i++) {\n query.setParameter(i, param.get(i));\n }\n List lst = query.list();\n Integer countRecord = (Integer) lst.get(0);\n if (String.valueOf(count).length() >= 6) {\n count = countRecord.intValue();\n }\n jsonDataGrid.setTotalRows(countRecord.intValue());\n } catch (Exception ex) {\n jsonDataGrid.setTotalRows(0);\n ex.printStackTrace();\n }\n }",
"public SearchRequestBuilder getListSearch(ESQuery query, String index) {\n\n\t\t// Group Aggregation\n\t\tString dimField = query.getDimField();\n\t\tTermsBuilder termsBuilder = AggregationBuilders.terms(dimField).field(dimField);\n\n\t\t// Group Filter\n\t\t/*List<ESFilter> aggFilter = query.getAggFilter();\n\t\tif (null != aggFilter) {\n\t\t\ttermsBuilder.collectMode(mode);\n\t\t}*/\n\t\t\n\t\t// Group Sum Aggregation\n\t\tfor (ConfigColumn column : query.getIdxList()) {\n\t\t\tString field = column.getField();\n\t\t\ttermsBuilder.subAggregation(AggregationBuilders.sum(field).field(field));\n\t\t}\n\n\t\t// Group Order\n\t\tConfigColumn sortField = query.getSortField();\n\t\tif (sortField != null) {\n\t\t\tif (sortField.getDim() == 1) {\n\t\t\t\ttermsBuilder.order(Terms.Order.term(query.isAsc()));\n\t\t\t} else {\n\t\t\t\tString fieldName = sortField.getField();\n\t\t\t\ttermsBuilder.order(Terms.Order.aggregation(fieldName, query.isAsc()));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Set Pagination\n\t\tPagination page = query.getPage();\n\t\tif (null != page) {\n\t\t\tint from = page.getFrom();\n\t\t\tint size = page.getPageSize();\n\t\t\ttermsBuilder.size(Math.max(max, from + size));\n\t\t} else {\n\t\t\ttermsBuilder.size(max);\n\t\t}\n\t\t\n\t\t// Construct Search Builder\n\t\tSearchRequestBuilder esSearch = getClient().prepareSearch(index).setTypes(type);\n\t\tesSearch.addAggregation(termsBuilder).setQuery(query.getQueryBuilder());\n\n\t\treturn esSearch;\n\t}",
"public int getRowsPerPage();",
"@Override\n public ArrayList<SamleImageDetails> getGroupingSampleImageLinks(String groupingId) throws PEPPersistencyException{\n \tLOGGER.info(\"inside getSampleImageLinksDetails()dao impl\");\n \tList<SamleImageDetails> sampleImgList = new ArrayList<SamleImageDetails>();\n \tSession session = this.sessionFactory.openSession();\n Query query = null; \n query = session.createSQLQuery(xqueryConstants.getGroupingSampleImageLinks());\n query.setParameter(0, groupingId); \n query.setFetchSize(1);\n List<Object[]> rows = query.list();\n try{\n for(Object[] row : rows){ \t\n \tSamleImageDetails sampleImage = new SamleImageDetails(); \t\n \tsampleImage.setOrinNo(row[0]!=null?row[0].toString():null);\n \tsampleImage.setImageId(row[1]!=null?row[1].toString():null);\n \tif(row[2]!=null){\n \t\tsampleImage.setImageName(row[2]!=null?row[2].toString():null);\n \t}else {\n \t\tsampleImage.setImageName(\"\");\n \t}\n \tif(row[3] !=null){\n \t\tsampleImage.setOriginalImageName(row[3]!=null?row[3].toString():null);\n \t}else{\n \t\tsampleImage.setOriginalImageName(\"\");\n \t} \t\n \tsampleImage.setImageShotType(row[4]!=null?row[4].toString():null);\n \tif(row[5] !=null){\n \t\t\tsampleImage.setLinkStatus(row[5]!=null?row[5].toString():null);\n \t\t \t\t\n \t}\n \tif(row[7] !=null){ \t\t\t\n \t\t\tsampleImage.setImageStatus(row[7]!=null?row[7].toString():null);\n \t} \n \t\n \tsampleImgList.add(sampleImage);\n }\n }catch(Exception e){\n \tLOGGER.error(\"inside getGroupingSampleImageLinks \",e);\n \te.printStackTrace();\n }\n finally{ \n \t session.close();\n }\n \treturn (ArrayList<SamleImageDetails>) sampleImgList; \n \t\n }",
"public StringBuilder adminBatchAddConsumerGroupInfo(HttpServletRequest req) throws Exception {\n StringBuilder sBuilder = new StringBuilder(512);\n try {\n WebParameterUtils.reqAuthorizeCheck(master, brokerConfManager,\n req.getParameter(\"confModAuthToken\"));\n String createUser =\n WebParameterUtils.validStringParameter(\"createUser\",\n req.getParameter(\"createUser\"),\n TBaseConstants.META_MAX_USERNAME_LENGTH,\n true, \"\");\n Date createDate =\n WebParameterUtils.validDateParameter(\"createDate\",\n req.getParameter(\"createDate\"),\n TBaseConstants.META_MAX_DATEVALUE_LENGTH,\n false, new Date());\n List<Map<String, String>> jsonArray =\n WebParameterUtils.checkAndGetJsonArray(\"groupNameJsonSet\",\n req.getParameter(\"groupNameJsonSet\"),\n TBaseConstants.META_VALUE_UNDEFINED, true);\n if ((jsonArray == null) || (jsonArray.isEmpty())) {\n throw new Exception(\"Null value of groupNameJsonSet, please set the value first!\");\n }\n Set<String> configuredTopicSet = brokerConfManager.getTotalConfiguredTopicNames();\n HashMap<String, BdbConsumerGroupEntity> inGroupAuthConfEntityMap =\n new HashMap<>();\n for (int j = 0; j < jsonArray.size(); j++) {\n Map<String, String> groupObject = jsonArray.get(j);\n try {\n String groupName =\n WebParameterUtils.validGroupParameter(\"groupName\",\n groupObject.get(\"groupName\"),\n TBaseConstants.META_MAX_GROUPNAME_LENGTH,\n true, \"\");\n String groupTopicName =\n WebParameterUtils.validStringParameter(\"topicName\",\n groupObject.get(\"topicName\"),\n TBaseConstants.META_MAX_TOPICNAME_LENGTH,\n true, \"\");\n String groupCreateUser =\n WebParameterUtils.validStringParameter(\"createUser\",\n groupObject.get(\"createUser\"),\n TBaseConstants.META_MAX_USERNAME_LENGTH,\n false, null);\n Date groupCreateDate =\n WebParameterUtils.validDateParameter(\"createDate\",\n groupObject.get(\"createDate\"),\n TBaseConstants.META_MAX_DATEVALUE_LENGTH,\n false, null);\n if ((TStringUtils.isBlank(groupCreateUser))\n || (groupCreateDate == null)) {\n groupCreateUser = createUser;\n groupCreateDate = createDate;\n }\n if (!configuredTopicSet.contains(groupTopicName)) {\n throw new Exception(sBuilder.append(\"Topic \").append(groupTopicName)\n .append(\" not configure in master configure, please configure first!\").toString());\n }\n String recordKey = sBuilder.append(groupName)\n .append(\"-\")\n .append(groupTopicName).toString();\n sBuilder.delete(0, sBuilder.length());\n inGroupAuthConfEntityMap.put(recordKey,\n new BdbConsumerGroupEntity(groupTopicName,\n groupName, groupCreateUser, groupCreateDate));\n } catch (Exception ee) {\n sBuilder.delete(0, sBuilder.length());\n throw new Exception(sBuilder.append(\"Process data exception, data is :\")\n .append(groupObject.toString()).append(\", exception is : \")\n .append(ee.getMessage()).toString());\n }\n\n }\n if (inGroupAuthConfEntityMap.isEmpty()) {\n throw new Exception(\"Not found record in groupNameJsonSet parameter\");\n }\n for (BdbConsumerGroupEntity tmpGroupEntity : inGroupAuthConfEntityMap.values()) {\n BdbTopicAuthControlEntity topicAuthControlEntity =\n brokerConfManager.getBdbEnableAuthControlByTopicName(tmpGroupEntity.getGroupTopicName());\n if (topicAuthControlEntity == null) {\n try {\n brokerConfManager.confSetBdbTopicAuthControl(\n new BdbTopicAuthControlEntity(tmpGroupEntity.getGroupTopicName(),\n false, createUser, createDate));\n } catch (Exception ee) {\n //\n }\n }\n brokerConfManager.confAddAllowedConsumerGroup(tmpGroupEntity);\n }\n sBuilder.append(\"{\\\"result\\\":true,\\\"errCode\\\":0,\\\"errMsg\\\":\\\"OK\\\"}\");\n } catch (Exception e) {\n sBuilder.delete(0, sBuilder.length());\n sBuilder.append(\"{\\\"result\\\":false,\\\"errCode\\\":400,\\\"errMsg\\\":\\\"\")\n .append(e.getMessage()).append(\"\\\"}\");\n }\n return sBuilder;\n }",
"public AggregatorsResource() {\n ConfigSingleton.setRepoxContextUtil(new DefaultRepoxContextUtil());\n dataManager = ((DefaultDataManager)ConfigSingleton.getRepoxContextUtil().getRepoxManager().getDataManager());\n }",
"List<Map<String,Object>> getConfigList(Request request, String configtype);",
"public DbIterator iterator() {\n // some code goes here\n ArrayList<Tuple> tuples = new ArrayList<Tuple>();\n for (Field key : m_aggregateData.keySet()) {\n \tTuple nextTuple = new Tuple(m_td);\n \tint recvValue;\n \t\n \tswitch (m_op) {\n \tcase MIN: case MAX: case SUM:\n \t\trecvValue = m_aggregateData.get(key);\n \t\tbreak;\n \tcase COUNT:\n \t\trecvValue = m_count.get(key);\n \t\tbreak;\n \tcase AVG:\n \t\trecvValue = m_aggregateData.get(key) / m_count.get(key);\n \t\tbreak;\n \tdefault:\n \t\trecvValue = setInitData(); // shouldn't reach here\n \t}\n \t\n \tField recvField = new IntField(recvValue);\n \tif (m_gbfield == NO_GROUPING) {\n \t\tnextTuple.setField(0, recvField);\n \t}\n \telse {\n \t\tnextTuple.setField(0, key);\n \t\tnextTuple.setField(1, recvField);\n \t}\n \ttuples.add(nextTuple);\n }\n return new TupleIterator(m_td, tuples);\n }",
"PagingLoadResult<GWTJahiaJobDetail> getJobs(int offset, int limit, String sortField, String sortDir, String groupState, List<String> groupNames) throws GWTJahiaServiceException;",
"@Override\n @Transactional\n public Page pageQuery(String orgcode, String cnname, String startdate, String enddate, String pageno) {\n p.setPageno(Integer.parseInt(pageno));\n List<En> ens = ed.pageQuery(orgcode,cnname,startdate,enddate);\n p.setTotalsize(ens.size());\n p.setTotalpage((p.getTotalsize()%p.getPagesize())==0?p.getTotalsize()/p.getPagesize():p.getTotalsize()/p.getPagesize()+1);\n PageHelper.startPage(Integer.parseInt(pageno),p.getPagesize());\n List<En> ens1 = ed.pageQuery(orgcode,cnname,startdate,enddate);\n p.setInvs(ens1);\n return p;\n }",
"public ArrayList getDimensions(String grpId) {\r\n ArrayList finalList = new ArrayList();\r\n// PbBussGrpResourceBundle resBundle = new PbBussGrpResourceBundle();\r\n try {\r\n\r\n PbReturnObject retObj = null;\r\n String finalQuery = null;\r\n String[] colNames = null;\r\n Object obj[] = new Object[1];\r\n obj[0] = grpId;\r\n String sql = getResourceBundle().getString(\"getBusinessGroupDimList\");\r\n finalQuery = buildQuery(sql, obj);\r\n retObj = execSelectSQL(finalQuery);\r\n colNames = retObj.getColumnNames();\r\n for (int i = 0; i < retObj.getRowCount(); i++) {\r\n BusinessGrpsTreeTable dimension = new BusinessGrpsTreeTable();\r\n dimension.setDimensionName(retObj.getFieldValueString(i, colNames[1]));\r\n dimension.setDimensionId(String.valueOf(retObj.getFieldValueInt(i, colNames[0])));\r\n ArrayList tableList = new ArrayList();\r\n\r\n tableList = getTableList(String.valueOf(retObj.getFieldValueInt(i, colNames[0])), grpId);\r\n dimension.setDimTableList(tableList);\r\n ArrayList membersList = new ArrayList();\r\n membersList = getMembersList(String.valueOf(retObj.getFieldValueInt(i, colNames[0])), grpId);\r\n dimension.setDimMembersList(membersList);\r\n ArrayList hierarchyList = new ArrayList();\r\n hierarchyList = getHeirarchyList(String.valueOf(retObj.getFieldValueInt(i, colNames[0])), grpId);\r\n dimension.setDimHierarchyList(hierarchyList);\r\n //.println.println(\"hierarchy list==\" + hierarchyList.size());\r\n finalList.add(dimension);\r\n }\r\n } catch (Exception e) {\r\n logger.error(\"Exception:\", e);\r\n }\r\n\r\n return finalList;\r\n }",
"@Test\n public void testAggregationOnly() {\n AggregationOperator aggregationOperator = getOperator(AGGREGATION_QUERY);\n AggregationResultsBlock resultsBlock = aggregationOperator.nextBlock();\n QueriesTestUtils.testInnerSegmentExecutionStatistics(aggregationOperator.getExecutionStatistics(), 30000L, 0L,\n 120000L, 30000L);\n QueriesTestUtils.testInnerSegmentAggregationResult(resultsBlock.getResults(), 30000L, 32317185437847L, 2147419555,\n 1689277, 28175373944314L, 30000L);\n\n // Test query with filter.\n aggregationOperator = getOperator(AGGREGATION_QUERY + FILTER);\n resultsBlock = aggregationOperator.nextBlock();\n QueriesTestUtils.testInnerSegmentExecutionStatistics(aggregationOperator.getExecutionStatistics(), 6129L, 63064L,\n 24516L, 30000L);\n QueriesTestUtils.testInnerSegmentAggregationResult(resultsBlock.getResults(), 6129L, 6875947596072L, 999813884,\n 1980174, 4699510391301L, 6129L);\n }",
"@Override\r\n\tpublic PageDataList<CustomerBaseinfoModel> customerBaseinfoList(int pageNumber,int pageSize,CustomerBaseinfoModel model) {\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tsb.append(\" select distinct w.id,w.name,u.real_name,c.sex,u.mobile_phone, \")\r\n\t\t .append(\" (DATE_FORMAT(CURDATE(),'%Y') - SUBSTR(u.card_id,7,4)) age, \")\r\n\t\t .append(\" u.card_id, ab.bank_no,ab.bank,u.add_time,i.real_name_verify_time as real_name_time,i.real_name_verify_time as bind_card_time, \")\r\n\t\t .append(\" c.status,p.coupon_code,a.use_money,u.user_id from rd_user u \")\r\n\t\t .append(\" LEFT JOIN ehb_wealth_user wu ON u.user_id = wu.user_id \")\r\n\t\t .append(\" LEFT JOIN ehb_zc_wealth_manager_user m ON wu.id = m.wealth_user_id \")\t\t\r\n\t\t .append(\" left join ehb_zc_wealth_manager w on m.wealth_manager_id = w.id \" )\r\n\t\t .append(\" left join rd_user_identify i on u.user_id = i.user_id \")\r\n\t\t .append(\" left join rd_user_base_info b on u.user_id = b.user_id \" )\r\n\t\t .append(\" left join rd_user_cache c on u.user_id = c.user_id \" )\r\n\t\t .append(\" left join rd_account_bank ab on u.user_id = ab.user_id \")\r\n\t\t .append(\" left join rd_user_invite ui on u.user_id = ui.user_id \")\r\n\t\t .append(\" left join rd_user_promot p on ui.invite_user = p.user_id \")\r\n\t\t .append(\" left join rd_account a on u.user_id = a.user_id where ab.status = 1 \");\r\n\t\tString strSql = sb.toString();\r\n\t if (!StringUtil.isBlank(model.getSearchName())) {\r\n\t \tstrSql += \" and (u.mobile_phone like '%\" + model.getSearchName() + \"%' \" + \r\n \t \" or u.real_name like '%\" + model.getSearchName() + \"%') \";\r\n\t\t} \r\n\t\tQuery query = em.createNativeQuery(strSql);\r\n\t\tPage page = new Page(query.getResultList().size(), pageNumber,pageSize);\r\n\t\tquery.setFirstResult((pageNumber - 1) * pageSize);\r\n\t\tquery.setMaxResults(pageSize);\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Object[]> list = query.getResultList();\r\n\t\tPageDataList<CustomerBaseinfoModel> pageDataList_ = new PageDataList<CustomerBaseinfoModel>();\r\n List<CustomerBaseinfoModel> cpmList = new ArrayList<CustomerBaseinfoModel>();\r\n pageDataList_.setPage(page);\r\n int i = 1;\r\n \tfor (Object[] o : list) {\r\n \t\tCustomerBaseinfoModel customer = new CustomerBaseinfoModel();\r\n\t\t\tcustomer.setId(i);\r\n\t\t\tcustomer.setSaleCode(o[0]==null?\"\":o[0].toString());\r\n\t\t\tcustomer.setSaleName(o[1]==null?\"\":o[1].toString());\r\n\t\t\tcustomer.setRealName(o[2]==null?\"\":o[2].toString());\r\n\t\t\tcustomer.setSex(o[3]==null?0:((Boolean)o[3]?1:0));\r\n\t\t\tcustomer.setPhone(o[4]==null?\"\":o[4].toString());\r\n\t\t\tcustomer.setAge(o[5]==null?0:((Double)o[5]).intValue());\r\n\t\t\tcustomer.setCertificate(o[6]==null?\"\":o[6].toString());\r\n\t\t\tcustomer.setBankNo(o[7]==null?\"\":o[7].toString());\r\n\t\t\tcustomer.setBank(o[8]==null?\"\":o[8].toString());\r\n\t\t\tcustomer.setRegisterTime(o[9]==null?new Date():(Date)o[9]);\r\n\t\t\tcustomer.setRealNameTime(o[10]==null?new Date():(Date)o[10]);\r\n\t\t\tcustomer.setBindCardTime(o[11]==null?new Date():(Date)o[11]);\r\n\t\t\tcustomer.setAccountState(o[12]==null?0:((Boolean)o[12]?1:0));\r\n\t\t\tcustomer.setRecommendCode(o[13]==null?\"\":o[13].toString());\r\n\t\t\tcustomer.setUseMoney(o[14]==null?0:Double.parseDouble(o[14].toString()));\r\n\t\t\tstrSql = \" select sum(account) from rd_borrow_tender where user_id = \" + (o[15]==null?0:Integer.parseInt(o[15].toString()));\r\n\t\t\tquery = em.createNativeQuery(strSql);\r\n\t\t\tif(query.getResultList()!=null&&query.getResultList().size()>0&&query.getResultList().get(0)!=null)\r\n\t\t\t{\r\n\t\t\t\tString money = query.getResultList().get(0).toString();\r\n\t\t\t\tcustomer.setInvestMoney(Double.parseDouble(money));\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\tcustomer.setInvestMoney(0.0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcpmList.add(customer);\r\n\t\t\ti++;\r\n \t}\r\n\t\tpageDataList_.setList(cpmList);\r\n\t\treturn pageDataList_;\r\n\t}",
"public java.util.List<DataEntry> findAll(int start, int end);",
"private void GetConfigDetails() {\n\t\tCursor c = database.rawQuery(\"select * from config\", null);\r\n\t\tif (c != null) {\r\n\t\t\tif (c.moveToFirst()) {\r\n\t\t\t\tdo {\r\n\r\n\t\t\t\t\tmuUid = c.getString(c.getColumnIndex(\"id\"));\r\n\t\t\t\t\tmuUsername = c.getString(c.getColumnIndex(\"username\"));\r\n\t\t\t\t\tmuPassword = c.getString(c.getColumnIndex(\"password\"));\r\n\t\t\t\t\tmuFname = c.getString(c.getColumnIndex(\"fname\"));\r\n\t\t\t\t\tmuLname = c.getString(c.getColumnIndex(\"lname\"));\r\n\t\t\t\t\tmuEmail = c.getString(c.getColumnIndex(\"email\"));\r\n\t\t\t\t\tmuMobile = c.getString(c.getColumnIndex(\"mobile\"));\r\n\t\t\t\t\tmuUrl = c.getString(c.getColumnIndex(\"url\"));\r\n\t\t\t\t\tmuRole = c.getString(c.getColumnIndex(\"role\"));\r\n\t\t\t\t} while (c.moveToNext());\r\n\t\t\t}\r\n\t\t}\r\n\t\tc.close();\r\n\t}",
"public StringBuilder adminBatchAddConsumeGroupSetting(HttpServletRequest req) throws Exception {\n StringBuilder sBuilder = new StringBuilder(512);\n try {\n WebParameterUtils.reqAuthorizeCheck(master, brokerConfManager,\n req.getParameter(\"confModAuthToken\"));\n String createUser =\n WebParameterUtils.validStringParameter(\"createUser\",\n req.getParameter(\"createUser\"),\n TBaseConstants.META_MAX_USERNAME_LENGTH,\n true, \"\");\n Date createDate =\n WebParameterUtils.validDateParameter(\"createDate\",\n req.getParameter(\"createDate\"),\n TBaseConstants.META_MAX_DATEVALUE_LENGTH,\n false, new Date());\n int enableBind =\n WebParameterUtils.validIntDataParameter(\"enableBind\",\n req.getParameter(\"enableBind\"),\n false, 0, 0);\n int allowedBClientRate =\n WebParameterUtils.validIntDataParameter(\"allowedBClientRate\",\n req.getParameter(\"allowedBClientRate\"),\n false, 0, 0);\n List<Map<String, String>> groupNameJsonArray =\n WebParameterUtils.checkAndGetJsonArray(\"groupNameJsonSet\",\n req.getParameter(\"groupNameJsonSet\"),\n TBaseConstants.META_VALUE_UNDEFINED, true);\n if ((groupNameJsonArray == null) || (groupNameJsonArray.isEmpty())) {\n throw new Exception(\"Null value of groupNameJsonSet, please set the value first!\");\n }\n HashMap<String, BdbConsumeGroupSettingEntity> inOffsetRstGroupEntityMap =\n new HashMap<>();\n for (int j = 0; j < groupNameJsonArray.size(); j++) {\n Map<String, String> groupObject = groupNameJsonArray.get(j);\n try {\n String groupName =\n WebParameterUtils.validGroupParameter(\"groupName\",\n groupObject.get(\"groupName\"),\n TBaseConstants.META_MAX_GROUPNAME_LENGTH,\n true, \"\");\n String groupCreateUser =\n WebParameterUtils.validStringParameter(\"createUser\",\n groupObject.get(\"createUser\"),\n TBaseConstants.META_MAX_USERNAME_LENGTH,\n false, createUser);\n Date groupCreateDate =\n WebParameterUtils.validDateParameter(\"createDate\",\n groupObject.get(\"createDate\"),\n TBaseConstants.META_MAX_DATEVALUE_LENGTH,\n false, createDate);\n int groupEnableBind =\n WebParameterUtils.validIntDataParameter(\"enableBind\",\n groupObject.get(\"enableBind\"),\n false, enableBind, 0);\n int groupAllowedBClientRate =\n WebParameterUtils.validIntDataParameter(\"allowedBClientRate\",\n groupObject.get(\"allowedBClientRate\"),\n false, allowedBClientRate, 0);\n inOffsetRstGroupEntityMap.put(groupName,\n new BdbConsumeGroupSettingEntity(groupName,\n groupEnableBind, groupAllowedBClientRate,\n \"\", groupCreateUser, groupCreateDate));\n } catch (Exception ee) {\n throw new Exception(sBuilder.append(\"Process data exception, data is :\")\n .append(groupObject.toString())\n .append(\", exception is : \")\n .append(ee.getMessage()).toString());\n }\n }\n if (inOffsetRstGroupEntityMap.isEmpty()) {\n throw new Exception(\"Not found record in groupNameJsonSet parameter\");\n }\n for (BdbConsumeGroupSettingEntity tmpGroupEntity\n : inOffsetRstGroupEntityMap.values()) {\n brokerConfManager.confAddBdbConsumeGroupSetting(tmpGroupEntity);\n }\n sBuilder.append(\"{\\\"result\\\":true,\\\"errCode\\\":0,\\\"errMsg\\\":\\\"OK\\\"}\");\n } catch (Exception e) {\n sBuilder.delete(0, sBuilder.length());\n sBuilder.append(\"{\\\"result\\\":false,\\\"errCode\\\":400,\\\"errMsg\\\":\\\"\")\n .append(e.getMessage()).append(\"\\\"}\");\n }\n return sBuilder;\n }",
"DataProviders retrieveAggregatorProviders(Aggregator agr) throws RepoxException;",
"@GetMapping(\"/all\")\n public BasePageResponse getAllGroup() throws NodeMgrException {\n BasePageResponse pageResponse = new BasePageResponse(ConstantCode.SUCCESS);\n Instant startTime = Instant.now();\n log.info(\"start getAllGroup startTime:{}\", startTime.toEpochMilli());\n\n // get group list\n int count = groupService.countOfGroup(null, GroupStatus.NORMAL.getValue());\n if (count > 0) {\n List<TbGroup> groupList = groupService.getGroupList(GroupStatus.NORMAL.getValue());\n pageResponse.setTotalCount(count);\n pageResponse.setData(groupList);\n }\n\n // reset group\n resetGroupListTask.asyncResetGroupList();\n\n log.info(\"end getAllGroup useTime:{} result:{}\",\n Duration.between(startTime, Instant.now()).toMillis(),\n JsonTools.toJSONString(pageResponse));\n return pageResponse;\n }",
"@Override\r\n protected DataSource selectAnyDataSource() {\n if (dataSourcesMtApp.isEmpty()) {\r\n List<MasterTenant> masterTenants = masterTenantRepo.findAll();\r\n LOG.info(\">>>> selectAnyDataSource() -- Total tenants:\" + masterTenants.size());\r\n for (MasterTenant masterTenant : masterTenants) {\r\n dataSourcesMtApp.put(masterTenant.getTenantId(),\r\n DataSourceUtil.createAndConfigureDataSource(masterTenant));\r\n }\r\n }\r\n return this.dataSourcesMtApp.values().iterator().next();\r\n }",
"@RequestMapping(\"org/query_group_list.shtm\")\n public void queryGroupList(HttpServletRequest req,\n HttpServletResponse resp) {\n LOG.info(\"query group list page start...\");\n \n Map<String, Object> params = getReqParams(req);\n \n // do query\n Map<String, Object> resultMap = this.service.queryGroupList(params);\n\n Map<String, Object> output = getDefaultResult();\n output.putAll(resultMap);\n outputJSON(resp, output);\n\n LOG.info(\"query group list page end.\");\n }",
"Data<List<Pins>> getSearchPins(String query, Integer limit, String fields);",
"@Override\n public Map<String, Object> queryTaskGroupByName(User loginUser, Integer pageNo, Integer pageSize, String name) {\n return this.doQuery(loginUser, pageNo, pageSize, loginUser.getId(),name, null);\n }",
"public String[] getSettingsToDisplay(String database, IDataAccessObject dataAccessObject) throws TotalADSDBMSException;",
"public interface DemandSearchMapper {\n /**\n * 微信搜索\n */\n @Select(\"select count(1) from demands where demandcode like #{content} and isdelete=0 and releasestatus=1 and checkstatus='审核通过' \")\n int getWapSearchDemandCount(@Param(\"content\")String content);\n\n @Select(\"<script>\" +\n \" select * from demands where demandcode like #{content} and isdelete=0 and releasestatus=1 and checkstatus='审核通过' \" +\n \" order by id desc \" +\n \" <choose><when test='anchor==null or anchor==\\\"\\\"'>limit #{pageQuery.pagesize} offset #{pageQuery.indexNum}</when><otherwise>limit ${pageQuery.rowNum} offset 0</otherwise></choose>\" +\n \"</script>\")\n List<Demand> getWapSearchDemandList(@Param(\"content\")String content,\n @Param(\"pageQuery\") PageQueryParam param,\n @Param(\"anchor\") String scrtop);\n\n public default PageQueryParam getWapSearchDemandTotalList(String content, PageQueryParam param, String scrtop) {\n content = Where.$like$(content);\n int totalCount = getWapSearchDemandCount(content);\n List<Demand> demandList = getWapSearchDemandList(content, param, scrtop);\n int totalPage = totalCount / param.getPagesize();\n totalPage = totalCount % param.getPagesize() == 0 ? totalPage : totalPage + 1;\n param.setTotalCount(totalCount);\n param.setTotalPage(totalPage);\n param.setList(demandList);\n //如果有锚点,加载完数据,告诉前台当前是第几页\n if (org.apache.commons.lang3.StringUtils.isNotBlank(scrtop)) {\n param.setPage(param.getIndexNum() / param.getPagesize());\n }\n return param;\n }\n\n}",
"public void select(int first, int pageSize, String sortField, Object filterValue) throws SQLException, NamingException, IOException {\n\t\n\t \t\tContext initContext = new InitialContext(); \n\t \tDataSource ds = (DataSource) initContext.lookup(JNDI);\n\t \t\tcon = ds.getConnection();\n\t \t//Reconoce la base de datos de conección para ejecutar el query correspondiente a cada uno\n\t \t\tDatabaseMetaData databaseMetaData = con.getMetaData();\n\t \t\tproductName = databaseMetaData.getDatabaseProductName();//Identifica la base de datos de conección\n\n\t \t\t\n\t \t\tString query = \"\";\n\t \t\t \t\n\t \t\tif(pcodcia==null){\n\t \t\t\tpcodcia = \" - \";\n\t }\n\t if(pcodcia==\"\"){\n\t \tpcodcia = \" - \";\n\t }\n\t \n\t \n\t \t\t//String[] veccodcia = pcodcia.split(\"\\\\ - \", -1);\n\t \n\t switch ( productName ) {\n\t case \"Oracle\":\n\t \t//Consulta paginada\n\t \tquery = \" select * from \";\n\t \tquery += \" ( select query.*, rownum as rn from\";\n\t\t \t\tquery += \" ( SELECT b.nomcia2, trim(a.p_codcia), trim(a.coduser), a.cedula, trim(a.cluser), trim(a.mail), trim(a.nbr), trim(a.codrol)||' - '||trim(c.desrol), a.grupo\";\n\t\t query += \" FROM autos01 a, pnt001 b, seg002 c\";\n\t\t query += \" where a.p_codcia=b.codcia\";\n\t\t query += \" and a.grupo=b.grupo\";\n\t\t query += \" and a.codrol=c.codrol\";\n\t\t query += \" and a.grupo=c.grupo\";\n\t\t query += \" and b.nomcia2||a.coduser||a.cedula like '%\" + ((String) filterValue).toUpperCase() + \"%'\";\n\t\t //query += \" and a.p_codcia like '\" + veccodcia[0] + \"%'\"; \n\t\t query += \" and a.grupo = '\" + grupo + \"'\";\n\t\t \t\tquery += \" order by \" + sortField.replace(\"v\", \"\") + \") query\";\n\t\t query += \" ) where rownum <= \" + pageSize ;\n\t\t query += \" and rn > (\" + first + \")\";\n\n\t break;\n\t case \"PostgreSQL\":\n\t \t//Consulta paginada\n\t\t \t\tquery = \"SELECT b.nomcia2, trim(a.p_codcia), trim(a.coduser), CAST(a.cedula AS text), trim(a.cluser), trim(a.mail), trim(a.nbr), trim(a.codrol)||' - '||trim(c.desrol), a.grupo\";\n\t\t query += \" FROM autos01 a, pnt001 b, seg002 c\";\n\t\t query += \" where a.p_codcia=b.codcia\";\n\t\t query += \" and a.grupo=b.grupo\";\n\t\t query += \" and a.codrol=c.codrol\";\n\t\t query += \" and a.grupo=c.grupo\";\n\t\t query += \" and b.nomcia2||a.coduser||a.cedula like '%\" + ((String) filterValue).toUpperCase() + \"%'\";\n\t\t //query += \" and a.p_codcia like '\" + veccodcia[0] + \"%'\"; \n\t\t query += \" and CAST(a.grupo AS text) = '\" + grupo + \"'\";\n\t\t query += \" order by \" + sortField.replace(\"v\", \"\") ;\n\t\t query += \" LIMIT \" + pageSize;\n\t\t query += \" OFFSET \" + first;\n\t break; \t\t \n\t \t\t}\n\t\n\t \t\t\n\t \t\t\n\t \t\t\n\t\n\t\n\t \n\t pstmt = con.prepareStatement(query);\n\t //System.out.println(query);\n\t \t\t\n\t ResultSet r = pstmt.executeQuery();\n\t \n\t \n\t while (r.next()){\n\t \tRegistros select = new Registros();\n\t \tselect.setVpcodcia(r.getString(1));\n\t select.setVpcodciadescia(r.getString(2) + \" - \" + r.getString(1));\n\t select.setVcedula(r.getString(4));\n\t select.setVcoduser(r.getString(3));\n\t select.setVcluser(r.getString(5));\n\t select.setVmail(r.getString(6));\n\t select.setPcodcia(r.getString(2));\n\t select.setVnbr(r.getString(7));\n\t select.setVcodrol(r.getString(8));\n\t select.setVgrupo(r.getString(9));\n\t \t//Agrega la lista\n\t \tlist.add(select);\n\t }\n\t //Cierra las conecciones\n\t pstmt.close();\n\t con.close();\n\t r.close();\n\t \n\t \t}",
"protected IDAOConfigs getDaoGenConfig(URL argUrl) {\r\n\t\tIDAOConfigs daoGenConfig = null;\r\n\t\tList<IConfigObject> configs = getConfigs(argUrl);\r\n\t\tif (!configs.isEmpty()) {\r\n\t\t\tdaoGenConfig = DAOConfigs.createInstance();\r\n\r\n\t\t\tfor (IConfigObject config : configs) {\r\n\t\t\t\tdaoGenConfig.setConfigObject(null, config);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn daoGenConfig;\r\n\t}",
"@Override\n\tpublic TransferData getDevicesbyGroupId(int pageSize, int pageIndex,\n\t\t\tString devGrpId) {\n\t\tTransferData data = new TransferData();\n\n\t\tif (!CoreSvrUtil.IsNullOrEmpty(devGrpId)) {\n\t\t\t// DBObject query = new BasicDBObject();\n\t\t\t// query.put(\"devGrpId\", devGrpId);\n\t\t\t//\n\t\t\t// Statement st = getMongoDao()\n\t\t\t// .createStatement(\n\t\t\t// MessageFormat\n\t\t\t// .format(\"FROM {0} WHERE devGrpId={3} SELECT * LIMIT {1},{2}\",\n\t\t\t// Constant.TABLE_InvDev, pageSize\n\t\t\t// * (pageIndex - 1),\n\t\t\t// pageSize, devGrpId));\n\n\t\t\tlong total = getMongoDao().getCollection(Constant.TABLE_InvDev)\n\t\t\t\t\t.count();\n\t\t\tDBObject query = new BasicDBObject();\n\n\t\t\tdata.setPageCount(CoreSvrUtil.getPageCount(total, pageSize));\n\t\t\tquery.put(\"managed\", true);\n\t\t\tquery.put(\"devGrpId\", devGrpId);\n\n\t\t\tList<InventoryDevice> devices = getMongoDao().findObjects(\n\t\t\t\t\tConstant.TABLE_InvDev, query, InventoryDevice.class)\n\t\t\t\t\t.readAll();\n\t\t\tif (devices != null && !devices.isEmpty()) {\n\t\t\t\tint start = (pageIndex - 1) * pageSize;\n\n\t\t\t\tdata.setListData(devices.subList(start, start + pageSize));\n\t\t\t}\n\t\t}\n\t\treturn data;\n\t}",
"Page<AppConfigDTO> findAll(Pageable pageable);",
"@Override\n public List<T> getAllByPaging(Integer size, Integer page) {\n PageHelper.startPage(page, size);\n return mapper.selectAll();\n }",
"String getMetadataSelectClause();",
"private static InternalCacheConfig defaultQueryCacheConfig() {\n InternalCacheConfig cacheConfig = new InternalCacheConfig();\n cacheConfig.maxIdle = Duration.ofSeconds(100);\n cacheConfig.objectCount = 10_000;\n return cacheConfig;\n }",
"private ResultSet getPaginatedArtifact(String buildNumber, Long date,\n String moduleId, String orderBy, String direction, String offset,\n String limit) throws SQLException {\n ResultSet rs;\n String buildQuery = \"SELECT distinct build_artifacts.artifact_name as name,build_artifacts.artifact_type as type,build_artifacts.sha1 FROM build_artifacts\\n\" +\n \"left join build_modules on build_modules.module_id=build_artifacts.module_id\\n\" +\n \"left join builds on build_modules.build_id = builds.build_id\\n\" +\n \"where builds.build_number = ? and builds.build_date = ? and build_modules.module_name_id = ?\";\n\n rs = jdbcHelper.executeSelect(buildQuery, buildNumber, date, moduleId);\n\n return rs;\n }",
"public JSONObject getGSTRMisMatchSummary(JSONObject params) throws ServiceException, JSONException {\n JSONObject object = new JSONObject();\n JSONObject jMeta = new JSONObject();\n JSONArray jarrColumns = new JSONArray();\n JSONArray jarrRecords = new JSONArray();\n JSONArray dataJArr = new JSONArray();\n if (params.optBoolean(\"isforstore\", false)) {\n /**\n * If request for Section combo box\n */\n return object = getGSTMisMatchReportSectionCombo();\n }\n JSONArray array = new JSONArray();\n JSONArray array1 = new JSONArray();\n String start = params.optString(\"start\");\n String limit = params.optString(\"limit\");\n String companyId = params.optString(\"companyid\");\n JSONObject reqParams = params;\n /**\n * Get column number for Entity, State,HSN,UQC etc.\n */\n JSONObject entityParams = new JSONObject();\n String entityModuleIds = Constants.Acc_Invoice_ModuleId + \",\" + Constants.Acc_Vendor_Invoice_ModuleId + \",\"\n + Constants.Acc_Sales_Order_ModuleId + \",\" + Constants.Acc_Purchase_Order_ModuleId+ \",\" + Constants.Acc_Delivery_Order_ModuleId +\",\"+ Constants.Acc_Goods_Receipt_ModuleId \n + \",\" + Constants.Acc_Credit_Note_ModuleId + \",\" + Constants.Acc_Debit_Note_ModuleId; // GET CN/ DN module entity detail\n params.put(\"moduleids\", entityModuleIds);\n params.put(\"fieldlabel\", Constants.ENTITY);\n params.put(\"fcdvalue\", reqParams.optString(\"entity\"));\n params.put(\"companyid\", reqParams.optString(\"companyid\"));\n List entityList = fieldManagerDAOobj.getEntityDataForRequestedModule(params);\n geModulewiseEntityData(entityList, reqParams);\n Map<String, Integer> fieldData = new HashMap<>();\n fieldData.put(Constants.HSN_SACCODE + Constants.Acc_Product_Master_ModuleId, Constants.Acc_Product_Master_ModuleId);\n fieldData.put(Constants.GSTProdCategory + Constants.Acc_Product_Master_ModuleId, Constants.Acc_Product_Master_ModuleId);\n fieldData.put(Constants.GST_UNIT_QUANTITY_CODE + Constants.Acc_Product_Master_ModuleId, Constants.Acc_Product_Master_ModuleId);\n fieldData.put(Constants.STATE + Constants.Acc_Invoice_ModuleId, Constants.Acc_Invoice_ModuleId);\n fieldData.put(Constants.STATE + Constants.Acc_Vendor_Invoice_ModuleId, Constants.Acc_Vendor_Invoice_ModuleId);\n fieldData.put(Constants.STATE + Constants.Acc_Sales_Order_ModuleId, Constants.Acc_Sales_Order_ModuleId);\n fieldData.put(Constants.STATE + Constants.Acc_Purchase_Order_ModuleId, Constants.Acc_Purchase_Order_ModuleId);\n fieldData.put(Constants.STATE + Constants.Acc_Delivery_Order_ModuleId, Constants.Acc_Delivery_Order_ModuleId);\n fieldData.put(Constants.STATE + Constants.Acc_Goods_Receipt_ModuleId, Constants.Acc_Goods_Receipt_ModuleId);\n /**\n * Get State field col number for CN and DN\n */\n fieldData.put(Constants.STATE + Constants.Acc_Credit_Note_ModuleId, Constants.Acc_Credit_Note_ModuleId);\n fieldData.put(Constants.STATE + Constants.Acc_Debit_Note_ModuleId, Constants.Acc_Debit_Note_ModuleId);\n List colList = fieldManagerDAOobj.getColnumForDimensionCollectively(fieldData, reqParams);\n getModulewiseColNumData(colList, reqParams);\n\n try {\n\n getColumnModelForGSTMissingDocSummary(jarrRecords, jarrColumns, params);\n reqParams.put(\"isInvoice\",true);\n\n /**\n * HSN\n */\n JSONObject parameter = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n parameter.put(\"typeofinvoice\", GSTRConstants.GSTMisMatch_SECTION_HSNNotAvailable);\n parameter.put(\"ishsnblank\", true);\n parameter.put(\"ishsninvalid\",true);// HSN code's length should be less than 8 digit\n JSONObject b2bobj = getGSTMissingInvoice(parameter);\n JSONObject B2B = new JSONObject();\n B2B = b2bobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(B2B);\n\n /**\n * UQC\n */\n parameter = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n parameter.put(\"typeofinvoice\", GSTRConstants.GSTMisMatch_SECTION_UQCNotAvailable);\n parameter.put(\"isuqcblank\", true);\n b2bobj = getGSTMissingInvoice(parameter);\n B2B = new JSONObject();\n B2B = b2bobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(B2B);\n\n /**\n * GSTIN Blank\n */\n parameter = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n parameter.put(\"typeofinvoice\", GSTRConstants.GSTMisMatch_SECTION_GSTINBlank);\n parameter.put(\"isGSTINnull\", true);\n parameter.put(\"registrationType\", Constants.GSTRegType_Regular + \",\" + Constants.GSTRegType_Regular_ECommerce + \",\" + Constants.GSTRegType_Composition + \",\" + Constants.GSTRegType_Composition_ECommerce);\n b2bobj = getGSTMissingInvoice(parameter);\n B2B = new JSONObject();\n B2B = b2bobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(B2B);\n\n /**\n * GSTIN non Blank\n */\n parameter = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n parameter.put(\"typeofinvoice\", GSTRConstants.GSTMisMatch_SECTION_GSTINnonBlank);\n parameter.put(\"isGSTINnull\", false);\n parameter.put(\"registrationType\", Constants.GSTRegType_Unregistered + \",\" + Constants.GSTRegType_Consumer);\n b2bobj = getGSTMissingInvoice(parameter);\n B2B = new JSONObject();\n B2B = b2bobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(B2B);\n\n /*\n * GSTIN Number Invalid\n */\n parameter = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n parameter.put(\"typeofinvoice\", GSTRConstants.GSTMisMatch_SECTION_GSTINInvalid);\n parameter.put(\"isGSTINnull\", false);\n parameter.put(\"registrationType\", Constants.GSTRegType_Regular + \",\" + Constants.GSTRegType_Regular_ECommerce + \",\" + Constants.GSTRegType_Composition + \",\" + Constants.GSTRegType_Composition_ECommerce);\n b2bobj = getGSTMissingInvoice(parameter);\n B2B = new JSONObject();\n B2B = b2bobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(B2B);\n /**\n * GST Registration Type blank\n */\n parameter = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n parameter.put(\"typeofinvoice\", GSTRConstants.GSTMisMatch_SECTION_GSTRegistrationTypeblank);\n parameter.put(\"isgstregtypeblank\", true);\n b2bobj = getGSTMissingInvoice(parameter);\n B2B = new JSONObject();\n B2B = b2bobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(B2B);\n\n /**\n * Customer Type blank\n */\n parameter = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n parameter.put(\"typeofinvoice\", GSTRConstants.GSTMisMatch_SECTION_CustomerVendorTypeblank);\n parameter.put(\"iscusttypeblank\", true);\n b2bobj = getGSTMissingInvoice(parameter);\n B2B = new JSONObject();\n B2B = b2bobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(B2B);\n\n /**\n * RCM Sales to Unregistered Person\n */\n parameter = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n parameter.put(\"typeofinvoice\", GSTRConstants.GSTMisMatch_SECTION_RCMSalestoUnregisteredPerson);\n parameter.put(\"registrationType\", Constants.GSTRegType_Unregistered + \",\" + Constants.GSTRegType_Consumer);\n parameter.put(\"isRCMApplicable\", true);\n b2bobj = getGSTMissingInvoice(parameter);\n B2B = new JSONObject();\n B2B = b2bobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(B2B);\n\n /**\n * Product tax Mismatch\n */\n parameter = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n parameter.put(\"typeofinvoice\", GSTRConstants.GSTMisMatch_SECTION_ProducttaxMismatch);\n parameter.put(\"istaxclassmismatch\", true);\n b2bobj = getGSTMissingInvoice(parameter);\n B2B = new JSONObject();\n B2B = b2bobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(B2B);\n \n /**\n * State Mismatch\n */\n parameter = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n parameter.put(\"typeofinvoice\", GSTRConstants.GSTMisMatch_SECTION_StateMismatch);\n parameter.put(\"statemismatch\", true);\n parameter.put(\"CustomerType\", Constants.CUSTVENTYPE_DEEMED_EXPORT + \",\" + Constants.CUSTVENTYPE_NA + \",\" + Constants.CUSTVENTYPE_SEZ+ \",\" + Constants.CUSTVENTYPE_SEZWOPAY);\n b2bobj = getGSTMissingInvoice(parameter);\n B2B = new JSONObject();\n B2B = b2bobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(B2B);\n\n /**\n * Manually entered Invoice Number\n */\n parameter = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n parameter.put(\"typeofinvoice\", GSTRConstants.GSTMisMatch_SECTION_ManuallyenteredInvoiceNumber);\n parameter.put(\"withoutseqformat\", true);\n b2bobj = getGSTMissingInvoice(parameter);\n B2B = new JSONObject();\n B2B = b2bobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(B2B);\n \n /**\n * GST-History not present\n */\n parameter = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n parameter.put(\"typeofinvoice\", GSTRConstants.Sec_GST_History_Not_Present);\n parameter.put(\"ishistoryblank\",true);\n b2bobj = getGSTMissingInvoice(parameter);\n B2B = new JSONObject();\n B2B = b2bobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(B2B);\n \n// /**\n// * Invalid CN\n// */\n// parameter = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n// parameter.put(\"typeofinvoice\", GSTRConstants.GSTMisMatch_SECTION_INVALIDCN);\n// parameter.put(\"isCNDN\", true);\n// parameter.put(\"isInvoice\", false);\n// parameter.put(\"iscndnwithoutinvoice\", true);\n// b2bobj = getGSTMissingInvoice(parameter);\n// B2B = new JSONObject();\n// B2B = b2bobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n// dataJArr.put(B2B);\n \n JSONArray pagedJson = new JSONArray();\n pagedJson = dataJArr;\n if (!StringUtil.isNullOrEmpty(start) && !StringUtil.isNullOrEmpty(limit)) {\n pagedJson = StringUtil.getPagedJSON(pagedJson, Integer.parseInt(start), Integer.parseInt(limit));\n }\n object.put(\"totalCount\", dataJArr.length());\n object.put(\"columns\", jarrColumns);\n object.put(\"coldata\", pagedJson);\n jMeta.put(\"totalProperty\", \"totalCount\");\n jMeta.put(\"root\", \"coldata\");\n jMeta.put(\"fields\", jarrRecords);\n object.put(\"metaData\", jMeta);\n if (params.optBoolean(\"isExport\")) {\n object.put(\"data\", dataJArr);\n object.put(\"columns\", jarrColumns);\n }\n\n } catch (JSONException ex) {\n throw ServiceException.FAILURE(ex.getMessage(), ex);\n }\n return object;\n }",
"DataSources retrieveDataSources() throws RepoxException;",
"@GetMapping(\"/config-parameters\")\n @Timed\n public List<ConfigParameter> getAllConfigParameters() {\n log.debug(\"REST request to get all ConfigParameters\");\n return configParameterRepository.findAll();\n }",
"@Test\n public void testQueryLessKeys1() throws Exception {\n File file = new File(testInfo.getDir());\n FileUtils.deleteDirectory(file);\n\n EventSchema eventSchema = GenericAggregateSerializerTest.getEventSchema();\n\n String[] dimensionSpecs = new String[] {\n \"time=\" + TimeUnit.MINUTES,\n \"time=\" + TimeUnit.MINUTES + \":adUnit\",\n \"time=\" + TimeUnit.MINUTES + \":adId\",\n \"time=\" + TimeUnit.MINUTES + \":pubId\",\n \"time=\" + TimeUnit.MINUTES + \":adId:adUnit\",\n \"time=\" + TimeUnit.MINUTES + \":pubId:adUnit\",\n \"time=\" + TimeUnit.MINUTES + \":pubId:adId\",\n \"time=\" + TimeUnit.MINUTES + \":pubId:adId:adUnit\"\n };\n\n GenericAggregator[] aggregators = new GenericAggregator[dimensionSpecs.length];\n for (int i = dimensionSpecs.length; i-- > 0;) {\n GenericAggregator aggregator = new GenericAggregator(eventSchema);\n aggregator.init(dimensionSpecs[i]);\n aggregators[i] = aggregator;\n }\n\n DimensionStoreOperator hdsOut = new DimensionStoreOperator() {\n @Override\n public void setup(OperatorContext arg0)\n {\n super.setup(arg0);\n super.writeExecutor = super.queryExecutor = MoreExecutors.sameThreadExecutor(); // synchronous processing\n }\n };\n TFileImpl hdsFile = new TFileImpl.DefaultTFileImpl();\n hdsOut.setFileStore(hdsFile);\n hdsFile.setBasePath(testInfo.getDir());\n //GenericAggregator aggregator = new GenericAggregator(eventSchema);\n //aggregator.init(\"time=MINUTES:pubId:adId:adUnit\");\n hdsOut.setEventSchemaJSON(GenericAggregateSerializerTest.TEST_SCHEMA_JSON);\n hdsOut.setAggregator(aggregators[0]);\n hdsOut.setMaxCacheSize(100);\n hdsOut.setFlushIntervalCount(100);\n hdsOut.setup(null);\n\n CollectorTestSink<DimensionStoreOperator.HDSRangeQueryResult> queryResults = new CollectorTestSink<DimensionStoreOperator.HDSRangeQueryResult>();\n @SuppressWarnings({\"unchecked\", \"rawtypes\"})\n CollectorTestSink<Object> tmp = (CollectorTestSink) queryResults;\n hdsOut.queryResult.setSink(tmp);\n\n\n long baseTime = System.currentTimeMillis();\n long baseMinute = TimeUnit.MILLISECONDS.convert(TimeUnit.MINUTES.convert(baseTime, TimeUnit.MILLISECONDS), TimeUnit.MINUTES);\n\n int numMinutes = 5;\n int wid = 1;\n for(int i = 0; i < numMinutes; i++) {\n hdsOut.beginWindow(wid);\n\n long timestamp = baseMinute - TimeUnit.MINUTES.toMillis(i);\n\n // Check aggregation for ae1 and ae2 as they have same key.\n Map<String, Object> eventMap = Maps.newHashMap();\n eventMap.put(\"timestamp\", timestamp);\n eventMap.put(\"pubId\", 1);\n eventMap.put(\"adId\", 2);\n eventMap.put(\"adUnit\", 3);\n eventMap.put(\"clicks\", 10L);\n\n GenericEvent ge = eventSchema.convertMapToGenericEvent(eventMap);\n\n int aggrIdx = 0;\n for (GenericAggregator aggregator : aggregators) {\n GenericAggregate aggr = aggregator.getGroup(ge, aggrIdx);\n aggregator.aggregate(aggr, ge);\n hdsOut.input.process(aggr);\n aggrIdx++;\n }\n hdsOut.endWindow();\n wid++;\n }\n\n hdsOut.beginWindow(wid);\n\n int pubId = 1;\n int adId = 2;\n int adUnit = 3;\n\n for(int i = 0; i < 8; i++) {\n JSONObject keys = new JSONObject();\n if ((i & 0x1) != 0)\n keys.put(\"pubId\", pubId);\n if ((i & 0x2) != 0)\n keys.put(\"adId\", adId);\n if ((i & 0x4) != 0)\n keys.put(\"adUnit\", adUnit);\n\n JSONObject query = new JSONObject();\n query.put(\"keys\", keys);\n query.put(\"id\", \"query\" + i);\n query.put(\"startTime\", baseMinute - TimeUnit.MILLISECONDS.convert(20, TimeUnit.MINUTES));\n query.put(\"endTime\", baseMinute);\n\n hdsOut.query.process(query.toString());\n }\n Assert.assertEquals(\"timeSeriesQueries \" + hdsOut.rangeQueries, 8, hdsOut.rangeQueries.size());\n hdsOut.endWindow();\n\n Assert.assertEquals(\"queryResults \" + queryResults.collectedTuples, 8, queryResults.collectedTuples.size());\n System.out.println(\"basetime \" + baseMinute);\n\n for(HDSRangeQueryResult r : queryResults.collectedTuples) {\n Assert.assertEquals(\"result points \" + r, Math.min(numMinutes, 20), r.data.size());\n for(Object o : r.data)\n System.out.println(o);\n }\n }",
"@Test\n public void query_ALLTag() throws AtlasBaseException {\n SearchParameters params = new SearchParameters();\n params.setClassification(ALL_CLASSIFICATION_TYPES);\n params.setQuery(\"sales\");\n\n List<AtlasEntityHeader> entityHeaders = discoveryService.searchWithParameters(params).getEntities();\n\n Assert.assertTrue(CollectionUtils.isNotEmpty(entityHeaders));\n assertEquals(entityHeaders.size(), 5);\n }",
"@SuppressWarnings(\"unchecked\")\r\n @Override\r\n public Map<String, Object> getAllCopAnalysis(int currpage, int limit)\r\n throws DataAccessException {\r\n LOG.debug(\"method getAllCopAnalysis start!\");\r\n Map<String, Object> map = new HashMap<String, Object>();\r\n // get cooperator analysis records\r\n List<CopAnalysisBean> copAnalysisList = hibernateTemplate\r\n .executeFind(new PagingHibernateCallback(\r\n CustomerConstant.COPANALYSIS_LIST_BEFORE_HQL, currpage, limit));\r\n // get cooperator analysis records number\r\n long total = (Long) hibernateTemplate.find(CustomerConstant.COPANALYSIS_COUNT_BEFORE_HQL)\r\n .get(0);\r\n map.put(CRMConstant.ITEMS, copAnalysisList);\r\n map.put(CRMConstant.TOTAL, total);\r\n LOG.debug(\"method getAllCopAnalysis end!\");\r\n return map;\r\n }",
"@Override\n\t@Transactional(propagation = Propagation.REQUIRED)\n\tpublic String stats(QualityQuery data) throws Exception {\n\t\treturn metaDataFetchService.stats(data);\n\t}",
"@Override\n public JSONObject getGSTR3BSummaryReport(JSONObject params) throws ServiceException, JSONException {\n JSONObject json = new JSONObject();\n try {\n JSONObject jMeta = new JSONObject();\n JSONArray jarrColumns = new JSONArray();\n JSONArray jarrRecords = new JSONArray();\n JSONArray dataJArr = new JSONArray();\n JSONArray exportJArr = new JSONArray();\n JSONObject exportJSON = new JSONObject();\n String start = params.optString(\"start\");\n String limit = params.optString(\"limit\");\n String companyId = params.optString(\"companyid\");\n \n params.put(GSTR3BConstants.DETAILED_VIEW_REPORT, true);\n\n /* * before starting sectional data need to get column no for Product Tax\n * Class (HSN)\n */\n getEntityDataForRequestedModule(params);\n getColNumForRequestedModules(params);\n getLocalStateOfEntity(params);\n getColumnModelForGSTR3B(jarrRecords, jarrColumns, params);\n\n JSONObject summaryJSON = new JSONObject();\n summaryJSON.put(\"particulars\", \"GST Payable [3.1 - (4A - 4B)]\");\n summaryJSON.put(\"fmt\", \"B\");\n summaryJSON.put(\"showBold\", true);\n \n JSONObject totalJSONObject = getGSTR3B_Section_3_1_Data(params, companyId, dataJArr, exportJArr);\n summaryJSON.put(\"taxableamt\", authHandler.formattedAmount(totalJSONObject.optDouble(\"taxableamt\", 0.0), companyId));\n summaryJSON.put(\"igst\", authHandler.formattedAmount(totalJSONObject.optDouble(\"igst\", 0.0), companyId));\n summaryJSON.put(\"cgst\", authHandler.formattedAmount(totalJSONObject.optDouble(\"cgst\", 0.0), companyId));\n summaryJSON.put(\"sgst\", authHandler.formattedAmount(totalJSONObject.optDouble(\"sgst\", 0.0), companyId));\n summaryJSON.put(\"csgst\", authHandler.formattedAmount(totalJSONObject.optDouble(\"csgst\", 0.0), companyId));\n summaryJSON.put(\"totaltax\", authHandler.formattedAmount(totalJSONObject.optDouble(\"totaltax\", 0.0), companyId));\n summaryJSON.put(\"totalamount\", authHandler.formattedAmount(totalJSONObject.optDouble(\"totalamount\", 0.0), companyId));\n \n exportJSON.put(\"sup_details\", exportJArr);\n exportJArr = new JSONArray();\n \n totalJSONObject = getGSTR3B_Section_3_2_Data(params, companyId, dataJArr, exportJArr);\n \n getGSTR3B_Section_4_Data(params, companyId, dataJArr, exportJArr, summaryJSON);\n\n totalJSONObject = getGSTR3B_Section_5_Data(params, companyId, dataJArr, exportJArr);\n /**\n * No need to consider Exempt/Zero/Nil rated in the total.\n */\n// summaryJSON.put(\"taxableamt\", authHandler.formattedAmount(summaryJSON.optDouble(\"taxableamt\", 0.0) - totalJSONObject.optDouble(\"taxableamt\", 0.0), companyId));\n// summaryJSON.put(\"igst\", authHandler.formattedAmount(summaryJSON.optDouble(\"igst\", 0.0) - totalJSONObject.optDouble(\"igst\", 0.0), companyId));\n// summaryJSON.put(\"cgst\", authHandler.formattedAmount(summaryJSON.optDouble(\"cgst\", 0.0) - totalJSONObject.optDouble(\"cgst\", 0.0), companyId));\n// summaryJSON.put(\"sgst\", authHandler.formattedAmount(summaryJSON.optDouble(\"sgst\", 0.0) - totalJSONObject.optDouble(\"sgst\", 0.0), companyId));\n// summaryJSON.put(\"csgst\", authHandler.formattedAmount(summaryJSON.optDouble(\"csgst\", 0.0) - totalJSONObject.optDouble(\"csgst\", 0.0), companyId));\n// summaryJSON.put(\"totaltax\", authHandler.formattedAmount(summaryJSON.optDouble(\"totaltax\", 0.0) - totalJSONObject.optDouble(\"totaltax\", 0.0), companyId));\n// summaryJSON.put(\"totalamount\", authHandler.formattedAmount(summaryJSON.optDouble(\"totalamount\", 0.0) - totalJSONObject.optDouble(\"totalamount\", 0.0), companyId));\n \n dataJArr.put(summaryJSON);\n summaryJSON = new JSONObject();\n summaryJSON.put(\"particulars\", \"Note : Excess ITC value will be shown in negative\");\n summaryJSON.put(\"fmt\", \"B\");\n summaryJSON.put(\"showBold\", true);\n dataJArr.put(summaryJSON);\n JSONArray pagedJson = new JSONArray();\n pagedJson = dataJArr;\n if (!StringUtil.isNullOrEmpty(start) && !StringUtil.isNullOrEmpty(limit)) {\n pagedJson = StringUtil.getPagedJSON(pagedJson, Integer.parseInt(start), Integer.parseInt(limit));\n }\n json.put(\"totalCount\", dataJArr.length());\n json.put(\"columns\", jarrColumns);\n json.put(\"coldata\", pagedJson);\n jMeta.put(\"totalProperty\", \"totalCount\");\n jMeta.put(\"root\", \"coldata\");\n jMeta.put(\"fields\", jarrRecords);\n json.put(\"metaData\", jMeta);\n Map<String, Object> map = new HashMap<>();\n map.put(\"fcdId\", params.opt(\"entityid\"));\n int gstin_column = fieldManagerDAOobj.getColumnFromFieldParams(Constants.GSTIN, companyId, Constants.GSTModule, 0);\n Object res = kwlCommonTablesDAOObj.getRequestedObjectFields(MultiEntityDimesionCustomData.class, new String[]{\"col\" + gstin_column}, map);\n String gstin = res != null ? (String) res : \"\";\n exportJSON.put(\"gstin\", gstin);\n json.put(\"exportJSON\", exportJSON);\n if (params.optBoolean(\"isExport\")) {\n json.put(\"data\", dataJArr);\n json.put(\"columns\", jarrColumns);\n }\n } catch (JSONException | ServiceException ex) {\n throw ServiceException.FAILURE(ex.getMessage(), ex);\n } catch (Exception ex) {\n Logger.getLogger(AccEntityGstServiceImpl.class.getName()).log(Level.INFO, ex.getMessage());\n }\n return json;\n }",
"public String getDetailData(String metric_categ, String service_group_name, String country, String metric_name,\r\n\t\t\tString date1, String date2)throws SQLException {\n\t\tArrayList responseArray = new ArrayList();\r\n\t\tString jsonResult=\"\";\r\n\t\tConnection conn = null;\r\n\t\ttry {\r\n\t\tconn = DBConnection.getConnection();\r\n\t\tStatement stmt = null;\r\n\t\t\r\n\t\tstmt = conn.createStatement();\r\n\t\tGson gson = new GsonBuilder().create();\r\n\t\tString measure_type=\"measure_amt\";\r\n\t\tif(metric_categ.equals(\"DQKPI\")){\r\n\t\t\tmeasure_type=\"measure_amt\";\r\n\r\n\r\n\t\t}else{\r\n\r\n\t\t\tmeasure_type=\"measure_cnt\";\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tString queryString=\"SELECT DISTINCT f.country_shortname, f.fact_row_no,f.fact_col_no,f.\"+measure_type+\" as Average_amt,dim2.validation_rule_name,f.measure_fact_date, dim2.quality_metric_type_comment,dim2.quality_metric_categ_shortname,dim1.service_main_group_name,dim2.quality_metric_type_name FROM mesa.PL_MEASURE_FACT_PRT f \"\r\n\t\t\t\t+\"INNER JOIN mesa.PL_SERVICE_PRT dim1 ON (f.validation_service_shortname = dim1.Service_Component_ShortName) \"\r\n\t\t\t\t+\"INNER JOIN mesa.PL_VALIDATION_RULE_EXT dim2 ON (f.Validation_Rule_Id = dim2.Validation_Rule_Id) WHERE f.\"+measure_type+\"<=99 AND f.country_shortname='\"+country+\"'\"\r\n\t\t\t\t+\"AND dim2.quality_metric_categ_shortname='\"+metric_categ+\"' AND dim1.service_main_group_name='\"+service_group_name+\"' AND dim2.quality_metric_type_name='\"+metric_name+\"' AND f.measure_fact_date BETWEEN '\"+date1+\"' and'\"+date2+\"'\";\r\n\r\n\t\tString queryTestString=\"SELECT DISTINCT f.fact_row_no,f.fact_col_no,f.country_shortname,f.measure_amt as Average_amt,dim2.validation_rule_name,f.measure_fact_date, dim2.quality_metric_type_comment,dim2.quality_metric_categ_shortname,dim1.service_main_group_name,dim2.quality_metric_type_name FROM mesa.PL_MEASURE_FACT_PRT f INNER JOIN mesa.PL_SERVICE_PRT dim1 ON (f.validation_service_shortname = dim1.Service_Component_ShortName) INNER JOIN mesa.PL_VALIDATION_RULE_EXT dim2 ON (f.Validation_Rule_Id = dim2.Validation_Rule_Id) WHERE f.measure_amt<=99 AND dim2.quality_metric_type_name='FORMAT CONFORMANCY' AND f.country_shortname='EE'AND dim2.quality_metric_categ_shortname='DQKPI' AND dim1.service_main_group_name='BB Data Warehouse' AND f.measure_fact_date BETWEEN '2017-01-21' and'2017-04-21'\";\r\n\t\t\r\n\t\tSystem.out.println(\"IS HERE\");\r\n\t\tSystem.out.println(queryString);\r\n\t\tResultSet rs = stmt.executeQuery(queryString);\r\n\t\twhile(rs.next()) {\r\n\r\n\r\n\t\t\tQualityModel model=new QualityModel();\r\n\t\t\tmodel.setMeasureAmt(rs.getInt(\"average_amt\"));\r\n\t\t\tmodel.setServiceMainGroupName(rs.getString(\"service_main_group_name\"));\r\n\t\t\tmodel.setDate(rs.getString(\"measure_fact_date\"));\r\n\t\t\tmodel.setQualityMetricTypeComment(rs.getString(\"validation_rule_name\").replaceAll(\"(.{50})\", \"$1<br>\"));\r\n model.setFactCol(rs.getInt(\"fact_col_no\"));\r\n model.setFactRow(rs.getInt(\"fact_row_no\"));\r\n model.setCountry(rs.getString(\"country_shortname\"));\r\n\r\n\t\t\tresponseArray.add(model);\r\n\t\t}\r\n\t\tjsonResult = gson.toJson(responseArray);\r\n\t\tSystem.out.println(jsonResult);\r\n\t\trs.close();\r\n\t\tstmt.close();\r\n\t}catch (SQLException e) {\r\n\t\te.printStackTrace();\r\n\t\tthrow new RuntimeException(e);\r\n\t} finally {\r\n\t\tDBConnection.close(conn);\r\n\t}\r\n\t\treturn jsonResult;\r\n\t\t\r\n\t\t\r\n\t\r\n\t}",
"@Override\n public JSONObject getGSTComputationReportSectionCombo(JSONObject requestParams) throws JSONException {\n JSONArray dataJArr = new JSONArray();\n JSONObject sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_1);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_1_1);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_1_2);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_1_3);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_2);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_2_2);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_3);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_3_1);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_4);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_4_1);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_4_2);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_7);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_7_1);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_7_2);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_7_3);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_7_4);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_7_5);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_8);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_9);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_9_1);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_9_2);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_10);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_10_1);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_SALES_10_2);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_1);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_1_1);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_2);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_3);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_3_1);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_3_2);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_4);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_5);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_6);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_7);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_7_1);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_7_2);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_11);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_11_10);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_12);\n dataJArr.put(sectionNameObject);\n sectionNameObject = new JSONObject();\n sectionNameObject.put(\"typeofinvoice\", GSTRConstants.GST_COMPUTATION_SECTION_PURCHASES_13_1);\n dataJArr.put(sectionNameObject);\n return new JSONObject().put(\"data\", dataJArr);\n }",
"SearchResponse search(Pageable pageable, QueryBuilder query, Collection<AggregationBuilder> aggregations);",
"public List<Configuration> getAll();",
"@Override\n\tpublic JSONObject getByPage(String param) {\n\t\tJSONObject data = new JSONObject();\n\t\tJSONObject result = new JSONObject();\n\t\tMainUtility mainUtil = new MainUtility();\n\t\tJSONObject jsonParams = mainUtil.stringToJson(param);\n\t\tStringBuilder builder = new StringBuilder();\n\t\tStringBuilder builderGetTotal = new StringBuilder();\n\n\t\tbuilder.append(\"SELECT `wt_id`, `wt_title`, `wt_content`, user.full_name, \"\n\t\t\t\t+ \"IF(writing_test.created_date IS NULL,null, DATE_FORMAT(writing_test.created_date, '%d-%m-%Y')) AS created_date FROM writing_test \"\n\t\t\t\t+ \"LEFT JOIN crm_user AS user ON writing_test.created_by = user.user_id WHERE 1=1 \");\n\t\tbuilderGetTotal.append(\"SELECT COUNT(1) FROM `writing_test` \"\n\t\t\t\t+ \" WHERE 1=1\");\n\t\t// filter header\n\t\tif (jsonParams.get(\"status\") == null || Integer.parseInt(jsonParams.get(\"status\").toString()) == -1) {\n\t\t\tbuilder.append(\" AND writing_test.deleted <> 1\");\n\t\t\tbuilderGetTotal.append(\" AND writing_test.deleted <> 1\");\n\t\t} else if (Integer.parseInt(jsonParams.get(\"status\").toString()) == -2) {// thùng rác\n\t\t\tbuilder.append(\" AND writing_test.deleted = 1\");\n\t\t\tbuilderGetTotal.append(\" AND writing_test.deleted = 1\");\n\t\t}\n\t\tif (jsonParams.get(\"wt_title\") != null && !\"\".equals(jsonParams.get(\"wt_title\").toString())) {\n\t\t\tbuilder.append(\" AND wt_title LIKE N'%\" + jsonParams.get(\"wt_title\").toString() + \"%'\");\n\t\t\tbuilderGetTotal\n\t\t\t\t\t.append(\" AND wt_title LIKE N'%\" + jsonParams.get(\"wt_title\").toString() + \"%'\");\n\t\t}\n\t\tif (jsonParams.get(\"wt_content\") != null && !\"\".equals(jsonParams.get(\"wt_content\").toString())) {\n\t\t\tbuilder.append(\" AND wt_content LIKE N'%\" + jsonParams.get(\"wt_content\").toString() + \"%'\");\n\t\t\tbuilderGetTotal\n\t\t\t\t\t.append(\" AND wt_content LIKE N'%\" + jsonParams.get(\"wt_content\").toString() + \"%'\");\n\t\t}\n\t\t// sortby\n\t\tif (jsonParams.get(\"sortField\") != null && !\"\".equals(jsonParams.get(\"sortField\").toString())) {\n\t\t\tswitch (jsonParams.get(\"sortField\").toString()) {\n\t\t\tdefault:\n\t\t\t\tbuilder.append(\" ORDER BY writing_test.created_date DESC\");\n\t\t\t\tbreak;\n\t\t\t}\n//\t\t\tif (jsonParams.get(\"sortOrder\") != null && \"descend\".equals(jsonParams.get(\"sortOrder\").toString())) {\n//\t\t\t\tbuilder.append(\" DESC\");\n//\t\t\t}\n//\t\t\tif (jsonParams.get(\"sortOrder\") != null && \"ascend\".equals(jsonParams.get(\"sortOrder\").toString())) {\n//\t\t\t\tbuilder.append(\" ASC\");\n//\t\t\t}\n\t\t}\n\t\tmainUtil.getLimitOffset(builder, jsonParams);\n\t\ttry {\n\t\t\tint totalRow = this.jdbcTemplate.queryForObject(builderGetTotal.toString(), Integer.class);\n\t\t\tList<Map<String, Object>> lstWrittingTest = this.jdbcTemplate.queryForList(builder.toString());\n\t\t\tJSONObject results = new JSONObject();\n\t\t\tresults.put(\"results\", lstWrittingTest);\n\t\t\tresults.put(\"total\", totalRow);\n\t\t\tdata.put(\"data\", results);\n\t\t\tdata.put(\"success\", true);\n\t\t} catch (Exception e) {\n\t\t\tdata.put(\"success\", false);\n\t\t\tdata.put(\"err\", e.getMessage());\n\t\t\tdata.put(\"msg\", \"Lấy danh sách bài kiểm tra thất bại\");\n\t\t}\n\t\treturn data;\n\t}",
"long getPageSize();",
"long getPageSize();",
"long getPageSize();"
]
| [
"0.6146412",
"0.5340984",
"0.5097442",
"0.4943728",
"0.48902386",
"0.488176",
"0.48771682",
"0.48446906",
"0.4751996",
"0.47093222",
"0.46651992",
"0.46569437",
"0.46299747",
"0.46263653",
"0.46044746",
"0.45592827",
"0.4538011",
"0.45368257",
"0.45339668",
"0.45247477",
"0.45169616",
"0.44982082",
"0.44580784",
"0.44563192",
"0.4410918",
"0.4403967",
"0.44019145",
"0.4397339",
"0.4395005",
"0.43845448",
"0.4377451",
"0.4375291",
"0.4362805",
"0.4361319",
"0.43612263",
"0.4350182",
"0.4349673",
"0.43308792",
"0.43264186",
"0.43153214",
"0.43144158",
"0.43143293",
"0.43040097",
"0.42806855",
"0.42783862",
"0.42658252",
"0.42616442",
"0.42566553",
"0.42529982",
"0.42526528",
"0.42466897",
"0.42451417",
"0.42415228",
"0.42369848",
"0.4232338",
"0.42302752",
"0.42185372",
"0.42179573",
"0.42071772",
"0.42006844",
"0.41947103",
"0.41899228",
"0.4189761",
"0.41879904",
"0.41872206",
"0.41815057",
"0.41792488",
"0.41771737",
"0.41743496",
"0.41730863",
"0.41707715",
"0.41677144",
"0.41642892",
"0.41619793",
"0.41612256",
"0.41607136",
"0.41592348",
"0.41575179",
"0.41533896",
"0.4152237",
"0.4152235",
"0.4147746",
"0.41462666",
"0.41459876",
"0.41444957",
"0.4141574",
"0.41381058",
"0.4136334",
"0.4133821",
"0.4131738",
"0.4131733",
"0.41265061",
"0.41121453",
"0.41005462",
"0.409234",
"0.4092176",
"0.409205",
"0.4090978",
"0.4090978",
"0.4090978"
]
| 0.7078753 | 0 |
Find all aggregated data sets. The default sql: SELECT DISTINCT data_id, group_id, tenant_id FROM config_info_aggr | String findAllAggrGroupByDistinct(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public HashSet<Integer> getAllSourceDatasets() {\n HashSet<Integer> allDatasets = null;\n Session session = getSession();\n try {\n SQLQuery allDatasetsQuery\n = session.createSQLQuery(ALL_SRC_DATASETS_QUERY\n + sourceDB + \".\" + DATASET_TABLE_NAME);\n allDatasets = new HashSet<Integer>(allDatasetsQuery.list());\n } finally {\n releaseSession(session);\n }\n return allDatasets;\n }",
"@Override\n\tpublic GroupSet getAllGroups() throws DataBackendException\n {\n GroupSet groupSet = new GroupSet();\n Connection con = null;\n\n try\n {\n \n con = Transaction.begin();\n\n List<Group> groups = doSelectAllGroups(con);\n\n for (Group group : groups)\n {\n // Add dependent objects if they exist\n ((TorqueAbstractSecurityEntity)group).retrieveAttachedObjects(con, getLazyLoading());\n\n groupSet.add(group);\n }\n\n Transaction.commit(con);\n con = null;\n }\n catch (TorqueException e)\n {\n throw new DataBackendException(\"Error retrieving group information\", e);\n }\n finally\n {\n if (con != null)\n {\n Transaction.safeRollback(con);\n }\n }\n\n return groupSet;\n }",
"@Override\r\n protected DataSource selectAnyDataSource() {\n if (dataSourcesMtApp.isEmpty()) {\r\n List<MasterTenant> masterTenants = masterTenantRepo.findAll();\r\n LOG.info(\">>>> selectAnyDataSource() -- Total tenants:\" + masterTenants.size());\r\n for (MasterTenant masterTenant : masterTenants) {\r\n dataSourcesMtApp.put(masterTenant.getTenantId(),\r\n DataSourceUtil.createAndConfigureDataSource(masterTenant));\r\n }\r\n }\r\n return this.dataSourcesMtApp.values().iterator().next();\r\n }",
"public List<Dataset> getDatasets();",
"@JsonIgnore\n @Override\n public List<DataSet> getDataSets()\n {\n if (getFetchOptions() != null && getFetchOptions().hasDataSets())\n {\n return dataSets;\n }\n else\n {\n throw new NotFetchedException(\"Data sets have not been fetched.\");\n }\n }",
"public interface ConfigInfoAggrMapper extends Mapper {\n \n /**\n * To delete aggregated data in bulk, you need to specify a list of datum.\n * The default sql:\n * DELETE FROM config_info_aggr WHERE data_id=? AND group_id=? AND tenant_id=? AND datum_id IN (...)\n *\n * @param datumList datumList\n * @return The sql of deleting aggregated data in bulk.\n */\n String batchRemoveAggr(List<String> datumList);\n \n /**\n * Get count of aggregation config info.\n * The default sql:\n * SELECT count(*) FROM config_info_aggr WHERE data_id = ? AND group_id = ? AND tenant_id = ?\n *\n * @param size datum id list size\n * @param isIn search condition\n * @return The sql of getting count of aggregation config info.\n */\n String aggrConfigInfoCount(int size, boolean isIn);\n \n /**\n * Find all data before aggregation under a dataId. It is guaranteed not to return NULL.\n * The default sql:\n * SELECT data_id,group_id,tenant_id,datum_id,app_name,content\n * FROM config_info_aggr WHERE data_id=? AND group_id=? AND tenant_id=? ORDER BY datum_id\n *\n * @return The sql of finding all data before aggregation under a dataId.\n */\n String findConfigInfoAggrIsOrdered();\n \n /**\n * Query aggregation config info.\n * The default sql:\n * SELECT data_id,group_id,tenant_id,datum_id,app_name,content FROM config_info_aggr WHERE data_id=? AND\n * group_id=? AND tenant_id=? ORDER BY datum_id LIMIT startRow,pageSize\n *\n * @param startRow The start index.\n * @param pageSize The size of page.\n * @return The sql of querying aggregation config info.\n */\n String findConfigInfoAggrByPageFetchRows(int startRow, int pageSize);\n \n /**\n * Find all aggregated data sets.\n * The default sql:\n * SELECT DISTINCT data_id, group_id, tenant_id FROM config_info_aggr\n *\n * @return The sql of finding all aggregated data sets.\n */\n String findAllAggrGroupByDistinct();\n}",
"@Override\n public List<Map<String, Serializable>> getResult() {\n Preconditions.checkState(_finish, \"GetResult cannot be called before finish.\");\n List<Map<String, Serializable>> result = new ArrayList<Map<String, Serializable>>(_aggrFuncContextList.size());\n\n for (int i = 0; i < _aggrFuncContextList.size(); i++) {\n result.add(new HashMap<String, Serializable>());\n }\n\n Iterator<Pair<Long, String>> groupKeys = _groupKeyGenerator.getUniqueGroupKeys();\n while (groupKeys.hasNext()) {\n Pair<Long, String> idKeyPair = groupKeys.next();\n String stringGroupKey = idKeyPair.getSecond();\n\n for (int i = 0; i < _aggrFuncContextList.size(); i++) {\n double resultForGroupKey = _resultHolderArray[i].getResultForGroupKey(idKeyPair.getFirst());\n result.get(i).put(stringGroupKey, resultForGroupKey);\n }\n }\n return result;\n }",
"private static void buildList() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif (connection == null || connection.isClosed()) \r\n\t\t\t\tconnection = DataSourceManager.getConnection();\r\n\t\t\t\r\n\t\t\tstatement = connection.prepareStatement(LOAD_ALL);\r\n\t \tresultset = statement.executeQuery();\r\n\t \t\r\n\t \tgroups = getCollectionFromResultSet(resultset);\r\n\t \tresultset.close();\r\n\t statement.close();\r\n\t\t\t\r\n\t\t} catch (ClassNotFoundException | SQLException e) {\r\n\t\t\tlog.fatal(e.toString());\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\r\n public Set<VisualizationAggregateColumn> getAggregates()\r\n {\n return Collections.emptySet();\r\n }",
"public org.eclipse.stardust.engine.api.runtime.DataQueryResult\n getAllData(org.eclipse.stardust.engine.api.query.DataQuery query)\n throws org.eclipse.stardust.common.error.WorkflowException;",
"@Override\n\tpublic List<Setting> queryall() {\n\t\treturn SettingMapper.queryall();\n\t}",
"public Set<DataSet> getMatchingDataSets(FilterSettingsXML xml) {\n Set<DataSet> filteredDataSets = new HashSet<DataSet>();\n\n // Get the filter types\n ArrayList<FilterTypeXML> filterTypeList = xml.getFilterTypeList();\n\n HashMap<String, ArrayList<String>> filterMap = new HashMap<String, ArrayList<String>>();\n\n // Now filter the available data values\n for (FilterTypeXML filterType : filterTypeList) {\n if (filterType.getValues().size() > 0) {\n filterMap.put(filterType.getFilterType(),\n filterType.getValues());\n }\n }\n\n List<String> providers = null;\n List<String> dataSetNames = null;\n Set<LevelType> levels = null;\n List<String> parameterNames = null;\n\n // iterate over the filters\n for (String filterType : filterMap.keySet()) {\n List<String> values = filterMap.get(filterType);\n\n // If there are no values to filter on, just continue to the next\n // filter\n if (values == null) {\n continue;\n }\n\n if (filterType.equalsIgnoreCase(\"Data Provider\")) {\n providers = values;\n } else if (filterType.equalsIgnoreCase(\"Data Set\")) {\n dataSetNames = values;\n } else if (filterType.equalsIgnoreCase(\"Level\")) {\n levels = new HashSet<LevelType>(values.size());\n for (String value : values) {\n levels.add(LevelType.fromDescription(value));\n }\n } else if (filterType.equalsIgnoreCase(\"Parameter\")) {\n parameterNames = values;\n }\n }\n\n // Add data set types\n List<String> dataSetTypes = xml.getDataSetTypes();\n\n try {\n filteredDataSets.addAll(DataDeliveryHandlers.getDataSetHandler()\n .getByFilters(providers, dataSetNames, levels,\n parameterNames, dataSetTypes, envelope));\n } catch (RegistryHandlerException e) {\n statusHandler.handle(Priority.PROBLEM,\n \"Unable to retrieve the filtered datasets.\", e);\n }\n\n return filteredDataSets;\n }",
"@Explain(displayName = \"grouping sets\")\n @Signature\n public List<Long> getListGroupingSets() {\n if (groupingSetsPresent) {\n return listGroupingSets;\n }\n return null;\n }",
"public List<DataSet> findDataSetEntities() {\n return findDataSetEntities(true, -1, -1);\n }",
"public Collection<GlobalIdEntry> getAllEntries();",
"public SortedSet<String> getAvailableDataSets() {\n if (allAvailableDataSets == null) {\n allAvailableDataSets = new TreeSet<String>();\n\n try {\n List<String> dataTypeList = new ArrayList<String>();\n dataTypeList.add(dataType);\n allAvailableDataSets.addAll(DataDeliveryHandlers\n .getDataSetNameHandler().getByDataTypes(dataTypeList));\n } catch (RegistryHandlerException e) {\n statusHandler.handle(Priority.PROBLEM,\n \"Unable to retrieve the dataset list.\", e);\n }\n }\n\n return allAvailableDataSets;\n }",
"private static void DoGroupBy()\n\t{\n\n\t\tArrayList<Attribute> inAtts = new ArrayList<Attribute>();\n\t\tinAtts.add(new Attribute(\"Int\", \"o_orderkey\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"o_custkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderstatus\"));\n\t\tinAtts.add(new Attribute(\"Float\", \"o_totalprice\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderdate\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderpriority\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_clerk\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"o_shippriority\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Str\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Float\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att4\"));\n\n\t\tArrayList<String> groupingAtts = new ArrayList<String>();\n\t\tgroupingAtts.add(\"o_orderdate\");\n\t\tgroupingAtts.add(\"o_orderstatus\");\n\n\t\tHashMap<String, AggFunc> myAggs = new HashMap<String, AggFunc>();\n\t\tmyAggs.put(\"att1\", new AggFunc(\"none\",\n\t\t\t\t\"Str(\\\"status: \\\") + o_orderstatus\"));\n\t\tmyAggs.put(\"att2\", new AggFunc(\"none\", \"Str(\\\"date: \\\") + o_orderdate\"));\n\t\tmyAggs.put(\"att3\", new AggFunc(\"avg\", \"o_totalprice * Int (100)\"));\n\t\tmyAggs.put(\"att4\", new AggFunc(\"sum\", \"Int (1)\"));\n\n\t\t// run the selection operation\n\t\ttry\n\t\t{\n\t\t\tnew Grouping(inAtts, outAtts, groupingAtts, myAggs, \"orders.tbl\", \"out.tbl\", \"g++\", \"cppDir/\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}",
"protected List<Aggregation> getAggregations(QueryContext queryContext) {\n\t\t\n\t\tif (_log.isDebugEnabled()) {\n\t\t\t_log.debug(\"Getting aggregations.\");\n\t\t}\n\n\t\tif (_aggregationBuilders == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tList<Aggregation> aggregations = new ArrayList<Aggregation>();\n\t\t\t\t\n\t\tfor (AggregationsBuilder aggregationBuilder : _aggregationBuilders) {\n\n\t\t\tif (_log.isDebugEnabled()) {\n\t\t\t\t_log.debug(\n\t\t\t\t\t\"Executing \" +\n\t\t\t\t\t\taggregationBuilder.getClass().getName());\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\taggregations.addAll(\n\t\t\t\t\taggregationBuilder.buildAggregation(queryContext));\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\t_log.error(e.getMessage(), e);\n\t\t\t}\n\t\t}\n\n\t\treturn aggregations;\n\t}",
"@Override\n\tpublic List<Generator> getAll() {\n\n\t\tList<Generator> result = new ArrayList<>();\n\n\t\ttry (Connection c = context.getConnection(); \n\t\t\tStatement stmt = c.createStatement()) {\n\n\t\t\tResultSet rs = stmt.executeQuery(getAllQuery);\n\n\t\t\twhile (rs.next()) {\n \tGenerator generator = new Generator(\n \t\trs.getInt(1),\n \t\trs.getString(2),\n \t\trs.getString(3),\n \t\trs.getInt(4),\n \t\trs.getInt(5),\n \t\trs.getInt(6)\n \t);\n\t\t\t\tresult.add(generator);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t\treturn result;\n\n\t}",
"Map<String, OperationalSets> getSets();",
"public List<AggregateRecord> getData() {\n return data;\n }",
"public java.util.List<DataEntry> findAll();",
"public List<Object[]> gatherData() {\n String testDir = System.getProperty(\"test.dir\");\n logger.info(\"Data from: \" + testDir);\n String testFilter = System.getProperty(\"test.filter\");\n List<Object[]> result = new ArrayList<Object[]>();\n File testDirFile = new File(testDir);\n File rootConfigFile = new File(testDirFile, \"config.properties\");\n Properties rootProp = new Properties();\n InputStream rootIn = null;\n try {\n rootIn = new FileInputStream(rootConfigFile);\n rootProp.load(rootIn);\n } catch (IOException e) {\n // if we can't get root properties, we just take empty root\n // properties\n rootProp = new Properties();\n } finally {\n IOUtils.closeQuietly(rootIn);\n }\n\n File[] childFiles = null;\n if (testFilter == null) {\n childFiles = testDirFile.listFiles();\n } else {\n String[] wildcards = testFilter.split(\";\");\n childFiles = testDirFile\n .listFiles((FilenameFilter) new WildcardFileFilter(\n wildcards));\n }\n int idx = 0;\n for (File child : childFiles) {\n if (child.isDirectory() && directoryContainsConfig(child)) {\n File configFile = new File(child, \"config.properties\");\n Properties prop = new Properties();\n InputStream in = null;\n try {\n in = new FileInputStream(configFile);\n prop.load(in);\n \n String parent = prop.getProperty(PARENT_CFG);\n if(parent != null) {\n \tFile parentFile = new File(child, parent);\n \tif(parentFile.exists()) {\n \t\tprop.clear();\n \t\tprop.load(new FileInputStream(parentFile));\n \t\tprop.load(new FileInputStream(configFile));\n \t}\n }\n \n if (isSupportedTestType(prop)) {\n Object[] data = extractDataFromConfig(configFile,\n rootProp, prop);\n result.add(data);\n String testName = idx + \"-\" + data[1].toString();\n ((BaseSignatureTestData)data[2]).setUniqueUnitTestName(testName);\n idx++;\n }\n } catch (IOException e) {\n logger.warn(\n \"Could not run test with config:\"\n + configFile.getAbsolutePath(), e);\n } finally {\n if (in != null)\n IOUtils.closeQuietly(in);\n }\n }\n }\n return result;\n }",
"private DataSet constantDataSet(){\n DataSet dataSet = new DataSet();\n Task[] tasks = new Task[NUM_DISTINCT_TASKS];\n //generate taks with all 50 mills\n for(int i=0; i < NUM_DISTINCT_TASKS; i++){\n UUID uuid = UUID.randomUUID();\n tasks[i] = new Task(TARGET_MEAN, uuid);\n }\n for(int i=0; i < NUM_TASKS; i++){\n dataSet.getTasks().add(tasks[random.nextInt(NUM_DISTINCT_TASKS)]);\n }\n return dataSet;\n }",
"public void loadGraph() {\n\t\tJSONArray data = null;\n\n\t\tswitch (mApp.getCurrentGroupBy()) {\n\t\tcase DATE:\n\n\t\t\tdata = DataBaseUtil.fetchEntriesByDateInJSON(mContext, mType.getId());\n\t\t\tbreak;\n\n\t\tcase MAX:\n\n\t\t\tdata = DataBaseUtil.fetchEntriesByMaxInJSON(mContext, mType.getId());\n\t\t\tbreak;\n\n\t\tcase NONE:\n\t\t\tdata = DataBaseUtil.fetchEntriesInJSON(mContext, mType.getId());\n\t\t\tbreak;\n\t\t}\n\t\tloadGraph(data);\n\t}",
"public DataSourceListType invokeQueryDatasources() throws TsResponseException {\n checkSignedIn();\n final String url = getUriBuilder().path(QUERY_DATA_SOURCES).build(m_siteId).toString();\n final TsResponse response = get(url);\n return response.getDatasources();\n }",
"private static void groupDataSetSamples(Map<EMailAddress, EntityTrackingEmailData> result,\n TrackedEntities trackedEntities)\n {\n for (AbstractExternalData dataSet : trackedEntities.getDataSets())\n {\n for (EMailAddress recipient : getDataSetTrackingRecipients(dataSet))\n {\n final EntityTrackingEmailData emailData =\n getOrCreateRecipientEmailData(result, recipient);\n emailData.addDataSet(dataSet);\n }\n }\n }",
"@Override\r\n\tpublic Collection selectALLData(Connection con) {\n\t\treturn select(con);\r\n\t}",
"public ArrayList<String> getDistinctADGroups() throws Exception {\n\t\tArrayList<String> DistinctADGroups = new ArrayList<String>();\n\t\tConnection connection = null;\n\t\tString activeDirectoryGroup = null;\n\t\ttry {\n\t\t\tconnection = getDefaultConnection();\n\t\t\tif (connection != null) {\n\t\t\t\tStatement statement = connection.createStatement();\n\n\t\t\t\tString query = \"select distinct ActiveDirectoryGroup from Application_ActiveDirectoryGroup where ApplicationName = 'Shop Floor Admin'\";\n\n\t\t\t\tResultSet resultSet = statement.executeQuery(query);\n\n\t\t\t\twhile (resultSet.next()) {\n\t\t\t\t\tactiveDirectoryGroup = resultSet\n\t\t\t\t\t\t\t.getString(\"ActiveDirectoryGroup\");\n\t\t\t\t\tDistinctADGroups.add(activeDirectoryGroup);\n\t\t\t\t}\n\t\t\t\tresultSet.close();\n\t\t\t\tresultSet = null;\n\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Error: No active Connection\");\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Exception in fetching app properties\");\n\t\t\te.printStackTrace();\n\n\t\t} finally {\n\t\t\tcloseConnection(connection);\n\t\t}\n\t\treturn DistinctADGroups;\n\t}",
"Page<Map<String, Object>> getAggregatedValues(AggregationInfo aggregationInfo, Pageable pageable);",
"public ArrayList getDimensions(String grpId) {\r\n ArrayList finalList = new ArrayList();\r\n// PbBussGrpResourceBundle resBundle = new PbBussGrpResourceBundle();\r\n try {\r\n\r\n PbReturnObject retObj = null;\r\n String finalQuery = null;\r\n String[] colNames = null;\r\n Object obj[] = new Object[1];\r\n obj[0] = grpId;\r\n String sql = getResourceBundle().getString(\"getBusinessGroupDimList\");\r\n finalQuery = buildQuery(sql, obj);\r\n retObj = execSelectSQL(finalQuery);\r\n colNames = retObj.getColumnNames();\r\n for (int i = 0; i < retObj.getRowCount(); i++) {\r\n BusinessGrpsTreeTable dimension = new BusinessGrpsTreeTable();\r\n dimension.setDimensionName(retObj.getFieldValueString(i, colNames[1]));\r\n dimension.setDimensionId(String.valueOf(retObj.getFieldValueInt(i, colNames[0])));\r\n ArrayList tableList = new ArrayList();\r\n\r\n tableList = getTableList(String.valueOf(retObj.getFieldValueInt(i, colNames[0])), grpId);\r\n dimension.setDimTableList(tableList);\r\n ArrayList membersList = new ArrayList();\r\n membersList = getMembersList(String.valueOf(retObj.getFieldValueInt(i, colNames[0])), grpId);\r\n dimension.setDimMembersList(membersList);\r\n ArrayList hierarchyList = new ArrayList();\r\n hierarchyList = getHeirarchyList(String.valueOf(retObj.getFieldValueInt(i, colNames[0])), grpId);\r\n dimension.setDimHierarchyList(hierarchyList);\r\n //.println.println(\"hierarchy list==\" + hierarchyList.size());\r\n finalList.add(dimension);\r\n }\r\n } catch (Exception e) {\r\n logger.error(\"Exception:\", e);\r\n }\r\n\r\n return finalList;\r\n }",
"@Transactional(readOnly = true)\n @Override\n public List<org.wiredwidgets.cow.server.api.service.Group> findAllGroups() {\n \n List<Group> groups = new ArrayList<Group>();\n\n for (String groupId : identityService.findGroupIdsByUser(ROOT_USER)) {\n groups.add(identityService.findGroupById(groupId));\n }\n return this.convertGroups(groups);\n }",
"public ResultSet[] getResultSets() {\n\n migratePathTestResults();\n return resultSets != null ? resultSets.clone() : null;\n }",
"@TransactionAttribute(TransactionAttributeType.SUPPORTS)\r\n\t\tpublic List<DatosGrlsProyectoDO> getAllAll() throws ConectelException {\r\n\t\t\tTypedQuery<DatosGrlsProyectoDO> query = entityManager.createNamedQuery(\r\n\t\t\t\t\t\"DatosGrlsProyectoDO.findAllAll\", DatosGrlsProyectoDO.class);\r\n\t\t\tList<DatosGrlsProyectoDO> dataProjectList;\r\n\t\t\ttry {\r\n\t\t\t\tdataProjectList = query.getResultList();\r\n\t\t\t} catch(NoResultException e) {\r\n\t\t\t\tthrow new ConectelException(\"No existen Datos Generales registrados.\");\r\n\t\t\t}\r\n\t\t\treturn dataProjectList;\r\n\t\t}",
"List<HostSummaryByStatementType> selectAll();",
"private static void loadResults() {\r\n\t\tint index = 5;\r\n\t\tsiteMap = new HashMap<String, Map<String, List<? extends TransactionData>>>();\r\n\t\ttry(MongoClient connection = new MongoClient(\"localhost\", 27017);){\r\n\t\t\twhile(index >= 5 && index <= 9) {\r\n\t\t\t\tString dbName = \"site\" + index + \"ResultsDB\";\r\n\t\t\t\tMongoDatabase database = connection.getDatabase(dbName);\r\n\t\t\t\tcollectionsMap = new HashMap<String, List<? extends TransactionData>>();\r\n\t\t\t\tfor (String collection : database.listCollectionNames()) {\r\n\t\t\t\t\ttry(MongoCursor<Document> iterator = database.getCollection(collection).find().iterator();) {\r\n\t\t\t\t\t\tloadCollectionData(iterator, collection);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tsiteMap.put(\"site\" + index, collectionsMap);\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Value.Default\n public int maxQueryAggregates() {\n return ConfigDefaults.ADVANCED_MAX_QUERY_AGGREGATES;\n }",
"private static void generateDatasets(int time_span, int time_granularity) {\n\n String[] city = {\n \"dm\", //Des Moines\n \"bo\", //Boston\n \"sf\" //San Francisco\n };\n\n double[] gridLength = { //relates (mostly) to number of agents\n 10,\n 30,\n 50,\n 100,\n 350,\n 500,\n 850,\n 1000,\n 1500,\n 2000,\n };\n\n double[] clusterDiv = { //multiply grid length by this and plug into radius in order for this to be number of clusters\n 1,\n 2,\n 4,\n 8,\n 16,\n 32,\n 64,\n 128,\n 256,\n 512,\n 1024\n };\n\n final int MIN_DEV = 2; final int MAX_DEV = 6; //minimum and maximum amount of devices per house to generate files for\n final int NUM_GRID_SIZES = 5; //number of different grid sizes to generate from the list above, some of the larger problems might be to big for some computers to handle\n for(int i = 0; i < city.length; i++) { // for each city\n for(int j = 0; j < NUM_GRID_SIZES; j++) { //for each grid size\n\n Topology topo = generateTopology(i, gridLength[j], 1);\n for(int d = MIN_DEV; d <= MAX_DEV; d++) {\n String fileName = \"datasets/\" + city[i]\n + \"_\" + topo.getNumAgents()\n + \"_\" + topo.getNumClusters()\n + \"_\" + d;\n generateSHDSInstances(fileName, d, topo, time_span, time_granularity);\n\n if(d == MAX_DEV) {\n Topology temp = topo;\n for (int k = 2; temp != null && k < clusterDiv.length; k++) {\n temp = generateTopology(i, gridLength[j], clusterDiv[k]);\n if (temp == null) continue; // if num_agents < agents_per_cluster then stop\n else topo = temp;\n }\n fileName = \"datasets/\" + city[i]\n + \"_\" + topo.getNumAgents()\n + \"_\" + topo.getNumClusters()\n + \"_\" + d;\n generateSHDSInstances(fileName, d, topo, time_span, time_granularity);\n }\n }\n }\n }\n }",
"public Map<String, List<BenchmarkResultSet>> groupByBenchmark() {\n Map<String, List<BenchmarkResultSet>> groupedResults = new HashMap<>();\n if (getResults()!= null) {\n groupedResults = getResults().stream()\n .collect(Collectors.groupingBy(BenchmarkResultSet::getName));\n }\n return groupedResults;\n }",
"Aggregators retrieveAggregators() throws RepoxException;",
"public void aggregate() {\n\t\tIAggregate selectedAggregation = this.gui.getSelectedAggregation();\n\t\tthis.output(selectedAggregation.aggregate(satelliteList));\n\t}",
"private Set calculateTimeSet() {\n List choices = getDataChoices();\n if (choices.isEmpty()) {\n return null;\n }\n Set newSet = null;\n for (int i = 0; i < choices.size(); i++) {\n try {\n VerticalProfileInfo info = getVPInfo(i);\n GridDataInstance dataInstance = info.getDataInstance();\n Set set = GridUtil.getTimeSet(dataInstance.getGrid());\n //System.out.println(\"di.timeset[\"+i+\"] = \" + set);\n if (set != null) {\n if (newSet == null) {\n newSet = set;\n } else {\n newSet = newSet.merge1DSets(set);\n }\n }\n } catch (Exception e) {\n logger.error(\"Problem calculating TimeSet\", e);\n }\n }\n //System.out.println(\"merged time set = \" + newSet);\n return newSet;\n }",
"public List<DataGroupInfo> getActiveGroups()\n {\n return New.list(myActiveGroups);\n }",
"public List<GroupType> getAllGroupDataTypes() throws Exception{\n\t\tList<GroupType> result=null;\n\t\tPreparedStatement preparedSELECTstatement;\n\t\tResultSet resultSet = null;\n\t\t\n\t\t// look up the user by name which should be unique\n\t\t//\n\t\t\n\t\t// get the connection\n\t\tConnection conn = openConnection();\n\t\t\n\t\t// \n\t\t// process the request\n\t\t\n\t\t// get first all the \n\t\t\n\t\t// create the statement to get all JOINS of the different tree elements\n\t\tpreparedSELECTstatement = conn\n .prepareStatement(\"SELECT * FROM group_data_type\"\n \t\t);\n\n\t\t// execute the statement \n resultSet = preparedSELECTstatement.executeQuery();\n \n //\n // process the result\n result = extractGroupsTypesFromResult(resultSet);\n\n\t\t// release the connection\n\t\tcloseConnection(conn);\n\t\t\t\t\n\t\t// return the result\n\t\treturn result;\n\t}",
"@Override\r\n\tpublic List<AsxDataVO> findAll() {\n\t\treturn mongoTemplate.find(new Query(), AsxDataVO.class);\r\n\t}",
"public List<MS> selectAllEntries() throws SQLException {\r\n Connection connection = super.getDataSource().getConnection();\r\n try {\r\n PreparedStatement pstmt = connection\r\n .prepareStatement(\"SELECT ID, NAME,\" + COMPONENT + \",TOTAL \"\r\n \t\t\t\t+ \"FROM ROOT\");\r\n ResultSet rs = pstmt.executeQuery();\r\n ArrayList<MS> list = new ArrayList<MS>();\r\n while (rs.next()) {\r\n MS ms = new MS();\r\n ms.setId(new Integer(rs.getInt(1)));\r\n \r\n ms.setSum(super.getSum(ms.getId()));\r\n \r\n \r\n ms.setName(rs.getString(2));\r\n ms.generateINumber();\r\n \r\n ms.setMs(rs.getInt(3));\r\n ms.setTotal(rs.getInt(4));\r\n list.add(ms);\r\n }\r\n Collections.sort(list);;\r\n return list;\r\n } finally {\r\n if (connection != null) {\r\n connection.close();\r\n }\r\n }\r\n }",
"@Override\n public Optional<List<Object[]>> getPopulateTempTableContent() {\n List<Object[]> batchArgs = new ArrayList<>();\n\n for (DataSet dataSet : objects) {\n CategoryCombo categoryCombo = dataSet.getCategoryCombo();\n\n for (OrganisationUnit orgUnit : dataSet.getSources()) {\n if (!categoryCombo.isDefault()) {\n if (orgUnit.hasCategoryOptions()) {\n Set<CategoryOption> orgUnitOptions = orgUnit.getCategoryOptions();\n\n for (CategoryOptionCombo optionCombo : categoryCombo.getOptionCombos()) {\n Set<CategoryOption> optionComboOptions = optionCombo.getCategoryOptions();\n\n if (orgUnitOptions.containsAll(optionComboOptions)) {\n Date startDate =\n DateUtils.min(\n optionComboOptions.stream()\n .map(co -> co.getStartDate())\n .collect(Collectors.toSet()));\n Date endDate =\n DateUtils.max(\n optionComboOptions.stream()\n .map(co -> co.getAdjustedEndDate(dataSet))\n .collect(Collectors.toSet()));\n\n List<Object> values =\n Lists.newArrayList(\n dataSet.getId(), orgUnit.getId(), optionCombo.getId(), startDate, endDate);\n\n batchArgs.add(values.toArray());\n }\n }\n }\n } else {\n List<Object> values =\n Lists.newArrayList(\n dataSet.getId(), orgUnit.getId(), defaultOptionCombo.getId(), null, null);\n\n batchArgs.add(values.toArray());\n }\n }\n }\n\n return Optional.of(batchArgs);\n }",
"@Override\n\tpublic List<Config_Entity> get_all_config() {\n\t\treturn config.get_all_config();\n\t}",
"public PagingOutput<DerivedProjectDataSetOutputModel> queryDerivedDataSet(QueryDerivedDataSetApi.Input input) {\n Where where = Where\n .create()\n .equal(\"projectId\", input.getProjectId())\n .equal(\"dataSetId\", input.getDataSetId())\n .equal(\"sourceFlowId\", input.getSourceFlowId())\n .equal(\"sourceJobId\", input.getSourceJobId());\n\n if (input.getSourceType() == null) {\n where.notEqual(\"sourceType\", null, false);\n } else {\n where.equal(\"sourceType\", input.getSourceType());\n }\n\n where.orderBy(\"createdTime\", OrderBy.desc);\n\n PagingOutput<ProjectDataSetMySqlModel> page = projectDataSetRepo.paging(where.build(ProjectDataSetMySqlModel.class), input);\n\n List<DerivedProjectDataSetOutputModel> list = page\n .getList()\n .parallelStream()\n .map(this::buildDerivedProjectDataSetOutputModel)\n .collect(Collectors.toList());\n\n return PagingOutput.of(page.getTotal(), list);\n\n }",
"@Override\r\n\tpublic List<ReportAndSummary> findAll() {\n\t\tList<ReportAndSummary> result = reportAndSummaryDao.findAll();\r\n\t\treturn result;\r\n\t}",
"public List<SalesOrderAggregatedCreated> selectAll();",
"public void clearFetchGroups() {\n\t\tquery.getFetchPlan().clearFetchGroups();\n\t}",
"private static Set<Dataset> findDatasets(Datasource d, String query) {\n String[] words = query.split(\"\\\\+\");\n Set<String> keyWords = new HashSet<String>();\n for (String word : words) {\n keyWords.add(word.toLowerCase());\n }\n Set<Dataset> ret = new HashSet<Dataset>();\n String tags;\n for (Dataset set : d.getDatasets()) {\n tags = set.getTags();\n if (intersects(tags, keyWords)) {\n ret.add(set);\n }\n } \n return ret;\n }",
"@Override\n\tpublic List<Site> getAllSites() {\n\t\tList<Site> sites = new ArrayList<>();\n\n\t\tString sql = \"SELECT site_id, campground_id, site_number, max_occupancy, accessible, max_rv_length, utilities \"\n\t\t\t\t+ \"FROM site\";\n\n\t\tSqlRowSet results = jdbcTemplate.queryForRowSet(sql);\n\n\t\twhile (results.next()) {\n\t\t\tsites.add(mapRowToSite(results));\n\t\t}\n\t\t// \n\n\t\treturn sites;\n\t}",
"@NonNull\n Collection<TObj> getAll() {\n Collection<TObj> result = new LinkedList<>();\n for (int countR = mData.size(), i = 0; i < countR; i++) {\n int rowKey = mData.keyAt(i);\n SparseArrayCompat<TObj> columns = mData.get(rowKey);\n for (int countC = columns.size(), j = 0; j < countC; j++) {\n int key = columns.keyAt(j);\n result.add(columns.get(key));\n }\n }\n return result;\n }",
"public java.util.List<Dimension> getDimensionsAll();",
"public Iterable<DataSegment> iterateAllSegments()\n {\n return () -> dataSources.values().stream().flatMap(dataSource -> dataSource.getSegments().stream()).iterator();\n }",
"public List<Object> retrieveIncrementalGroups() {\n List<Object> result = new ArrayList<Object>();\n for (ProvisioningGroupWrapper provisioningGroupWrapper : this.provisioningGroupWrappers) {\n \n if (provisioningGroupWrapper.getGrouperTargetGroup() != null) {\n result.add(provisioningGroupWrapper.getGrouperTargetGroup());\n } else if (provisioningGroupWrapper.getGrouperProvisioningGroup() != null) {\n result.add(provisioningGroupWrapper.getGrouperProvisioningGroup());\n } else if (provisioningGroupWrapper.getGcGrouperSyncGroup() != null) {\n result.add(provisioningGroupWrapper.getGcGrouperSyncGroup());\n } else if (provisioningGroupWrapper.getProvisioningStateGroup() != null) {\n result.add(provisioningGroupWrapper.getProvisioningStateGroup());\n }\n }\n return result;\n }",
"public List<OwnerQueryStatsDTO> getQueries() {\n\t\tif (queries == null) {\n\t\t\ttry (Config config = ConfigFactory.get()) {\n\n\t\t\t queries = DbUtil.getOwnerQueries(config, userBean.getUserId(), getFilterTerms(),\n\t\t\t\t\t flagFilter);\n\t\t\t\tsortQueries();\n\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn queries;\n\t}",
"private static Set<String> getCurrencySet() {\n Set<String> currencySet = new HashSet<>();\n for (int i= 0; i<getDataBase().length;i++){\n currencySet.add(getDataBase()[i][0]);\n }\n return Collections.synchronizedSet(currencySet);\n }",
"@GetMapping(\"/all\")\n public BasePageResponse getAllGroup() throws NodeMgrException {\n BasePageResponse pageResponse = new BasePageResponse(ConstantCode.SUCCESS);\n Instant startTime = Instant.now();\n log.info(\"start getAllGroup startTime:{}\", startTime.toEpochMilli());\n\n // get group list\n int count = groupService.countOfGroup(null, GroupStatus.NORMAL.getValue());\n if (count > 0) {\n List<TbGroup> groupList = groupService.getGroupList(GroupStatus.NORMAL.getValue());\n pageResponse.setTotalCount(count);\n pageResponse.setData(groupList);\n }\n\n // reset group\n resetGroupListTask.asyncResetGroupList();\n\n log.info(\"end getAllGroup useTime:{} result:{}\",\n Duration.between(startTime, Instant.now()).toMillis(),\n JsonTools.toJSONString(pageResponse));\n return pageResponse;\n }",
"@Override\n\tpublic void getGroupAndCount(RpcController controller, ExpandAggregationRequest request,\n\t\t\tRpcCallback<ExpandAggregationResponse> done) {\n\t\tInternalScanner scanner = null;\n\t\ttry {\n\t\t\t// 通过protobuf传来的Scan,scan已经添加groupBy column和count lie\n\t\t\tScan scan = ProtobufUtil.toScan(request.getScan());\n\t\t\tscanner = environment.getRegion().getScanner(scan);\n\t\t\tList<ExpandCell> groupList = request.getGroupColumnsList();\n\t\t\tList<ExpandCell> countList = request.getCountColumnsList();\n\t\t\tboolean hashNext = false;\n\t\t\tList<Cell> results = new ArrayList<Cell>();\n\t\t\tArrayList<TempRow> rows = new ArrayList<TempRow>();\n\t\t\tdo {\n\t\t\t\thashNext = scanner.next(results);//id 4\n\t\t\t\tTempRow tempRow = new TempRow();\n\t\t\t\tfor (Cell cell : results) {\n\t\t\t\t\tString family = Bytes.toString(cell.getFamilyArray(), cell.getFamilyOffset(),\n\t\t\t\t\t\t\tcell.getFamilyLength());\n\t\t\t\t\tString qualify = Bytes.toString(cell.getQualifierArray(), cell.getQualifierOffset(),\n\t\t\t\t\t\t\tcell.getQualifierLength());\n\t\t\t\t\tfor (ExpandCell gCell : groupList) {\n\t\t\t\t\t\tif (family.equals(gCell.getFamily()) && qualify.equals(gCell.getQualify())) {\n\t\t\t\t\t\t\tString value = Bytes.toString(cell.getValueArray(), cell.getValueOffset(),\n\t\t\t\t\t\t\t\t\tcell.getValueLength());\n\t\t\t\t\t\t\tSystem.out.println(value);\n\t\t\t\t\t\t\ttempRow.setKey(value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (Cell cell : results) {\n\t\t\t\t\tString family = Bytes.toString(cell.getFamilyArray(), cell.getFamilyOffset(),\n\t\t\t\t\t\t\tcell.getFamilyLength());\n\t\t\t\t\tString qualify = Bytes.toString(cell.getQualifierArray(), cell.getQualifierOffset(),\n\t\t\t\t\t\t\tcell.getQualifierLength());\n\t\t\t\t\tfor (ExpandCell gCell : countList) {\n\t\t\t\t\t\tif (family.equals(gCell.getFamily()) && qualify.equals(gCell.getQualify())) {\n\t\t\t\t\t\t\tString value = Bytes.toString(cell.getValueArray(), cell.getValueOffset(),\n\t\t\t\t\t\t\t\t\tcell.getValueLength());\n\t\t\t\t\t\t\ttempRow.setValue(value);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trows.add(tempRow);\n\t\t\t} while (hashNext);\n\t\t\tArrayList<ResultRow> ResultRows = analyzeRow(rows);\n\t\t\tArrayList<RpcResultRow> rpcResultRows = changeToRpcResultRow(ResultRows);\n\t\t\tWxsGroupByProto3.ExpandAggregationResponse.Builder responsBuilder = WxsGroupByProto3.ExpandAggregationResponse\n\t\t\t\t\t.newBuilder();\n\t\t\tfor (RpcResultRow rpcResultRow : rpcResultRows) {\n\t\t\t\tresponsBuilder.addResults(rpcResultRow);\n\t\t\t}\n\t\t\tdone.run(responsBuilder.build());\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tscanner.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t}",
"protected abstract <T extends Group> List<T> doSelectAllGroups(Connection con)\n throws TorqueException;",
"public HashSet<Integer> findMergeDatasets(HashSet<Integer> datasets, int mergeType) {\n String existingDatasetsQuery = \"SELECT ds.dataset_id FROM \"\n + getQualifiedSrcDsTableName() + \" ds JOIN \" + DATASET_TABLE_NAME\n + \" USING (dataset_name)\"\n + \" WHERE ds.dataset_id IN \" + populateInClause(datasets);\n\n Session session = getSession();\n HashSet<Integer> ids;\n\n try {\n ids = new HashSet<Integer>(\n session.createSQLQuery(existingDatasetsQuery).list());\n\n /* Check to make sure the transaction count is greater than what we already have. */\n if (mergeType == 1 && datasets.size() > 0 && ids.size() > 0) {\n Iterator<Integer> it = datasets.iterator();\n Integer sourceId;\n /* Must use iterator if we're removing from the list */\n while (it.hasNext()) {\n sourceId = (Integer) it.next();\n logger.debug(\"Testing merge with source appended dataset id \" + sourceId\n + \" for \" + \"new transactions.\");\n String existingIdQuery = \"SELECT ds.dataset_id FROM \" + DATASET_TABLE_NAME\n + \" ds JOIN \" + getQualifiedSrcDsTableName()\n + \" srcds USING (dataset_name) \"\n + \"WHERE srcds.dataset_id = \" + sourceId.intValue();\n Integer existingId = (Integer) session.createSQLQuery(\n existingIdQuery).list().get(0);\n logger.debug(existingId);\n\n logger.debug(\"Retrieving existing transaction count\");\n String existingTxCountQuery = \"SELECT count(transaction_id) \"\n + \"FROM tutor_transaction \"\n + \"WHERE dataset_id = \"\n + existingId.intValue();\n BigInteger existingTxCount = (BigInteger) session.createSQLQuery(\n existingTxCountQuery).list().get(0);\n logger.debug(existingTxCount);\n\n logger.debug(\"Retrieving new transaction count\");\n String newTxCountQuery = \"SELECT count(transaction_id) FROM \" + sourceDB\n + \".tutor_transaction WHERE dataset_id = \" + sourceId.intValue();\n BigInteger difference = ((BigInteger) session.createSQLQuery(\n newTxCountQuery).list().get(0)).subtract(existingTxCount);\n logger.debug(\"Difference between source tx count and existing tx count = \"\n + difference.longValue());\n\n if (difference.longValue() <= 0) {\n logger.info(\"Removing dataset id \" + sourceId\n + \" because the transaction count is the same.\");\n it.remove();\n }\n }\n }\n } finally {\n releaseSession(session);\n }\n datasets.retainAll(ids);\n return new HashSet<Integer>(datasets);\n }",
"private List<Object> handleAggregates(List<Object> resultSet)\n {\n final Expression[] grouping = compilation.getExprGrouping();\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 // 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 groups.add(group);\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 List<Object> result = new ArrayList<>();\n Expression having = compilation.getExprHaving();\n if (having != null)\n {\n for (int i=0; i<groups.size(); i++)\n {\n if (satisfiesHavingClause(groups.get(i)))\n {\n result.addAll(groups.get(i));\n }\n }\n }\n else\n {\n for (int i = 0; i < groups.size(); i++)\n {\n result.addAll(groups.get(i));\n }\n }\n return result;\n }",
"public java.util.List<DataEntry> findByGroupId(long groupId);",
"Collection getUniqueKeysInGroup(Object groupID) throws Exception;",
"List<UmsIntegrationConsumeSetting> selectAll();",
"public java.util.List<DataEntry> filterFindByGroupId(long groupId);",
"public void getAllResults()\n {\n for(String module: modules.keySet())\n {\n getResults(module);\n }\n }",
"public Collection<BaseData> getBaseData() {\n\t\tQuery query = em.createQuery(\"from BaseData\");\n\t\treturn (List<BaseData>)query.getResultList();\n\t}",
"@Override\n public Map<String, Object> queryAllTaskGroup(User loginUser, Integer pageNo, Integer pageSize) {\n return this.doQuery(loginUser, pageNo, pageSize, loginUser.getId(), null, null);\n }",
"public List<Configuration> getAll();",
"public void executeGroupByCriteria() {\n Session session = getSession();\n Transaction transaction = session.beginTransaction();\n\n // SELECT name, price\n ProjectionList projectionList = Projections.projectionList();\n projectionList.add(Projections.groupProperty(\"name\"));\n projectionList.add(Projections.property(\"price\"));\n\n // FROM Product p\n Criteria criteria = session.createCriteria(Product.class);\n\n // GROUP BY p.name\n criteria.setProjection(projectionList);\n\n displayObjectsList(criteria.list());\n transaction.commit();\n }",
"protected final Map<String, Object> getAllData() throws IOException, InterruptedException {\n final Map<String, Object> res = new HashMap<String, Object>(this.getRg().getCommonData());\r\n // plus les données de ce generateur en particulier\r\n res.putAll(this.getData());\r\n return res;\r\n }",
"public List<Organization> getAll() throws SQLException {\n\t\tlogger.info(\"[Organization] get\");\n\t\treturn organizationDao.queryForAll();\n\t}",
"public Relation group(ArrayList<String> params, ArrayList<String> aggregates, ArrayList<String> groupBy){\n Relation table = new Relation();\n\n // Create columns for new table\n for(int i = 0; i < params.size(); i++){\n Col c = getColumnByName(params.get(i));\n\n String name = params.get(i);\n\n if(!aggregates.get(i).isEmpty()){\n name += \"-\" + aggregates.get(i);\n }\n\n table.insertColumn(new Col(name, c.getType(), c.getMaxLength(), c.getDecimalsAllowed(), false));\n }\n\n if(groupBy.size() == 1 && groupBy.get(0).charAt(0) == '('){\n\n Relation r = select(params, EMPTY_LIST, EMPTY_LIST);\n ArrayList<String> values = new ArrayList<>();\n\n for(int i = 0; i < params.size(); i++){\n\n if(aggregates.get(i).isEmpty()){\n values.add(r.getColumnByName(params.get(i)).getRec(0).getLastEntry().getData());\n }\n else{\n if(aggregates.get(i).equals(\"avg\")){\n values.add(Double.toString(r.average(params.get(i))));\n }\n else if(aggregates.get(i).equals(\"count\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Integer.toString(r.count(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"sum\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.sum(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"min\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.min(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"max\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.max(p, c, a)));\n\n }\n else{\n System.out.println(\"Relation.group: Unexpected scenerio occurred\");\n System.exit(2);\n }\n }\n\n }\n\n table.insert(values);\n values.clear();\n\n return table;\n }\n\n //Get distinct group values\n HashSet<String> distinct = new HashSet<>();\n HashMap<String, Relation> tables = new HashMap<>();\n Relation temp = new Relation();\n\n ArrayList<Col> columns = new ArrayList<>();\n for(String group : groupBy){\n columns.add(getColumnByName(group));\n temp.insertColumn(getColumnByName(group));\n }\n\n for(int i = 0; i < columns.get(0).size(); i++){\n ArrayList<Rec> rec = temp.getRecordsByRowIndex(i);\n String groups = \"\";\n\n for(Rec value : rec){\n groups += value.getLastEntry().getData() + \",\";\n }\n\n groups = groups.substring(0, groups.length()-1);\n\n distinct.add(groups);\n }\n\n /*Col col = getColumnByName(groupBy);\n for(Rec rec : col.getRecs()){\n distinct.add(rec.getLastEntry().getData());\n }*/\n\n for(String d : distinct) {\n\n ArrayList<String> p = new ArrayList<>();\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n String[] split = d.split(\",\");\n for(int i = 0; i < split.length; i++) {\n c.add(groupBy.get(i) + \" = \" + split[i]);\n }\n\n for(int i = 1; i < split.length; i++){\n a.add(\"AND\");\n }\n\n Relation r = this.select(p, c, a);\n tables.put(d, r);\n }\n\n for(String d : distinct){\n\n Relation r = tables.get(d);\n ArrayList<String> values = new ArrayList<>();\n\n for(int i = 0; i < params.size(); i++){\n\n if(aggregates.get(i).isEmpty()){\n values.add(r.getColumnByName(params.get(i)).getRec(0).getLastEntry().getData());\n }\n else{\n if(aggregates.get(i).equals(\"avg\")){\n values.add(Double.toString(r.average(params.get(i))));\n }\n else if(aggregates.get(i).equals(\"count\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n String[] split = d.split(\",\");\n for(int j = 0; j < split.length; j++) {\n c.add(groupBy.get(j) + \" = \" + split[j]);\n }\n\n for(int j = 1; j < split.length; j++){\n a.add(\"AND\");\n }\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Integer.toString(r.count(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"sum\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n String[] split = d.split(\",\");\n for(int j = 0; j < split.length; j++) {\n c.add(groupBy.get(j) + \" = \" + split[j]);\n }\n\n for(int j = 1; j < split.length; j++){\n a.add(\"AND\");\n }\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.sum(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"min\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n String[] split = d.split(\",\");\n for(int j = 0; j < split.length; j++) {\n c.add(groupBy.get(j) + \" = \" + split[j]);\n }\n\n for(int j = 1; j < split.length; j++){\n a.add(\"AND\");\n }\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.min(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"max\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n String[] split = d.split(\",\");\n for(int j = 0; j < split.length; j++) {\n c.add(groupBy.get(j) + \" = \" + split[j]);\n }\n\n for(int j = 1; j < split.length; j++){\n a.add(\"AND\");\n }\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.max(p, c, a)));\n\n }\n else{\n System.out.println(\"Relation.group: Unexpected scenerio occurred\");\n System.exit(2);\n }\n }\n\n }\n\n table.insert(values);\n values.clear();\n\n }\n\n return table;\n\n }",
"protected SortedSet<Select2OptGroup> getListOfAllInstances(Class<? extends DefinitionsChildId> clazz) throws RepositoryCorruptException {\n Select2DataWithOptGroups data = new Select2DataWithOptGroups();\n\n IRepository repo = RepositoryFactory.getRepository();\n Collection<? extends DefinitionsChildId> instanceIds = repo.getAllElementsReferencingGivenType(clazz, this.id.getQName());\n\n for (DefinitionsChildId instanceId : instanceIds) {\n String groupText = instanceId.getNamespace().getDecoded();\n String text = BackendUtils.getName(instanceId, repo);\n data.add(groupText, instanceId.getQName().toString(), text);\n }\n\n return data.asSortedSet();\n }",
"public List<Group_Entity> getAllGroups() {\n\t\tList<Group_Entity> list = new ArrayList<>();\n\t\tgroupRepo.findAll().forEach(list::add);\n\t\treturn list;\n\t}",
"private DataSet normalDataSet(){\n //create normal distribution with mean .05 and sd .05/3 so that 99.7% of events are < .1\n NormalDistribution normalDistribution = new NormalDistribution(TARGET_MEAN, TARGET_MEAN/3D);\n DataSet dataSet = new DataSet();\n Task[] tasks = new Task[NUM_DISTINCT_TASKS];\n //generate costs from sampling from normal distribution\n for(int i=0; i < NUM_DISTINCT_TASKS; i++){\n UUID uuid = UUID.randomUUID();\n Long cost = (long) Math.max(1, normalDistribution.sample()); //make sure no 0 cost events\n tasks[i] = new Task(cost, uuid);\n }\n //generate task multiplities from sampling from uniform distribution\n for(int i=0; i < NUM_TASKS; i++){\n dataSet.getTasks().add(tasks[random.nextInt(NUM_DISTINCT_TASKS)]);\n }\n return dataSet;\n }",
"String findConfigInfoAggrByPageFetchRows(int startRow, int pageSize);",
"static void aggregate(String workingDir) {\n String inputPath = workingDir + \"/processed\";\n String outputPath = workingDir + \"/aggregated\";\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 \n\n AggregatorStrategy[] strategies = new AggregatorStrategy[] {\n new DomainCountCSVAggregatorStrategy(new TruncateDay()),\n new DomainCountCSVAggregatorStrategy(new TruncateMonth()),\n new FullDomainCountCSVAggregatorStrategy(new TruncateMonth()),\n new CodeCountCSVAggregatorStrategy(new TruncateMonth()),\n new CodeCountCSVAggregatorStrategy(new TruncateDay()),\n\n new GroupedFullDomainsAggregatorStrategy(),\n new DOICountCSVAggregatorStrategy(),\n\n new AllCountCSVAggregatorStrategy(new TruncateDay()),\n new AllCountCSVAggregatorStrategy(new TruncateMonth())\n };\n\n \n try {\n List<Thread> threads = new ArrayList<>();\n for (AggregatorStrategy strategy: strategies) {\n System.out.format(\"Aggregate with strategy: %s \\n\", strategy.toString());\n Aggregator aggregator = new Aggregator(input, output, strategy);\n Thread thread = new Thread(aggregator);\n threads.add(thread);\n thread.start(); \n System.out.format(\"Finished aggregate with strategy: %s \\n\", strategy.toString());\n }\n\n for (Thread thread: threads) {\n synchronized(thread) {\n System.out.println(\"Wait...\" + thread.toString());\n thread.join();\n System.out.println(\"Done \" + thread.toString());\n }\n }\n } catch (Exception e) {\n System.err.println(\"Error:\");\n e.printStackTrace();\n System.exit(1);\n }\n }",
"static DataSource[] _getDataSources () throws Exception {\n SearchOptions opts = new SearchOptions (null, 1, 0, 1000); \n TextIndexer.SearchResult results = _textIndexer.search(opts, null);\n Set<String> labels = new TreeSet<String>();\n for (TextIndexer.Facet f : results.getFacets()) {\n if (f.getName().equals(SOURCE)) {\n for (TextIndexer.FV fv : f.getValues())\n labels.add(fv.getLabel());\n }\n }\n\n Class[] entities = new Class[]{\n Disease.class, Target.class, Ligand.class\n };\n\n List<DataSource> sources = new ArrayList<DataSource>();\n for (String la : labels ) {\n DataSource ds = new DataSource (la);\n for (Class cls : entities) {\n opts = new SearchOptions (cls, 1, 0, 100);\n results = _textIndexer.search(opts, null);\n for (TextIndexer.Facet f : results.getFacets()) {\n if (f.getName().equals(SOURCE)) {\n for (TextIndexer.FV fv : f.getValues())\n if (la.equals(fv.getLabel())) {\n if (cls == Target.class)\n ds.targets = fv.getCount();\n else if (cls == Disease.class)\n ds.diseases = fv.getCount();\n else\n ds.ligands = fv.getCount();\n }\n }\n }\n }\n Logger.debug(\"DataSource: \"+la);\n Logger.debug(\" + targets: \"+ds.targets);\n Logger.debug(\" + ligands: \"+ds.ligands);\n Logger.debug(\" + diseases: \"+ds.diseases);\n \n sources.add(ds);\n }\n\n return sources.toArray(new DataSource[0]);\n }",
"public void populateGroups() {\n new PopulateGroupsTask(this.adapter, this).execute();\n }",
"public void getOrgUnitGroupNameMap()\n {\n orgUnitGroupNameMap = new HashMap<Integer, String>();\n try\n {\n String query = \"SELECT orgGrpMem.organisationunitid,orgGrp.name from orgunitgroupsetmembers orgGrpsetMem \" +\n \"INNER JOIN orgunitgroupmembers orgGrpMem ON orgGrpMem.orgunitgroupid = orgGrpsetMem.orgunitgroupid \" + \n \"INNER JOIN orgunitgroupset orgGrpSet ON orgGrpSet.orgunitgroupsetid = orgGrpsetMem.orgunitgroupsetid \" +\n \"INNER JOIN orgunitgroup orgGrp ON orgGrp.orgunitgroupid = orgGrpMem.orgunitgroupid \" + \n \"WHERE orgGrpSet.name IN ( 'Kayakalp CHC/CH/DH', 'Kayakalp PHC Bedded', 'Kayakalp PHC Non Bedded' )\";\n \n //System.out.println( \"data-set-Query - \" + query );\n SqlRowSet rs = jdbcTemplate.queryForRowSet( query );\n while ( rs.next() )\n {\n Integer orgUnitId = rs.getInt( 1 );\n String orgUnitGroupName = rs.getString( 2 );\n \n //System.out.println( orgUnitId + \" : \" + orgUnitAttribueValue );\n \n if ( orgUnitId != null && orgUnitGroupName != null )\n {\n orgUnitGroupNameMap.put( orgUnitId, orgUnitGroupName );\n }\n }\n //return orgUnitAttributeValueMap;\n }\n catch ( Exception e )\n {\n throw new RuntimeException( \"Illegal OrgUnitGroupIds \", e );\n }\n }",
"protected void generateGroupBy( SQLQueryModel query, LogicalModel model, List<Selection> selections,\n Map<LogicalTable, String> tableAliases, Map<String, Object> parameters, boolean genAsPreparedStatement,\n DatabaseMeta databaseMeta, String locale ) {\n // Can be moved to selection loop.\n for ( Selection selection : selections ) {\n // Check if the column has any nested aggregation in there like a calculated column : SUM(a)/SUM(b) with no\n // aggregation set.\n //\n if ( !hasFactsInIt( model, selection, parameters, genAsPreparedStatement, databaseMeta, locale ) ) {\n SqlAndTables sqlAndTables =\n getBusinessColumnSQL( model, selection, tableAliases, parameters, genAsPreparedStatement, databaseMeta,\n locale );\n query.addGroupBy( sqlAndTables.getSql(), null );\n }\n }\n }",
"public abstract Map<Integer, QuantDataset> updatedDatasets();",
"@Override\r\n\tpublic List<Warehouse> selectAll() {\n\t\treturn warehouseDao.selectAll();\r\n\t}",
"static List<AffinityGroup> setsToAffinityGroups(Set<Set<Guid>> uag) {\n List<AffinityGroup> output = new ArrayList<>();\n\n for(Set<Guid> s : uag) {\n AffinityGroup temp = new AffinityGroup();\n temp.setVmAffinityRule(EntityAffinityRule.POSITIVE);\n List<Guid> entities = new ArrayList<>();\n\n entities.addAll(s);\n temp.setVmIds(entities);\n output.add(temp);\n }\n\n return output;\n }",
"Collection getIndexesInGroup(Object groupID) throws Exception;",
"private Map<String, List<String>> getObjectsGroupedByType() throws SQLException {\n boolean xmlDbAvailable = dbSupport.isXmlDbAvailable();\n String query =\n // Most of objects are seen in ALL_OBJECTS\n \"SELECT OBJECT_TYPE, OBJECT_NAME FROM ALL_OBJECTS WHERE OWNER = ? \" +\n (xmlDbAvailable\n // XML tables are seen in a separate dictionary table\n ? \"UNION ALL SELECT 'TABLE', TABLE_NAME FROM ALL_XML_TABLES WHERE OWNER = ? \" +\n \"AND TABLE_NAME NOT LIKE 'BIN$________________________$_'\" //ignore recycle bin objects\n : \"\");\n\n // Count params\n int n = 1;\n if (xmlDbAvailable) n += 1;\n String[] params = new String[n];\n Arrays.fill(params, name);\n\n List<Map<String, String>> rows = jdbcTemplate.queryForList(query, params);\n Map<String, List<String>> result = new HashMap<String, List<String>>();\n for (Map<String, String> row : rows) {\n String objectType = row.get(\"OBJECT_TYPE\");\n String objectName = row.get(\"OBJECT_NAME\");\n if (result.containsKey(objectType)) {\n result.get(objectType).add(objectName);\n } else {\n List<String> newList = new ArrayList<String>();\n newList.add(objectName);\n result.put(objectType, newList);\n }\n }\n return result;\n }",
"public java.util.List<DataEntry> findByDataSetId(long dataSetId);",
"@Override\n\tpublic List<UserGroupReportGroupBean> queryAll(UserGroupReportGroupBean t, PageBean page, Object... o) throws Exception {\n\t\treturn null;\n\t}",
"@Test\n public void testSmallAggregationGroupBy() {\n GroupByOperator groupByOperator = getOperator(AGGREGATION_QUERY + SMALL_GROUP_BY);\n GroupByResultsBlock resultsBlock = groupByOperator.nextBlock();\n QueriesTestUtils.testInnerSegmentExecutionStatistics(groupByOperator.getExecutionStatistics(), 30000L, 0L, 150000L,\n 30000L);\n QueriesTestUtils.testInnerSegmentAggregationGroupByResult(resultsBlock.getAggregationGroupByResult(),\n new Object[]{11270}, 1L, 815409257L, 1215316262, 1328642550, 788414092L, 1L);\n\n // Test query with filter.\n groupByOperator = getOperator(AGGREGATION_QUERY + FILTER + SMALL_GROUP_BY);\n resultsBlock = groupByOperator.nextBlock();\n QueriesTestUtils.testInnerSegmentExecutionStatistics(groupByOperator.getExecutionStatistics(), 6129L, 63064L,\n 30645L, 30000L);\n QueriesTestUtils.testInnerSegmentAggregationGroupByResult(resultsBlock.getAggregationGroupByResult(),\n new Object[]{242920}, 3L, 4348938306L, 407993712, 296467636, 5803888725L, 3L);\n }",
"@Override\n\tpublic void readAllAGBSources() {\n\t\t\n\t\tAPIController apic = new APIController();\n\t\t\n\t\tString s = apic.getAllAGBSources().toString();\n\t\t\n\t\tString [] sarray = s.split(\"],\");\n\t\t\n\t\tSystem.out.println(\"Alle AGBs der Datenbank: \");\n\t\tSystem.out.println(\" \");\n\t\t\n\t\tfor (int i=0; i<sarray.length; i++)\n\t\t{\n\t\t\tallAGBSources.add(sarray[i]);\n\t\t\t//System.out.println(sarray[i]);\n\t\t}\n\t\t\n\t\t\n\t\tIterator iter = allAGBSources.iterator();\n\t\t\n\t\twhile (iter.hasNext())\n\t\t{\n\t\t\tSystem.out.println(iter.next());\n\t\t}\n\n\t}",
"public List<com.silanis.esl.sdk.GroupSummary> getGroupSummaries() {\n List<com.silanis.esl.sdk.GroupSummary> result = new ArrayList<com.silanis.esl.sdk.GroupSummary>();\n String path = template.urlFor( UrlTemplate.GROUPS_SUMMARY_PATH ).build();\n try {\n String stringResponse = client.get( path );\n Result<com.silanis.esl.api.model.GroupSummary> apiResponse = JacksonUtil.deserialize( stringResponse, new TypeReference<Result<com.silanis.esl.api.model.GroupSummary>>() {\n } );\n for(com.silanis.esl.api.model.GroupSummary apiGroupSummary : apiResponse.getResults()) {\n result.add(new GroupSummaryConverter(apiGroupSummary).toSDKGroupSummary());\n }\n return result;\n } catch ( RequestException e ) {\n throw new EslServerException( \"Failed to retrieve Group Summary list.\", e );\n } catch ( Exception e ) {\n throw new EslException( \"Failed to retrieve Group Summary list.\", e );\n }\n }",
"@Override\n public List<KeepercontainerTbl> doQuery() throws DalException {\n List<KeepercontainerTbl> allDcKeeperContainers = dao.findActiveByDcName(dcName, KeepercontainerTblEntity.READSET_FULL);\n List<KeepercontainerTbl> allDcOrgKeeperContainers = allDcKeeperContainers.stream().filter(keepercontainer -> keepercontainer.getKeepercontainerOrgId() == clusterOrgId).collect(Collectors.toList());\n\n List<KeepercontainerTbl> dcOrgKeeperContainersInUsed;\n if (allDcOrgKeeperContainers.isEmpty() && clusterOrgId != XPipeConsoleConstant.DEFAULT_ORG_ID) {\n logger.info(\"cluster {} with org id {} is going to find keepercontainers in normal pool\",\n clusterName, clusterOrgId);\n allDcOrgKeeperContainers = allDcKeeperContainers.stream().filter(keepercontainer -> keepercontainer.getKeepercontainerOrgId() == XPipeConsoleConstant.DEFAULT_ORG_ID).collect(Collectors.toList());\n\n // find keepers in used in normal org\n dcOrgKeeperContainersInUsed = dao.findKeeperContainerByCluster(dcName, XPipeConsoleConstant.DEFAULT_ORG_ID,\n KeepercontainerTblEntity.READSET_KEEPER_COUNT_BY_CLUSTER);\n } else {\n // find keepers in used in cluster org\n dcOrgKeeperContainersInUsed = dao.findKeeperContainerByCluster(dcName, clusterOrgId,\n KeepercontainerTblEntity.READSET_KEEPER_COUNT_BY_CLUSTER);\n }\n\n setCountAndSortForAllKeeperContainers(allDcOrgKeeperContainers, dcOrgKeeperContainersInUsed);\n allDcOrgKeeperContainers = filterKeeperFromSameAvailableZone(allDcOrgKeeperContainers, dcName);\n logger.info(\"find keeper containers: {}\", allDcOrgKeeperContainers);\n return allDcOrgKeeperContainers;\n }",
"public void syncingByGroup(String period, int granularity){\n\t\tList<Object[]> resultList = kpiResultDetailDao.getKpiResultDetail(period, granularity);\n\t\tif(resultList.size()==0){\n\t\t\tlog.info(\"Can not fetch data,return.\");\n\t\t\treturn;\n\t\t}\n\t\tString filename = saveToFileGroup(resultList, granularity);\n\t\tString loadsql = String.format(LOAD_FORMAT_GROUP, filename,\"ices_kpi_result_detail_group\");\n\t\tlog.info(\"loadsql: \"+loadsql);\n\t\tkpiDao.loadData(loadsql);\n\t\tnew File(filename).delete();\n\t\tsaveKpiResultGroup(period, granularity);\n\t}",
"protected MapDataSet mergeDataSets(List<MapDataSet> dataSets, MergingDataSetDefinition dataSetDefinition, EvaluationContext context) {\n \t\tMapDataSet ret = new MapDataSet(dataSetDefinition, context);\n \n \t\tList<DataSetColumn> columns = new ArrayList<DataSetColumn>();\n \n \t\t// Gather all columns from all contained data sets\n \t\tfor (DataSet dataSet : dataSets) {\n \t\t\tfor (DataSetColumn column : dataSet.getMetaData().getColumns()) {\n \t\t\t\tcolumns.add(column);\n \t\t\t}\n \t\t}\n \n \t\t// Sort the columns according to the merge order\n \t\tif (MergingDataSetDefinition.MergeOrder.NAME.equals(dataSetDefinition.getMergeOrder())) {\n \t\t\tCollections.sort(columns, new Comparator<DataSetColumn>() {\n \t\t\t\t@Override\n \t\t\t\tpublic int compare(DataSetColumn column1, DataSetColumn column2) {\n \t\t\t\t\treturn OpenmrsUtil.compareWithNullAsGreatest(column1.getName(), column2.getName());\n \t\t\t\t}\n \t\t\t});\n \t\t}\n \t\telse if (MergingDataSetDefinition.MergeOrder.LABEL.equals(dataSetDefinition.getMergeOrder())) {\n \t\t\tCollections.sort(columns, new Comparator<DataSetColumn>() {\n \t\t\t\t@Override\n \t\t\t\tpublic int compare(DataSetColumn column1, DataSetColumn column2) {\n \t\t\t\t\treturn OpenmrsUtil.compareWithNullAsGreatest(column1.getLabel(), column2.getLabel());\n \t\t\t\t}\n \t\t\t});\n \t\t}\n \n \t\tret.getMetaData().setColumns(columns);\n \n \t\t// Gather column data values from all contained data sets\n \t\tfor (MapDataSet dataSet : dataSets) {\n \t\t\tfor (DataSetColumn column : dataSet.getMetaData().getColumns()) {\n \t\t\t\tret.addData(column, getDataSetData(dataSet, column));\n \t\t\t}\n \t\t}\n \n \t\treturn ret;\n \t}",
"@Transactional(value = \"cleia-txm\", readOnly = true)\n public List<Medical> getAll(GridRequest filters) {\n List<Medical> lmedical = this.find(entityManager, \"select m from Medical m\" + filters.getQL(\"m\", true), filters.getParamsValues(), filters.getStart(), filters.getLimit());\n for (Medical medical : lmedical) {\n medical.getPatient().getUser().getGroups().size();\n medical.getPatient().getUser().getRoles().size();\n medical.getPatient().getUser().getIds().size();\n medical.getPatient().getProcessInstances().size();\n }\n return lmedical;\n \n }"
]
| [
"0.5828024",
"0.5572795",
"0.5467462",
"0.54305154",
"0.54022473",
"0.5378239",
"0.5327909",
"0.53017735",
"0.5258641",
"0.5161998",
"0.5147752",
"0.51359636",
"0.51068866",
"0.5101059",
"0.5094735",
"0.5047144",
"0.5025936",
"0.4993041",
"0.49196452",
"0.49045938",
"0.4854209",
"0.48346227",
"0.48324588",
"0.4817516",
"0.48139024",
"0.4809132",
"0.4806312",
"0.47923827",
"0.47808188",
"0.47634932",
"0.4747125",
"0.47363648",
"0.4695635",
"0.46806768",
"0.46774942",
"0.4673325",
"0.466366",
"0.46599284",
"0.46531725",
"0.4651547",
"0.4634418",
"0.4628594",
"0.46256617",
"0.46192628",
"0.46144134",
"0.46077603",
"0.460763",
"0.45913523",
"0.45711675",
"0.45685846",
"0.45627716",
"0.45576155",
"0.4550122",
"0.4549975",
"0.4529935",
"0.45176095",
"0.45129597",
"0.45070317",
"0.44989032",
"0.44948566",
"0.449333",
"0.448872",
"0.44871238",
"0.44835773",
"0.4480437",
"0.44745693",
"0.44680122",
"0.44576898",
"0.44556916",
"0.44523695",
"0.44508296",
"0.44507086",
"0.44372773",
"0.44369337",
"0.4427538",
"0.4416197",
"0.441281",
"0.44106498",
"0.44101435",
"0.4405484",
"0.44046268",
"0.43915373",
"0.4391086",
"0.43881032",
"0.43875661",
"0.438682",
"0.43812454",
"0.4376076",
"0.43752587",
"0.4373659",
"0.4373436",
"0.43722352",
"0.43696165",
"0.43687958",
"0.43595752",
"0.43589637",
"0.43582854",
"0.43549976",
"0.43545008",
"0.43540227"
]
| 0.54813063 | 2 |
sumWithCondition(numbers, n > true) | public static void main(String args[]){
MyClass2 obj = new MyClass2();
obj.print("");
obj.isNull("abc");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void testSumOverFunctionEvaluatingArguments() {\n\t\trunTest(2, false, \"sum({{(on f in Boolean -> 0..3) product({{(on X in Boolean) f(not X or X) : true }}) : true }})\", \"40\");\n\t}",
"@Test\n\tpublic void testSumOverFunctionV3() {\n\t\trunTest(2, false, \"sum({{(on f in Boolean -> 0..3) sum({{(on X in Boolean) f(X) : true }}) : true }})\", \"56\");\n\t}",
"@Test\n\tpublic void testSumOverFunctionV2() {\n\t\trunTest(2, true, \"sum({{(on f in Boolean -> 0..3) f(true) : true }})\", \"24\");\n\t}",
"@Test\n\tpublic void testSumOverFunctionV4() {\n\t\trunTest(2, false, \"sum({{(on f in Boolean -> 0..3) product({{(on X in Boolean) f(X) : true }}) : true }})\", \"56\");\n\t}",
"boolean hasN();",
"boolean hasN();",
"static boolean sumChecker( int[] arrayOfNumbers) {\n\t\tint intArraySum = 0; \n\t\tfor (int i : arrayOfNumbers) { \n\t\t\tintArraySum += arrayOfNumbers[i];\n\t\t}\n\t\tif (intArraySum >= 100) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t\t \n\t\t}\n\t}",
"io.dstore.values.BooleanValue getComputeSum();",
"public static int sum67(List<Integer> numbers) {\n boolean start = false;\n Integer sumOfNumbers = 0;\n for (Integer number : numbers) {\n if (!start && number != 6) {\n sumOfNumbers += number;\n } else if (number == 6) {\n start = true;\n } else if (start && number == 7) {\n start = false;\n }\n }\n return sumOfNumbers;\n }",
"public static void main(String[] args) {\n\n boolean isTrue = false;\n int[] numbers = { 10, 15, 3, 1, 6, 16, 8 };\n int k = 17;\n\n for (int i = 0; i < (numbers.length-1); i++) {\n for (int j = (i+1); j < numbers.length; j++) {\n if (numbers[i] + numbers[j] == k) {\n isTrue = true;\n break;\n }\n }\n }\n System.out.println(isTrue);\n }",
"public static <T extends Number> double computeSum(ArrayList<T> nData, boolean isPositiveNumber) {\r\n if (nData.size() < 0) // check data size is less than 0\r\n throw new IllegalArgumentException(\"x cannot be empty\"); // throw exception if data is empty\r\n\r\n double sum = 0.0; // initialze sum for store sum value in sum variable\r\n for (T TemporaryValue : nData) { // for loop for get all data of list \r\n double value = TemporaryValue.doubleValue(); // convert integer value to double\r\n if (isPositiveNumber || value >= 0) // check isPositiveNumber and value is positive\r\n sum += value; // increase sum value by adding value in sum \r\n }\r\n\r\n return sum; // return double type sum result of list data\r\n }",
"public static boolean sumTo(int[] values, int n) {\n // TODO\n // /** construnc a hashset and when we iterate through the array, we find if curr is in the set and insert n-curr into the set\n return false;\n }",
"public static int calculateSum(int n)\n {\n int sum =0 ;\n for(int i = 3;i <= n; i++ )\n {\n if(i%3 == 0 || i%5 == 0)\n {\n sum += i;\n }\n }\n return sum;\n }",
"int countSusbset(int n, int w){\n //i.e target sum achieved\n if(w == 0){\n return 1;\n }\n \n //if sum not achieved and no items left\n if(n == 0){\n return 0;\n }\n \n //if item is gretart than target weight, we have to exclude it\n if(arr[n-1] > w){\n return countSusbset(n-1, w)\n }else{ \n return countSusbset(n-1, w) + countSusbset(n-1, w - arr[n-1]);\n }\n}",
"public static boolean findSum3Bool(int[] a, int x){\r\n\t\tint begin = 0, end = a.length -1, sum;\r\n\t\twhile(begin < a.length -1 && (end >= 0)){\r\n\t\t\tsum = a[begin] + a[end];\r\n\t\t\tif(sum < x){\r\n\t\t\t\tbegin++;\r\n\t\t\t}else if(sum > x){\r\n\t\t\t\tend--;\r\n\t\t\t}else {\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 or35(int n) {\n return (n % 3 == 0 || n % 5 == 0);\n}",
"private int countTrue(boolean... cases) {\n int result = 0;\n for (boolean c : cases) {\n if (c) {\n result++;\n }\n }\n return result;\n }",
"boolean requiresExpression(int k);",
"public boolean makes10(int a, int b) {\n return (a == 10 || b == 10 || a + b == 10);\n}",
"static int sum(int n) {\n\t\tif(n==1) \n\t\t\treturn 1;\n\t\treturn n+sum(n-1);\n\t}",
"public static void SumOfNaturalNumbers(int num)\n {\n\n int sum = 0;\n for (int i=1; i<=num; i++){\n sum = sum + i;\n System.out.println(i);\n }\n System.out.println(\"The first n natural numbers are:\" + num );\n System.out.println(\"The sum of natural numbers upto n limit is:\" + sum);\n\n }",
"public boolean or35 (int n) {\n if ( (n % 3 == 0) || (n % 5 == 0)){\n return true;\n }\n return false;\n}",
"boolean hasComputeSum();",
"boolean hasTotalBet();",
"boolean hasTotalBet();",
"public static int sumOfNs(int targetNumber, int... result) {\n int score = IntStream.of(result).filter(val -> val == targetNumber).sum();\n return score;\n }",
"public static int countFives(int [] num)\n{\n // Create a static method called getSum which sums an array of ints\n int i;\n int total = 0;\n for(i=0;i < num.length;i++)\n {\n \tif(num[i] == 5) {\n \t\ttotal += 1;\n \t}\n }\n return total;\n}",
"private static int sumOfAllMultiplesof3or5ForAandBelow (int a){\n\t\treturn (a==0)? 0 : sumOfAllMultiplesof3or5ForAandBelow(a-1) + ((isDivisibeby3or5(a))? a : 0) ;\n\t}",
"static int multipleOf3And4_streams(int n) {\n return IntStream.range(0, n)\n .filter(value -> value % 3 == 0 || value % 5 == 0)\n .sum();\n }",
"public Integer sumNumbers(List<Integer> numbers) throws Exception;",
"public int getSum(List<Integer> a){\n\n int sum = 0;\n\n for(int i = 0; i<a.size(); i++){\n if(a.get(i)<0){\n continue;\n } else{\n sum +=a.get(i);\n }\n }\n return sum;\n }",
"public static int sumCheck(int target, int... numberArr) {\n\t\tint sum = 0;\n\t\tfor (int number : numberArr) {\n\t\t\tsum += number;\n\t\t}\n\t\treturn target == sum ? 0 : ((target < sum) ? -1 : 1);\n\t}",
"public int sumCount(int number){\n int sum=0;\n for(int i=1; i<=number; i++){\n sum=sum+countSetBits(i);\n }\n return sum;\n }",
"long countByExample(TrueorfalseExample example);",
"boolean SubArraySum( int arr[] , int n , int sum ){\n HashSet<Integer> s = new HashSet<Integer>();\n int pre_sum = 0 ;\n for( int i = 0 ; i < n ; i++ ){\n pre_sum += arr[i];\n if( pre_sum == sum ) // Corner case if pre-sum is equal to sum.\n return true;\n if( s.contains(pre_sum - sum))\n return true;\n s.add(pre_sum);\n }\n return false;\n }",
"long getRsum(int n, int i, int k){\r\n return n-i>=k ? (n-i-k)+ssum(k-1): ssum(k-1) - ssum(k-n+i);\r\n }",
"io.dstore.values.BooleanValueOrBuilder getComputeSumOrBuilder();",
"public boolean nearHundred(int n) {\n return (Math.abs(n - 100) <= 10 || Math.abs(n - 200) <= 10);\n}",
"static void countApplesAndOranges(int s, int t, int a, int b, int[] apples, int[] oranges) {\n /*\n * Write your code here.\n */\n int countApples = 0, countOranges = 0;\n for(int apple : apples){\n if(apple >= 0){\n if(((a+apple) >= s) && ((a+apple) <= t)){\n countApples+=1;\n }\n }\n }\n System.out.println(countApples);\n \n for(int orange : oranges){\n if(orange <= 0){\n if(((b+orange) >= s) && ((b+orange) <= t)){\n countOranges+=1;\n }\n }\n }\n System.out.println(countOranges);\n\n }",
"public long iterativeSum(long n){\n long result = 0;\n for(long i = 1L; i <= n; i++){\n result += i;\n }\n return result;\n }",
"@Override\n public int divisor_sum(int n) {\n int x;\n int sum = 0;\n for (int i = 1; i <= n; i++) {\n if(n%i == 0){\n x = i;\n sum += x;\n }\n }\n return sum;\n }",
"io.dstore.values.BooleanValue getGetSumOfAllPagesPerDay();",
"public int countByTodoBooleanStat(boolean todoBooleanStat);",
"static long sumOfFullyTruncatable(boolean[] composite) {\n int count = 0;\n long sum = 0;\n\n for(int i = 10; i < composite.length; i++) {\n if(fullyTruncatable(i, composite)) {\n count++;\n sum += i;\n }\n }\n\n System.out.println(\"Count of truncatable primes is \" + count);\n return sum;\n }",
"boolean getComputeSumNull();",
"public int addValue(boolean b) {\n return foldIn(b ? 0 : 1);\n }",
"boolean hasAmount();",
"boolean hasAmount();",
"private static double fact(int n) {\n\t\tdouble sum = 1;\n\t\tfor(int i = 1; i <= n; i++) {\n\t\t\tsum *= i;\n\t\t}\n\t\treturn sum;\n\t}",
"static boolean blanco(int numero){\n\t\tboolean resultado; \n\t\tif (numero > 43){\n\t\t\tresultado = true;\n\t\t}else{\n\t\t\tresultado = false;\n\t\t}\n\t\treturn resultado;\t\n\t}",
"private int calc(int x, int n, int i, int sum) {\n int ways = 0;\n\n // Calling power of 'i' raised to 'n'\n int p = (int) Math.pow(i, n);\n while (p + sum < x) {\n // Recursively check all greater values of i\n ways += calc(x, n, i + 1,\n p + sum);\n i++;\n p = (int) Math.pow(i, n);\n }\n\n // If sum of powers is equal to x\n // then increase the value of result.\n if (p + sum == x)\n ways++;\n\n // Return the final result\n return ways;\n }",
"private int count(int val , int m , int n){\n int res = 0;\n for(int i = 1 ; i <= m ; i++){\n res += Math.min( val / i , n);\n }\n return res;\n }",
"private static void sumOfSquaresfromList(List<Integer> numbers) {\n\t\tint sum = numbers.stream().map(number -> number * number).reduce(0, Integer::sum);\n\t\tSystem.out.println(\"Sum of Squres : \" + sum);\n\n\t\t// Whenever we want to verify the conditions and do the operation, then use\n\t\t// filters\n\t\tint sumOfOddNumbers = numbers.stream().filter(number -> number % 2 != 0).reduce(0, Integer::sum);\n\t\tSystem.out.println(\"Sum of Odd Numbers : \" + sumOfOddNumbers);\n\n\t}",
"public abstract boolean isHappy(int n);",
"private static Predicate<Courses> numberOfStudentsPredecateMethod(int numberOfStudentsThreshhold) {\n\t\treturn course -> course.getNumberOfStudents() > numberOfStudentsThreshhold;\n\t}",
"public int rangeBitwiseAnd(int m, int n) {\n\t \tint ans = 0;\n\t for (int i = 0; i < 32; ++ i) {\n \t\tif (1 == ((m >> i) & 1)) {\n \t\t\tif (((m & ~0 << (i + 1)) | (~0 >>> (31 - i))) >= n) {\n \t\t\t\tans |= 1 << i;\n \t\t\t}\n \t\t}\n\t }\n\t System.out.println(ans);\n\t return ans;\n\t }",
"public boolean getDivisibileByN(int number, int N){\r\n\t\tint checkNumber = N;\r\n\t\tboolean returnValue = false;\r\n\t\tint count=0;\r\n\t\tdo{\r\n\t\t\tcount++;\r\n\t\t\tcheckNumber += N;// Incrementing by N\r\n\t\t\tif(checkNumber == number){\r\n\t\t\t\treturnValue = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnumber -= N;\r\n\t\t\tif(checkNumber == number){\r\n\t\t\t\treturnValue = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}while(checkNumber <= number);\r\n\t\t\r\n\t\tSystem.out.println(\"Number of iterations : \" + count);\r\n\t\treturn returnValue;\r\n\t}",
"boolean hasGetSumOfAllPagesPerDay();",
"public static void calculateSum(List<Integer> numbers){\n int sum = 0;\n for(int i = 0; i < numbers.size(); i++){\n if(numbers.get(i) % 2 == 0){\n sum += numbers.get(i) * numbers.get(i);\n }\n }\n System.out.println(sum);\n\n }",
"public static Boolean isSumGtrThan100(int array[])\n\t{\n\t\tint sum = 0;\n\t\t\n\t\t// Sum array\n\t\tfor (int i = 0; i < array.length; i++)\n\t\t\tsum += array[i];\n\t\t\n\t\t// Check if more than 100\n\t\treturn sum > 100;\n\t}",
"boolean getGetSumOfAllPagesPerDayNull();",
"public static int getNrOrSum(boolean number, boolean plz5) throws SQLException, ClassNotFoundException{\n\t\tStatement stmt = getConnection();\n\t\tStringBuffer sb = new StringBuffer();\n\tif (plz5){\n\t\tif (number)\n\t\t\t{ sb.append(\"SELECT COUNT (id) FROM criteriasplz51\");}\n\t\telse\n\t\t\t{ sb.append(\"SELECT SUM(CAST(_c1 AS int)) FROM criteriasplz51\");}\n\t\t}\n\telse{\n\t\tif (number)\n\t\t{ sb.append(\"SELECT COUNT (id) FROM criteriasplz81\");}\n\telse\n\t\t{ sb.append(\"SELECT SUM(CAST(_c1 AS int)) FROM criteriasplz81\");}\n\t}\n\t\t\n\t\n\t\tResultSet t=stmt.executeQuery(sb.toString());\n\t\tt.next();\n\t\tint sum=t.getInt(1);\n\t\tif (number)\n\t\t\t{System.out.println(\"numberofpolygons: \"+sum);}\n\t\telse\n\t\t\t{System.out.println(\"sum: \"+sum);}\n\n\t\treturn sum;\n\t}",
"protected int sumIterative(int a, int b){\n int result = a;\n while (b != 0){\n if (b > 0){\n result++;\n b--;\n } else {\n result--;\n b++;\n }\n }\n return result;\n }",
"long getLsum(int n, int i, int k){ \r\n return (i-k+1)>=0 ? (i-k+1) + ssum(k) : ssum(k) - ssum(k-i-1);\r\n }",
"public Boolean getSum() {\n return sum;\n }",
"private boolean allLessThanN() {\n return this.matrix.stream()\n .allMatch(row -> row.stream()\n .allMatch(e -> e <= this.n));\n }",
"static boolean isValid(int a[], int n, int k, int max)\r\n\t {\r\n\t int painter = 1, sum = 0;\r\n\t \r\n\t for(int i = 0; i < n; i++)\r\n\t {\r\n\t if(sum + a[i] > max)\r\n\t {\r\n\t painter++;\r\n\t sum = a[i];\r\n\t \r\n\t if(painter > k)\r\n\t return false;\r\n\t }\r\n\t else\r\n\t sum += a[i];\r\n\t }\r\n\t \r\n\t return true;\r\n\t }",
"public static void solve(int n, List<Integer> a) {\n Collections.sort(a);\n Collections.reverse(a);\n double sum = a.stream().mapToDouble(num -> Double.valueOf(num)).sum();\n double currentN = Double.valueOf(n);\n double currentSum = sum;\n for(Integer next : a)\n {\n double nextDouble = Double.valueOf(next);\n if(nextDouble<=currentSum/currentN)\n {\n break;\n }\n currentSum -= nextDouble;\n currentN--;\n }\n System.out.println(currentSum/currentN);\n\n\n }",
"public static void main(String[] args){\n System.out.println(\"hello world\");\n // int a = 5;\n // int c;\n // boolean b = (a>4)&&(a<10);\n // c = b ? 25 : 22;\n // System.out.println(c);\n // while( a < 10){\n // a++;\n // System.out.println(a);\n // }\n // do{\n // a++;\n // System.out.println(a);\n // }while( a < 10);\n // for(int x = 10; x < 20; ++x){\n // System.out.println(x);\n // }\n // int [] numbers = {1,2,3};\n // for(int x : numbers){\n // System.out.println(x);\n // }\n // 数组大小\n // int size = 10;\n // // 定义数组\n // double[] myList = new double[size];\n // myList[0] = 5.6;\n // myList[1] = 4.5;\n // myList[2] = 3.3;\n // myList[3] = 13.2;\n // myList[4] = 4.0;\n // myList[5] = 34.33;\n // myList[6] = 34.0;\n // myList[7] = 45.45;\n // myList[8] = 99.993;\n // myList[9] = 11123;\n // // 计算所有元素的总和\n // double total = 0;\n // for (int i = 0; i < size; i++) {\n // total += myList[i];\n // }\n // System.out.println(\"总和为: \" + total);\n // System.out.println(\"90 度的正弦值:\" + Math.sin(Math.PI/2)); \n // System.out.println(\"0度的余弦值:\" + Math.cos(0)); \n // System.out.println(\"60度的正切值:\" + Math.tan(Math.PI/3)); \n // System.out.println(\"1的反正切值: \" + Math.atan(1)); \n // Systasdasaem.out.println(\"π/2的角度值:\" + Math.toDegrees(Math.PI/2)); \n // System.out.println(Math.PI);\n // Float a = 1.1;\n // System.out.println(Math.ceil(a.doubleValue()));\n // char [] l1 = {'a','b','c'};\n // for(char x:l1){\n // System.out.println(getName(x));\n // }\n // Scanner scan = new Scanner(System.in);\n // // 从键盘接收数据\n \n // // next方式接收字符串\n // System.out.println(\"next方式接收:\");\n // // 判断是否还有输入\n // if (scan.hasNext()) {\n // String str1 = scan.next();\n // System.out.println(\"输入的数据为:\" + str1);\n // }\n // scan.close();\n int [] myArray = new int[]{1, 2, 3, 4, 5};\n ChangeIt.doIt( myArray );\n for(int j=0; j<myArray.length; j++)\n System.out.print( myArray[j] + \" \" );\n char[] z = new char[10];\n String st = \"12312311111111111111111\";\n ChangeIt.blur(z, st);\n // System.out.print(z);\n int[] arr;\n for(int j=0; j<arr.length; j++)\n System.out.printl( arr[j] + \" \" );\n }",
"public static boolean findNumbers(double Array[], int arraySize, double sum) {\n //outter loop keeps first number unless it has to change\n for (int i = 0; i < arraySize - 2; i++) {\n //middle loop keeps second number unless it has to change \n for (int j = i + 1; j < arraySize - 1; j++) {\n //changes the every time and will break function if sum is found\n for (int k = j + 1; k < arraySize; k++) {\n //conditional staement if found print and return true \n if (Array[i] + Array[j] + Array[k] == sum) {\n System.out.print(\"Triplet is \" + Array[i] + \" ,\" + Array[j] + \" ,\" + Array[k]);\n return true;\n }\n }\n }\n }\n\n // If we reach here then nothing was found \n return false;\n }",
"static long sumOfGroup(int k) {\n long start = 1;\n long sum = 0;\n for(int i=1;i<=k;i++){\n long count = 0;\n sum = 0;\n while(count<i){\n if(start%2 == 1){\n sum = sum+start;\n count++;\n }\n start++;\n }\n }\n return sum;\n }",
"default A satisfiesNumberCondition(Condition condition) {\n return satisfies(new PredicateWrappedCondition(\"Number\", JsonNode::isNumber, condition));\n }",
"boolean contains(int n);",
"public boolean nearHundred(int n) {\n return ((Math.abs(100 - n) <= 10) || (Math.abs(200 - n) <= 10));\n}",
"public static int sum1(int[] a, int n) // summen av de n første\n {\n if (n == 1) return a[0]; // summen er verdien selv\n return sum1(a,n-1) + a[n-1]; // summen av de n-1 første + a[n-1]\n }",
"@Test\n\tpublic void testProductWithLotsOfSamplesV3() {\n\t\trunBoundedTest(10000, true, \"product({{(on f in Boolean -> 1..10) f(true) + f(false) : true }})\", \"(1+1)^100\", \"(10+10)^100\");\n\t}",
"public Integer sumLogic(int startingNumber, int endingNumber){\n\t\tSystem.out.println(\"Print Sum from this number\");\n\t\tint sum = 0;\n\t\tfor(int x = startingNumber; x <= endingNumber; x++){\n\t\t\tsum = sum + x;\n\t\t\tSystem.out.println(\"New number is: \" + x + \" sum: \" + sum);\n\t\t}\n\t\treturn 0;\n\t}",
"public static void sumZero(int n) {\n\t\tScanner input = new Scanner(System.in);\n\t\tArrayList<Integer> arr = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tarr.add(input.nextInt());\n\t\t}\n\t\tfor (int i = 0; i < arr.size(); i++) {\n\t\t\tfor (int j = i + 1; j < arr.size(); j++) {\n\t\t\t\tif (arr.get(j) + arr.get(i) == 0) {\n\t\t\t\t\tSystem.out.println(arr.get(i) + \" \" + arr.get(j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public int[] reduce(boolean[] value, int[] sum) {\n if (sum == null) {\n sum = new int[value.length];\n }\n \n for (int cycle = 0; cycle < value.length; cycle++) {\n sum[cycle] += (value[cycle] ? 1 : 0);\n }\n \n return sum;\n }",
"public void findAllSumTenNumbers(int[] nums) {\n\t\tArrays.sort(nums);\r\n\t\t\r\n\t\tint p = 0; \r\n\t\tint q = nums.length - 1;\r\n\t\twhile (p < q) { \r\n\t\t\tif (nums[p] + nums[q] == 10) { \r\n\t\t\t\tout.println(\"found \" + nums[p] + \" \" + nums[q]);\r\n\t\t\t\tp++;\r\n\t\t\t\tq--;\r\n\t\t\t} else if (nums[p] + nums[q] > 10) {\r\n\t\t\t\tq--;\r\n\t\t\t} else if (nums[p] + nums[q] < 10) { \r\n\t\t\t\tp++;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test\n\tpublic void testProductWithLotsOfSamplesV5() {\n\t\trunBoundedTest(10000, true, \"product({{(on f in Boolean -> 1..100) f(true) + f(false) : true }})\", \"(1+1)^10000\", \"(100+100)^10000\");\n\t}",
"public void incrementConditionCount(int basicBooleanCount) {\n this.conditions.add(Integer.valueOf(basicBooleanCount));\n }",
"public int collect(int n){\r\n\t\tint counter=0;\r\n\t\tint distinctValue=0;\r\n\t\tboolean[] collectedvalue=new boolean[n];\r\n\t\twhile(distinctValue<n){\r\n\t\t\tint v=generateRandomCoupon(n);\r\n\t\t\tcounter++;\r\n\t\t\tif(collectedvalue[v]){\r\n\t\t\t\tdistinctValue++;\r\n\t\t\t\tcollectedvalue[v]=true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn counter++;\r\n\t}",
"public static void main(String[] args) {\n\n int sum = 0;\n int n = 5;\n\n for (int i = 0; i < n; i++) {\n sum = sum + (2 * i);\n }\n System.out.println(sum);\n // prints 20 which is sum of 1st 5 even numbers (0,2,4,6,8)\n }",
"default int sumOfAll(int a, int b) {\n\t\t\treturn 0;\n\t\t}",
"public void sum(int n) {\n int sum = 0;\n for (int j = 0; j < n; j++) // 2n+2\n sum += j;\n for (int k = 0; k < n; k++) // 2n+2\n sum += k;\n for (int l = 0; l < n; l++) //2n+2\n sum += l;\n }",
"static void subsetSums(int arr[], int n)\n {\n \n // There are totoal 2^n subsets\n int total = 1 << n;\n \n // Consider all numbers from 0 to 2^n - 1\n for (int i = 0; i < total; i++) {\n int sum = 0;\n \n // Consider binary reprsentation of\n // current i to decide which elements\n // to pick.\n for (int j = 0; j < n; j++)\n if ((i & (1 << j)) != 0)\n sum += arr[j];\n \n // Print sum of picked elements.\n System.out.print(sum + \" \");\n }\n }",
"static int logic(int x,int y){\n int z;\n if(x>y){\n z=x+y;\n }\n else\n {\n z=(x+y)*5;\n }\n return z;\n }",
"public static int check (int nhap){\n int f1 =0 ; int f2 = 1; int f3 = 1;\n \n if(nhap < 0 ){\n return -1;\n }else if(nhap == 0 || nhap ==1){\n return nhap;\n }else{\n for(int i = 2 ; i< nhap ; i++){\n f1 = f2;\n f2 = f3;\n f3 = f2 + f1;\n }\n }\n return f3;\n }",
"@Test\n\tpublic void testProductWithLotsOfSamplesV1() {\n\t\trunBoundedTest(10000, true, \"product({{(on f in Boolean -> 1..3) f(true) + f(false) : true }})\", \"512\", \"10077696\");\n\t}",
"public static boolean find3Numbers(int A[], int n, int X) { \n \n // Your code \n for(int i=0;i<n-2;i++)\n {\n HashSet<Integer> set = new HashSet<>();\n int toFind=X-A[i];\n for(int j=i+1;j<n;j++)\n {\n if(set.contains(toFind-A[j]))\n {\n return true;\n }\n set.add(A[j]);\n }\n }\n return false;\n }",
"public int sumDouble(int a, int b) {\n int sum = a + b;\n if (a == b){\n sum *= 2;\n }\n\n return sum; \n}",
"public static double sum(double n) {\n\t\tdouble sum = 0;\t// Sum of the series\n\t\tfor (double i = 1; i <= n; i++) {\n\t\t\tsum += i / (i + 1);\n\t\t}\n\t\treturn sum;\n\t}",
"public static int addN(int... values) {\n\t\tint sum = 0;\n\t\tfor (int currentValue : values) {\n\t\t\tsum += currentValue;\n\t\t}\n\t\treturn sum;\n\t}",
"void sumProd(int n) {\n\t\tdouble sum = 0.0;//C1\n\t\tdouble prod = 1.0;\n\t\tfor (int i = 1; i <= n; i++)\n\t\t\t{ if (i%2 == 0) sum += i;\n\t\t\tprod = prod * i;\n\t\t\tUtil.foo(sum, prod); }}",
"private static int getHighestSum(List<? extends ISubsetSum> list, int n, int sum) {\n\t\tboolean subset[][] = new boolean[sum + 1][n + 1];\n\n\t\t// primeira coluna toda true, pois se considera que com qualquer\n\t\t// conjunto se pode obter uma somatoria de 0.\n\t\tfor (int i = 0; i <= n; i++)\n\t\t\tsubset[0][i] = true;\n\n\t\t// nenhuma somatoria é possível com nenhum elemento.\n\t\tfor (int i = 1; i <= sum; i++)\n\t\t\tsubset[i][0] = false;\n\n\t\t// Vai verificando se com aqueles elementos se obtem a sum iterada.\n\t\tfor (int i = 1; i <= sum; i++) {\n\t\t\tfor (int j = 1; j <= n; j++) {\n\t\t\t\tsubset[i][j] = subset[i][j - 1];\n\t\t\t\tif (i >= list.get(j - 1).getValue()) {\n\t\t\t\t\tsubset[i][j] = subset[i][j] || subset[i - list.get(j - 1).getValue()][j - 1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// itera sobre a ultima row de tras para frente até achar um valor true\n\t\t// e retorna a maior somatoria, tal que somatoria <= sum.\n\t\tint maxSum = 0;\n\t\tfor (int i = sum; i > 0; i--) {\n\t\t\tif (subset[i][n] == true) {\n\t\t\t\tmaxSum = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn maxSum;\n\n\t}",
"public static int recursionSum(int[] num, int n) {\n if (n <= 2)\n System.out.println(num[n]);\n if (n <= 0)\n return 0;\n return recursionSum(num, n - 1) + num[n - 1];\n }",
"public static int sumRange(int a, int b) {\r\n int sum = 0;\r\n int big = 0;\r\n int small = 0;\r\n \r\n if (a > b) {\r\n big = a;\r\n small = b;\r\n } else {\r\n big = b;\r\n small = a;\r\n }\r\n for(int i = small; i <= big; i++) {\r\n //System.out.println( i );\r\n sum += i;\r\n }\r\n return sum;\r\n }",
"public static int feibona(int n) {\r\n int a = 1;\r\n int b = 1;\r\n int c = 0;\r\n for(int i = 3;i <= n;i++) {\r\n c = a + b;\r\n\r\n a = b;\r\n b = c;\r\n }\r\n return c;\r\n }",
"public static int sumUpTo(Integer num)\n {\n int total = 0;\n for(int i = 0; i < num + 1; i++)\n total += i;\n return total;\n }",
"public boolean happyNumber(int n) {\n\t\tif (n <= 0) {\n\t\t\treturn false;\n\t\t}\n\t\tint sum = 0;\n\t\tHashSet<Integer> set = new HashSet<>();\n\t\tset.add(n);\n\t\twhile (sum != 1) {\n\t\t\tsum = 0;\n\t\t\twhile (n != 0) {\n\t\t\t\tsum += Math.pow(n % 10, 2);\n\t\t\t\tn /= 10;\n\t\t\t}\n\t\t\tif (set.contains(sum)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tset.add(sum);\n\t\t\t}\n\t\t\tn = sum;\n\t\t}\n\t\treturn true;\n\t}"
]
| [
"0.621751",
"0.61636645",
"0.6106125",
"0.6030179",
"0.5812814",
"0.5812814",
"0.57633275",
"0.5646471",
"0.560472",
"0.5586582",
"0.5535559",
"0.54781497",
"0.54369926",
"0.5433909",
"0.5413423",
"0.5407178",
"0.5377336",
"0.5376624",
"0.5342788",
"0.53175545",
"0.53123736",
"0.52711177",
"0.5235977",
"0.52288777",
"0.52288777",
"0.52242285",
"0.5207134",
"0.52061933",
"0.520609",
"0.5200692",
"0.5188853",
"0.5131133",
"0.51130843",
"0.5106635",
"0.50994456",
"0.50745165",
"0.5065302",
"0.50646013",
"0.50602955",
"0.50555974",
"0.5046499",
"0.5042783",
"0.503334",
"0.5031567",
"0.5024579",
"0.5022265",
"0.501313",
"0.501313",
"0.5006325",
"0.49961293",
"0.49922818",
"0.4982168",
"0.4976371",
"0.49680945",
"0.4960393",
"0.49590752",
"0.49540088",
"0.49434787",
"0.49414355",
"0.49087572",
"0.4901862",
"0.48983657",
"0.48954585",
"0.48920238",
"0.48911205",
"0.48909792",
"0.48866552",
"0.48854014",
"0.48816243",
"0.48816144",
"0.48806408",
"0.4871344",
"0.4867884",
"0.48676953",
"0.48611024",
"0.48592085",
"0.48479074",
"0.4847064",
"0.48443145",
"0.48397255",
"0.4839668",
"0.48350948",
"0.48307183",
"0.48281687",
"0.48281297",
"0.48276204",
"0.48222896",
"0.48099363",
"0.48072922",
"0.48063222",
"0.47926128",
"0.47918165",
"0.4790678",
"0.4789526",
"0.47867343",
"0.47780138",
"0.4776907",
"0.47730058",
"0.4770955",
"0.47708154",
"0.47607192"
]
| 0.0 | -1 |
/BigDecimal totalAportes = comprobanteSeleccionado.getAporteuniversidad().add(comprobanteSeleccionado.getAporteorganismo().add(comprobanteSeleccionado.getAportecomitente())); System.out.println("Total Aportes Sumados = " + totalAportes.floatValue()); | public void distribuirAportes1(){
if(null == comprobanteSeleccionado.getAporteuniversidad()){
System.out.println("comprobanteSeleccionado.getAporteuniversidad() >> NULO");
}
if(null == comprobanteSeleccionado.getAporteorganismo()){
System.out.println("comprobanteSeleccionado.getAporteorganismo() >> NULO");
}
if(null == comprobanteSeleccionado.getMontoaprobado()){
System.out.println("comprobanteSeleccionado.getMontoaprobado() >> NULO");
}
try{
if(comprobanteSeleccionado.getAporteuniversidad().floatValue() > 0f){
comprobanteSeleccionado.setAporteorganismo(comprobanteSeleccionado.getMontoaprobado().subtract(comprobanteSeleccionado.getAporteuniversidad()));
comprobanteSeleccionado.setAportecomitente(BigDecimal.ZERO);
}
} catch(NullPointerException npe){
System.out.println("Error de NullPointerException");
npe.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"BigDecimal getTotal();",
"BigDecimal getTotal();",
"public void totalFacturaVenta(){\n BigDecimal totalVentaFactura = new BigDecimal(0);\n \n try{\n //Recorremos la lista de detalle y calculamos la Venta total de la factura\n for(Detallefactura det: listDetalle){\n //Sumamos a la variable 'totalVentaFactura'\n totalVentaFactura = totalVentaFactura.add(det.getTotal());\n } \n }catch(Exception e){\n e.printStackTrace();\n }\n \n //Setemos al objeto Factura el valor de la variable 'totalFacturaVenta'\n factura.setTotalVenta(totalVentaFactura);\n \n }",
"public void calcPrecioTotal() {\n try {\n float result = precioUnidad * Float.parseFloat(unidades.getText().toString());\n prTotal.setText(String.valueOf(result) + \"€\");\n }catch (Exception e){\n prTotal.setText(\"0.0€\");\n }\n }",
"public BigDecimal getValorTotal() {\r\n \treturn valorUnitario.setScale(5, BigDecimal.ROUND_HALF_EVEN).multiply(quantidade.setScale(3, BigDecimal.ROUND_HALF_EVEN)).setScale(3, BigDecimal.ROUND_DOWN).subtract(valorDesconto).setScale(3, BigDecimal.ROUND_HALF_EVEN);\r\n }",
"public BigDecimal getValorTotal(){\r\n\t\r\n\t\t// percorre a lista de ItemVenda - stream especie de interator do java 8\r\n\t\treturn itens.stream()\r\n\t .map(ItemVenda::getValorTotal) // para cada um dos itens, obtem o valor total do item\t\r\n\t .reduce(BigDecimal::add) // soma todos os valores total \r\n\t .orElse(BigDecimal.ZERO); // caso não tenha nenhum item retorna zeo\r\n\t}",
"public double obtener_total(){\r\n double total_ventas = precio*unidades;\r\n return total_ventas;\r\n }",
"public Double darTiempoTotal(){\n\t\treturn tiempoComputacionalGrasp+tiempoComputacionalSetCovering;\n\t}",
"public BigDecimal getValorTotal() {\n\t\treturn itens.stream()\n\t\t\t\t.map(ItemDieta::getValorTotal)\n\t\t\t\t.reduce(BigDecimal::add)\n\t\t\t\t.orElse(BigDecimal.ZERO);\n\t}",
"public void calcularTotalVentas(FormularioRegistrarCorte formularioRegistrarCorte) {\n Double suma = 0.00;\n try {\n for (int i = 0; i < formularioRegistrarCorte.getTablaEntradas().getRowCount(); i++) {\n suma = suma + (Double.valueOf(formularioRegistrarCorte.getTablaEntradas().getValueAt(i, 2).toString()));\n }\n formularioRegistrarCorte.getTxtTotalVentas().setText(new OperacionesUtiles().formatoDouble(suma));\n } catch (Exception e) {\n showMessageDialog(null, \"Ocurrio un error al intenetar calcular total entradas\");\n\n }\n\n }",
"public float getProductTotalMoney(){\n connect();\n float total = 0;\n String sql = \"SELECT SUM(subtotal) + (SUM(subtotal) * (SELECT iva FROM configuraciones)) FROM productos\";\n ResultSet result = null;\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n result = ps.executeQuery();\n //result = getQuery(sql);\n if(result != null){\n while(result.next()){\n total = result.getFloat(1);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n }\n return total; \n }",
"public double probabilidadTotal(){\n return probabilidadTotal;\n }",
"BigDecimal getGrandTotal();",
"private void sumarTotalVenta(int cantidad, double precioProducto) {\r\n\t\tdouble valorProductos = cantidad * precioProducto;\r\n\t\ttotalVenta += valorProductos;\r\n\t}",
"private double prixTotal() \r\n\t{\r\n\t\tdouble pt = getPrix() ; \r\n\t\t\r\n\t\tfor(Option o : option) \r\n\t\t\tpt += o.getPrix();\t\r\n\t\treturn pt;\r\n\t}",
"public void calcularTotal() {\n double valor = 0;\n String servico = (String)consultaSelecionada.getSelectedItem().toString();\n switch(servico) {\n case \"Consulta\":\n valor += 100;\n break;\n case \"Limpeza\":\n valor += 130;\n break;\n case \"Clareamento\":\n valor += 450;\n break;\n case \"Aparelho\":\n valor += 100;\n break;\n case \"Raio-x\":\n valor += 80;\n break;\n case \"Cirurgia\":\n valor += 70;\n break;\n }\n Total.setText(String.valueOf(valor));\n }",
"private void sumaApostado() {\n\t\tapostado.set(apostado.get() + 1.0);\n\t\tdiruField.setText(String.format(\"%.2f\", apostado.get()));\n\t\tactualizaPremio();\n\t}",
"public float totalVentas() {\n float total = 0;\n for (int i = 0; i < posicionActual; i++) {\n total += getValorCompra(i); //Recorre el arreglo y suma toda la informacion el el arreglo de los valores en una variable que luego se retorna \n }\n return total;\n }",
"public void addQuantidade(BigDecimal quantidade){\r\n this.quantidade = this.quantidade.setScale(5, BigDecimal.ROUND_HALF_EVEN).add(quantidade).setScale(5, BigDecimal.ROUND_HALF_EVEN).setScale(5, BigDecimal.ROUND_HALF_EVEN);\r\n }",
"BigDecimal getSumaryTechoCveFuente(BudgetKeyEntity budgetKeyEntity);",
"public BigDecimal getGrandTotal();",
"public BigDecimal getGrandTotal();",
"BigDecimal getSubtotal();",
"public void prinRecaudacion()\n {\n System.out.println(\"La cantidad recaudada por la maquina1 es \" + maquina1.getTotal());\n System.out.println(\"La cantidad recaudada por la maquina2 es \" + maquina2.getTotal());\n System.out.println(\"La cantidad total es\" + ( maquina1.getTotal() + maquina2.getTotal()));\n}",
"public BigDecimal getSumOfOutstanding(){\n\t\t BigDecimal a = new BigDecimal(0);\r\n//\t\t int outstandingIndex = 0;\r\n//\t\t for (int i=0 ; i<mColumnNames.length ; i++){\r\n//\t\t\t if (mColumnNames[i].equals(DBService.OUTSTANDING)){\r\n//\t\t\t\t outstandingIndex = i;\r\n//\t\t\t\t break;\r\n//\t\t\t }\r\n//\t\t }\r\n\t\t \r\n\t\t for (int i=0 ; i<getRowCount() ; i++){\r\n\t\t\t float value = (Float)getValueAt(i, 11);\r\n\t\t\t \r\n\t\t\t if (value != 0){\r\n\t\t\t\t BigDecimal b = new BigDecimal(value);\r\n\t\t\t\t a = a.add(b);\r\n\t\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t return a;\r\n\t }",
"public BigDecimal getTotalEarnings() {\n totalEarnings = new BigDecimal(0);\n for(BigDecimal earnings: earningsList){\n totalEarnings = totalEarnings.add(earnings);\n }\n return totalEarnings.setScale(2, RoundingMode.HALF_UP);\n }",
"public BigDecimal calcularValorUtilizado(Emenda e) {\n\t\t\n\t\tBigDecimal valorUsado = new BigDecimal(0);\t\t\n\t\tList<IndicacaoEmenda> indicacoes = indicacaoEService.findByEmenda(e);\n\t\t\n\t\tfor (IndicacaoEmenda indicacao : indicacoes) {\n\t\t\tvalorUsado = valorUsado.add(indicacao.getValorDestinado());\n\t\t}\n\t\t\n\t\treturn valorUsado;\n\t}",
"public BigDecimal getTotal() {\n return total;\n }",
"public BigDecimal getTotal() {\n return total;\n }",
"public float valorTotalItem()\r\n {\r\n float total = (produto.getValor() - (produto.getValor() * desconto)) * quantidade;\r\n return total;\r\n }",
"@Override\r\n\tpublic int precioTotal() {\n\t\treturn this.precio;\r\n\t}",
"public void sumar(){\n recogidaDatos();\n System.out.println(\"El resultado de la suma es: \" + (numerando1 + numerando2));\n System.out.println(\"***********************************\");\n\n }",
"public void obtenertotales(double suma){\n double Total = suma;\n totalPagarVentaTB.setText(String.valueOf(Total));\n double iva = Total*0.19;\n ivaVentaTB.setText(String.valueOf(iva));\n double subtotal = Total-iva;\n subTotalVentaTB.setText(String.valueOf(subtotal)); \n \n }",
"public float calcularTotalPagosFactura(FacturaIngreso factura){\n float total = (float) 0.00;\n if(factura != null){\n if(!factura.getPagoCompraCollection().isEmpty()){\n BigDecimal suma = BigDecimal.ZERO;\n for(PagoCompra actual : factura.getPagoCompraCollection()){\n suma = suma.add(actual.getTotalPagoCompra());\n }\n total = new funciones().redondearMas(suma.floatValue(), 2);\n }\n }\n return total;\n }",
"@Override\n public double calcularValorCompra(ArrayList<Mueble> muebles){\n double total = 0d;\n for (Mueble m : muebles) {\n total+= m.getCantidad()*m.getPrecio();\n }\n return total; \n }",
"public void calcular()\r\n/* 530: */ {\r\n/* 531:556 */ this.facturaProveedorSRI.setMontoIva(this.facturaProveedorSRI.getBaseImponibleDiferenteCero().multiply(\r\n/* 532:557 */ ParametrosSistema.getPorcentajeIva().divide(BigDecimal.valueOf(100L))));\r\n/* 533: */ }",
"public boolean calcularTotal() {\r\n double dou_debe = 0;\r\n double dou_haber = 0;\r\n for (int i = 0; i < tab_tabla2.getTotalFilas(); i++) {\r\n try {\r\n if (tab_tabla2.getValor(i, \"ide_cnlap\").equals(p_con_lugar_debe)) {\r\n dou_debe += Double.parseDouble(tab_tabla2.getValor(i, \"valor_cndcc\"));\r\n } else if (tab_tabla2.getValor(i, \"ide_cnlap\").equals(p_con_lugar_haber)) {\r\n dou_haber += Double.parseDouble(tab_tabla2.getValor(i, \"valor_cndcc\"));\r\n }\r\n } catch (Exception e) {\r\n }\r\n }\r\n eti_suma_debe.setValue(\"TOTAL DEBE : \" + utilitario.getFormatoNumero(dou_debe));\r\n eti_suma_haber.setValue(\"TOTAL HABER : \" + utilitario.getFormatoNumero(dou_haber));\r\n\r\n double dou_diferencia = Double.parseDouble(utilitario.getFormatoNumero(dou_debe)) - Double.parseDouble(utilitario.getFormatoNumero(dou_haber));\r\n eti_suma_diferencia.setValue(\"DIFERENCIA : \" + utilitario.getFormatoNumero(dou_diferencia));\r\n if (dou_diferencia != 0.0) {\r\n eti_suma_diferencia.setStyle(\"font-size: 14px;font-weight: bold;color:red\");\r\n } else {\r\n eti_suma_diferencia.setStyle(\"font-size: 14px;font-weight: bold\");\r\n return true;\r\n }\r\n return false;\r\n }",
"public synchronized double getTotal(){\n float CantidadTotal=0;\n Iterator it = getElementos().iterator();\n while (it.hasNext()) {\n ArticuloVO e = (ArticuloVO)it.next();\n CantidadTotal=CantidadTotal+(e.getCantidad()*e.getPrecio());\n}\n\n \n return CantidadTotal;\n\n }",
"List<BigDecimal> computeRes();",
"private double getOrderTotal() {\n double d = 0;\n\n for (Pizza p : pizzas) {\n d += p.calcTotalCost();\n }\n\n return d;\n }",
"public void calcularTotalGastos(FormularioRegistrarCorte formularioRegistrarCorte) {\n Double suma = 0.0;\n try {\n for (int i = 0; i < formularioRegistrarCorte.getTablaSlidas().getRowCount(); i++) {\n suma = suma + (Double.valueOf(formularioRegistrarCorte.getTablaSlidas().getValueAt(i, 2).toString()));\n }\n formularioRegistrarCorte.getTxtTotalGastos().setText(new OperacionesUtiles().formatoDouble(suma));\n } catch (Exception e) {\n showMessageDialog(null, \"Ocurrio un error al intenetar calcular total salidas\");\n }\n\n }",
"public BigDecimal calcolaImportoTotaleDaDedurreSobdocumenti(){\n\t\tBigDecimal result = BigDecimal.ZERO;\n\t\tfor(SD ds : getListaSubdocumenti()){\n\t\t\tresult = result.add(ds.getImportoDaDedurreNotNull());\n\t\t}\n\t\treturn result;\n\t}",
"public BigDecimal getValorTotalSemDesconto() {\r\n return valorUnitario.setScale(5, BigDecimal.ROUND_HALF_EVEN).multiply(quantidade.setScale(3, BigDecimal.ROUND_HALF_EVEN)).setScale(3, BigDecimal.ROUND_DOWN);\r\n }",
"public Double retornaSubTotal(Double totalGeral,Double desconto){\n return totalGeral - (totalGeral*(desconto/100));\n}",
"public Fraccion suma() {\r\n return new Fraccion(operador1.getNumerador()*operador2.getDenominador() + operador1.getDenominador()*operador2.getNumerador(),\r\n operador1.getDenominador()*operador2.getDenominador());\r\n }",
"public BigDecimal calcolaImportoTotaleSubdoumenti(){\n\t\tBigDecimal result = BigDecimal.ZERO;\n\t\tfor(SD ds : getListaSubdocumenti()){\n\t\t\tresult = result.add(ds.getImporto());\n\t\t}\n\t\treturn result;\n\t}",
"public void sumaPuntos() {\r\n int rojo = 0;\r\n int azul = 0;\r\n for (int i = 1; i < 10; i++) {\r\n\r\n if (tablero[1][i].getTipo().equals(\"Rojo\")) {\r\n rojo += tablero[1][i].getValor();\r\n }\r\n\r\n if (tablero[8][i].getTipo().equals(\"Azul\")) {\r\n azul += tablero[8][i].getValor();\r\n }\r\n\r\n }\r\n if (rojo > azul) {\r\n this.setResultado(\"Rojo\");\r\n this.agregarVictoria(jugadorRojo);\r\n }\r\n if (azul > rojo) {\r\n this.setResultado(\"Azul\");\r\n this.agregarVictoria(jugadorAzul);\r\n }\r\n \r\n this.setReplay(true);\r\n }",
"public BigDecimal calcularVolumenProductos(ArrayList volumenProductos) throws MareException {\n UtilidadesLog.info(\"MONCalculoCubicaje.calcularVolumenProductos(ArrayList volumenProductos): Entrada\");\n \n BigDecimal volumenTotal = new BigDecimal(0);\n int cantVolumenProductos = volumenProductos.size();\n DTOVolumenProducto dtoVolumenProducto = null;\n \n for(int j=0; j< cantVolumenProductos; j++){\n dtoVolumenProducto = (DTOVolumenProducto)volumenProductos.get(j);\n UtilidadesLog.debug(\"dtoVolumenProducto: \" + dtoVolumenProducto);\n \n volumenTotal = volumenTotal.add(dtoVolumenProducto.getVolumen().multiply(new BigDecimal(dtoVolumenProducto.getUnidadesProducto().toString())));\n \n UtilidadesLog.debug(\"volumenTotal parcial: \" + volumenTotal); \n }\n \n UtilidadesLog.debug(\"volumenTotal: \" + volumenTotal); \n \n UtilidadesLog.info(\"MONCalculoCubicaje.calcularVolumenProductos(ArrayList volumenProductos): Salida\");\n return volumenTotal;\n }",
"public BigDecimal calcolaImportoTotaleRilevanteIVASubdoumenti(){\n\t\tBigDecimal result = BigDecimal.ZERO;\n\t\tfor(SD ds : getListaSubdocumenti()) {\n\t\t\tif(Boolean.TRUE.equals(ds.getFlagRilevanteIVA())) {\n\t\t\t\tresult = result.add(ds.getImporto());\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public String addDecimal();",
"public BigDecimal getBSCA_ProfitPriceListEntered();",
"private List<ObligacionCoactivoDTO> calcularCostasProcesales(List<ObligacionCoactivoDTO> obligaciones,\n BigDecimal valorAbsoluto, BigDecimal porcentaje) throws CirculemosNegocioException {\n // No aplica costas\n if (valorAbsoluto == null && porcentaje == null) {\n return obligaciones;\n } else if (valorAbsoluto != null) {\n // Aplica valor absoluto\n if (obligaciones.size() == 1) {\n obligaciones.get(0).setValorCostasProcesales(valorAbsoluto);\n return obligaciones;\n } else {\n BigDecimal porcentajeDeuda;\n BigDecimal totalDeuda = new BigDecimal(0);\n\n // Calculo de deuda\n for (ObligacionCoactivoDTO obligacion : obligaciones) {\n totalDeuda = totalDeuda\n .add(obligacion.getValorObligacion().add(obligacion.getValorInteresMoratorios()));\n\n }\n\n // Calculo de porcentaje y valor\n for (ObligacionCoactivoDTO obligacion : obligaciones) {\n porcentajeDeuda = ((obligacion.getValorCostasProcesales()\n .add(obligacion.getValorInteresMoratorios())).multiply(new BigDecimal(100)))\n .divide(totalDeuda);\n\n obligacion\n .setValorCostasProcesales(totalDeuda.multiply(porcentajeDeuda).divide(new BigDecimal(100)));\n\n }\n return obligaciones;\n\n }\n } else if (porcentaje != null) {\n // Aplica porcentaje de la deuda\n for (ObligacionCoactivoDTO obligacion : obligaciones) {\n obligacion.setValorCostasProcesales(\n (obligacion.getValorObligacion().add(obligacion.getValorInteresMoratorios()))\n .multiply(porcentaje).divide(new BigDecimal(100)).setScale(2,\n BigDecimal.ROUND_HALF_UP));\n\n }\n return obligaciones;\n } else {\n throw new CirculemosNegocioException(ErrorCoactivo.GenerarCoactivo.COAC_002005);\n }\n }",
"public double sumMoney(){\n\t\tdouble result = 0;\n\t\tfor(DetailOrder detail : m_DetailOrder){\n\t\t\tresult += detail.calMoney();\n\t\t}\n\t\tif(exportOrder == true){\n\t\t\tresult = result * 1.1;\n\t\t}\n\t\treturn result;\n\t}",
"void setTotal(BigDecimal total);",
"@Override\r\n\tpublic Double precio() {\n\t\treturn this.combo.precio() + 50;\r\n\t}",
"List<BigDecimal> computeSol();",
"public BigDecimal calcolaImportoTotaleNoteCollegateEntrata(){\n\t\tBigDecimal result = BigDecimal.ZERO;\n\t\tfor(DocumentoEntrata ds : getListaNoteCreditoEntrataFiglio()){\n\t\t\tresult = result.add(ds.getImporto());\n\t\t}\n\t\treturn result;\n\t}",
"public BigDecimal getPresupuestoTotalExpediente() {\r\n return presupuestoTotalExpediente;\r\n }",
"double getSubtotal();",
"double getSubtotal();",
"private BigDecimal calcolaTotaleImportoPreDocumenti(List<PreDocumentoEntrata> preDocs) {\n\t\tBigDecimal result = BigDecimal.ZERO;\t\n\t\tfor(PreDocumentoEntrata preDoc : preDocs){\n\t\t\tresult = result.add(preDoc.getImportoNotNull());\n\t\t}\n\t\treturn result;\n\t}",
"private Double calcularValorTotal(Aluguel aluguelPendente, Date dataDevolucao) {\n int quantFilmes = aluguelPendente.getFilmes().size();\n DateTime dateAluguel = new DateTime(aluguelPendente.getDataAluguel().getTime());\n DateTime dateDevolucao = new DateTime(dataDevolucao);\n int diferencaDias = Days.daysBetween(dateAluguel, dateDevolucao).getDays();\n int diasAtraso = diferencaDias - 2 - (quantFilmes - 1);\n Double multa = 1.2 * (diasAtraso > 0 ? diasAtraso : 0);\n Double valorTotal = aluguelPendente.getValor() + multa;\n return valorTotal;\n }",
"public int precioTotalRepuestos() {\n int sumaTotal = 0;\n for (Dispositivo dispositivo : dispositivos) {\n sumaTotal += dispositivo.getPrecioRepuesto();\n }\n return sumaTotal;\n }",
"private void funcaoTotalPedido() {\n\n ClassSale.paymentCoupon(codeCoupon);\n BigDecimal smallCash = PaymentCoupon.getSmallCash();\n\n jTextValueTotalCoupon.setText(v.format(PaymentCoupon.getTotalCoupon()));\n \n jTextSmallCash.setText(v.format(smallCash.setScale(2, BigDecimal.ROUND_HALF_UP)));\n //jTextValueTotalDiscontCoupon.setText(v.format(PagamentoPedido.getDesconto_pagamento()));\n\n if (smallCash.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() < 0) {\n valor_devido = smallCash.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();\n jTextCash.setText(\"0,00\");\n jTextValueDiscontCoupon.setText(\"0,00\");\n jTextCash.requestFocus(true);\n } else {\n\n if (last_cod_tipo_pagamento != null && smallCash.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() > 0) {\n\n if (JOptionPane.showConfirmDialog(this, \"Não é permitido troco para pagamento com cartão.\\nDeseja emitir um contra vale?\", \"Mensagem\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, icon) == 0) {\n\n JOptionPane.showMessageDialog(this, \"Emitindo contra vale...\");\n\n fechouVenda = true;\n //BeanConsulta.setVenda_fechada(fechouVenda);\n this.dispose();\n\n } else {\n\n funcaoLimpaPag();\n }\n } else {\n \n \n valor_devido = smallCash.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); \n jButtonFinalizaCalculoPagameto.setEnabled(true);\n jButtonFinalizaCalculoPagameto.requestFocus(true);\n\n }\n }\n\n }",
"BigDecimal calculateTotalPrice(Order order);",
"public double precioFinal(){\r\n \r\n double plus = 0;\r\n \r\n switch(consumoElectrico){\r\n case 'A':\r\n plus +=100;\r\n break;\r\n case 'B':\r\n plus += 80;\r\n break;\r\n case 'C':\r\n plus +=60;\r\n break;\r\n case 'D':\r\n plus +=50;\r\n break;\r\n case 'E':\r\n plus+=30;\r\n break;\r\n case 'F':\r\n plus+=10;\r\n break;\r\n \r\n }\r\n \r\n \r\n if(peso>=0 && peso<=19){\r\n plus+=10;\r\n }else if(peso >=20 && peso<= 49){\r\n plus+=50;\r\n }else if(peso >= 50 && peso<=79){\r\n plus+=80;\r\n }else if(peso>=80){\r\n plus+=100;\r\n }\r\n return precioBase+plus;\r\n }",
"public void generarTotal(){\n\n\t\tfloat total = 0;\n\n\t\tfor (int con = 0; con < modelo.getRowCount(); con++) {\n\n\t\t\ttotal += (float) tabla.getValueAt(con, 3);\n\t\t\t\n\t\t}\n\n\t\tcampoTotal.setText(formato.format(total));\n\n\t\tlimpiarCampos();\n\n\t}",
"public BigDecimal pesquisarValorMultasCobradas(int idConta) throws ErroRepositorioException ;",
"public double total(){\n\tdouble total=0;\n\tfor(Map.Entry<String, Integer> pro:proScan.getProducts().entrySet()){\n\t\tString proName=pro.getKey();\n\t\tint quantity=pro.getValue();\n\t\tProductCalculator proCal=priceRule.get(proName);\n\t\tif(proCal==null)\n\t\t\tthrow new MissingProduct(proName);\n\t\t\n\t\tProductCalculator cal=priceRule.get(proName);\n\t\tdouble subtotal=cal.getTotal(quantity);\n\t\ttotal+=subtotal;\n\t\t//System.out.println(total);\n\t}\n\t//round the total price to two digit\n\treturn round(total, 2);\n}",
"double getSum();",
"double getSum();",
"public void calcularBalance(FormularioRegistrarCorte formularioRegistrarCortef) {\n Double suma = 0.0;\n Double entradas = 0.0;\n Double salidas = 0.0;\n try {\n entradas = Double.valueOf(formularioRegistrarCortef.getTxtTotalVentas().getText());\n salidas = Double.valueOf(formularioRegistrarCortef.getTxtTotalGastos().getText());\n suma = entradas + (-salidas);\n \n formularioRegistrarCortef.getTxtBalance().setText(new OperacionesUtiles().formatoDouble(suma));\n\n } catch (Exception e) {\n showMessageDialog(null, \"Ocurrio un error al intenetar calcular balance\");\n }\n\n }",
"public int sumar(){\n return this.a+this.b;\n }",
"public java.math.BigDecimal getSum() {\n\treturn sum;\n}",
"public int getTotalRecaudado()\n {\n return maquina1.getTotal() + maquina2.getTotal();\n }",
"@Override\n\tpublic double totalPresentase(UUID idPemb) {\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(\"SELECT sum(k.persentase_komponen) as res \"\n\t\t\t\t+ \"FROM komponen_nilai k WHERE id_pemb='\" + idPemb + \"'\");\n\t\tList<Object[]> results = (List<Object[]>)query.list();\n\t\tfor (Object[] result : results) {\n\t\t\tdouble res = (Double) result[0];\n\t\t\tSystem.out.println(res);\n\t\t}\n\t\treturn 0;\n\t}",
"public double getTotal(){\n\t\tBigDecimal total =BigDecimal.valueOf(0);\n\t\tfor(CartItem cartItem : map.values()){\n\t\t\ttotal = total.add(BigDecimal.valueOf(cartItem.getSubtotal())) ;\n\t\t}\t\t\n\t\treturn total.doubleValue();\n\t}",
"public BigDecimal calcolaImportoTotaleNoteCollegateSpesa(){\n\t\tBigDecimal result = BigDecimal.ZERO;\n\t\tfor(DocumentoSpesa ds : getListaNoteCreditoSpesaFiglio()){\n\t\t\tresult = result.add(ds.getImporto());\n\t\t}\n\t\treturn result;\n\t}",
"public void setGrandTotal (BigDecimal GrandTotal);",
"public void setGrandTotal (BigDecimal GrandTotal);",
"public BigDecimal calcolaImportoTotaleNonRilevanteIVASubdoumenti(){\n\t\tBigDecimal result = BigDecimal.ZERO;\n\t\tfor(SD ds : getListaSubdocumenti()) {\n\t\t\tif(!Boolean.TRUE.equals(ds.getFlagRilevanteIVA())) {\n\t\t\t\tresult = result.add(ds.getImporto());\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public double getTotal_Venta() {\n return total_Venta;\n }",
"public void addTotal() {\n for (int i = 0; i < itemsInOrder.size(); i++) {\n this.dblTotal += itemsInOrder.get(i).getPrice();\n }\n }",
"double getTotalProfit();",
"public BigDecimal getPercentageProfitPLimit();",
"public double obtenerTotalCarrito() throws DBException {\r\n\t\tdouble precioTotal = 0;\r\n\t\tString sentSQL = \"SELECT SUM(precio) FROM carrito\";\r\n\t\ttry {\r\n\t\t\tStatement st = conexion.createStatement();\r\n\t\t\tResultSet rs = st.executeQuery(sentSQL);\r\n\t\t\tif(rs.next()) {\r\n\t\t\t\tprecioTotal = rs.getDouble(1);\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tst.close();\r\n\t\t\tLOG.log(Level.INFO,\"Precio total obtenido\");\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\tLOG.log(Level.WARNING,e.getMessage());\r\n\t\t\tthrow new DBException(\"No se ha podido ejecutar la query\");\r\n\t\t}\r\n\t\treturn precioTotal;\r\n\t}",
"public void mostrarTotales() { \n // Inicializacion de los atributos en 0\n totalPCs = 0;\n totalLaptops = 0;\n totalDesktops = 0; \n /* Recorrido de la lista de computadores para acumular el precio usar instanceof para comparar el tipo de computador */ \n for (Computador pc : computadores){\n if (pc instanceof PCLaptop) {\n totalLaptops += pc.calcularPrecio(); \n } else if (pc instanceof PCDesktop){\n totalDesktops += pc.calcularPrecio();\n }\n }\n totalPCs = totalLaptops + totalDesktops;\n System.out.println(\"El precio total de los computadores es de \" + totalPCs); \n System.out.println(\"La suma del precio de los Laptops es de \" + totalLaptops); \n System.out.println(\"La suma del precio de los Desktops es de \" + totalDesktops);\n }",
"private BigDecimal calculaJuros(ParcelaRecebimento pagamento, long diasAtraso) {\n\t\tBigDecimal juros = pagamento.getParcelaReceber().getValor().multiply(pagamento.getTaxaJuro().setScale(5).divide(BigDecimal.valueOf(30.0), 5))\r\n\t\t\t\t.divide(BigDecimal.valueOf(100), 5).multiply(BigDecimal.valueOf(diasAtraso));\r\n\r\n\t\treturn juros.setScale(2, RoundingMode.HALF_DOWN);\r\n\t}",
"public List viewTotalInscritosBD();",
"public void sumarUnidad() {\r\n\t\tcantidad++;\r\n\t}",
"public double getTotalValue(){\r\n return this.quantity * this.price;\r\n }",
"public float montos(){\n\tDefaultTableModel modelo = vc.returnModelo();\r\n\tint numeroFilas=modelo.getRowCount();\r\n\tfloat monto=0;\r\n\t\tif(modelo.getRowCount()!=0){\r\n\t\t\r\n\t\t\tfor (int i = 0; i < numeroFilas; i++) {\r\n\t\t\t\t\r\n\t\t\t\tmonto = monto + Float.valueOf(modelo.getValueAt(i, 5).toString());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tmonto=0;\r\n\t\t}\r\n\t\treturn monto;\r\n\t}",
"public double getSUM() {\n return sum;\n }",
"public double getTotal(){\n return total;\n }",
"public BigDecimal getPriceActual();",
"public Double getTotal();",
"private double totalPrice(){\n\n double sum = 0;\n\n for (CarComponent carComponent : componentsCart) {\n sum += (carComponent.getCompPrice() * carComponent.getCompQuantity()) ;\n }\n return sum;\n }",
"public void total() {\n\t\t\n\t}",
"public int fondMagasin(){\n\tint total =this.jeton;\n\tfor(Caisse c1 : this.lesCaisses){\n\ttotal = c1.getTotal()+total;\n\t}\n\treturn total;\n}",
"@Test\n public void testSuma() {\n assertEquals(new Fraccion(12.0, 9.0), instance.suma());\n assertEquals(12.0, instance.suma().getNumerador(), 0.001);\n assertEquals(9.0, instance.suma().getDenominador(), 1.0E-3); // 1.0 ^ -3 -> 1 / 1000\n }"
]
| [
"0.7344017",
"0.7344017",
"0.7273408",
"0.7131847",
"0.7111825",
"0.70033276",
"0.68111515",
"0.6744074",
"0.67339057",
"0.6727224",
"0.6705827",
"0.66902703",
"0.6683165",
"0.6668096",
"0.66157126",
"0.66052926",
"0.65928555",
"0.6572447",
"0.6557712",
"0.6540572",
"0.6522834",
"0.6522834",
"0.65184295",
"0.64616805",
"0.6412127",
"0.63885015",
"0.63574016",
"0.6355421",
"0.6355421",
"0.633839",
"0.63288355",
"0.6311202",
"0.6303396",
"0.6302693",
"0.6288573",
"0.62880635",
"0.62710613",
"0.62644595",
"0.6253812",
"0.6250552",
"0.62436295",
"0.6236098",
"0.62131083",
"0.6204959",
"0.6197541",
"0.61911064",
"0.618978",
"0.61682093",
"0.6165155",
"0.6147031",
"0.6143177",
"0.61243695",
"0.612198",
"0.61027163",
"0.6095147",
"0.60840607",
"0.6083679",
"0.6081355",
"0.60754764",
"0.60754764",
"0.60717183",
"0.60676503",
"0.6057821",
"0.6050973",
"0.6039377",
"0.6038315",
"0.6027377",
"0.602031",
"0.6009215",
"0.60060775",
"0.60060775",
"0.59985363",
"0.59957325",
"0.5989066",
"0.5974701",
"0.5973608",
"0.5973485",
"0.5972819",
"0.5969736",
"0.5969736",
"0.5968524",
"0.59629995",
"0.59596306",
"0.5949762",
"0.5939141",
"0.593755",
"0.59372133",
"0.59361774",
"0.59247327",
"0.59114456",
"0.58983064",
"0.5897266",
"0.5882954",
"0.5879194",
"0.5878725",
"0.58758897",
"0.5873632",
"0.58670545",
"0.586703",
"0.58646286"
]
| 0.64697486 | 23 |
/BigDecimal totalAportes = comprobanteSeleccionado.getAporteuniversidad().add(comprobanteSeleccionado.getAporteorganismo().add(comprobanteSeleccionado.getAportecomitente())); System.out.println("Total Aportes Sumados = " + totalAportes.floatValue()); | public void distribuirAportes2(){
if(comprobanteSeleccionado.getAporteorganismo().floatValue() > 0f){
comprobanteSeleccionado.setAportecomitente(comprobanteSeleccionado.getMontoaprobado().subtract(comprobanteSeleccionado.getAporteuniversidad().add(comprobanteSeleccionado.getAporteorganismo())));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"BigDecimal getTotal();",
"BigDecimal getTotal();",
"public void totalFacturaVenta(){\n BigDecimal totalVentaFactura = new BigDecimal(0);\n \n try{\n //Recorremos la lista de detalle y calculamos la Venta total de la factura\n for(Detallefactura det: listDetalle){\n //Sumamos a la variable 'totalVentaFactura'\n totalVentaFactura = totalVentaFactura.add(det.getTotal());\n } \n }catch(Exception e){\n e.printStackTrace();\n }\n \n //Setemos al objeto Factura el valor de la variable 'totalFacturaVenta'\n factura.setTotalVenta(totalVentaFactura);\n \n }",
"public void calcPrecioTotal() {\n try {\n float result = precioUnidad * Float.parseFloat(unidades.getText().toString());\n prTotal.setText(String.valueOf(result) + \"€\");\n }catch (Exception e){\n prTotal.setText(\"0.0€\");\n }\n }",
"public BigDecimal getValorTotal() {\r\n \treturn valorUnitario.setScale(5, BigDecimal.ROUND_HALF_EVEN).multiply(quantidade.setScale(3, BigDecimal.ROUND_HALF_EVEN)).setScale(3, BigDecimal.ROUND_DOWN).subtract(valorDesconto).setScale(3, BigDecimal.ROUND_HALF_EVEN);\r\n }",
"public BigDecimal getValorTotal(){\r\n\t\r\n\t\t// percorre a lista de ItemVenda - stream especie de interator do java 8\r\n\t\treturn itens.stream()\r\n\t .map(ItemVenda::getValorTotal) // para cada um dos itens, obtem o valor total do item\t\r\n\t .reduce(BigDecimal::add) // soma todos os valores total \r\n\t .orElse(BigDecimal.ZERO); // caso não tenha nenhum item retorna zeo\r\n\t}",
"public double obtener_total(){\r\n double total_ventas = precio*unidades;\r\n return total_ventas;\r\n }",
"public Double darTiempoTotal(){\n\t\treturn tiempoComputacionalGrasp+tiempoComputacionalSetCovering;\n\t}",
"public BigDecimal getValorTotal() {\n\t\treturn itens.stream()\n\t\t\t\t.map(ItemDieta::getValorTotal)\n\t\t\t\t.reduce(BigDecimal::add)\n\t\t\t\t.orElse(BigDecimal.ZERO);\n\t}",
"public void calcularTotalVentas(FormularioRegistrarCorte formularioRegistrarCorte) {\n Double suma = 0.00;\n try {\n for (int i = 0; i < formularioRegistrarCorte.getTablaEntradas().getRowCount(); i++) {\n suma = suma + (Double.valueOf(formularioRegistrarCorte.getTablaEntradas().getValueAt(i, 2).toString()));\n }\n formularioRegistrarCorte.getTxtTotalVentas().setText(new OperacionesUtiles().formatoDouble(suma));\n } catch (Exception e) {\n showMessageDialog(null, \"Ocurrio un error al intenetar calcular total entradas\");\n\n }\n\n }",
"public float getProductTotalMoney(){\n connect();\n float total = 0;\n String sql = \"SELECT SUM(subtotal) + (SUM(subtotal) * (SELECT iva FROM configuraciones)) FROM productos\";\n ResultSet result = null;\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n result = ps.executeQuery();\n //result = getQuery(sql);\n if(result != null){\n while(result.next()){\n total = result.getFloat(1);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n }\n return total; \n }",
"public double probabilidadTotal(){\n return probabilidadTotal;\n }",
"BigDecimal getGrandTotal();",
"private void sumarTotalVenta(int cantidad, double precioProducto) {\r\n\t\tdouble valorProductos = cantidad * precioProducto;\r\n\t\ttotalVenta += valorProductos;\r\n\t}",
"private double prixTotal() \r\n\t{\r\n\t\tdouble pt = getPrix() ; \r\n\t\t\r\n\t\tfor(Option o : option) \r\n\t\t\tpt += o.getPrix();\t\r\n\t\treturn pt;\r\n\t}",
"public void calcularTotal() {\n double valor = 0;\n String servico = (String)consultaSelecionada.getSelectedItem().toString();\n switch(servico) {\n case \"Consulta\":\n valor += 100;\n break;\n case \"Limpeza\":\n valor += 130;\n break;\n case \"Clareamento\":\n valor += 450;\n break;\n case \"Aparelho\":\n valor += 100;\n break;\n case \"Raio-x\":\n valor += 80;\n break;\n case \"Cirurgia\":\n valor += 70;\n break;\n }\n Total.setText(String.valueOf(valor));\n }",
"private void sumaApostado() {\n\t\tapostado.set(apostado.get() + 1.0);\n\t\tdiruField.setText(String.format(\"%.2f\", apostado.get()));\n\t\tactualizaPremio();\n\t}",
"public float totalVentas() {\n float total = 0;\n for (int i = 0; i < posicionActual; i++) {\n total += getValorCompra(i); //Recorre el arreglo y suma toda la informacion el el arreglo de los valores en una variable que luego se retorna \n }\n return total;\n }",
"public void addQuantidade(BigDecimal quantidade){\r\n this.quantidade = this.quantidade.setScale(5, BigDecimal.ROUND_HALF_EVEN).add(quantidade).setScale(5, BigDecimal.ROUND_HALF_EVEN).setScale(5, BigDecimal.ROUND_HALF_EVEN);\r\n }",
"BigDecimal getSumaryTechoCveFuente(BudgetKeyEntity budgetKeyEntity);",
"public BigDecimal getGrandTotal();",
"public BigDecimal getGrandTotal();",
"BigDecimal getSubtotal();",
"public void distribuirAportes1(){\n\n if(null == comprobanteSeleccionado.getAporteuniversidad()){\n System.out.println(\"comprobanteSeleccionado.getAporteuniversidad() >> NULO\");\n }\n\n if(null == comprobanteSeleccionado.getAporteorganismo()){\n System.out.println(\"comprobanteSeleccionado.getAporteorganismo() >> NULO\");\n }\n\n if(null == comprobanteSeleccionado.getMontoaprobado()){\n System.out.println(\"comprobanteSeleccionado.getMontoaprobado() >> NULO\");\n }\n\n try{\n if(comprobanteSeleccionado.getAporteuniversidad().floatValue() > 0f){\n comprobanteSeleccionado.setAporteorganismo(comprobanteSeleccionado.getMontoaprobado().subtract(comprobanteSeleccionado.getAporteuniversidad()));\n comprobanteSeleccionado.setAportecomitente(BigDecimal.ZERO);\n }\n } catch(NullPointerException npe){\n System.out.println(\"Error de NullPointerException\");\n npe.printStackTrace();\n }\n\n }",
"public void prinRecaudacion()\n {\n System.out.println(\"La cantidad recaudada por la maquina1 es \" + maquina1.getTotal());\n System.out.println(\"La cantidad recaudada por la maquina2 es \" + maquina2.getTotal());\n System.out.println(\"La cantidad total es\" + ( maquina1.getTotal() + maquina2.getTotal()));\n}",
"public BigDecimal getSumOfOutstanding(){\n\t\t BigDecimal a = new BigDecimal(0);\r\n//\t\t int outstandingIndex = 0;\r\n//\t\t for (int i=0 ; i<mColumnNames.length ; i++){\r\n//\t\t\t if (mColumnNames[i].equals(DBService.OUTSTANDING)){\r\n//\t\t\t\t outstandingIndex = i;\r\n//\t\t\t\t break;\r\n//\t\t\t }\r\n//\t\t }\r\n\t\t \r\n\t\t for (int i=0 ; i<getRowCount() ; i++){\r\n\t\t\t float value = (Float)getValueAt(i, 11);\r\n\t\t\t \r\n\t\t\t if (value != 0){\r\n\t\t\t\t BigDecimal b = new BigDecimal(value);\r\n\t\t\t\t a = a.add(b);\r\n\t\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t return a;\r\n\t }",
"public BigDecimal getTotalEarnings() {\n totalEarnings = new BigDecimal(0);\n for(BigDecimal earnings: earningsList){\n totalEarnings = totalEarnings.add(earnings);\n }\n return totalEarnings.setScale(2, RoundingMode.HALF_UP);\n }",
"public BigDecimal calcularValorUtilizado(Emenda e) {\n\t\t\n\t\tBigDecimal valorUsado = new BigDecimal(0);\t\t\n\t\tList<IndicacaoEmenda> indicacoes = indicacaoEService.findByEmenda(e);\n\t\t\n\t\tfor (IndicacaoEmenda indicacao : indicacoes) {\n\t\t\tvalorUsado = valorUsado.add(indicacao.getValorDestinado());\n\t\t}\n\t\t\n\t\treturn valorUsado;\n\t}",
"public BigDecimal getTotal() {\n return total;\n }",
"public BigDecimal getTotal() {\n return total;\n }",
"public float valorTotalItem()\r\n {\r\n float total = (produto.getValor() - (produto.getValor() * desconto)) * quantidade;\r\n return total;\r\n }",
"@Override\r\n\tpublic int precioTotal() {\n\t\treturn this.precio;\r\n\t}",
"public void sumar(){\n recogidaDatos();\n System.out.println(\"El resultado de la suma es: \" + (numerando1 + numerando2));\n System.out.println(\"***********************************\");\n\n }",
"public float calcularTotalPagosFactura(FacturaIngreso factura){\n float total = (float) 0.00;\n if(factura != null){\n if(!factura.getPagoCompraCollection().isEmpty()){\n BigDecimal suma = BigDecimal.ZERO;\n for(PagoCompra actual : factura.getPagoCompraCollection()){\n suma = suma.add(actual.getTotalPagoCompra());\n }\n total = new funciones().redondearMas(suma.floatValue(), 2);\n }\n }\n return total;\n }",
"public void obtenertotales(double suma){\n double Total = suma;\n totalPagarVentaTB.setText(String.valueOf(Total));\n double iva = Total*0.19;\n ivaVentaTB.setText(String.valueOf(iva));\n double subtotal = Total-iva;\n subTotalVentaTB.setText(String.valueOf(subtotal)); \n \n }",
"@Override\n public double calcularValorCompra(ArrayList<Mueble> muebles){\n double total = 0d;\n for (Mueble m : muebles) {\n total+= m.getCantidad()*m.getPrecio();\n }\n return total; \n }",
"public void calcular()\r\n/* 530: */ {\r\n/* 531:556 */ this.facturaProveedorSRI.setMontoIva(this.facturaProveedorSRI.getBaseImponibleDiferenteCero().multiply(\r\n/* 532:557 */ ParametrosSistema.getPorcentajeIva().divide(BigDecimal.valueOf(100L))));\r\n/* 533: */ }",
"public boolean calcularTotal() {\r\n double dou_debe = 0;\r\n double dou_haber = 0;\r\n for (int i = 0; i < tab_tabla2.getTotalFilas(); i++) {\r\n try {\r\n if (tab_tabla2.getValor(i, \"ide_cnlap\").equals(p_con_lugar_debe)) {\r\n dou_debe += Double.parseDouble(tab_tabla2.getValor(i, \"valor_cndcc\"));\r\n } else if (tab_tabla2.getValor(i, \"ide_cnlap\").equals(p_con_lugar_haber)) {\r\n dou_haber += Double.parseDouble(tab_tabla2.getValor(i, \"valor_cndcc\"));\r\n }\r\n } catch (Exception e) {\r\n }\r\n }\r\n eti_suma_debe.setValue(\"TOTAL DEBE : \" + utilitario.getFormatoNumero(dou_debe));\r\n eti_suma_haber.setValue(\"TOTAL HABER : \" + utilitario.getFormatoNumero(dou_haber));\r\n\r\n double dou_diferencia = Double.parseDouble(utilitario.getFormatoNumero(dou_debe)) - Double.parseDouble(utilitario.getFormatoNumero(dou_haber));\r\n eti_suma_diferencia.setValue(\"DIFERENCIA : \" + utilitario.getFormatoNumero(dou_diferencia));\r\n if (dou_diferencia != 0.0) {\r\n eti_suma_diferencia.setStyle(\"font-size: 14px;font-weight: bold;color:red\");\r\n } else {\r\n eti_suma_diferencia.setStyle(\"font-size: 14px;font-weight: bold\");\r\n return true;\r\n }\r\n return false;\r\n }",
"public synchronized double getTotal(){\n float CantidadTotal=0;\n Iterator it = getElementos().iterator();\n while (it.hasNext()) {\n ArticuloVO e = (ArticuloVO)it.next();\n CantidadTotal=CantidadTotal+(e.getCantidad()*e.getPrecio());\n}\n\n \n return CantidadTotal;\n\n }",
"List<BigDecimal> computeRes();",
"private double getOrderTotal() {\n double d = 0;\n\n for (Pizza p : pizzas) {\n d += p.calcTotalCost();\n }\n\n return d;\n }",
"public void calcularTotalGastos(FormularioRegistrarCorte formularioRegistrarCorte) {\n Double suma = 0.0;\n try {\n for (int i = 0; i < formularioRegistrarCorte.getTablaSlidas().getRowCount(); i++) {\n suma = suma + (Double.valueOf(formularioRegistrarCorte.getTablaSlidas().getValueAt(i, 2).toString()));\n }\n formularioRegistrarCorte.getTxtTotalGastos().setText(new OperacionesUtiles().formatoDouble(suma));\n } catch (Exception e) {\n showMessageDialog(null, \"Ocurrio un error al intenetar calcular total salidas\");\n }\n\n }",
"public BigDecimal calcolaImportoTotaleDaDedurreSobdocumenti(){\n\t\tBigDecimal result = BigDecimal.ZERO;\n\t\tfor(SD ds : getListaSubdocumenti()){\n\t\t\tresult = result.add(ds.getImportoDaDedurreNotNull());\n\t\t}\n\t\treturn result;\n\t}",
"public BigDecimal getValorTotalSemDesconto() {\r\n return valorUnitario.setScale(5, BigDecimal.ROUND_HALF_EVEN).multiply(quantidade.setScale(3, BigDecimal.ROUND_HALF_EVEN)).setScale(3, BigDecimal.ROUND_DOWN);\r\n }",
"public Double retornaSubTotal(Double totalGeral,Double desconto){\n return totalGeral - (totalGeral*(desconto/100));\n}",
"public Fraccion suma() {\r\n return new Fraccion(operador1.getNumerador()*operador2.getDenominador() + operador1.getDenominador()*operador2.getNumerador(),\r\n operador1.getDenominador()*operador2.getDenominador());\r\n }",
"public BigDecimal calcolaImportoTotaleSubdoumenti(){\n\t\tBigDecimal result = BigDecimal.ZERO;\n\t\tfor(SD ds : getListaSubdocumenti()){\n\t\t\tresult = result.add(ds.getImporto());\n\t\t}\n\t\treturn result;\n\t}",
"public void sumaPuntos() {\r\n int rojo = 0;\r\n int azul = 0;\r\n for (int i = 1; i < 10; i++) {\r\n\r\n if (tablero[1][i].getTipo().equals(\"Rojo\")) {\r\n rojo += tablero[1][i].getValor();\r\n }\r\n\r\n if (tablero[8][i].getTipo().equals(\"Azul\")) {\r\n azul += tablero[8][i].getValor();\r\n }\r\n\r\n }\r\n if (rojo > azul) {\r\n this.setResultado(\"Rojo\");\r\n this.agregarVictoria(jugadorRojo);\r\n }\r\n if (azul > rojo) {\r\n this.setResultado(\"Azul\");\r\n this.agregarVictoria(jugadorAzul);\r\n }\r\n \r\n this.setReplay(true);\r\n }",
"public BigDecimal calcularVolumenProductos(ArrayList volumenProductos) throws MareException {\n UtilidadesLog.info(\"MONCalculoCubicaje.calcularVolumenProductos(ArrayList volumenProductos): Entrada\");\n \n BigDecimal volumenTotal = new BigDecimal(0);\n int cantVolumenProductos = volumenProductos.size();\n DTOVolumenProducto dtoVolumenProducto = null;\n \n for(int j=0; j< cantVolumenProductos; j++){\n dtoVolumenProducto = (DTOVolumenProducto)volumenProductos.get(j);\n UtilidadesLog.debug(\"dtoVolumenProducto: \" + dtoVolumenProducto);\n \n volumenTotal = volumenTotal.add(dtoVolumenProducto.getVolumen().multiply(new BigDecimal(dtoVolumenProducto.getUnidadesProducto().toString())));\n \n UtilidadesLog.debug(\"volumenTotal parcial: \" + volumenTotal); \n }\n \n UtilidadesLog.debug(\"volumenTotal: \" + volumenTotal); \n \n UtilidadesLog.info(\"MONCalculoCubicaje.calcularVolumenProductos(ArrayList volumenProductos): Salida\");\n return volumenTotal;\n }",
"public BigDecimal calcolaImportoTotaleRilevanteIVASubdoumenti(){\n\t\tBigDecimal result = BigDecimal.ZERO;\n\t\tfor(SD ds : getListaSubdocumenti()) {\n\t\t\tif(Boolean.TRUE.equals(ds.getFlagRilevanteIVA())) {\n\t\t\t\tresult = result.add(ds.getImporto());\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public String addDecimal();",
"public BigDecimal getBSCA_ProfitPriceListEntered();",
"private List<ObligacionCoactivoDTO> calcularCostasProcesales(List<ObligacionCoactivoDTO> obligaciones,\n BigDecimal valorAbsoluto, BigDecimal porcentaje) throws CirculemosNegocioException {\n // No aplica costas\n if (valorAbsoluto == null && porcentaje == null) {\n return obligaciones;\n } else if (valorAbsoluto != null) {\n // Aplica valor absoluto\n if (obligaciones.size() == 1) {\n obligaciones.get(0).setValorCostasProcesales(valorAbsoluto);\n return obligaciones;\n } else {\n BigDecimal porcentajeDeuda;\n BigDecimal totalDeuda = new BigDecimal(0);\n\n // Calculo de deuda\n for (ObligacionCoactivoDTO obligacion : obligaciones) {\n totalDeuda = totalDeuda\n .add(obligacion.getValorObligacion().add(obligacion.getValorInteresMoratorios()));\n\n }\n\n // Calculo de porcentaje y valor\n for (ObligacionCoactivoDTO obligacion : obligaciones) {\n porcentajeDeuda = ((obligacion.getValorCostasProcesales()\n .add(obligacion.getValorInteresMoratorios())).multiply(new BigDecimal(100)))\n .divide(totalDeuda);\n\n obligacion\n .setValorCostasProcesales(totalDeuda.multiply(porcentajeDeuda).divide(new BigDecimal(100)));\n\n }\n return obligaciones;\n\n }\n } else if (porcentaje != null) {\n // Aplica porcentaje de la deuda\n for (ObligacionCoactivoDTO obligacion : obligaciones) {\n obligacion.setValorCostasProcesales(\n (obligacion.getValorObligacion().add(obligacion.getValorInteresMoratorios()))\n .multiply(porcentaje).divide(new BigDecimal(100)).setScale(2,\n BigDecimal.ROUND_HALF_UP));\n\n }\n return obligaciones;\n } else {\n throw new CirculemosNegocioException(ErrorCoactivo.GenerarCoactivo.COAC_002005);\n }\n }",
"public double sumMoney(){\n\t\tdouble result = 0;\n\t\tfor(DetailOrder detail : m_DetailOrder){\n\t\t\tresult += detail.calMoney();\n\t\t}\n\t\tif(exportOrder == true){\n\t\t\tresult = result * 1.1;\n\t\t}\n\t\treturn result;\n\t}",
"void setTotal(BigDecimal total);",
"@Override\r\n\tpublic Double precio() {\n\t\treturn this.combo.precio() + 50;\r\n\t}",
"public BigDecimal calcolaImportoTotaleNoteCollegateEntrata(){\n\t\tBigDecimal result = BigDecimal.ZERO;\n\t\tfor(DocumentoEntrata ds : getListaNoteCreditoEntrataFiglio()){\n\t\t\tresult = result.add(ds.getImporto());\n\t\t}\n\t\treturn result;\n\t}",
"List<BigDecimal> computeSol();",
"public BigDecimal getPresupuestoTotalExpediente() {\r\n return presupuestoTotalExpediente;\r\n }",
"double getSubtotal();",
"double getSubtotal();",
"private BigDecimal calcolaTotaleImportoPreDocumenti(List<PreDocumentoEntrata> preDocs) {\n\t\tBigDecimal result = BigDecimal.ZERO;\t\n\t\tfor(PreDocumentoEntrata preDoc : preDocs){\n\t\t\tresult = result.add(preDoc.getImportoNotNull());\n\t\t}\n\t\treturn result;\n\t}",
"private Double calcularValorTotal(Aluguel aluguelPendente, Date dataDevolucao) {\n int quantFilmes = aluguelPendente.getFilmes().size();\n DateTime dateAluguel = new DateTime(aluguelPendente.getDataAluguel().getTime());\n DateTime dateDevolucao = new DateTime(dataDevolucao);\n int diferencaDias = Days.daysBetween(dateAluguel, dateDevolucao).getDays();\n int diasAtraso = diferencaDias - 2 - (quantFilmes - 1);\n Double multa = 1.2 * (diasAtraso > 0 ? diasAtraso : 0);\n Double valorTotal = aluguelPendente.getValor() + multa;\n return valorTotal;\n }",
"public int precioTotalRepuestos() {\n int sumaTotal = 0;\n for (Dispositivo dispositivo : dispositivos) {\n sumaTotal += dispositivo.getPrecioRepuesto();\n }\n return sumaTotal;\n }",
"private void funcaoTotalPedido() {\n\n ClassSale.paymentCoupon(codeCoupon);\n BigDecimal smallCash = PaymentCoupon.getSmallCash();\n\n jTextValueTotalCoupon.setText(v.format(PaymentCoupon.getTotalCoupon()));\n \n jTextSmallCash.setText(v.format(smallCash.setScale(2, BigDecimal.ROUND_HALF_UP)));\n //jTextValueTotalDiscontCoupon.setText(v.format(PagamentoPedido.getDesconto_pagamento()));\n\n if (smallCash.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() < 0) {\n valor_devido = smallCash.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();\n jTextCash.setText(\"0,00\");\n jTextValueDiscontCoupon.setText(\"0,00\");\n jTextCash.requestFocus(true);\n } else {\n\n if (last_cod_tipo_pagamento != null && smallCash.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() > 0) {\n\n if (JOptionPane.showConfirmDialog(this, \"Não é permitido troco para pagamento com cartão.\\nDeseja emitir um contra vale?\", \"Mensagem\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, icon) == 0) {\n\n JOptionPane.showMessageDialog(this, \"Emitindo contra vale...\");\n\n fechouVenda = true;\n //BeanConsulta.setVenda_fechada(fechouVenda);\n this.dispose();\n\n } else {\n\n funcaoLimpaPag();\n }\n } else {\n \n \n valor_devido = smallCash.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); \n jButtonFinalizaCalculoPagameto.setEnabled(true);\n jButtonFinalizaCalculoPagameto.requestFocus(true);\n\n }\n }\n\n }",
"BigDecimal calculateTotalPrice(Order order);",
"public double precioFinal(){\r\n \r\n double plus = 0;\r\n \r\n switch(consumoElectrico){\r\n case 'A':\r\n plus +=100;\r\n break;\r\n case 'B':\r\n plus += 80;\r\n break;\r\n case 'C':\r\n plus +=60;\r\n break;\r\n case 'D':\r\n plus +=50;\r\n break;\r\n case 'E':\r\n plus+=30;\r\n break;\r\n case 'F':\r\n plus+=10;\r\n break;\r\n \r\n }\r\n \r\n \r\n if(peso>=0 && peso<=19){\r\n plus+=10;\r\n }else if(peso >=20 && peso<= 49){\r\n plus+=50;\r\n }else if(peso >= 50 && peso<=79){\r\n plus+=80;\r\n }else if(peso>=80){\r\n plus+=100;\r\n }\r\n return precioBase+plus;\r\n }",
"public void generarTotal(){\n\n\t\tfloat total = 0;\n\n\t\tfor (int con = 0; con < modelo.getRowCount(); con++) {\n\n\t\t\ttotal += (float) tabla.getValueAt(con, 3);\n\t\t\t\n\t\t}\n\n\t\tcampoTotal.setText(formato.format(total));\n\n\t\tlimpiarCampos();\n\n\t}",
"public BigDecimal pesquisarValorMultasCobradas(int idConta) throws ErroRepositorioException ;",
"public double total(){\n\tdouble total=0;\n\tfor(Map.Entry<String, Integer> pro:proScan.getProducts().entrySet()){\n\t\tString proName=pro.getKey();\n\t\tint quantity=pro.getValue();\n\t\tProductCalculator proCal=priceRule.get(proName);\n\t\tif(proCal==null)\n\t\t\tthrow new MissingProduct(proName);\n\t\t\n\t\tProductCalculator cal=priceRule.get(proName);\n\t\tdouble subtotal=cal.getTotal(quantity);\n\t\ttotal+=subtotal;\n\t\t//System.out.println(total);\n\t}\n\t//round the total price to two digit\n\treturn round(total, 2);\n}",
"double getSum();",
"double getSum();",
"public void calcularBalance(FormularioRegistrarCorte formularioRegistrarCortef) {\n Double suma = 0.0;\n Double entradas = 0.0;\n Double salidas = 0.0;\n try {\n entradas = Double.valueOf(formularioRegistrarCortef.getTxtTotalVentas().getText());\n salidas = Double.valueOf(formularioRegistrarCortef.getTxtTotalGastos().getText());\n suma = entradas + (-salidas);\n \n formularioRegistrarCortef.getTxtBalance().setText(new OperacionesUtiles().formatoDouble(suma));\n\n } catch (Exception e) {\n showMessageDialog(null, \"Ocurrio un error al intenetar calcular balance\");\n }\n\n }",
"public int sumar(){\n return this.a+this.b;\n }",
"public java.math.BigDecimal getSum() {\n\treturn sum;\n}",
"public int getTotalRecaudado()\n {\n return maquina1.getTotal() + maquina2.getTotal();\n }",
"public double getTotal(){\n\t\tBigDecimal total =BigDecimal.valueOf(0);\n\t\tfor(CartItem cartItem : map.values()){\n\t\t\ttotal = total.add(BigDecimal.valueOf(cartItem.getSubtotal())) ;\n\t\t}\t\t\n\t\treturn total.doubleValue();\n\t}",
"@Override\n\tpublic double totalPresentase(UUID idPemb) {\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(\"SELECT sum(k.persentase_komponen) as res \"\n\t\t\t\t+ \"FROM komponen_nilai k WHERE id_pemb='\" + idPemb + \"'\");\n\t\tList<Object[]> results = (List<Object[]>)query.list();\n\t\tfor (Object[] result : results) {\n\t\t\tdouble res = (Double) result[0];\n\t\t\tSystem.out.println(res);\n\t\t}\n\t\treturn 0;\n\t}",
"public BigDecimal calcolaImportoTotaleNoteCollegateSpesa(){\n\t\tBigDecimal result = BigDecimal.ZERO;\n\t\tfor(DocumentoSpesa ds : getListaNoteCreditoSpesaFiglio()){\n\t\t\tresult = result.add(ds.getImporto());\n\t\t}\n\t\treturn result;\n\t}",
"public void setGrandTotal (BigDecimal GrandTotal);",
"public void setGrandTotal (BigDecimal GrandTotal);",
"public BigDecimal calcolaImportoTotaleNonRilevanteIVASubdoumenti(){\n\t\tBigDecimal result = BigDecimal.ZERO;\n\t\tfor(SD ds : getListaSubdocumenti()) {\n\t\t\tif(!Boolean.TRUE.equals(ds.getFlagRilevanteIVA())) {\n\t\t\t\tresult = result.add(ds.getImporto());\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public double getTotal_Venta() {\n return total_Venta;\n }",
"public void addTotal() {\n for (int i = 0; i < itemsInOrder.size(); i++) {\n this.dblTotal += itemsInOrder.get(i).getPrice();\n }\n }",
"double getTotalProfit();",
"public BigDecimal getPercentageProfitPLimit();",
"public double obtenerTotalCarrito() throws DBException {\r\n\t\tdouble precioTotal = 0;\r\n\t\tString sentSQL = \"SELECT SUM(precio) FROM carrito\";\r\n\t\ttry {\r\n\t\t\tStatement st = conexion.createStatement();\r\n\t\t\tResultSet rs = st.executeQuery(sentSQL);\r\n\t\t\tif(rs.next()) {\r\n\t\t\t\tprecioTotal = rs.getDouble(1);\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tst.close();\r\n\t\t\tLOG.log(Level.INFO,\"Precio total obtenido\");\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\tLOG.log(Level.WARNING,e.getMessage());\r\n\t\t\tthrow new DBException(\"No se ha podido ejecutar la query\");\r\n\t\t}\r\n\t\treturn precioTotal;\r\n\t}",
"public void mostrarTotales() { \n // Inicializacion de los atributos en 0\n totalPCs = 0;\n totalLaptops = 0;\n totalDesktops = 0; \n /* Recorrido de la lista de computadores para acumular el precio usar instanceof para comparar el tipo de computador */ \n for (Computador pc : computadores){\n if (pc instanceof PCLaptop) {\n totalLaptops += pc.calcularPrecio(); \n } else if (pc instanceof PCDesktop){\n totalDesktops += pc.calcularPrecio();\n }\n }\n totalPCs = totalLaptops + totalDesktops;\n System.out.println(\"El precio total de los computadores es de \" + totalPCs); \n System.out.println(\"La suma del precio de los Laptops es de \" + totalLaptops); \n System.out.println(\"La suma del precio de los Desktops es de \" + totalDesktops);\n }",
"private BigDecimal calculaJuros(ParcelaRecebimento pagamento, long diasAtraso) {\n\t\tBigDecimal juros = pagamento.getParcelaReceber().getValor().multiply(pagamento.getTaxaJuro().setScale(5).divide(BigDecimal.valueOf(30.0), 5))\r\n\t\t\t\t.divide(BigDecimal.valueOf(100), 5).multiply(BigDecimal.valueOf(diasAtraso));\r\n\r\n\t\treturn juros.setScale(2, RoundingMode.HALF_DOWN);\r\n\t}",
"public List viewTotalInscritosBD();",
"public void sumarUnidad() {\r\n\t\tcantidad++;\r\n\t}",
"public double getTotalValue(){\r\n return this.quantity * this.price;\r\n }",
"public float montos(){\n\tDefaultTableModel modelo = vc.returnModelo();\r\n\tint numeroFilas=modelo.getRowCount();\r\n\tfloat monto=0;\r\n\t\tif(modelo.getRowCount()!=0){\r\n\t\t\r\n\t\t\tfor (int i = 0; i < numeroFilas; i++) {\r\n\t\t\t\t\r\n\t\t\t\tmonto = monto + Float.valueOf(modelo.getValueAt(i, 5).toString());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tmonto=0;\r\n\t\t}\r\n\t\treturn monto;\r\n\t}",
"public double getSUM() {\n return sum;\n }",
"public double getTotal(){\n return total;\n }",
"public BigDecimal getPriceActual();",
"public Double getTotal();",
"private double totalPrice(){\n\n double sum = 0;\n\n for (CarComponent carComponent : componentsCart) {\n sum += (carComponent.getCompPrice() * carComponent.getCompQuantity()) ;\n }\n return sum;\n }",
"public int fondMagasin(){\n\tint total =this.jeton;\n\tfor(Caisse c1 : this.lesCaisses){\n\ttotal = c1.getTotal()+total;\n\t}\n\treturn total;\n}",
"public void total() {\n\t\t\n\t}",
"@Test\n public void testSuma() {\n assertEquals(new Fraccion(12.0, 9.0), instance.suma());\n assertEquals(12.0, instance.suma().getNumerador(), 0.001);\n assertEquals(9.0, instance.suma().getDenominador(), 1.0E-3); // 1.0 ^ -3 -> 1 / 1000\n }"
]
| [
"0.734357",
"0.734357",
"0.7274092",
"0.7131486",
"0.7111923",
"0.7003046",
"0.68119216",
"0.6744708",
"0.6733865",
"0.6727786",
"0.6704623",
"0.6690451",
"0.66825265",
"0.6668262",
"0.6614918",
"0.66045564",
"0.6593177",
"0.6573384",
"0.6558127",
"0.6539949",
"0.652234",
"0.652234",
"0.6517792",
"0.64703333",
"0.6462187",
"0.6413384",
"0.6389025",
"0.6357997",
"0.63558686",
"0.63558686",
"0.6338806",
"0.6329308",
"0.6311966",
"0.63031214",
"0.6303049",
"0.62884575",
"0.628746",
"0.62715536",
"0.62650937",
"0.6253519",
"0.6251695",
"0.6244277",
"0.6237226",
"0.6213307",
"0.6204482",
"0.6198546",
"0.61917925",
"0.6190479",
"0.61682427",
"0.6165649",
"0.6146911",
"0.61429787",
"0.61247224",
"0.61230004",
"0.6101674",
"0.60945565",
"0.60846883",
"0.60833955",
"0.6082019",
"0.60754186",
"0.60754186",
"0.60722995",
"0.6068109",
"0.60584253",
"0.605113",
"0.6038776",
"0.6037971",
"0.6027442",
"0.6019149",
"0.6009364",
"0.60069126",
"0.60069126",
"0.5998535",
"0.59965897",
"0.59904146",
"0.5975708",
"0.5973754",
"0.59731925",
"0.59731275",
"0.5968938",
"0.5968938",
"0.59689355",
"0.5963819",
"0.59602433",
"0.5949892",
"0.59380645",
"0.59376705",
"0.5937432",
"0.5936047",
"0.59248745",
"0.59127754",
"0.58984715",
"0.58977044",
"0.5884251",
"0.5880014",
"0.58778405",
"0.587648",
"0.5873634",
"0.58675665",
"0.58674914",
"0.5865364"
]
| 0.0 | -1 |
listaComprobantes = this.getEjbFacadeComprobantes().buscarPorFechaDesdeHasta(desde, hasta); buscamos los comprobantes de gasto, que tengan estado, es decir, fueron evaluados | public void buscarComprobantesEntreFechas(){
listaComprobantes = this.getEjbFacadeComprobantes().buscarEntreFechasConEstadoSinRendicionExterna(desde,hasta);
System.out.println("listaComprobantes cantidad >> " + listaComprobantes.size());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<Oficios> buscarActivas();",
"List<Venta1> consultarVentaPorFecha(Date desde, Date hasta, Persona cliente) throws Exception;",
"@Override\n\tpublic List<Comisiones> buscar(Comisiones comisiones) {\n\t\tEntityManager manager = createEntityManager();\n\t\tCriteriaBuilder builder = manager.getCriteriaBuilder();\n\t\t\n\t\tCriteriaQuery<Comisiones> criteriaQuery = builder.createQuery(Comisiones.class);\n\t\tRoot<Comisiones> root = criteriaQuery.from(Comisiones.class);\n\t\t\n\t\t \n\t\tPredicate valor1 = builder.equal(root.get(\"region\"), comisiones.getRegion().getrEgionidpk());\n\t\tPredicate valor2 = builder.equal(root.get(\"vCodcomision\"),comisiones.getvCodcomision());\n\t\tPredicate valor3 = builder.equal(root.get(\"vNumdocapr\"),comisiones.getvNumdocapr());\n\t\tPredicate valor4 = null;\n\t\tPredicate valor6 = null; \n\t\tif(comisiones.getvDescripcion().length() >0) {\n\t\t\t valor4 = builder.like(root.get(\"vDescripcion\"), \"%\"+comisiones.getvDescripcion()+\"%\"); \n\t\t\t valor6 = builder.or(valor4);\n\t\t}else {\n\t\t\t if(comisiones.getNombrencargado().length()>0) {\n\t\t\t\t valor4 = builder.like(root.get(\"consejero\").get(\"vDesnombre\"), \"%\"+comisiones.getNombrencargado()+\"%\"); \n\t\t\t\t valor6 = builder.or(valor4);\n\t\t\t }else {\n\t\t\t\t valor6 = builder.or(valor2,valor3); \n\t\t\t }\n\t\t\t \n\t\t}\n\t\tPredicate valor7 = builder.and(valor1,valor6);\n\t\tcriteriaQuery.where(valor7);\n\t\tQuery<Comisiones> query = (Query<Comisiones>) manager.createQuery(criteriaQuery);\n\t\tList<Comisiones> resultado = query.getResultList();\n\t\tmanager.close();\n\t\treturn resultado; \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 }",
"@SuppressWarnings(\"unchecked\")\n public void consultarCoactivosXLS() throws CirculemosNegocioException {\n\n // consulta la tabla temporal de los 6000 coactivos\n StringBuilder sql = new StringBuilder();\n\n sql.append(\"select [TIPO DOC], [NUMERO DE IDENTIFICACIÓN], [valor multas], [titulo valor], proceso \");\n sql.append(\"from coactivos_xls \");\n sql.append(\"where id_tramite is null and numero_axis is null AND archivo is not null \");\n sql.append(\"AND [titulo valor] IN ('2186721','2187250','2187580','2186845')\");\n\n Query query = em.createNativeQuery(sql.toString());\n\n List<Object[]> listaResultados = Utilidades.safeList(query.getResultList());\n\n Date fechaCoactivo = UtilFecha.buildCalendar().getTime();\n CoactivoDTO coactivoDTOs;\n TipoIdentificacionPersonaDTO tipoIdentificacion;\n List<ObligacionCoactivoDTO> obligacionesCoactivoDTO;\n PersonaDTO personaDTO;\n ProcesoDTO proceso;\n // persiste los resultados en coactivoDTO\n for (Object[] coactivo : listaResultados) {\n coactivoDTOs = new CoactivoDTO();\n // persiste el tipo de indetificacion en TipoIdentificacionPersonaDTO\n personaDTO = new PersonaDTO();\n proceso = new ProcesoDTO();\n tipoIdentificacion = new TipoIdentificacionPersonaDTO();\n obligacionesCoactivoDTO = new ArrayList<>();\n\n tipoIdentificacion.setCodigo((String) coactivo[0]);\n personaDTO.setTipoIdentificacion(tipoIdentificacion);\n coactivoDTOs.setPersona(personaDTO);\n coactivoDTOs.getPersona().setNumeroIdentificacion((String) coactivo[1]);\n\n proceso.setFechaInicio(fechaCoactivo);\n coactivoDTOs.setProceso(proceso);\n coactivoDTOs.setValorTotalObligaciones(BigDecimal\n .valueOf(Double.valueOf(coactivo[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n coactivoDTOs.setValorTotalCostasProcesales(\n coactivoDTOs.getValorTotalObligaciones().multiply(BigDecimal.valueOf(0.05)));\n coactivoDTOs.getProceso().setObservacion(\"COACTIVO\");\n String[] numeroFactura = coactivo[3].toString().split(\",\");\n // separa los numeros de factura cuando viene mas de uno.\n for (String nFactura : numeroFactura) {\n // consulta por numero de factura el el saldo a capital por cada factura\n sql = new StringBuilder();\n sql.append(\"select nombre, saldo_capital, saldo_interes \");\n sql.append(\"from cartera_coactivos_xls \");\n sql.append(\"where nombre = :nFactura\");\n\n Query quer = em.createNativeQuery(sql.toString());\n\n quer.setParameter(\"nFactura\", nFactura);\n\n List<Object[]> result = Utilidades.safeList(quer.getResultList());\n // persiste las obligaciones consultadas y las inserta en ObligacionCoactivoDTO\n ObligacionCoactivoDTO obligaciones;\n for (Object[] obligacion : result) {\n obligaciones = new ObligacionCoactivoDTO();\n obligaciones.setNumeroObligacion((String) obligacion[0]);\n obligaciones.setValorObligacion(BigDecimal.valueOf(\n Double.valueOf(obligacion[1].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n obligaciones.setValorInteresMoratorios(BigDecimal.valueOf(\n Double.valueOf(obligacion[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n // Adiciona las obligaciones a una lista\n obligacionesCoactivoDTO.add(obligaciones);\n }\n\n }\n coactivoDTOs.setObligacionCoactivos(obligacionesCoactivoDTO);\n try {\n iLCoactivo.registrarCoactivoAxis(coactivoDTOs, coactivo[4].toString());\n } catch (Exception e) {\n logger.error(\"Error al registrar coactivo 6000 :\", e);\n }\n }\n }",
"public List<Madeira> buscaCidadesEstado(String estado);",
"@Override\n\tpublic ArrayList<VOFactura> getAllFacturasByClienteDate(VOCliente cliente,\n\t\t\tCalendar fechaDesde, Calendar fechaHasta) {\n\t\t\n\t\tDBConnection con = null;\n\t\tStatement stm = null;\n\t\tString sql = null;\n\t\tResultSet res = null;\n\t\t\n\t\tVOFactura factura;\n\t\tArrayList<VOFactura> listaFacturas = new ArrayList<VOFactura>();\n\t\t\n\t\tjava.sql.Date sqlDesde = new java.sql.Date(fechaDesde.getTimeInMillis());\n\t\tjava.sql.Date sqlHasta = new java.sql.Date(fechaHasta.getTimeInMillis());\n\t\t\n\t\t try {\n\t\t\tcon = new DBConnection(\"root\",\"walkirias84\");\n\t\t\tstm = con.getConnection().createStatement();\n\t\t\tsql = \"SELECT * FROM factura fac\"+\n\t\t\t\" WHERE fac.facfecha >= '\"+sqlDesde+\"' \"+\n\t\t\t\" AND fac.facfecha < '\"+sqlHasta+\"' \"+\n\t\t\t\" AND fac.cliente_cliid = \"+cliente.getId()+\"\";\n\t\t\tres = stm.executeQuery(sql);\n\n\t\t\tSystem.out.println(\"comparando fechas sql: \"+sql);\n\n\t\t\twhile(res.next()) {\n\t\t\t\tfactura = new VOFactura();\n\t\t\t\tfactura.setId(res.getInt(1));\n\t\t\t\tfactura.setNumero(res.getInt(2));\n\t\t\t\tfactura.setIdCliente(res.getInt(3));\n\t\t\t\tCalendar fecha = Calendar.getInstance();\n\t\t\t\tfecha.setTimeInMillis(res.getDate(4).getTime());\n\t\t\t\tfactura.setFecha(fecha);\n\t\t\t\tfactura.setValorNeto(res.getBigDecimal(5));\n\t\t\t\tfactura.setValorIva(res.getBigDecimal(6));\n\t\t\t\tfactura.setValorTotal(res.getBigDecimal(7));\n\t\t\t\t\n\t\t\t\tlistaFacturas.add(factura);\n\t\t\t}\n\n\t\t\treturn listaFacturas;\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\tSystem.out.println(e);\n\t\t} finally {\n\t if (res != null) try { res.close(); } catch (SQLException logOrIgnore) {}\n\t if (stm != null) try { stm.close(); } catch (SQLException logOrIgnore) {}\n\t if (con != null) try { con.getConnection().close(); } catch (SQLException logOrIgnore) {}\n\t }\n\t\t\n\t\treturn null;\n\t}",
"List<Pacote> buscarPorTransporte(Transporte transporte);",
"public void actualizarFiltrarEstadoRequisicion(Requisicion req) throws Exception{\n String carnet = req.getCarnetEmpleado();\n\n java.util.Date utilDate = req.getFechaNueva();\n java.sql.Date fechaConvertida = new java.sql.Date(utilDate.getTime()); \n\n List<Requisicion> requisicion = new ArrayList<>();\n \n Connection miConexion = null;\n Statement miStatement = null;\n ResultSet miResultset = null; \n\n \n //Establecer la conexion\n miConexion = origenDatos.getConexion();\n \n \n //Verificar si existe empleado\n String sqlEmpleado = \"Select CARNETEMPLEADO FROM EMPLEADO WHERE CARNETEMPLEADO = '\"+carnet+\"'\";\n miStatement = miConexion.createStatement();\n miResultset = miStatement.executeQuery(sqlEmpleado);\n \n if(miResultset.next()){\n \n String empleado = carnet;\n \n \n String sqlDepto = \"select d.NOMBREDEPARTAMENTO from departamento d \" + \n \"inner join catalagopuesto c on d.codigodepartamento = c.codigodepartamento \" + \n \"inner join empleado e on c.codigopuesto = e.codigopuesto where e.carnetempleado ='\"+carnet+\"'\";\n \n miStatement = miConexion.createStatement();\n \n //Ejecutar SQL\n miResultset = miStatement.executeQuery(sqlDepto);\n //Crear sentencia SQL y Statement\n miResultset.next();\n String nomdepto = miResultset.getString(\"NOMBREDEPARTAMENTO\");\n \n String miSQl = \"select r.NUMREQ, r.FECPEDIDOREQ, r.FECENTREGAREQ, r.AUTORIZADO, e.CARNETEMPLEADO, e.NOMBREEMPLEADO, e.APELLIDOEMPLEADO, d.NOMBREDEPARTAMENTO \" + \n \"from requisicion r inner join empleado e on r.carnetempleado =e.carnetempleado \" + \n \"inner join catalagopuesto c on e.codigopuesto =c.codigopuesto \" + \n \"inner join departamento d on c.codigodepartamento = d.codigodepartamento \" + \n \"where r.AUTORIZADO = 1 and d.NOMBREDEPARTAMENTO='\"+nomdepto+\"' and r.FECPEDIDOREQ >=TO_DATE('\"+fechaConvertida+\"', 'YYYY/MM/DD HH:MI:SS') order by r.FECPEDIDOREQ\";\n \n miStatement = miConexion.createStatement();\n \n //Ejecutar SQL\n miResultset = miStatement.executeQuery(miSQl);\n \n while(miResultset.next()){\n int numReq = miResultset.getInt(\"NUMREQ\");\n Date fechaPedido = miResultset.getDate(\"FECPEDIDOREQ\");\n Date fechaEntrega = miResultset.getDate(\"FECENTREGAREQ\"); \n String carnetEmpleado = miResultset.getString(\"CARNETEMPLEADO\");\n String nombreEmpleado = miResultset.getString(\"NOMBREEMPLEADO\"); \n String apellidoEmpleado = miResultset.getString(\"APELLIDOEMPLEADO\");\n String nombreDepartamento = miResultset.getString(\"NOMBREDEPARTAMENTO\"); \n\n //*************************ACTUALIZAR**************************\n Connection miConexion1 = null;\n PreparedStatement miStatement1 = null;\n \n //Obtener la conexion\n \n miConexion1 = origenDatos.getConexion();\n \n //Crear sentencia sql que inserte la requisicion a la base\n String misql = \"UPDATE requisicion SET autorizado = ? WHERE numreq = ?\";\n \n miStatement1 = miConexion1.prepareStatement(misql);\n \n //Establecer los parametros para insertar la requisicion \n if(\"aceptado\".equals(req.getEstadoAut())) {\n miStatement1.setInt(1, 0);\n }else{\n miStatement1.setInt(1, 1);\n } \n\n miStatement1.setInt(2, numReq);//se obtendra dentro del while\n \n //Ejecutar la instruccion sql\n miStatement1.execute(); \n //Requisicion temporal = new Requisicion(numReq, fechaPedido, fechaEntrega, carnetEmpleado, nombreEmpleado, apellidoEmpleado, nombreDepartamento);\n //requisicion.add(temporal);\n }\n \n }\n //return requisicion; \n }",
"public Collection<OrdenCompra> traerTodasLasOrdenesDeCompra() {\n Collection<OrdenCompra> resultado = null;\n try {\n controlOC = new ControlOrdenCompra();\n bitacora.info(\"Registro OrdenCompra Iniciado correctamente\");\n resultado = controlOC.traerTodasLasOrdenesDeCompra();\n } catch (IOException ex) {\n bitacora.error(\"No se pudo iniciar el registro OrdenCompra por \" + ex.getMessage());\n }\n return resultado;\n }",
"@Override\n\tpublic ArrayList<VOFactura> getAllFacturasByDate(Calendar fechaDesde,\n\t\t\tCalendar fechaHasta) {\n\t\t\n\t\tSystem.out.println(\"@DAOFACTURAS: getallfacturasbydate!\");\n\t\t\n\t\tDBConnection con = null;\n\t\tStatement stm = null;\n\t\tString sql = null;\n\t\tResultSet res = null;\n\t\t\n\t\tVOFactura factura;\n\t\tArrayList<VOFactura> listaFacturas = new ArrayList<VOFactura>();\n\t\t\n\t\tjava.sql.Date sqlDesde = new java.sql.Date(fechaDesde.getTimeInMillis());\n\t\tjava.sql.Date sqlHasta = new java.sql.Date(fechaHasta.getTimeInMillis());\n\t\t\n\t\ttry {\n\t\t\tcon = new DBConnection(\"root\",\"walkirias84\");\n\t\t\tstm = con.getConnection().createStatement();\n\t\t\tsql = \"SELECT * FROM factura fac\"+\n\t\t\t\" WHERE fac.facfecha >= '\"+sqlDesde+\"' \"+\n\t\t\t\" AND fac.facfecha < '\"+sqlHasta+\"' \";\n\t\t\tres = stm.executeQuery(sql);\n\n\t\t\tSystem.out.println(\"comparando fechas sql: \"+sql);\n\t\t\t\n\t\t\twhile(res.next()) {\n\t\t\t\tfactura = new VOFactura();\n\t\t\t\tfactura.setId(res.getInt(1));\n\t\t\t\tfactura.setNumero(res.getInt(2));\n\t\t\t\tfactura.setIdCliente(res.getInt(3));\n\t\t\t\tCalendar fecha = Calendar.getInstance();\n\t\t\t\tfecha.setTimeInMillis(res.getDate(4).getTime());\n\t\t\t\tfactura.setFecha(fecha);\n\t\t\t\tfactura.setValorNeto(res.getBigDecimal(5));\n\t\t\t\tfactura.setValorIva(res.getBigDecimal(6));\n\t\t\t\tfactura.setValorTotal(res.getBigDecimal(7));\n\t\t\t\t\n\t\t\t\tlistaFacturas.add(factura);\n\t\t\t}\n\n\t\t\treturn listaFacturas;\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\tSystem.out.println(e);\n\t\t} finally {\n\t if (res != null) try { res.close(); } catch (SQLException logOrIgnore) {}\n\t if (stm != null) try { stm.close(); } catch (SQLException logOrIgnore) {}\n\t if (con != null) try { con.getConnection().close(); } catch (SQLException logOrIgnore) {}\n\t }\n\t\t\n\t\treturn null;\n\t}",
"public void actualizarFechaComprobantes() {\r\n if (utilitario.isFechasValidas(cal_fecha_inicio.getFecha(), cal_fecha_fin.getFecha())) {\r\n tab_tabla1.setCondicion(\"fecha_trans_cnccc between '\" + cal_fecha_inicio.getFecha() + \"' and '\" + cal_fecha_fin.getFecha() + \"' and ide_cntcm=\" + com_tipo_comprobante.getValue());\r\n tab_tabla1.ejecutarSql();\r\n tab_tabla2.ejecutarValorForanea(tab_tabla1.getValorSeleccionado());\r\n utilitario.addUpdate(\"tab_tabla1,tab_tabla2\");\r\n calcularTotal();\r\n utilitario.addUpdate(\"gri_totales\");\r\n } else {\r\n utilitario.agregarMensajeInfo(\"Rango de fechas no válidas\", \"\");\r\n }\r\n\r\n }",
"public void buscarDatos() throws Exception {\n\t\ttry {\n\t\t\tString parameter = lbxParameter.getSelectedItem().getValue()\n\t\t\t\t\t.toString();\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\n\n\t\t\tMap<String, Object> parameters = new HashMap<String, Object>();\n\t\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\n\t\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\n\n\t\t\tif (admision != null) {\n\t\t\t\tparameters.put(\"identificacion\",\n\t\t\t\t\t\tadmision.getNro_identificacion());\n\t\t\t}\n\n\t\t\tif (parameter.equalsIgnoreCase(\"fecha_inicial\")) {\n\t\t\t\tparameters.put(\"fecha_string\", value);\n\t\t\t} else {\n\t\t\t\tparameters.put(\"parameter\", parameter);\n\t\t\t\tparameters.put(\"value\", \"%\" + value + \"%\");\n\t\t\t}\n\n\t\t\tgetServiceLocator().getHisc_urgencia_odontologicoService()\n\t\t\t\t\t.setLimit(\"limit 25 offset 0\");\n\n\t\t\tList<Hisc_urgencia_odontologico> lista_datos = getServiceLocator()\n\t\t\t\t\t.getHisc_urgencia_odontologicoService().listar(parameters);\n\t\t\trowsResultado.getChildren().clear();\n\n\t\t\tfor (Hisc_urgencia_odontologico hisc_urgencia_odontologico : lista_datos) {\n\t\t\t\trowsResultado.appendChild(crearFilas(\n\t\t\t\t\t\thisc_urgencia_odontologico, this));\n\t\t\t}\n\n\t\t\tgridResultado.setVisible(true);\n\t\t\tgridResultado.setMold(\"paging\");\n\t\t\tgridResultado.setPageSize(20);\n\n\t\t\tgridResultado.applyProperties();\n\t\t\tgridResultado.invalidate();\n\n\t\t} catch (Exception e) {\n\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t}\n\t}",
"public List<ExistenciaMaq> buscarExistencias(final Producto producto,final Date fecha);",
"public List<conteoTab> filtro() throws Exception {\n iConteo iC = new iConteo(path, this);\n try {\n fecha = sp.getString(\"date\", \"\");\n iC.nombre = fecha;\n\n List<conteoTab> cl = iC.all();\n\n for (conteoTab c : cl) {\n boolean val = true;\n for (int i = 0; i <= clc.size(); i++) {\n if (c.getIdBloque() == sp.getInt(\"bloque\", 0) || c.getIdVariedad() == sp.getInt(\"idvariedad\", 0)) {\n val = true;\n } else {\n val = false;\n }\n }\n if (val) {\n clc.add(c);\n } else {\n }\n }\n } catch (Exception e) {\n Toast.makeText(this, \"No existen registros actuales que coincidan con la fecha\", Toast.LENGTH_LONG).show();\n clc.clear();\n }\n return clc;\n }",
"List<CatalogoAprobadorDTO> buscarAprobador(int cveADM, String numEmpleado, Integer claveNivel, Integer centroCostoOP) throws SIATException;",
"public void filtroVentas(String nombre, String academia, String curso, String fecha_inicio, String fecha_fin, String estado){\n for(GrupoEstudio grupo : grupos){\r\n if(grupo.getNombre().compareTo(nombre) == 0)\r\n listar.add(grupo);\r\n }\r\n //ordenamos la lista por fecha de vencimiento\r\n Collections.sort(listar, new Comparator() { \r\n public int compare(Object o1, Object o2) { \r\n GrupoEstudio c1 = (GrupoEstudio) o1;\r\n GrupoEstudio c2 = (GrupoEstudio) o2;\r\n return c1.getFecha_inicio().compareToIgnoreCase(c2.getFecha_inicio()); \r\n } \r\n }); \r\n }",
"public List<Object[]> getReporte(Reporteador reporteadorSeleccionado, Date fechaDesde, Date fechaHasta, int idSucursal)\r\n/* 266: */ throws AS2Exception, IllegalArgumentException, ArithmeticException\r\n/* 267: */ {\r\n/* 268:291 */ reporteadorSeleccionado = cargarDetalle(reporteadorSeleccionado.getId());\r\n/* 269:292 */ Map<Integer, BigDecimal> mapaValorVariables = new HashMap();\r\n/* 270: */ \r\n/* 271:294 */ List<Object[]> resultado = new ArrayList();\r\n/* 272:297 */ for (Iterator localIterator1 = reporteadorSeleccionado.getListaDetalleReporteadorVariable().iterator(); localIterator1.hasNext();)\r\n/* 273: */ {\r\n/* 274:297 */ detalle1 = (DetalleReporteadorVariable)localIterator1.next();\r\n/* 275:298 */ for (DetalleReporteadorVariable detalle2 : reporteadorSeleccionado.getListaDetalleReporteadorVariable()) {\r\n/* 276:299 */ if ((detalle2.isIndicadorFormula()) && \r\n/* 277:300 */ (detalle2.getExpresion().contains(detalle1.getCodigo()))) {\r\n/* 278:301 */ detalle2.getListaDetalleVariablesExpresion().add(detalle1);\r\n/* 279: */ }\r\n/* 280: */ }\r\n/* 281: */ }\r\n/* 282: */ DetalleReporteadorVariable detalle1;\r\n/* 283:307 */ resultado.addAll(getReporteRecursivo(reporteadorSeleccionado, null, fechaDesde, fechaHasta, idSucursal, 0, mapaValorVariables));\r\n/* 284: */ \r\n/* 285:309 */ return resultado;\r\n/* 286: */ }",
"private void validarhorarioconotroshorariosactivos(HorarioAsignado horarioasignado, List<HorarioAsignado> horarios) throws LogicaException, ParseException, DatoException {\nGregorianCalendar startasignado=new GregorianCalendar();\nDate startdateasignado= new Date(horarioasignado.getValidezinicio().getTime());\nstartasignado.setTime(startdateasignado);\nGregorianCalendar endasignado=new GregorianCalendar();\nDate enddateasignado= new Date(horarioasignado.getValidezfin().getTime());\nendasignado.setTime(enddateasignado);\n\nint tempfrecasignado = horarioasignado.getHorario().getIdfrecuenciaasignacion().intValue();\nList<Integer> diadelasemanaasignado = diadelasemana(tempfrecasignado);\nList<HashMap<String, Object>> dataasignado = Util.diferenciaEnDiasconFrecuencia(startasignado, endasignado,diadelasemanaasignado,tempfrecasignado);\n\n\n\n\nfor(HorarioAsignado ho:horarios){\n\t\t\tif(ho.getIdhorarioasignado().equals(horarioasignado.getIdhorarioasignado())){\n\t\t\t\n\t\t\t}else{\n\t\t\tif(ho.getIdhorario()==horarioasignado.getIdhorario()){\n\t\t\t\n\t\t\t/*//cedulasconhorarios.add(em);\n\t\t\tif (horarioasignado.getValidezinicio().after(ho.getValidezinicio()) && horarioasignado.getValidezinicio().before(ho.getValidezfin())){\n\t\t\tthrow new LogicaException(\"este contrato ya tiene asociado ese horario\"\n\t\t\t+ \" entre las fechas \"+ho.getValidezinicio()+\" y \"+ ho.getValidezfin());\n\t\t\t\n\t\t\t}*/\n\t\t\t\n\t\t\t}else{\n\t\t\t\n\t\t\t}\n\n\t\tContrato contrato = contratoEJB.getContratosporId(ho.getIdcontrato());\n\t\tEmpleadoBean empleado = empleadoEJB.buscarEmpleadosporId(contrato.getIdempleado());\t\n\tGregorianCalendar start=new GregorianCalendar();\n\tDate startdate= new Date(ho.getValidezinicio().getTime());\n\tstart.setTime(startdate);\n\tGregorianCalendar end=new GregorianCalendar();\n\tDate enddate= new Date(ho.getValidezfin().getTime());\n\tend.setTime(enddate);\n\t\n\tint tempfrec = ho.getHorario().getIdfrecuenciaasignacion().intValue();\n\tList<Integer> diadelasemana = diadelasemana(tempfrec);\n\tList<HashMap<String, Object>> data = Util.diferenciaEnDiasconFrecuencia(start, end,diadelasemana,tempfrec);\n\t\n\t\t\t\t\tfor(HashMap<String, Object> diadehorario:data){\n\t\t\t\tHashMap<String, Object> horariofechas=new HashMap<String, Object>();\n\t\t\t\tGregorianCalendar fecha = (GregorianCalendar)diadehorario.get(\"fecha\");\n\t\t\t\tDate fechadat =fecha.getTime();\n\t\t\t\tGregorianCalendar fechafin = (GregorianCalendar)diadehorario.get(\"fechafin\");\n\t\t\t\tDate fechafindat = fechafin.getTime();\n\t\t\t\tfor(HashMap<String, Object> diaasignado:dataasignado){\n\t\t\t\t\t\tHashMap<String, Object> horariofechasasignadas=new HashMap<String, Object>();\n\t\t\t\t\t\tGregorianCalendar fechaasignada = (GregorianCalendar)diaasignado.get(\"fecha\");\n\t\t\t\t\t\tDate fechaasignadadat =fechaasignada.getTime();\n\t\t\t\t\t\tGregorianCalendar fechafinasignada = (GregorianCalendar)diaasignado.get(\"fechafin\");\n\t\t\t\t\t\tDate fechafinasignadadat = fechafinasignada.getTime();\n\t\t\t\t\t\t\t\t\tif(fechaasignada.after(fechafin)){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif((fechaasignada.getTime().after(fecha.getTime())||fechaasignada.getTime().equals(fecha.getTime())) && fechaasignada.getTime().before(fechafin.getTime()) ){\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//\tif((fechaasignada.getTime().after(fecha.getTime()) && fechaasignada.getTime().before(fechafin.getTime())) ){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tthrow new LogicaException(\"Este contrato del empleado con identificación numero:\"+empleado.getEmpleadoidentificacion().getNumeroidentificacion() +\" ya tiene asociado un horario\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" en las fechas \"+Util.dateToString(fecha.getTime(), \"dd/MM/yyyy HH:mm\") +\" y \"+ Util.dateToString(fechafin.getTime(),\"dd/MM/yyyy HH:mm\")+\" debe seleccionar un rango de dias diferente o un horario diferente\");\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif((fechafinasignada.getTime().after(fecha.getTime())||fechafinasignada.getTime().equals(fecha.getTime())) && fechafinasignada.getTime().before(fechafin.getTime()) ){\n\t\t\t\t\t\t\t\t\t\t\t\tthrow new LogicaException(\"Este contrato del empleado con identificación numero:\"+empleado.getEmpleadoidentificacion().getNumeroidentificacion() +\" ya tiene asociado un horario\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" en las fechas \"+Util.dateToString(fecha.getTime(), \"dd/MM/yyyy HH:mm\")+\" y \"+ Util.dateToString(fechafin.getTime(),\"dd/MM/yyyy HH:mm\")+\" debe seleccionar un rango de dias diferente o un horario diferente\");\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif((fecha.getTime().after(fechaasignada.getTime() ) && fecha.getTime().before(fechafinasignada.getTime())) ){\n\t\t\t\t\t\t\t\t\t\t\t\tthrow new LogicaException(\"Este contrato del empleado con identificación numero:\"+empleado.getEmpleadoidentificacion().getNumeroidentificacion() +\" ya tiene asociado un horario\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" en las fechas \"+Util.dateToString(fecha.getTime(), \"dd/MM/yyyy HH:mm\")+\" y \"+ Util.dateToString(fechafin.getTime(),\"dd/MM/yyyy HH:mm\")+\" debe seleccionar un rango de dias diferente o un horario diferente\");\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif((fechafin.getTime().after(fechaasignada.getTime() ) && fechafin.getTime().before(fechafinasignada.getTime())) ){\n\t\t\t\t\t\t\t\t\t\t\t\tthrow new LogicaException(\"Este contrato del empleado con identificación numero:\"+empleado.getEmpleadoidentificacion().getNumeroidentificacion() +\" ya tiene asociado un horario\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" en las fechas \"+Util.dateToString(fecha.getTime(), \"dd/MM/yyyy HH:mm\")+\" y \"+ Util.dateToString(fechafin.getTime(),\"dd/MM/yyyy HH:mm\")+\" debe seleccionar un rango de dias diferente o un horario diferente\");\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\n}\n\n\n}\n\n\n/////////////////////////fin validacion/\n}",
"private static java.util.List<com.esperapp.ws.Empleado> buscarEmpleado(java.lang.String cedula) {\n com.esperapp.ws.AsignarTurnos_Service service = new com.esperapp.ws.AsignarTurnos_Service();\n com.esperapp.ws.AsignarTurnos port = service.getAsignarTurnosPort();\n return port.buscarEmpleado(cedula);\n }",
"private void cargaComentarios() {\n\t\ttry{\n\t\t\t String Sjson= Utils.doHttpConnection(\"http://codigo.labplc.mx/~mikesaurio/taxi.php?act=pasajero&type=getcomentario&placa=\"+placa);\n\t\t JSONObject json= (JSONObject) new JSONTokener(Sjson).nextValue();\n\t\t JSONObject json2 = json.getJSONObject(\"message\");\n\t\t JSONObject jsonResponse = new JSONObject(json2.toString());\n\t\t JSONArray cast2 = jsonResponse.getJSONArray(\"calificacion\");\n\t\t\t ArrayList<ComentarioBean> arrayComenario= new ArrayList<ComentarioBean>();\n\t\t\t for (int i=0; i<cast2.length(); i++) {\n\t\t\t \tJSONObject oneObject = cast2.getJSONObject(i);\n\t\t\t\t\t\t try {\n\t\t\t\t\t\t\t ComentarioBean\t comentarioBean = new ComentarioBean();\n\t\t\t\t\t\t\t comentarioBean.setComentario((String) oneObject.getString(\"comentario\"));\n\t\t\t\t\t\t\t Float calif =Float.parseFloat((String) oneObject.getString(\"calificacion\"));\n\t\t\t\t\t\t\t comentarioBean.setCalificacion(calif);\n\t\t\t\t\t\t\t comentarioBean.setId_facebook((String) oneObject.getString(\"id_face\"));\n\t\t\t\t\t\t\t comentarioBean.setFecha_comentario((String) oneObject.getString(\"hora_fin\"));\n\t\t\t\t\t\t\t arrayComenario.add(comentarioBean);\n\t\t\t\t\t\t\t sumaCalificacion+=calif;\n\t\t\t\t\t\t } catch (JSONException e) { \n\t\t\t\t\t\t\t DatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t\t\t\t }\n\t\t\t }\n\t\t\t autoBean.setArrayComentarioBean(arrayComenario);\n\t\t\t if(cast2.length()>0){\n\t\t\t \t float califParcial = (sumaCalificacion/cast2.length());\n\t\t\t \t PUNTOS_USUARIO =usuarioCalifica(califParcial); //(int) (califParcial * 20 /5);\n\t\t\t \t autoBean.setCalificacion_usuarios(califParcial);\n\t\t\t }else{\n\t\t\t \t autoBean.setCalificacion_usuarios(0);\n\t\t\t }\n\t\t\t}catch(JSONException e){\n\t\t\t\tDatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t}\n\t}",
"public void selecteazaComanda()\n {\n for(String[] comanda : date) {\n if (comanda[0].compareTo(\"insert client\") == 0)\n clientBll.insert(idClient++, comanda[1], comanda[2]);\n else if (comanda[0].compareTo(\"insert product\") == 0)\n {\n Product p = productBll.findProductByName(comanda[1]);\n if(p!=null)//daca produsul exista deja\n productBll.prelucreaza(p.getId(), comanda[1], Float.parseFloat(comanda[2]), Float.parseFloat(comanda[3]));\n else\n productBll.prelucreaza(idProduct++, comanda[1], Float.parseFloat(comanda[2]), Float.parseFloat(comanda[3]));\n\n }\n else if (comanda[0].contains(\"delete client\"))\n clientBll.sterge(comanda[1]);\n else if (comanda[0].contains(\"delete product\"))\n productBll.sterge(comanda[1]);\n else if (comanda[0].compareTo(\"order\")==0)\n order(comanda);\n else if (comanda[0].contains(\"report\"))\n report(comanda[0]);\n }\n }",
"private static ArrayList<Compra> listComprasDoCliente(int idCliente) throws Exception {//Inicio mostraCompras\r\n ArrayList<Compra> lista = arqCompra.toList();\r\n lista.removeIf(c -> c.idCliente != idCliente);\r\n return lista;\r\n }",
"public List<Pagamento> buscarPorBusca(String busca)throws DaoException;",
"List<Reservation> trouverlisteDeReservationAyantUneDateDenvoieDeMail();",
"private ArrayList<Tarea> getTareas(Date desde, Date hasta) {\n BDConsulter consulter = new BDConsulter(DATABASE_URL, DATABASE_USER, DATABASE_PASS);//genero la clase, que se conecta a la base postgresql\n consulter.connect();//establezco la conexion\n\n //Si no hay ningun integrante seleccionado, selecciono todos\n List<String> integrantesSeleccionados = jListIntegrantes.getSelectedValuesList();\n DefaultListModel<String> model = (DefaultListModel<String>) jListIntegrantes.getModel();\n List<String> integrantes = new ArrayList<String>();\n if (integrantesSeleccionados.size() == 0) {\n for (int i = 0; i < model.getSize(); i++) {\n System.out.println((model.getElementAt(i)));\n integrantes.add(model.getElementAt(i));\n }\n integrantesSeleccionados = integrantes;\n }\n\n ArrayList<Tarea> tareas = new ArrayList<>();\n for (String s : integrantesSeleccionados) {\n tareas.addAll(consulter.getTareas(desde, hasta, (String) jComboBoxProyecto.getSelectedItem(), (String) jComboBoxGrupos.getSelectedItem(), s));//obtengo las tareas creadas entre un rango de fecha dado\n }\n consulter.disconnect();//termino la conexion con la base//termino la conexion con la base\n return tareas;\n }",
"public List<HistoriaLaboral> getContratosReporte(Date inicio, Date ffinal, String nombreDependencia,\r\n\t\t\tString nombreDependenciaDesignacion, String nombreCargo, String claseEmpleado, String nombreDesignacion,\r\n\t\t\tEmp empleado , boolean isFullReport);",
"@Override\n\tpublic ArrayList<TransferCompra> listaCompra() {\n\t\t\n\t\t//Creamos la Transaccion\n\t\tTransactionManager.getInstance().nuevaTransaccion();\n\t\tTransactionManager.getInstance().getTransaccion().start();\n\t\tArrayList<TransferCompra> lista = FactoriaDAO.getInstance().createDAOCompra().list();\n\t\t\n\t\t//Hacemos Commit\n\t\tTransactionManager.getInstance().getTransaccion().commit();\n\t\t\n\t\t//Finalmnete cerramos la Transaccion\n\t\tTransactionManager.getInstance().eliminaTransaccion();\n\t\treturn lista;\n\t}",
"private void grabarProyectoCarrerasOferta() {\r\n try {\r\n if (!sessionProyecto.getEstadoActual().getCodigo().equalsIgnoreCase(EstadoProyectoEnum.INICIO.getTipo())) {\r\n return;\r\n }\r\n for (ProyectoCarreraOferta proyectoCarreraOferta : sessionProyecto.getCarrerasSeleccionadasTransfer()) {\r\n Carrera c = carreraService.find(proyectoCarreraOferta.getCarreraId());\r\n List<ProyectoCarreraOferta> proyectoCarreraOfertas = proyectoCarreraOfertaService.buscar(\r\n new ProyectoCarreraOferta(sessionProyecto.getProyectoSeleccionado(), null, null, Boolean.TRUE));\r\n \r\n Long pcoId = devuelveProyectoCarreraId(proyectoCarreraOfertas, proyectoCarreraOferta);\r\n proyectoCarreraOferta = proyectoCarreraOfertaService.buscarPorId(new ProyectoCarreraOferta(pcoId));\r\n if (proyectoCarreraOferta == null) {\r\n proyectoCarreraOferta = new ProyectoCarreraOferta(sessionProyecto.getProyectoSeleccionado(), c.getId(), sessionProyecto.getOfertaAcademicaSeleccionada().getId(),\r\n Boolean.TRUE);\r\n if (contieneCarrera(proyectoCarreraOfertas, proyectoCarreraOferta) == false) {\r\n proyectoCarreraOfertaService.guardar(proyectoCarreraOferta);\r\n this.grabarIndividuoPCO(proyectoCarreraOferta);\r\n logDao.create(logDao.crearLog(\"ProyectoCarreraOferta\", proyectoCarreraOferta.getId() + \"\", \"CREAR\", \"Carrera=\"\r\n + proyectoCarreraOferta.getCarreraId() + \"|Oferta=\" + proyectoCarreraOferta.getOfertaAcademicaId() + \"|Proyecto= \"\r\n + proyectoCarreraOferta.getProyectoId().getId(), sessionUsuario.getUsuario()));\r\n }\r\n }\r\n proyectoCarreraOferta.setEsActivo(true);\r\n proyectoCarreraOfertaService.actualizar(proyectoCarreraOferta);\r\n logDao.create(logDao.crearLog(\"ProyectoCarreraOferta\", proyectoCarreraOferta.getId() + \"\", \"EDITAR\", \"Carrera=\"\r\n + proyectoCarreraOferta.getCarreraId() + \"|Oferta=\" + proyectoCarreraOferta.getOfertaAcademicaId()\r\n + \"|Proyecto= \" + proyectoCarreraOferta.getProyectoId().getId(), sessionUsuario.getUsuario()));\r\n }\r\n } catch (Exception e) {\r\n LOG.info(e.getMessage());\r\n }\r\n }",
"public List<ReporteComprasVentasRetenciones> getNumeroComprobantesAnulados(int mes, int anio, int idOrganizacion)\r\n/* 289: */ {\r\n/* 290:381 */ StringBuffer sql = new StringBuffer();\r\n/* 291:382 */ sql.append(\" SELECT new ReporteComprasVentasRetenciones(tc.codigo, tc.nombre, SUM(CASE WHEN a.numeroRegistrosAnulados IS NULL THEN 0 ELSE a.numeroRegistrosAnulados END), \");\r\n/* 292:383 */ sql.append(\" 'Anulados' ) \");\r\n/* 293:384 */ sql.append(\" FROM AnuladoSRI a \");\r\n/* 294:385 */ sql.append(\" LEFT JOIN a.tipoComprobanteSRI tc \");\r\n/* 295:386 */ sql.append(\" WHERE a.mes = :mes \");\r\n/* 296:387 */ sql.append(\" AND a.anio = :anio \");\r\n/* 297:388 */ sql.append(\" AND a.idOrganizacion = :idOrganizacion \");\r\n/* 298:389 */ sql.append(\" GROUP BY tc.codigo, tc.nombre \");\r\n/* 299: */ \r\n/* 300:391 */ Query query = this.em.createQuery(sql.toString());\r\n/* 301:392 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 302:393 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 303:394 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 304: */ \r\n/* 305:396 */ return query.getResultList();\r\n/* 306: */ }",
"public void buscarDatos() throws Exception {\n\t\ttry {\n\t\t\tString parametro = lbxParametros.getSelectedItem().getValue()\n\t\t\t\t\t.toString();\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\n\n\t\t\tlbTotal_admisiones.setValue(\"\");\n\n\t\t\tMap<String, Object> parameters = new HashMap<String, Object>();\n\t\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\n\t\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\n\n\t\t\tif (!value.isEmpty()) {\n\t\t\t\tif (parametro.equals(\"paramTodo\")) {\n\t\t\t\t\tparameters.put(\"paramTodo\", \"paramTodo\");\n\t\t\t\t\tparameters.put(\"value\", value);\n\t\t\t\t} else {\n\t\t\t\t\tparameters.put(parametro, value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tparameters.put(\"atendida\", chkFiltro_atendidas.isChecked());\n\t\t\tparameters.put(\"estado\", \"1\");// Estado 1 significa que esta activa\n\n\t\t\tif (lbxVias_ingreso.getSelectedItems().size() > 0\n\t\t\t\t\t|| chkFiltro_incluir_hosp.isChecked()\n\t\t\t\t\t|| chkFiltro_incluir_urgencia.isChecked()) {\n\t\t\t\tList<String> listado_vias = new ArrayList<String>();\n\t\t\t\tfor (Listitem listitem : lbxVias_ingreso.getSelectedItems()) {\n\t\t\t\t\tlistado_vias.add((String) listitem.getValue());\n\t\t\t\t}\n\n\t\t\t\t// incluimos las areas\n\t\t\t\tif (chkFiltro_incluir_hosp.isChecked()) {\n\t\t\t\t\tlistado_vias.add(IVias_ingreso.HOSPITALIZACIONES);\n\t\t\t\t}\n\n\t\t\t\tif (chkFiltro_incluir_urgencia.isChecked()) {\n\t\t\t\t\tlistado_vias.add(IVias_ingreso.URGENCIA);\n\t\t\t\t}\n\n\t\t\t\tbtnFiltro_ingreso.setImage(\"/images/filtro1.png\");\n\t\t\t\tparameters.put(\"vias_ingreso\", listado_vias);\n\t\t\t} else {\n\t\t\t\tbtnFiltro_ingreso.setImage(\"/images/filtro.png\");\n\t\t\t\tList<String> vias_ingreso = new ArrayList<String>();\n\t\t\t\tvias_ingreso.add(IVias_ingreso.HOSPITALIZACIONES);\n\t\t\t\tvias_ingreso.add(IVias_ingreso.URGENCIA);\n\t\t\t\tparameters.put(\"vias_ingreso_excluyentes\", vias_ingreso);\n\t\t\t}\n\n\t\t\tif (dtbxFecha_inicial.getValue() != null\n\t\t\t\t\t&& dtbxFecha_final.getValue() != null) {\n\t\t\t\tif (dtbxFecha_inicial.getValue().compareTo(\n\t\t\t\t\t\tdtbxFecha_final.getValue()) > 0) {\n\t\t\t\t\tthrow new ValidacionRunTimeException(\n\t\t\t\t\t\t\t\"La fecha inicial en la busqueda no puede ser mayor a la fecha final\");\n\t\t\t\t}\n\t\t\t\tparameters.put(\"fecha_inicial_p\", new Timestamp(\n\t\t\t\t\t\tdtbxFecha_inicial.getValue().getTime()));\n\t\t\t\tparameters.put(\"fecha_final_p\", new Timestamp(dtbxFecha_final\n\t\t\t\t\t\t.getValue().getTime()));\n\t\t\t} else if (dtbxFecha_inicial.getValue() != null) {\n\t\t\t\tparameters.put(\"fecha_inicial_p\", new Timestamp(\n\t\t\t\t\t\tdtbxFecha_inicial.getValue().getTime()));\n\t\t\t} else if (dtbxFecha_final.getValue() != null) {\n\t\t\t\tparameters.put(\"fecha_final_p\", new Timestamp(dtbxFecha_final\n\t\t\t\t\t\t.getValue().getTime()));\n\t\t\t}\n\n\t\t\tAdministradora administradora = bandboxAseguradora\n\t\t\t\t\t.getRegistroSeleccionado();\n\n\t\t\tif (administradora != null) {\n\t\t\t\tparameters.put(\"codigo_administradora\",\n\t\t\t\t\t\tadministradora.getCodigo());\n\t\t\t\tif (lbxContratos.getSelectedIndex() != 0) {\n\t\t\t\t\tContratos contratos = (Contratos) lbxContratos\n\t\t\t\t\t\t\t.getSelectedItem().getValue();\n\t\t\t\t\tparameters.put(\"id_plan\", contratos.getId_plan());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tList<String> listado_centros = new ArrayList<String>();\n\t\t\tif (!lbxCentros_atencion.getSelectedItems().isEmpty()) {\n\t\t\t\tfor (Listitem listitem : lbxCentros_atencion.getSelectedItems()) {\n\t\t\t\t\tCentro_atencion centro_atencion = (Centro_atencion) listitem\n\t\t\t\t\t\t\t.getValue();\n\t\t\t\t\tlistado_centros.add(centro_atencion.getCodigo_centro());\n\t\t\t\t}\n\t\t\t\tbtnFiltro_centros.setImage(\"/images/filtro1.png\");\n\t\t\t\tparameters.put(\"listado_centros\", listado_centros);\n\t\t\t} else {\n\t\t\t\tbtnFiltro_centros.setImage(\"/images/filtro.png\");\n\t\t\t}\n\t\t\tpopupViasIngreso.close();\n\t\t\tpopupCentros_atencion.close();\n\n\t\t\t// for (String key_map : parameters.keySet()) {\n\t\t\t// log.info(key_map + \" ===> \" + parameters.get(key_map));\n\t\t\t// }\n\n\t\t\tList<Admision> lista_datos = admisionService\n\t\t\t\t\t.listarResultados(parameters);\n\t\t\tlistboxResultado.getItems().clear();\n\n\t\t\tfor (Admision admision : lista_datos) {\n\t\t\t\tlistboxResultado.appendChild(crearFilas(admision, this));\n\t\t\t}\n\n\t\t\tlbTotal_admisiones.setValue(lista_datos.size() + \"\");\n\n\t\t\tlistboxResultado.setVisible(true);\n\t\t\t// listboxResultado.setMold(\"paging\");\n\t\t\t// listboxResultado.setPageSize(20);\n\n\t\t\tlistboxResultado.applyProperties();\n\t\t\tlistboxResultado.invalidate();\n\n\t\t} catch (Exception e) {\n\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t}\n\t}",
"public List<Requisicion> getRequisicionesNoAutorizadas() throws Exception{\n \n List<Requisicion> requisicion = new ArrayList<>();\n \n Connection miConexion = null;\n Statement miStatement = null;\n ResultSet miResultset = null;\n \n //Establecer la conexion\n miConexion = origenDatos.getConexion();\n \n //Crear sentencia SQL y Statement\n String miSql = \"select r.NUMREQ, r.FECPEDIDOREQ, r.FECENTREGAREQ, r.AUTORIZADO, e.CARNETEMPLEADO, e.NOMBREEMPLEADO, e.APELLIDOEMPLEADO, d.NOMBREDEPARTAMENTO \" + \n \"from requisicion r inner join empleado e on r.carnetempleado =e.carnetempleado \" + \n \"inner join catalagopuesto c on e.codigopuesto =c.codigopuesto \" + \n \"inner join departamento d on c.codigodepartamento = d.codigodepartamento where r.AUTORIZADO = 1\";\n \n miStatement = miConexion.createStatement();\n \n //Ejecutar SQL\n miResultset = miStatement.executeQuery(miSql);\n \n while(miResultset.next()){\n int numReq = miResultset.getInt(\"NUMREQ\");\n Date fechaPedido = miResultset.getDate(\"FECPEDIDOREQ\");\n Date fechaEntrega = miResultset.getDate(\"FECENTREGAREQ\"); \n String carnetEmpleado = miResultset.getString(\"CARNETEMPLEADO\");\n String nombreEmpleado = miResultset.getString(\"NOMBREEMPLEADO\"); \n String apellidoEmpleado = miResultset.getString(\"APELLIDOEMPLEADO\");\n String nombreDepartamento = miResultset.getString(\"NOMBREDEPARTAMENTO\"); \n \n Requisicion temporal = new Requisicion(numReq, fechaPedido, fechaEntrega, carnetEmpleado, nombreEmpleado, apellidoEmpleado, nombreDepartamento);\n requisicion.add(temporal);\n }\n \n return requisicion;\n \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 }",
"public void BuscarGrupo() {\r\n try {\r\n // Inicializamos la tabla para refrescar todos los datos contenidos.\r\n InicializarTabla(_escuchador.session);\r\n Transaction tx = _escuchador.session.beginTransaction();\r\n List<Cursos> tabla=rsmodel.lista;\r\n List<Cursos> borrados = new <Cursos>ArrayList();\r\n if(menuCursos.campoCursosBuscarCategorias.getSelectedItem().toString().equals(\"Todos los campos\")){\r\n for(Cursos obj : tabla) {\r\n if(!obj.getCodigo().toString().contains(menuCursos.campoCursosBuscar.getText().toLowerCase()) && !obj.getNombre().toLowerCase().contains(menuCursos.campoCursosBuscar.getText().toLowerCase())){\r\n borrados.add(obj);\r\n }\r\n }\r\n }\r\n else if(menuCursos.campoCursosBuscarCategorias.getSelectedItem().toString().equals(\"Código del curso\")){\r\n for(Cursos obj : tabla) {\r\n if(!obj.getCodigo().toString().contains(menuCursos.campoCursosBuscar.getText().toLowerCase())){\r\n borrados.add(obj);\r\n }\r\n }\r\n }\r\n else if(menuCursos.campoCursosBuscarCategorias.getSelectedItem().toString().equals(\"Nombre del curso\")){\r\n for(Cursos obj : tabla) {\r\n if(!obj.getNombre().toLowerCase().contains(menuCursos.campoCursosBuscar.getText().toLowerCase())){\r\n borrados.add(obj);\r\n }\r\n }\r\n }\r\n tabla.removeAll(borrados);\r\n tx.commit();\r\n if(tabla.isEmpty()){tabla.add(new Cursos(null));}\r\n rs=tabla;\r\n ControladorTabla registrosBuscados = new ControladorTabla(tabla);\r\n menuCursos.getTablaCursos().setModel(registrosBuscados);\r\n } catch (Exception e) {\r\n JOptionPane.showMessageDialog(null, e, \"Excepción\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }",
"public void buscarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tString codigo_empresa = empresa.getCodigo_empresa();\r\n\t\t\tString codigo_sucursal = sucursal.getCodigo_sucursal();\r\n\t\t\tString parameter = lbxParameter.getSelectedItem().getValue()\r\n\t\t\t\t\t.toString();\r\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\r\n\r\n\t\t\tMap<String, Object> parameters = new HashMap();\r\n\t\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\t\tparameters.put(\"parameter\", parameter);\r\n\t\t\tparameters.put(\"value\", \"%\" + value + \"%\");\r\n\r\n\t\t\tgetServiceLocator().getHis_atencion_embarazadaService().setLimit(\r\n\t\t\t\t\t\"limit 25 offset 0\");\r\n\r\n\t\t\tList<His_atencion_embarazada> lista_datos = getServiceLocator()\r\n\t\t\t\t\t.getHis_atencion_embarazadaService().listar(parameters);\r\n\t\t\trowsResultado.getChildren().clear();\r\n\r\n\t\t\tfor (His_atencion_embarazada his_atencion_embarazada : lista_datos) {\r\n\t\t\t\trowsResultado.appendChild(crearFilas(his_atencion_embarazada,\r\n\t\t\t\t\t\tthis));\r\n\t\t\t}\r\n\r\n\t\t\tgridResultado.setVisible(true);\r\n\t\t\tgridResultado.setMold(\"paging\");\r\n\t\t\tgridResultado.setPageSize(20);\r\n\r\n\t\t\tgridResultado.applyProperties();\r\n\t\t\tgridResultado.invalidate();\r\n\t\t\tgridResultado.setVisible(true);\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\t}",
"public Collection cargarMasivo(int codigoCiclo, String proceso, String subproceso, int periodo) {\n/* 287 */ Collection resultados = new ArrayList();\n/* */ try {\n/* 289 */ String s = \"select m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, u.Descripcion Nombre_Area, Um.Descripcion as Nombre_Unidad_Medida, to_char(m.Codigo_Objetivo,'9999999999') ||' - ' || o.Descripcion Nombre_Objetivo, to_char(m.Codigo_Meta,'9999999999') ||' - ' || m.Descripcion Nombre_Meta, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, l.Valor_Logro, case when l.Valor_Logro is not null then 'A' else 'N' end Existe from Cal_Planes p, Cal_Plan_Objetivos o, Cal_Plan_Metas m left join Cal_Logros l on( m.Codigo_Ciclo = l.Codigo_Ciclo and m.Codigo_Plan = l.Codigo_Plan and m.Codigo_Meta = l.Codigo_Meta and m.Codigo_Objetivo = l.Codigo_Objetivo and \" + periodo + \" = l.Periodo),\" + \" Unidades_Dependencia u,\" + \" Sis_Multivalores Um\" + \" where p.Ciclo = o.Codigo_Ciclo\" + \" and p.Codigo_Plan = o.Codigo_Plan\" + \" and o.Codigo_Ciclo = m.Codigo_Ciclo\" + \" and o.Codigo_Plan = m.Codigo_Plan\" + \" and o.Codigo_Objetivo = m.Codigo_Objetivo\" + \" and p.Codigo_Area = u.Codigo\" + \" and m.Unidad_Medida = Um.Valor\" + \" and Um.Tabla = 'CAL_UNIDAD_MEDIDA_META'\" + \" and o.Proceso = '\" + proceso + \"'\" + \" and o.Subproceso = '\" + subproceso + \"'\" + \" and p.Ciclo = \" + codigoCiclo + \" and m.Estado = 'A'\" + \" and o.Estado = 'A'\" + \" and o.Tipo_Objetivo in ('G', 'M')\";\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/* 333 */ if (periodo == 1) {\n/* 334 */ s = s + \" and m.mes01='S'\";\n/* */ }\n/* 336 */ else if (periodo == 2) {\n/* 337 */ s = s + \" and m.mes02='S'\";\n/* */ }\n/* 339 */ else if (periodo == 3) {\n/* 340 */ s = s + \" and m.mes03='S'\";\n/* */ }\n/* 342 */ else if (periodo == 4) {\n/* 343 */ s = s + \" and m.mes04='S'\";\n/* */ }\n/* 345 */ else if (periodo == 5) {\n/* 346 */ s = s + \" and m.mes05='S'\";\n/* */ }\n/* 348 */ else if (periodo == 6) {\n/* 349 */ s = s + \" and m.mes06='S'\";\n/* */ }\n/* 351 */ else if (periodo == 7) {\n/* 352 */ s = s + \" and m.mes07='S'\";\n/* */ }\n/* 354 */ else if (periodo == 8) {\n/* 355 */ s = s + \" and m.mes08='S'\";\n/* */ }\n/* 357 */ else if (periodo == 9) {\n/* 358 */ s = s + \" and m.mes09='S'\";\n/* */ }\n/* 360 */ else if (periodo == 10) {\n/* 361 */ s = s + \" and m.mes10='S'\";\n/* */ }\n/* 363 */ else if (periodo == 11) {\n/* 364 */ s = s + \" and m.mes11='S'\";\n/* */ }\n/* 366 */ else if (periodo == 12) {\n/* 367 */ s = s + \" and m.mes12='S'\";\n/* */ } \n/* */ \n/* 370 */ s = s + \" order by m.Codigo_Ciclo, m.Codigo_Objetivo, m.Codigo_Meta, u.Descripcion\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 377 */ boolean rtaDB = this.dat.parseSql(s);\n/* 378 */ if (!rtaDB) {\n/* 379 */ return resultados;\n/* */ }\n/* */ \n/* 382 */ this.rs = this.dat.getResultSet();\n/* 383 */ while (this.rs.next()) {\n/* 384 */ CalMetasDTO reg = new CalMetasDTO();\n/* 385 */ reg.setCodigoCiclo(codigoCiclo);\n/* 386 */ reg.setCodigoPlan(this.rs.getInt(\"codigo_plan\"));\n/* 387 */ reg.setCodigoMeta(this.rs.getInt(\"codigo_meta\"));\n/* 388 */ reg.setCodigoObjetivo(this.rs.getInt(\"codigo_objetivo\"));\n/* 389 */ reg.setNombreArea(this.rs.getString(\"Nombre_Area\"));\n/* 390 */ reg.setNombreMeta(this.rs.getString(\"Nombre_meta\"));\n/* 391 */ reg.setNombreObjetivo(this.rs.getString(\"Nombre_Objetivo\"));\n/* 392 */ reg.setUnidadMedida(this.rs.getString(\"unidad_medida\"));\n/* 393 */ reg.setValorMinimo(this.rs.getDouble(\"valor_minimo\"));\n/* 394 */ reg.setValorMaximo(this.rs.getDouble(\"valor_maximo\"));\n/* 395 */ reg.setValorLogro(this.rs.getDouble(\"Valor_Logro\"));\n/* 396 */ reg.setNombreUnidadMedida(this.rs.getString(\"nombre_unidad_medida\"));\n/* 397 */ reg.setEstado(this.rs.getString(\"existe\"));\n/* 398 */ resultados.add(reg);\n/* */ }\n/* */ \n/* 401 */ } catch (Exception e) {\n/* 402 */ e.printStackTrace();\n/* 403 */ Utilidades.writeError(\"CalPlanMetasFactory:cargarTodos \", e);\n/* */ } \n/* 405 */ return resultados;\n/* */ }",
"public static ArrayList<Paciente> BuscarPacientesConConvenios(Empresa emp) {\n Session sesion;\n Transaction tr = null;\n ArrayList<Paciente> lis = null;\n String hql;\n try{ \n sesion = NewHibernateUtil.getSessionFactory().openSession();\n tr = sesion.beginTransaction();\n hql = \"SELECT DISTINCT c.paciente FROM Convenio c WHERE c.estado = 'Activo' AND c.empresa = \"+emp.getIdempresa();\n Query query = sesion.createQuery(hql); \n Iterator<Paciente> it = query.iterate();\n if(it.hasNext()){\n lis = new ArrayList();\n while(it.hasNext()){\n lis.add(it.next());\n }\n }\n }catch(HibernateException ex){\n JOptionPane.showMessageDialog(null, \"Error al conectarse con Base de Datos\", \"Convenio Controlador\", JOptionPane.INFORMATION_MESSAGE);\n }\n return lis;\n }",
"public ArrayList<Menu> buscarPorFecha(Date fechaIni,Date fechaTer );",
"public List<ChamadosAtendidos> contaChamadosAtendidos(int servico) throws SQLException {\r\n\r\n List<ChamadosAtendidos> CAList = new ArrayList<>();\r\n PreparedStatement ps = conn.prepareStatement(\"SELECT * FROM `solicitacoes` WHERE servico_id_servico =? \");\r\n\r\n ps.setInt(1, servico);\r\n ChamadosAtendidos ch = new ChamadosAtendidos();\r\n int contador1 = 0, contador2 = 0, contador3 = 0;\r\n\r\n ResultSet rs = ps.executeQuery();\r\n while (rs.next()) {\r\n contador1++;\r\n }\r\n PreparedStatement ps2 = conn.prepareStatement(\"SELECT * FROM `solicitacoes` WHERE servico_id_servico =? and em_chamado= 4 \");\r\n ps2.setInt(1, servico);\r\n ResultSet rs2 = ps2.executeQuery();\r\n while (rs2.next()) {\r\n contador2++;\r\n }\r\n PreparedStatement ps3 = conn.prepareStatement(\"SELECT Qtde_tentativas FROM `solicitacoes` WHERE servico_id_servico=?\");\r\n ps3.setInt(1, servico);\r\n ResultSet rs3 = ps3.executeQuery();\r\n while (rs3.next()) {\r\n\r\n contador3 = contador3 + rs3.getInt(1);\r\n }\r\n PreparedStatement ps4 = conn.prepareStatement(\"SELECT * FROM `solicitacoes` WHERE servico_id_servico =? and em_chamado= 2 \");\r\n ps4.setInt(1, servico);\r\n\r\n ResultSet rs4 = ps4.executeQuery();\r\n while (rs4.next()) {\r\n\r\n contador3++;\r\n }\r\n ch.setTotalDeChamados(contador1);\r\n ch.setChamadosConcluidos(contador2);\r\n ch.setChamadosRealizados(contador3 + contador2);\r\n CAList.add(ch);\r\n return CAList;\r\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<Encuesta> getEncuestasSupervisar(String codigo, String nombre,\n\t\t\tLong desde, Long hasta, String zonas, String zonafiltrar, boolean checkSinSupervisar) {\n\t\t//Set the SQL Query initially\n\t\tString sqlQuery = \"from Encuesta enc where 1=1\";\n\t\t// if not null set time parameters\n\t\tif(!(desde==null)) {\n\t\t\tsqlQuery = sqlQuery + \" and enc.fechaEntrevista between :fechaInicio and :fechaFinal\";\n\t\t}\n\t\tif (!codigo.matches(\"\")) {\n\t\t\tsqlQuery = sqlQuery + \" and enc.codigo =:codigo\";\n\t\t}\n\t\tif (checkSinSupervisar) {\n\t\t\tsqlQuery = sqlQuery + \" and enc.supervisor is null\";\n\t\t}\n\t\tif (!nombre.matches(\"\")) {\n\t\t\tsqlQuery = sqlQuery + \" and lower(enc.jefeFamilia) like:nombre\";\n\t\t}\n\t\tif(zonas.equals(\"ZON_REP_1\")) {\n\t\t\tsqlQuery = sqlQuery + \" and enc.segmento.grupo=:grupo\";\n\t\t}\n\t\telse if(zonas.equals(\"ZON_REP_2\")) {\n\t\t\tsqlQuery = sqlQuery + \" and enc.segmento.region=:region\";\n\t\t}\n\t\telse if(zonas.equals(\"ZON_REP_3\")) {\n\t\t\tsqlQuery = sqlQuery + \" and enc.segmento.departamento=:departamento\";\n\t\t}\n\t\telse if(zonas.equals(\"ZON_REP_4\")) {\n\t\t\tsqlQuery = sqlQuery + \" and enc.segmento.municipio=:municipio\";\n\t\t}\n\t\telse if(zonas.equals(\"ZON_REP_5\")) {\n\t\t\tsqlQuery = sqlQuery + \" and enc.segmento.ident=:segmento\";\n\t\t}\n\t\t// Retrieve session from Hibernate\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\t// Create a Hibernate query (HQL)\n\t\tQuery query = session.createQuery(sqlQuery);\n\t\tif(!(desde==null)) {\n\t\t\tTimestamp timeStampInicio = new Timestamp(desde);\n\t\t\tTimestamp timeStampFinal = new Timestamp(hasta);\n\t\t\tquery.setTimestamp(\"fechaInicio\", timeStampInicio);\n\t\t\tquery.setTimestamp(\"fechaFinal\", timeStampFinal);\n\t\t}\n\t\tif (!codigo.matches(\"\")) {\n\t\t\tquery.setParameter(\"codigo\", codigo);\n\t\t}\n\t\tif (!nombre.matches(\"\")) {\n\t\t\tquery.setParameter(\"nombre\", \"%\"+nombre.toLowerCase()+\"%\");\n\t\t}\n\t\tif(zonas.equals(\"ZON_REP_1\")) {\n\t\t\tquery.setParameter(\"grupo\", zonafiltrar);\n\t\t}\n\t\telse if(zonas.equals(\"ZON_REP_2\")) {\n\t\t\tquery.setParameter(\"region\", zonafiltrar);\n\t\t}\n\t\telse if(zonas.equals(\"ZON_REP_3\")) {\n\t\t\tquery.setParameter(\"departamento\", zonafiltrar);\n\t\t}\n\t\telse if(zonas.equals(\"ZON_REP_4\")) {\n\t\t\tquery.setParameter(\"municipio\", zonafiltrar);\n\t\t}\n\t\telse if(zonas.equals(\"ZON_REP_5\")) {\n\t\t\tquery.setParameter(\"segmento\", zonafiltrar);\n\t\t}\n\t\t// Retrieve all\n\t\treturn query.list();\n\t}",
"public List<ReporteComprasVentasRetenciones> getReporteCompras(int mes, int anio, int idOrganizacion)\r\n/* 167: */ {\r\n/* 168:227 */ StringBuffer sql = new StringBuffer();\r\n/* 169: */ \r\n/* 170:229 */ sql.append(\" SELECT new ReporteComprasVentasRetenciones(tc.codigo, tc.nombre, COUNT(tc.codigo), \");\r\n/* 171:230 */ sql.append(\" (CASE WHEN tc.codigo = '04' THEN -SUM(fps.baseImponibleTarifaCero) ELSE SUM(fps.baseImponibleTarifaCero) END), \");\r\n/* 172:231 */ sql.append(\" (CASE WHEN tc.codigo = '04' THEN -SUM(fps.baseImponibleDiferenteCero) ELSE SUM(fps.baseImponibleDiferenteCero) END), \");\r\n/* 173:232 */ sql.append(\" (CASE WHEN tc.codigo = '04' THEN -SUM(fps.baseImponibleNoObjetoIva) ELSE SUM(fps.baseImponibleNoObjetoIva) END), \");\r\n/* 174:233 */ sql.append(\" (CASE WHEN tc.codigo = '04' THEN -SUM(fps.montoIva) ELSE SUM(fps.montoIva) END), 'Compras',ct.codigo,ct.nombre) \");\r\n/* 175:234 */ sql.append(\" FROM FacturaProveedorSRI fps \");\r\n/* 176:235 */ sql.append(\" LEFT OUTER JOIN fps.tipoComprobanteSRI tc \");\r\n/* 177:236 */ sql.append(\" LEFT OUTER JOIN fps.creditoTributarioSRI ct\");\r\n/* 178:237 */ sql.append(\" WHERE MONTH(fps.fechaRegistro) =:mes \");\r\n/* 179:238 */ sql.append(\" AND YEAR(fps.fechaRegistro) =:anio \");\r\n/* 180:239 */ sql.append(\" AND fps.estado!=:estadoAnulado \");\r\n/* 181:240 */ sql.append(\" AND fps.indicadorSaldoInicial!=true \");\r\n/* 182:241 */ sql.append(\" AND fps.idOrganizacion = :idOrganizacion \");\r\n/* 183:242 */ sql.append(\" GROUP BY tc.codigo, tc.nombre,ct.codigo,ct.nombre\");\r\n/* 184:243 */ sql.append(\" ORDER BY tc.codigo, tc.nombre \");\r\n/* 185: */ \r\n/* 186:245 */ Query query = this.em.createQuery(sql.toString());\r\n/* 187:246 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 188:247 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 189:248 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 190:249 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 191: */ \r\n/* 192:251 */ return query.getResultList();\r\n/* 193: */ }",
"public void ListarVehiculosCiatCasaCiat() throws GWorkException {\r\n\t\ttry {\r\n\t\t\tDate dtFechaInicio;\r\n\t\t\tDate dtFechaFin;\r\n\t\t\tLong idPeriodo = 1L;\r\n\r\n\t\t\tdtFechaInicio = ManipulacionFechas\r\n\t\t\t\t\t.getMesAnterior(ManipulacionFechas.getFechaActual());\r\n\r\n\t\t\t// Integer mes = Integer.valueOf(ManipulacionFechas\r\n\t\t\t// .getMes(ManipulacionFechas.getFechaActual()));\r\n\t\t\tCalendar calendario = Calendar.getInstance();\r\n\r\n\t\t\tcalendario.setTime(dtFechaInicio);\r\n\t\t\tcalendario.set(Calendar.DAY_OF_MONTH, 5);\r\n\t\t\t// calendario.set(Calendar.MONTH, mes - 2);\r\n\r\n\t\t\tdtFechaInicio = calendario.getTime();\r\n\r\n\t\t\tdtFechaFin = ManipulacionFechas.getFechaActual();\r\n\t\t\tcalendario.setTime(dtFechaFin);\r\n\t\t\tcalendario.set(Calendar.DAY_OF_MONTH, 4);\r\n\r\n\t\t\tdtFechaFin = calendario.getTime();\r\n\r\n\t\t\tList<BillingAccountVO> vehiculos = listVehiclesFlatFileCiatCasaCiat(\r\n\t\t\t\t\tdtFechaInicio, dtFechaFin);\r\n\r\n\t\t\tReporteCobroCiatCasaCiat(vehiculos, idPeriodo);\r\n\t\t\tEntityManagerHelper.getEntityManager().getTransaction().begin();\r\n\t\t\tEntityManagerHelper.getEntityManager().getTransaction().commit();\r\n\t\t} catch (RuntimeException re) {\r\n\t\t\tlog.error(\"ListarVehiculosCiatCasaCiat\",re);\r\n\t\t\tthrow new GworkRuntimeException(\"[INFO] - \" + re.getMessage(), re);\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(\"ListarVehiculosCiatCasaCiat\",e);\r\n\t\t\tthrow new GWorkException(\r\n\t\t\t\t\t\"No se pudo generar el comprobante [ERROR] - \"\r\n\t\t\t\t\t\t\t+ e.getMessage(), e);\r\n\r\n\t\t}\r\n\t}",
"public List<Tripulante> buscarTodosTripulantes();",
"public ArrayList<Comobox> listaUserBancos(String valor)\n {\n @SuppressWarnings(\"MismatchedQueryAndUpdateOfCollection\")\n ArrayList<Comobox> al= new ArrayList<>();\n ResultSet rs = null;\n\n sql=\"select * FROM table(FUNCT_LOAD_BANCO_SIMULACAO(?,?,?))\";\n Conexao conexao = new Conexao();\n if(conexao.getCon()!=null)\n {\n try \n {\n cs = conexao.getCon().prepareCall(sql);\n cs.setInt(1, SessionUtil.getUserlogado().getIdAgencia());\n cs.setString(2, SessionUtil.getUserlogado().getNif());\n cs.setFloat(3, Float.valueOf(valor));\n cs.execute();\n rs=cs.executeQuery(); \n if (rs!=null) \n { \n al.add(new Comobox(\"Selecione\", \"Selecione\"));\n while (rs.next())\n { \n al.add(new Comobox(rs.getString(\"ID\"), rs.getString(\"SIGLA\"), rs.getString(\"QUANTIDADE DE CHEQUES VARIAVEL\")));\n } \n }\n rs.close();\n \n if(al.size() == 1){\n FacesContext context = FacesContext.getCurrentInstance();\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR,\"Cheque\", \"Nenhum Cheque disponivel para essa agencia!\") );\n }\n } \n catch (SQLException ex)\n {\n Logger.getLogger(CreditoDao.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Erro a obter bancos \"+ex.getMessage());\n }\n }\n return al;\n }",
"List<TotalCarritoDTO> getTotalCarritoCompras(String userName,TipoMoneda tipoMoneda);",
"List<CarritoProductoResponseDTO> consultarCarritoCompras(String userName,TipoMoneda tipoMoneda);",
"public void buscarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tString codigo_empresa = empresa.getCodigo_empresa();\r\n\t\t\tString codigo_sucursal = sucursal.getCodigo_sucursal();\r\n\t\t\tString parameter = lbxParameter.getSelectedItem().getValue()\r\n\t\t\t\t\t.toString();\r\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\r\n\r\n\t\t\tMap<String, Object> parameters = new HashMap();\r\n\t\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\t\tparameters.put(\"parameter\", parameter);\r\n\t\t\tparameters.put(\"value\", \"%\" + value + \"%\");\r\n\r\n\t\t\tgetServiceLocator().getHis_partoService().setLimit(\r\n\t\t\t\t\t\"limit 25 offset 0\");\r\n\r\n\t\t\tList<His_parto> lista_datos = getServiceLocator()\r\n\t\t\t\t\t.getHis_partoService().listar(parameters);\r\n\t\t\trowsResultado.getChildren().clear();\r\n\r\n\t\t\tfor (His_parto his_parto : lista_datos) {\r\n\t\t\t\trowsResultado.appendChild(crearFilas(his_parto, this));\r\n\t\t\t}\r\n\r\n\t\t\tgridResultado.setVisible(true);\r\n\t\t\tgridResultado.setMold(\"paging\");\r\n\t\t\tgridResultado.setPageSize(20);\r\n\r\n\t\t\tgridResultado.applyProperties();\r\n\t\t\tgridResultado.invalidate();\r\n\t\t\tgridResultado.setVisible(true);\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\t}",
"public void getPropuestasOrdenadas(int confirm) throws ParseException{\n System.out.println(\"\\nSe imprimirán las propuestas de la Sala \"+getNombreSala()+\":\");\n if (propuestas.size() == 0){\n System.out.println(\"No hay reservas para esta Sala\");\n }\n else{\n for (Propuesta propuestaF : propuestas) {\n String nombreReservador = propuestaF.getReservador().getNombreCompleto();\n if (confirm == 0){\n if (propuestaF.isForAllSem()) {\n System.out.println(\"Propuesta por todo el semestre, parte el \"+propuestaF.getFechaPuntualI(0)+\" hasta \"+\n propuestaF.getFechaPuntualF(0)+\". La reserva termina el \"+\n propuestaF.getFechaPuntualI(propuestaF.getFechasPropuestasInicio().size()-1)+\" hasta \"+\n propuestaF.getFechaPuntualF(propuestaF.getFechasPropuestasFinal().size()-1));\n System.out.println(\"Esta reserva fue hecha por:\");\n if (propuestaF.getReservador() instanceof Profesor){\n System.out.println(\"Profesor \"+ nombreReservador);\n }\n else if (propuestaF.getReservador() instanceof Estudiante){\n System.out.println(\"Estudiante \"+ nombreReservador);\n }\n else{\n System.out.println(nombreReservador);\n }\n }\n else{\n int i = 0;\n int j = 0;\n int idPropuesta = 0;\n String fecha = \"01-01-50000\";\n SimpleDateFormat parseF = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date fechaMasReciente = parseF.parse(fecha);\n Date fechaAux;\n Propuesta propActual;\n while(i < propuestas.size()){\n while (j < propuestas.size()){\n propActual = propuestas.get(j);\n fechaAux = propActual.getFechaPuntualI(0);\n if (fechaAux.compareTo(fechaMasReciente) < 0){\n fechaMasReciente = fechaAux;\n }\n j++;\n }\n System.out.println(\"Desde \"+propuestas.get(i).getFechaPuntualF(0)+\" hasta \"+\n propuestas.get(i).getFechaPuntualF(0));\n fecha = \"01-01-2200\";\n fechaMasReciente = parseF.parse(fecha);\n i++;\n }\n }\n }\n else if (confirm == 1){\n if (propuestaF.isForAllSem() && propuestaF.isConfirmada()) {\n System.out.println(\"Propuesta por todo el semestre, parte el \"+propuestaF.getFechaPuntualI(0)+\" hasta \"+\n propuestaF.getFechaPuntualF(0)+\". La reserva termina el \"+\n propuestaF.getFechaPuntualI(propuestaF.getFechasPropuestasInicio().size()-1)+\" hasta \"+\n propuestaF.getFechaPuntualF(propuestaF.getFechasPropuestasFinal().size()-1));\n System.out.println(\"Esta reserva fue hecha por:\");\n if (propuestaF.getReservador() instanceof Profesor){\n System.out.println(\"Profesor \"+ nombreReservador);\n }\n else if (propuestaF.getReservador() instanceof Estudiante){\n System.out.println(\"Estudiante \"+ nombreReservador);\n }\n else{\n System.out.println(nombreReservador);\n }\n }\n else if (propuestaF.isConfirmada()){\n int i = 0;\n int j = 0;\n int idPropuesta = 0;\n String fecha = \"01-01-50000\";\n SimpleDateFormat parseF = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date fechaMasReciente = parseF.parse(fecha);\n Date fechaAux;\n Propuesta propActual;\n while(i < propuestas.size()){\n while (j < propuestas.size()){\n propActual = propuestas.get(j);\n fechaAux = propActual.getFechaPuntualI(0);\n if (fechaAux.compareTo(fechaMasReciente) < 0){\n fechaMasReciente = fechaAux;\n }\n j++;\n }\n System.out.println(\"Desde \"+propuestas.get(i).getFechaPuntualF(0)+\" hasta \"+\n propuestas.get(i).getFechaPuntualF(0));\n fecha = \"01-01-2200\";\n fechaMasReciente = parseF.parse(fecha);\n i++;\n }\n }\n }\n }\n }\n }",
"public Collection cargarDeObjetivo(int codigoCiclo, int codigoPlan, int objetivo, int periodo, String estado) {\n/* 121 */ Collection resultados = new ArrayList();\n/* */ try {\n/* 123 */ String s = \"select m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, m.Descripcion, m.Valor_Meta, m.Tipo_Medicion, m.Frecuencia_Medicion, m.Justificacion, m.Estado, m.Fecha_Insercion, m.Usuario_Insercion, m.Fecha_Modificacion, m.Usuario_Modificacion, m.Mes01, m.Mes02, m.Mes03, m.Mes04, m.Mes05, m.Mes06, m.Mes07, m.Mes08, m.Mes09, m.Mes10, m.Mes11, m.Mes12, m.Fuente_Dato, m.Aplica_En, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, m.Tipo_Grafica, Tm.Descripcion as Nombretipomedicion, Est.Descripcion as Nombreestado, Um.Descripcion as Nombre_Unidad_Medida, SUM(CASE WHEN ac.NUMERO IS NOT NULL THEN 1 ELSE 0 END) acciones from Cal_Plan_Metas m left join Am_Acciones Ac on( m.Codigo_Ciclo = Ac.Codigo_Ciclo and m.Codigo_Plan = Ac.Codigo_Plan and m.Codigo_Meta = Ac.Codigo_Meta and Ac.Asociado = 'P'), \\t\\t Sis_Multivalores Tm, \\t\\t Sis_Multivalores Est, \\t\\t Sis_Multivalores Um where m.Tipo_Medicion = Tm.Valor and Tm.Tabla = 'CAL_TIPO_MEDICION' and m.Estado = Est.Valor and Est.Tabla = 'CAL_ESTADO_META' and m.Unidad_Medida = Um.Valor and Um.Tabla = 'CAL_UNIDAD_MEDIDA_META' and m.codigo_ciclo=\" + codigoCiclo + \" and m.codigo_plan=\" + codigoPlan + \" and m.codigo_objetivo=\" + objetivo;\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/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 180 */ if (estado.length() > 0) {\n/* 181 */ s = s + \" and m.estado='A'\";\n/* */ }\n/* */ \n/* 184 */ if (periodo == 1) {\n/* 185 */ s = s + \" and m.mes01='S'\";\n/* */ }\n/* 187 */ else if (periodo == 2) {\n/* 188 */ s = s + \" and m.mes02='S'\";\n/* */ }\n/* 190 */ else if (periodo == 3) {\n/* 191 */ s = s + \" and m.mes03='S'\";\n/* */ }\n/* 193 */ else if (periodo == 4) {\n/* 194 */ s = s + \" and m.mes04='S'\";\n/* */ }\n/* 196 */ else if (periodo == 5) {\n/* 197 */ s = s + \" and m.mes05='S'\";\n/* */ }\n/* 199 */ else if (periodo == 6) {\n/* 200 */ s = s + \" and m.mes06='S'\";\n/* */ }\n/* 202 */ else if (periodo == 7) {\n/* 203 */ s = s + \" and m.mes07='S'\";\n/* */ }\n/* 205 */ else if (periodo == 8) {\n/* 206 */ s = s + \" and m.mes08='S'\";\n/* */ }\n/* 208 */ else if (periodo == 9) {\n/* 209 */ s = s + \" and m.mes09='S'\";\n/* */ }\n/* 211 */ else if (periodo == 10) {\n/* 212 */ s = s + \" and m.mes10='S'\";\n/* */ }\n/* 214 */ else if (periodo == 11) {\n/* 215 */ s = s + \" and m.mes11='S'\";\n/* */ }\n/* 217 */ else if (periodo == 12) {\n/* 218 */ s = s + \" and m.mes12='S'\";\n/* */ } \n/* */ \n/* 221 */ s = s + \" GROUP BY m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, m.Descripcion, m.Valor_Meta, m.Tipo_Medicion, m.Frecuencia_Medicion, m.Justificacion, m.Estado, m.Fecha_Insercion, m.Usuario_Insercion, m.Fecha_Modificacion, m.Usuario_Modificacion, m.Mes01, m.Mes02, m.Mes03, m.Mes04, m.Mes05, m.Mes06, m.Mes07, m.Mes08, m.Mes09, m.Mes10, m.Mes11, m.Mes12, m.Fuente_Dato, m.Aplica_En, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, m.Tipo_Grafica, Tm.Descripcion, Est.Descripcion, Um.Descripcion order by m.descripcion\";\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/* 259 */ boolean rtaDB = this.dat.parseSql(s);\n/* 260 */ if (!rtaDB) {\n/* 261 */ return resultados;\n/* */ }\n/* */ \n/* 264 */ this.rs = this.dat.getResultSet();\n/* 265 */ while (this.rs.next()) {\n/* 266 */ resultados.add(leerRegistro());\n/* */ }\n/* */ }\n/* 269 */ catch (Exception e) {\n/* 270 */ e.printStackTrace();\n/* 271 */ Utilidades.writeError(\"CalPlanMetasFactory:cargarTodos \", e);\n/* */ } \n/* 273 */ return resultados;\n/* */ }",
"public void buscarMarcacion(){\n\t\t\n \tif(!FuncionesFechas.validaFecha(fCargaI, fCargaF))\n \t{\t\n \t\tlistaMarcacion=null;\n \t\tlistaMarcacionPDF=null;\n \t\treturn ;}\n \tMarcacionDespatch marcacionDespatch=new MarcacionDespatch();\n\t\ttry {\n\t\t\t//listaMarcacion=marcacionDespatch.getMarcacionesPorCodigo(PGP_Usuario.getV_codpersonal());\n\t\t\t/*for(int i=0;i<listaMarcacion.size();i++)\n\t\t\t{\n\t\t\t\tif(listaMarcacion.get(i).getdFecha().after(fCargaI) && listaMarcacion.get(i).getdFecha().before(fCargaF)){\n\t\t\t\t\tSystem.out.println(\"Entroo\\nLista [\"+(i+1)+\"]:\"+listaMarcacion.get(i).getdFecha());\n\t\t\t\t}\n\t\t\t}*/\n\t\t\t\n\t\t\tlistaMarcacion=marcacionDespatch.getMarcacionesPorCodigoFecha(PGP_Usuario.getV_codpersonal(),fCargaI,fCargaF);//\"44436285\"\n\t\t\tMap parametros = new HashMap();\t\t\t\n\t\t\tparametros.put(\"PARAM_NRODOC\", PGP_Usuario.getV_codpersonal());\n\t\t\tparametros.put(\"PARAM_STR_FI\", FuncionesFechas.getFormatDateDDMMYYYY(fCargaI));\n\t\t\tparametros.put(\"PARAM_STR_FF\", FuncionesFechas.getFormatDateDDMMYYYY(fCargaF));\n\t\t\tlistaMarcacionPDF=marcacionDespatch.reporteMisMarcaciones(parametros);\n\t\t} catch (Exception e) {\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n }",
"public ArrayList<Factura> recuperaFacturaCompletaPorFiltro(String filtro) {\r\n\t\tString sql = \"\";\r\n\t\tsql += \"SELECT * FROM facturas WHERE \";\r\n\t\tsql += filtro;\r\n\t\tsql += \" ORDER BY facturas.numero\";\r\n\t\tSystem.out.println(sql);\r\n\t\tArrayList<Factura> lista = new ArrayList<>();\r\n\t\tConnection c = new Conexion().getConection();\r\n\t\tif (c != null) {\r\n\t\t\ttry {\r\n\t\t\t\t// Crea un ESTAMENTO (comando de ejecucion de un sql)\r\n\t\t\t\tStatement comando = c.createStatement();\r\n\t\t\t\tResultSet rs = comando.executeQuery(sql);\r\n\t\t\t\twhile (rs.next() == true) {\r\n\t\t\t\t\tint id = rs.getInt(\"id\");\r\n\t\t\t\t\tint clienteId = rs.getInt(\"clienteId\");\r\n\t\t\t\t\tString nombreCliente = rs.getString(\"nombreCliente\");\r\n\t\t\t\t\tint numero = rs.getInt(\"numero\");\r\n\t\t\t\t\tDate fecha = rs.getDate(\"fecha\");\r\n\t\t\t\t\tdouble porcDescuento = rs.getDouble(\"porcDescuento\");\r\n\t\t\t\t\tdouble porcRecargoEquivalencia = rs.getDouble(\"porcRecargoEquivalencia\");\r\n\t\t\t\t\tdouble impTotal = rs.getDouble(\"impTotal\");\r\n\t\t\t\t\tdouble impRecargo = rs.getDouble(\"impRecargo\");\r\n\t\t\t\t\tdouble impIva = rs.getDouble(\"impIva\");\r\n\t\t\t\t\tString dirCorreo = rs.getString(\"dirCorreo\");\r\n\t\t\t\t\tString dirFactura = rs.getString(\"dirFactura\");\r\n\t\t\t\t\tString dirEnvio = rs.getString(\"dirEnvio\");\r\n\t\t\t\t\tboolean cobrada = rs.getBoolean(\"cobrada\");\r\n\t\t\t\t\tArrayList<FacturaDetalle> detalles = new FacturasDetallesBDD().recuperaPorFacturaId(id);\r\n\t\t\t\t\tlista.add(new Factura(id, clienteId, nombreCliente, numero, fecha, porcDescuento, porcRecargoEquivalencia, impTotal, impRecargo, impIva, dirCorreo, dirFactura, dirEnvio, cobrada, detalles));\t\t\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}\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tc.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn lista;\r\n\t}",
"public List<Faturamento> gerarFaturamento(Banco banco,Date competenciaBase,\tint dataLimite, UsuarioInterface usuario, Date dataGeracaoPlanilha, Collection<TetoPrestadorFaturamento> tetos) throws Exception {\n\t\tSession session = HibernateUtil.currentSession();\n\t\tsession.setFlushMode(FlushMode.COMMIT);\n\t\tCriteria criteria = session.createCriteria(Prestador.class);\n\t\tList<Faturamento> faturamentos = new ArrayList<Faturamento>();\n\t\tList<AbstractFaturamento> todosFaturamentos = new ArrayList<AbstractFaturamento>();\n\t\tif (banco != null)\n\t\t\tcriteria.add(Expression.eq(\"informacaoFinanceira.banco\",banco));\n//\t\t\tcriteria.add(Expression.not(Expression.in(\"idPrestador\", AbstractFinanceiroService.getIdsPrestadoresNaoPagos())));\n\t\t\tcriteria.add(Expression.eq(\"idPrestador\",528079L));\n\t\t\t\n\t\tList<Prestador> prestadores = criteria.list();\n\n//\t\tsaveImpostos();\n\t\tint quantPrest = prestadores.size();\n\t\tint countPrest = 0;\n\t\tDate competenciaAjustada = ajustarCompetencia(competenciaBase);\n\t\t\n//\t\talimentaLista();\n\t\t\n\t\tfor (Prestador prestador : prestadores) {\n\t\t\tSystem.out.println(++countPrest + \"/\" + quantPrest + \" - Prestador: \" + prestador.getPessoaJuridica().getFantasia());\n\t\t\tif(!prestador.getTipoPrestador().equals(Prestador.TIPO_PRESTADOR_ANESTESISTA)){\n//\t\t\t\tgerarFaturamento(competenciaBase, faturamentos, competenciaAjustada, prestador, usuario, dataGeracaoPlanilha, tetos);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Gerando os faturamentos dos procedimentos...\");\n \t\t\t\tgerarFaturamento(competenciaBase, faturamentos, competenciaAjustada, (PrestadorAnestesista)prestador, usuario);\n\t\t\t\tSystem.out.println(\"Gerando os faturamentos das guias...\");\n//\t\t\t\tgerarFaturamento(competenciaBase, faturamentos, competenciaAjustada, prestador, usuario, dataGeracaoPlanilha, tetos);\n\t\t\t\tSystem.out.println(\"Concluído Coopanest!\");\n\t\t\t}\t\t\t\t\n\t\t}\n\t\t\n\t\treturn faturamentos;\n\t}",
"Collection<GestionPrecioDTO> findCampaniasFiltros (GestionPrecioDTO gestionPrecio,String estadoCobro);",
"public Mach buscarEmpleado(Vacante vacante) {\r\n\t\tSystem.out.println(\"buscando empleo\");\r\n\t\tMach ELpapa = null;\r\n\t\tMach nuevo = null;\r\n\t\tArrayList<Mach> maches = new ArrayList<>();\r\n\t\tfor (Persona persona : personas) {\r\n\t\t\tSystem.out.println(\"aqui\");\r\n\t\t\tif (persona instanceof Obrero) {\r\n\t\t\t\tif (vacante instanceof vacanteObrero) {\r\n\t\t\t\t\tSystem.out.println(\"estoy aqui obrero\");\r\n\t\t\t\t\tif (persona.INTERIOR().equalsIgnoreCase(((vacanteObrero) vacante).getHabilidades())) {\r\n\t\t\t\t\t\tnuevo = persona.buscarCurriculums(vacante);\r\n\t\t\t\t\t\tif (nuevo.getIdice() > 0) {\r\n\t\t\t\t\t\t\tmaches.add(nuevo);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (persona instanceof Tecnico) {\r\n\t\t\t\tif (vacante instanceof vacanteTecnico) {\r\n\t\t\t\t\tif (persona.INTERIOR().equalsIgnoreCase(((vacanteTecnico) vacante).getArea_desarrollo())) {\r\n\t\t\t\t\t\tSystem.out.println(\"esoty aqui tecnico\");\r\n\t\t\t\t\t\tnuevo = persona.buscarCurriculums(vacante);\r\n\t\t\t\t\t\tif (nuevo.getIdice() > 0) {\r\n\t\t\t\t\t\t\tmaches.add(nuevo);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (persona instanceof Universitario) {\r\n\t\t\t\tif (vacante instanceof vancanteUniversitario) {\r\n\t\t\t\t\tSystem.out.println(\"estoy aqui univeristario\");\r\n\t\t\t\t\tif (persona.INTERIOR().equalsIgnoreCase(((vancanteUniversitario) vacante).getCarreraUniv())) {\r\n\t\t\t\t\t\tnuevo = persona.buscarCurriculums(vacante);\r\n\t\t\t\t\t\tif (nuevo.getIdice() > 0) {\r\n\t\t\t\t\t\t\tmaches.add(nuevo);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tELpapa = buscarmayorIndiceDeMACHES(maches);\r\n\t\tif (ELpapa != null) {\r\n\t\t\tSystem.out.println(\"no es null\");\r\n\t\t}\r\n\t\treturn ELpapa;\r\n\t}",
"@Test\n public void testConfirmarCompra() {\n System.out.println(\"confirmarCompra\");\n ControleCompra instance = new ControleCompra();\n int id = 1;\n String nome = \"Adidas\";\n float total = 150;\n Fornecedor forn = fornecedor;\n Date d = new Date();\n Calendar cal = new GregorianCalendar();\n cal.setTime(d);\n Date dataCompra = d;\n Date dataRecebimento = d;\n instance.confirmarCompra(id, nome, total, forn, dataCompra, dataRecebimento);\n }",
"private void cargarFichaLepra_convivientes() {\r\n\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\tparameters.put(\"nro_identificacion\", tbxNro_identificacion.getValue());\r\n\t\tparameters.put(\"fecha_actual\", new Date());\r\n\r\n\t\t// log.info(\"parameters\" + parameters);\r\n\t\tseguimiento_control_pqtService.setLimit(\"limit 25 offset 0\");\r\n\r\n\t\t// log.info(\"parameters>>>>\" + parameters);\r\n\t\tBoolean fecha_tratamiento = seguimiento_control_pqtService\r\n\t\t\t\t.existe_fecha_fin_tratamiento(parameters);\r\n\t\t// log.info(\"fecha_tratamiento>>>>\" + fecha_tratamiento);\r\n\r\n\t\tif (fecha_tratamiento) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_CONTROL_CONVIVIENTES_LEPRA,\r\n\t\t\t\t\tIRutas_historia.LABEL_CONTROL_CONVIVIENTES_LEPRA,\r\n\t\t\t\t\tparametros);\r\n\t\t}\r\n\t}",
"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 }",
"public void consultasSeguimiento() {\r\n try {\r\n switch (opcionMostrarAnalistaSeguim) {\r\n case \"Cita\":\r\n ListSeguimientoRadicacionesConCita = Rad.ConsultasRadicacionYSeguimiento(2, mBsesion.codigoMiSesion());\r\n break;\r\n case \"Entrega\":\r\n ListSeguimientoRadicacionesConCita = Rad.ConsultasRadicacionYSeguimiento(3, mBsesion.codigoMiSesion());\r\n break;\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".consultasSeguimiento()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n\r\n }",
"public ArrayList<Comobox> listaTodosBanco()\n {\n @SuppressWarnings(\"MismatchedQueryAndUpdateOfCollection\")\n ArrayList<Comobox> al= new ArrayList<>();\n @SuppressWarnings(\"UnusedAssignment\")\n ResultSet rs = null;\n sql=\"select * FROM VER_BANCO\";\n Conexao conexao = new Conexao();\n if(conexao.getCon()!=null)\n {\n try \n {\n if(conexao.getCon()!=null)\n {\n cs = conexao.getCon().prepareCall(sql);\n cs.execute();\n rs=cs.executeQuery(); \n if (rs!=null) \n { \n while (rs.next())\n { \n al.add(new Comobox(rs.getString(\"ID\"), rs.getString(\"SIGLA\")));\n } \n }\n rs.close();\n }\n else\n {\n al.add(new Comobox(\"djdj\",\"ddj\"));\n al.add(new Comobox(\"1dj\",\"dmsmdj\"));\n }\n } \n catch (SQLException ex)\n {\n Logger.getLogger(CreditoDao.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Erro a obter fontes rendimentos \"+ex.getMessage());\n }\n }\n return al;\n }",
"public Collection<OsAtividadePeriodoExecucao> obterOsAtividadePeriodoExecucaoPorEquipe(Integer idEquipe, Date dataRoteiro)\n\t\t\t\t\tthrows ErroRepositorioException{\n\n\t\tCollection<Object[]> retornoConsulta = null;\n\t\tCollection<OsAtividadePeriodoExecucao> colecaoOsPeriodo = new ArrayList();\n\n\t\tSession session = HibernateUtil.getSession();\n\t\tString consulta = \"\";\n\t\ttry{\n\n\t\t\tconsulta = \"SELECT DISTINCT osAtividadePeriodoExecucao.id, \" // 0\n\t\t\t\t\t\t\t+ \"osAtividadePeriodoExecucao.dataInicio, \" // 1\n\t\t\t\t\t\t\t+ \"osAtividadePeriodoExecucao.dataFim \" // 2\n\t\t\t\t\t\t\t+ \"FROM OsExecucaoEquipe osExecucaoEquipe \"\n\t\t\t\t\t\t\t// + \"INNER JOIN osExecucaoEquipe.equipe equipe \"\n\t\t\t\t\t\t\t+ \"INNER JOIN osExecucaoEquipe.osAtividadePeriodoExecucao osAtividadePeriodoExecucao \"\n\t\t\t\t\t\t\t// +\n\t\t\t\t\t\t\t// \"INNER JOIN osAtividadePeriodoExecucao.ordemServicoAtividade ordemServicoAtividade \"\n\t\t\t\t\t\t\t+ \"WHERE osExecucaoEquipe.equipe.id = :idEquipe \"\n\t\t\t\t\t\t\t+ \"AND osAtividadePeriodoExecucao.ordemServicoAtividade.id IS NOT NULL \"\n\t\t\t\t\t\t\t+ \"AND day(osAtividadePeriodoExecucao.dataFim) = day(cast(:dataRoteiro as date)) \"\n\t\t\t\t\t\t\t+ \"AND month(osAtividadePeriodoExecucao.dataFim) = month(cast(:dataRoteiro as date)) \"\n\t\t\t\t\t\t\t+ \"AND year(osAtividadePeriodoExecucao.dataFim) = year(cast(:dataRoteiro as date)) \"\n\t\t\t\t\t\t\t+ \"ORDER BY osAtividadePeriodoExecucao.id \";\n\n\t\t\tretornoConsulta = (Collection<Object[]>) session.createQuery(consulta).setInteger(\"idEquipe\", idEquipe)\n\t\t\t\t\t\t\t.setDate(\"dataRoteiro\", dataRoteiro).list();\n\n\t\t\tif(retornoConsulta != null && !retornoConsulta.isEmpty()){\n\n\t\t\t\tOsAtividadePeriodoExecucao osAtividadePeriodoExecucao = null;\n\n\t\t\t\tfor(Object[] periodo : retornoConsulta){\n\n\t\t\t\t\tosAtividadePeriodoExecucao = new OsAtividadePeriodoExecucao();\n\n\t\t\t\t\tosAtividadePeriodoExecucao.setId((Integer) periodo[0]);\n\t\t\t\t\tosAtividadePeriodoExecucao.setDataInicio((Date) periodo[1]);\n\t\t\t\t\tosAtividadePeriodoExecucao.setDataFim((Date) periodo[2]);\n\n\t\t\t\t\tcolecaoOsPeriodo.add(osAtividadePeriodoExecucao);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tthrow new ErroRepositorioException(e, \"Erro no Hibernate\");\n\t\t}finally{\n\t\t\tHibernateUtil.closeSession(session);\n\t\t}\n\t\treturn colecaoOsPeriodo;\n\t}",
"public ArrayList<Comobox> fontesRendimentos()\n {\n @SuppressWarnings(\"MismatchedQueryAndUpdateOfCollection\")\n ArrayList<Comobox> al= new ArrayList<>();\n @SuppressWarnings(\"UnusedAssignment\")\n ResultSet rs = null;\n sql=\"select * FROM VER_FONTEPAGAMENTO\";\n Conexao conexao = new Conexao();\n if(conexao.getCon()!=null)\n {\n try \n {\n cs = conexao.getCon().prepareCall(sql);\n cs.execute();\n rs=cs.executeQuery(); \n if (rs!=null) \n { \n while (rs.next())\n { \n al.add(new Comobox(rs.getString(\"REALID\"), rs.getString(\"FONTE\")));\n } \n }\n rs.close();\n } \n catch (SQLException ex)\n {\n Logger.getLogger(CreditoDao.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Erro a obter fontes rendimentos \"+ex.getMessage());\n }\n }\n return al;\n }",
"public List<ReporteComprasVentasRetenciones> getReporteRetencionClientes(int mes, int anio, int idOrganizacion)\r\n/* 231: */ {\r\n/* 232:307 */ StringBuffer sql = new StringBuffer();\r\n/* 233:308 */ sql.append(\"SELECT new ReporteComprasVentasRetenciones(fp.codigo, fp.nombre, COUNT(fp.codigo),\");\r\n/* 234:309 */ sql.append(\" (CASE WHEN fp.indicadorRetencionIva = true OR fp.indicadorRetencionFuente = true THEN SUM(dcfc.valor) END),\");\r\n/* 235:310 */ sql.append(\" 'Ventas', '' )\");\r\n/* 236:311 */ sql.append(\" FROM DetalleCobroFormaCobro dcfc\");\r\n/* 237:312 */ sql.append(\" JOIN dcfc.detalleFormaCobro dfc\");\r\n/* 238:313 */ sql.append(\" LEFT JOIN dfc.cobro c\");\r\n/* 239:314 */ sql.append(\" LEFT OUTER JOIN dfc.formaPago fp\");\r\n/* 240:315 */ sql.append(\" LEFT OUTER JOIN dcfc.detalleCobro dc\");\r\n/* 241:316 */ sql.append(\" LEFT OUTER JOIN dc.cuentaPorCobrar cpc\");\r\n/* 242:317 */ sql.append(\" LEFT OUTER JOIN cpc.facturaCliente fc\");\r\n/* 243:318 */ sql.append(\" WHERE MONTH(c.fecha) =:mes\");\r\n/* 244:319 */ sql.append(\" AND YEAR(c.fecha) =:anio\");\r\n/* 245:320 */ sql.append(\" AND fc.estado!=:estadoAnulado\");\r\n/* 246:321 */ sql.append(\" AND c.estado!=:estadoAnulado\");\r\n/* 247:322 */ sql.append(\" AND (fp.indicadorRetencionIva=true OR fp.indicadorRetencionFuente=true)\");\r\n/* 248:323 */ sql.append(\" AND fc.idOrganizacion = :idOrganizacion\");\r\n/* 249:324 */ sql.append(\" GROUP BY fp.codigo, fp.nombre, fp.indicadorRetencionIva, fp.indicadorRetencionFuente\");\r\n/* 250:325 */ sql.append(\" ORDER BY fp.codigo, fp.nombre\");\r\n/* 251:326 */ Query query = this.em.createQuery(sql.toString());\r\n/* 252:327 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 253:328 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 254:329 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 255:330 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 256:331 */ return query.getResultList();\r\n/* 257: */ }",
"public List<ColunasMesesBody> getClientexIndustria(String periodo, String perfil, String cdVenda) {\n\t\tList<ClienteDetalhado> getCarteira = new ArrayList<>();\n\t\tgetCarteira = new PlanoDeCoberturaConsolidado().getClientesPlanCobConsolidado(perfil, cdVenda);\n\t\tSystem.err.println(getCarteira.size());\n\t\t\n\t\tList<ColunasMesesBody> planCobCliFat = new ArrayList<>();\n\t\t\n\t\tfor (ClienteDetalhado c : getCarteira) {\n\t\t\tColunasMesesBody registro = new ColunasMesesBody();\n\t\t\tregistro.setCd_cliente(c.getCd_cliente());\n\t\t\tregistro.setDesc_cliente(c.getDesc_cliente());\n\t\t\tregistro.setFantasia(c.getFantasia());\n\t\t\tregistro.setTp_Cli(c.getTp_Cli());\n\t\t\tregistro.setCgc_cpf(c.getCgc_cpf());\n\t\t\tregistro.setTelefone(c.getTelefone());\n\t\t\tregistro.setGrupoCli(c.getGrupoCli());\n\t\t\tregistro.setSegmento(c.getSegmento());\n\t\t\tregistro.setArea(c.getArea());\n\t\t\tregistro.setCep(c.getCep());\n\t\t\tregistro.setLogradouro(c.getLogradouro());\n\t\t\tregistro.setNumero(c.getNumero());\n\t\t\tregistro.setBairro(c.getBairro());\n\t\t\tregistro.setMunicipio(c.getMunicipio());\n\t\t\tregistro.setDistrito(c.getDistrito());\n\t\t\tregistro.setCdVendedor(c.getCdVendedor());\n\t\t\tregistro.setVendedor(c.getVendedor());\n\t\t\tregistro.setNomeGuerraVend(c.getNomeGuerraVend());\n\t\t\tregistro.setDescGerencia(c.getDescGerencia());\n\t\t\tregistro.setCdEquipe(c.getCdEquipe());\n\t\t\tregistro.setDescEquipe(c.getDescEquipe());\n\t\t\t\n\t\t\t\t\n\t\t\tregistro.setColuna01(\"R$ 0,00\");\n\t\t\tregistro.setColuna02(\"R$ 0,00\");\n\t\t\tregistro.setColuna03(\"R$ 0,00\");\n\t\t\tregistro.setColuna04(\"R$ 0,00\");\n\t\t\tregistro.setColuna05(\"R$ 0,00\");\n\t\t\tregistro.setColuna06(\"R$ 0,00\");\n\t\t\tregistro.setColuna07(\"R$ 0,00\");\n\t\t\tregistro.setColuna08(\"R$ 0,00\");\n\t\t\tregistro.setColuna09(\"R$ 0,00\");\n\t\t\tregistro.setColuna10(\"R$ 0,00\");\n\t\t\tregistro.setColuna11(\"R$ 0,00\");\n\t\t\tregistro.setColuna12(\"R$ 0,00\");\n\t\t\tregistro.setColuna13(\"R$ 0,00\");\n\t\t\tregistro.setColuna14(\"R$ 0,00\");\n\t\t\tregistro.setColuna15(\"R$ 0,00\");\n\n\t\t\t\n\t\t\tplanCobCliFat.add(registro);\n\t\t}\n\t\t/* CARREGANDO A LISTA DE CLIENTES*/\n\t\t\n\t\t/* TRANTANDO OS CLINTES PARA PASSAR PARA O SELECT */\n\t\t\tString inClintes = \"\";\n\t\t\tint tamanhoLista = getCarteira.size();\n\t\t\tint i = 1;\n\t\n\t\t\tfor (Cliente c : getCarteira) {\n\t\t\t\tif (i < tamanhoLista) {\n\t\t\t\t\tinClintes += c.getCd_cliente() + \", \";\n\t\t\t\t} else {\n\t\t\t\t\tinClintes += c.getCd_cliente();\n\t\t\t\t}\n\t\n\t\t\t\ti++;\n\t\t\t}\n\t\t\n\t\t/* TRANTANDO OS CLINTES PARA PASSAR PARA O SELECT */\n\t\t\n\t\tString sql = \"select * from(\\r\\n\" + \n\t\t\t\t\"SELECT\\r\\n\" + \n\t\t\t\t\" --DATEPART(mm, no.dt_emis) as MES_Emissao,\\r\\n\" + \n\t\t\t\t\" f.descricao as FABRICANTE,\\r\\n\" + \n\t\t\t\t\"\t\tno.cd_clien AS Cod_Cliente, \\r\\n\" + \n\t\t\t\t\"\t cast(SUM((itn.qtde* itn.preco_unit) ) as NUMERIC(12,2)) as Valor\\r\\n\" + \n\t\t\t\t\"\tFROM\\r\\n\" + \n\t\t\t\t\"\t\tdbo.it_nota AS itn\\r\\n\" + \n\t\t\t\t\"\t\t\tINNER JOIN dbo.nota AS no\\r\\n\" + \n\t\t\t\t\"\t\t\t\tINNER JOIN dbo.nota_tpped AS ntped\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tINNER JOIN dbo.tp_ped AS tp\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON ntped.tp_ped = tp.tp_ped\\r\\n\" + \n\t\t\t\t\"\t\t\t\tON no.nu_nf = ntped.nu_nf\\r\\n\" + \n\t\t\t\t\"\t\t\t \\r\\n\" + \n\t\t\t\t\"\t\t\tINNER JOIN dbo.cliente AS cl \\r\\n\" + \n\t\t\t\t\"\t\t\t\tINNER JOIN dbo.ram_ativ AS rm\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON cl.ram_ativ = rm.ram_ativ \t\t\t\t \\r\\n\" + \n\t\t\t\t\"\t\t\t\tINNER JOIN dbo.end_cli AS edc\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON cl.cd_clien = edc.cd_clien\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tAND edc.tp_end = 'FA'\t\t\t\t\t\t\t \\r\\n\" + \n\t\t\t\t\"\t\t\t\tLEFT OUTER JOIN dbo.area AS ar \\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON cl.cd_area = ar.cd_area\\r\\n\" + \n\t\t\t\t\"\t\t\t\tLEFT OUTER JOIN grupocli\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON cl.cd_grupocli = grupocli.cd_grupocli\\r\\n\" + \n\t\t\t\t\"\t\t\t\tON no.cd_clien = cl.cd_clien\\r\\n\" + \n\t\t\t\t\"\t\t\t\\r\\n\" + \n\t\t\t\t\"\t\t\tINNER JOIN dbo.vendedor AS vd\\r\\n\" + \n\t\t\t\t\"\t\t\t\tINNER JOIN dbo.equipe AS eq \\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tINNER JOIN dbo.gerencia AS ge \\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tON eq.cd_gerencia = ge.cd_gerencia\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tAND eq.cd_emp = ge.cd_emp\\r\\n\" + \n\t\t\t\t\"\t\t\t\tON vd.cd_emp = eq.cd_emp \\r\\n\" + \n\t\t\t\t\"\t\t\t\tAND vd.cd_equipe = eq.cd_equipe \\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\t\t\t\tINNER JOIN grp_faix gr\\r\\n\" + \n\t\t\t\t\"\t\t\t\tON vd.cd_grupo = gr.cd_grupo\\r\\n\" + \n\t\t\t\t\"\t\t\tON no.cd_vend = vd.cd_vend\t\t\t\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\t\tON itn.nu_nf = no.nu_nf \\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\tJOIN produto p\\r\\n\" + \n\t\t\t\t\"\t\tON p.cd_prod=itn.cd_prod\\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\tJOIN fabric f\\r\\n\" + \n\t\t\t\t\"\t\tON p.cd_fabric = f.cd_fabric\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"WHERE \\r\\n\" + \n\t\t\t\t\"\tno.situacao IN ('AB', 'DP')\\r\\n\" + \n\t\t\t\t\"\tAND\tno.tipo_nf = 'S' \\r\\n\" + \n\t\t\t\t\"\tAND\tno.cd_emp IN (13, 20)\\r\\n\" + \n\t\t\t\t\"\tAND\tntped.tp_ped IN ('BE', 'BF', 'BS', 'TR', 'VC', 'VE', 'VP', 'VS', 'BP', 'BI', 'VB', 'SR','AS','IP','SL')\\r\\n\" + \n\t\t\t\t\"\tAND no.dt_emis BETWEEN \"+periodo+\"\t\\r\\n\" + \n\t\t\t\t\"\tand no.cd_clien IN (\"+inClintes+\")\\r\\n\" + \n\t\t\t\t\"\tAND f.descricao IN ('ONTEX GLOBAL', 'BIC','CARTA FABRIL','KIMBERLY','BARUEL','PHISALIA','SKALA', 'ALFAPARF', 'EMBELLEZE', 'BEAUTY COLOR', 'HYPERA S/A', 'STEVITA', 'PAMPAM', 'YPE', 'APOLO')\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\tGROUP BY\\r\\n\" + \n\t\t\t\t\"\t--DATEPART(dd,no.dt_emis),no.dt_emis,\\r\\n\" + \n\t\t\t\t\"\tf.descricao,\\r\\n\" + \n\t\t\t\t\"\t\\r\\n\" + \n\t\t\t\t\"\t no.cd_clien,\\r\\n\" + \n\t\t\t\t\"\tno.cd_emp,\\r\\n\" + \n\t\t\t\t\"\t no.nu_ped, \\r\\n\" + \n\t\t\t\t\"\t no.nome,\\r\\n\" + \n\t\t\t\t\"\t vd.nome_gue,\\r\\n\" + \n\t\t\t\t\"\t vd.cd_vend,\\r\\n\" + \n\t\t\t\t\"\t vd.nome,\\r\\n\" + \n\t\t\t\t\"\t vd.cd_equipe\\r\\n\" + \n\t\t\t\t\"\t \\r\\n\" + \n\t\t\t\t\") em_linha\\r\\n\" + \n\t\t\t\t\"pivot (sum(Valor) for FABRICANTE IN ([ONTEX GLOBAL], [BIC],[CARTA FABRIL],[KIMBERLY],[BARUEL],[PHISALIA],[SKALA],[ALFAPARF],[EMBELLEZE],[BEAUTY COLOR],[HYPERA S/A],[STEVITA],[PAMPAM],[YPE],[APOLO])) em_colunas\\r\\n\" + \n\t\t\t\t\"order by 1\";\t\t\n\t\t\n\t\tSystem.out.println(\"Processando Script Clientes: \" + sql);\n\t\t\n\t\ttry {\n\t\t\tPreparedStatement stmt = connectionSqlServer.prepareStatement(sql);\n\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\n\n\t\t\twhile (rs.next()) {\n\t\t\tString coluna;\n\n\n\t\t\t\tfor (ColunasMesesBody p:planCobCliFat ) {\n\t\t\t\t\tif(rs.getInt(\"Cod_Cliente\") == p.getCd_cliente()) {\n\t\t\t\t\t\tp.setColuna01(\"teve vendas\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tp.setColuna01(Formata.moeda(rs.getDouble(2)));\n\t\t\t\t\t\tp.setColuna02(Formata.moeda(rs.getDouble(3)));\n\t\t\t\t\t\tp.setColuna03(Formata.moeda(rs.getDouble(4)));\n\t\t\t\t\t\tp.setColuna04(Formata.moeda(rs.getDouble(5)));\n\t\t\t\t\t\tp.setColuna05(Formata.moeda(rs.getDouble(6)));\n\t\t\t\t\t\tp.setColuna06(Formata.moeda(rs.getDouble(7)));\n\t\t\t\t\t\tp.setColuna07(Formata.moeda(rs.getDouble(8)));\n\t\t\t\t\t\tp.setColuna08(Formata.moeda(rs.getDouble(9)));\n\t\t\t\t\t\tp.setColuna09(Formata.moeda(rs.getDouble(10)));\n\t\t\t\t\t\tp.setColuna10(Formata.moeda(rs.getDouble(11)));\n\t\t\t\t\t\tp.setColuna11(Formata.moeda(rs.getDouble(12)));\n\t\t\t\t\t\tp.setColuna12(Formata.moeda(rs.getDouble(13)));\n\t\t\t\t\t\tp.setColuna13(Formata.moeda(rs.getDouble(14)));\n\t\t\t\t\t\tp.setColuna14(Formata.moeda(rs.getDouble(15)));\n\t\t\t\t\t\tp.setColuna15(Formata.moeda(rs.getDouble(16)));\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\n\t\t} catch (SQLException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t\t\n\t\t\n\t\t\t\t\n\t\treturn planCobCliFat;\n\n\t\t\n\t\t\n\t}",
"public void reporteHabitacionMasPopular(TablaModelo modelo){\n ArrayList<ControlVeces> control = new ArrayList<>();\n ControlVeces controlador;\n try {// pago de alojamiento en rango fchas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT ALOJAMIENTO.Id,ALOJAMIENTO.Id_Reservacion,RESERVACION.Fecha_Entrada, RESERVACION.Fecha_Salida,RESERVACION.Precio, RESERVACION.Id_Habitacion FROM RESERVACION JOIN ALOJAMIENTO WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND RESERVACION.Check_In=1;\");\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {// pago de alojamiento en rango fchas\n String nombre = Integer.toString(resultado.getInt(6));\n int casilla = numeroObjeto(control,nombre);\n if(casilla>=0){// maneja el resultado// pago de alojamiento en rango fchas\n control.get(casilla).setVeces(control.get(casilla).getVeces()+1);\n }else{// maneja el resultado\n controlador = new ControlVeces(nombre);// pago de alojamiento en rango fchas\n control.add(controlador);\n }\n } // maneja el resultado \n ordenamiento(control);\n int numero = control.size()-1;// el de hasta arriba es el que mas elementos tiene \n String idHabitacionMasPopular = control.get(numero).getNombre();\n this.habitacionPopular= idHabitacionMasPopular;\n introducirDatosHabitacionMasPopular(modelo, idHabitacionMasPopular);\n } catch (SQLException ex) {\n ex.printStackTrace();\n } catch(Exception e){\n \n }\n }",
"public void buscarEvaluacion() {\n if (materiaSeleccionada && gradoSeleccionado && grupoSeleccionado) {\n\n cbox3Evaluacion.removeAllItems();\n cbox3Evaluacion.addItem(\"Seleccione una opción\");\n ControlEvaluacion evaluacion = new ControlEvaluacion();\n try {\n\n ResultSet consultarIdMateriadeEvaluacion = evaluacion.consultarIdMateriadeEvaluacion(cbox1Materia.getSelectedItem().toString());\n int idMateria = 0;\n while (consultarIdMateriadeEvaluacion.next()) {\n idMateria = Integer.parseInt(consultarIdMateriadeEvaluacion.getObject(1).toString());\n }\n\n ResultSet resultados = evaluacion.consultarNombre(idMateria, cbox4Grupo.getSelectedItem().toString(), Integer.parseInt(cbox2Grado.getSelectedItem().toString()));\n mostrarEvaluaciones(resultados);\n } catch (ClassNotFoundException | SQLException ex) {\n Logger.getLogger(InterfazConsultarCalificaciones.class.getName()).log(Level.SEVERE, null, ex);\n } catch (NumberFormatException | NullPointerException e) {\n }\n\n }\n\n }",
"public ArrayList<clsPago> consultaDataPagosCuotaInicial(int codigoCli)\n { \n ArrayList<clsPago> data = new ArrayList<clsPago>(); \n try{\n bd.conectarBaseDeDatos();\n sql = \" SELECT a.id_pagos_recibo idPago, a.id_usuario, b.name name_usuario, \"\n + \" a.referencia referencia, \"\n + \" a.fecha_pago fecha_pago, a.estado, \"\n + \" a.valor valor_pago, a.id_caja_operacion, e.name_completo nombre_cliente, \"\n + \" a.fecha_pago fecha_registro\"\n + \" FROM ck_pagos_recibo AS a\"\n + \" JOIN ck_usuario AS b ON a.id_usuario = b.id_usuario\"\n + \" JOIN ck_cliente AS e ON a.codigo = e.codigo\"\n + \" WHERE a.estado = 'A'\"\n + \" AND a.cuota_inicial = 'S'\"\n + \" AND a.estado_asignado = 'N'\"\n + \" AND a.codigo = \" + codigoCli; \n \n System.out.println(sql);\n bd.resultado = bd.sentencia.executeQuery(sql);\n \n if(bd.resultado.next())\n { \n do \n { \n clsPago oListaTemporal = new clsPago();\n \n oListaTemporal.setReferencia(bd.resultado.getString(\"referencia\"));\n oListaTemporal.setFechaPago(bd.resultado.getString(\"fecha_pago\"));\n oListaTemporal.setNombreUsuario(bd.resultado.getString(\"name_usuario\"));\n oListaTemporal.setNombreCliente(bd.resultado.getString(\"nombre_cliente\"));\n oListaTemporal.setValor(bd.resultado.getDouble(\"valor_pago\"));\n oListaTemporal.setFechaRegistro(bd.resultado.getString(\"fecha_registro\"));\n oListaTemporal.setIdPago(bd.resultado.getInt(\"idPago\"));\n data.add(oListaTemporal);\n }\n while(bd.resultado.next()); \n //return data;\n }\n else\n { \n data = null;\n } \n }\n catch(Exception ex)\n {\n System.out.print(ex);\n data = null;\n } \n bd.desconectarBaseDeDatos();\n return data;\n }",
"private void listar(HttpPresentationComms comms, String _operacion) throws HttpPresentationException, KeywordValueException {\n/* 219 */ activarVista(\"consulta\");\n/* 220 */ if (_operacion.equals(\"X\")) {\n/* */ return;\n/* */ }\n/* */ \n/* */ \n/* 225 */ PrcRecursoDAO ob = new PrcRecursoDAO();\n/* 226 */ Collection<PrcRecursoDTO> arr = ob.cargarTodos();\n/* 227 */ HTMLTableSectionElement hte = this.pagHTML.getElementDetalle();\n/* 228 */ int cuantas = 0;\n/* 229 */ Iterator<PrcRecursoDTO> iterator = arr.iterator();\n/* 230 */ while (iterator.hasNext()) {\n/* 231 */ PrcRecursoDTO reg = (PrcRecursoDTO)iterator.next();\n/* 232 */ HTMLElement eltr = (HTMLElement)this.pagHTML.createElement(\"tr\");\n/* 233 */ eltr.appendChild(newtd(\"\" + reg.getIdRecurso()));\n/* 234 */ String url = \"PrcRecurso.po?_operacion=V&idRecurso=\" + reg.getIdRecurso() + \"\";\n/* 235 */ eltr.appendChild(newtdhref(\"\" + reg.getNombreIdTipoRecurso(), url));\n/* 236 */ eltr.appendChild(newtd(\"\" + reg.getDescripcionRecurso()));\n/* 237 */ eltr.appendChild(newtd(\"\" + reg.getNombreIdProcedimiento()));\n/* 238 */ eltr.appendChild(newtd(\"\" + reg.getNombreEstado()));\n/* 239 */ hte.appendChild(eltr);\n/* 240 */ cuantas++;\n/* */ } \n/* 242 */ arr.clear();\n/* 243 */ this.pagHTML.setTextNroRegistros(\"\" + cuantas);\n/* */ }",
"public ArrayList<CompraRelatorio> getComprasRelatorios(Usuario user){\r\n CriarConexao();\r\n ArrayList<CompraRelatorio> compras = new ArrayList<CompraRelatorio>();\r\n uDao = new UsuarioDao();\r\n \r\n try {\r\n resultado = consulta.executeQuery(\"SELECT * FROM comprarelatorio WHERE usuario_id = \"+user.getId());\r\n \r\n while(resultado.next()){\r\n compras.add(new CompraRelatorio(\r\n resultado.getInt(\"id\"), \r\n resultado.getDouble(\"valorCompra\"), \r\n resultado.getInt(\"parcelas\"), \r\n resultado.getInt(\"quantidade\"), \r\n resultado.getDate(\"dataCompraRelatorio\"), \r\n uDao.select(user.getId()))\r\n );\r\n }\r\n \r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(UsuarioDao.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n fecharConexao();\r\n }\r\n \r\n return compras;\r\n }",
"public void buscarDatos() throws Exception {\n\t\ttry {\n\t\t\tString parameter = lbxParameter.getSelectedItem().getValue()\n\t\t\t\t\t.toString();\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\n\n\t\t\tMap<String, Object> parameters = new HashMap<String, Object>();\n\t\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\n\t\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\n\n\t\t\tif (parameter.equalsIgnoreCase(\"fecha_inicial\")) {\n\t\t\t\tparameters.put(\"fecha_string\", value);\n\t\t\t} else {\n\t\t\t\tparameters.put(\"parameter\", parameter);\n\t\t\t\tparameters.put(\"value\", \"%\" + value + \"%\");\n\t\t\t}\n\t\t\tif (admision != null) {\n\t\t\t\tparameters.put(\"identificacion\",\n\t\t\t\t\t\tadmision.getNro_identificacion());\n\t\t\t}\n\n\t\t\tgetServiceLocator().getFicha_epidemiologia_nnService().setLimit(\n\t\t\t\t\t\"limit 25 offset 0\");\n\n\t\t\tList<Ficha_epidemiologia_n3> lista_datos = getServiceLocator()\n\t\t\t\t\t.getFicha_epidemiologia_nnService().listar(\n\t\t\t\t\t\t\tFicha_epidemiologia_n3.class, parameters);\n\t\t\trowsResultado.getChildren().clear();\n\n\t\t\tfor (Ficha_epidemiologia_n3 ficha_epidemiologia_n3 : lista_datos) {\n\t\t\t\trowsResultado.appendChild(crearFilas(\n\t\t\t\t\t\tficha_epidemiologia_n3, this));\n\t\t\t}\n\n\t\t\tgridResultado.setVisible(true);\n\t\t\tgridResultado.setMold(\"paging\");\n\t\t\tgridResultado.setPageSize(20);\n\n\t\t\tgridResultado.applyProperties();\n\t\t\tgridResultado.invalidate();\n\n\t\t} catch (Exception e) {\n\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t}\n\t}",
"@DirectMethod\r\n\tpublic List<MovimientoDto> obtenerPagos(int iIdEmpresa, int iIdEmpRaiz, int iIdBanco, \r\n\t\t\tString sIdDivisa, String sIdChequera, String sTipoBusqueda, int idUsuario)\r\n\t{\r\n\t\tif (!Utilerias.haveSession(WebContextManager.get())) \r\n\t\t\treturn null;\r\n\t\tList<MovimientoDto> listConsPag = new ArrayList<MovimientoDto>(); \r\n\t\ttry\r\n\t\t{\r\n\t\t\tif (Utilerias.haveSession(WebContextManager.get())) {\r\n\t\t\tParamBusquedaFondeoDto dtoBus = new ParamBusquedaFondeoDto();\r\n\t\t\tCoinversionService coinversionService = (CoinversionService) contexto.obtenerBean(\"coinversionBusinessImpl\");\r\n\t\t\tdtoBus.setIdEmpresa(funciones.validarEntero(iIdEmpresa));\r\n\t\t\tdtoBus.setIdBanco(funciones.validarEntero(iIdBanco));\r\n\t\t\tdtoBus.setIdChequera(funciones.validarCadena(sIdChequera));\r\n\t\t\tdtoBus.setIdEmpresaRaiz(funciones.validarEntero(iIdEmpRaiz));\r\n\t\t\tdtoBus.setSTipoBusqueda(funciones.validarCadena(sTipoBusqueda));\r\n\t\t\tdtoBus.setIdDivisa(funciones.validarCadena(sIdDivisa));\r\n\t\t\tdtoBus.setIdUsuario(idUsuario);\r\n\t\t\t\r\n\t\t\tlistConsPag = coinversionService.obtenerPagos(dtoBus);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tbitacora.insertarRegistro(new Date().toString() + \" \" + Bitacora.getStackTrace(e) \r\n\t\t\t\t\t+ \"P:Coinversion, C:CoinversionAction, M:obtenerPagos\");\r\n\t\t}\r\n\t\treturn listConsPag;\r\n\t}",
"public List<CXPFactura> buscarFacturasPorRequisitar(final Proveedor proveedor,final Currency moneda){\r\n\t\treturn getFacturaDao().buscarFacturasPorRequisitar(proveedor, moneda);\r\n\t}",
"public List<CXPFactura> buscarFacturasPendientes(){\r\n\t\treturn getFacturaDao().buscarFacturasPendientes();\r\n\t}",
"public List<ExistenciaMaq> buscarExistencias(final Long almacenId,final Date fecha);",
"public void cargaDatosInicialesSoloParaAdicionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n //Obtien Ajuste Fin\n //Activa formulario para automatico modifica \n if (selectedEntidad.getNivel() >= 3) {\n numeroEspaciadorAdicionar = 260;\n }\n\n if (selectedEntidad.getNivel() == 3) {\n swParAutomatico = false;\n numeroEspaciadorAdicionar = 230;\n }\n if (selectedEntidad.getNivel() == 2) {\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciadorAdicionar = 200;\n }\n if (selectedEntidad.getNivel() == 1) {\n swParAutomatico = true;\n numeroEspaciadorAdicionar = 130;\n cntParametroAutomaticoDeNivel2 = cntParametroAutomaticoService.obtieneObjetoDeParametroAutomatico(selectedEntidad);\n }\n\n mascaraNuevoOpcion = \"N\";\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n mascaraNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"N\");\n mascaraSubNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"S\");\n longitudNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"N\");\n longitudSubNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"S\");\n }",
"public ArrayList<TicketDto> consultarVentasChance(String fecha, String moneda) {\n ArrayList<TicketDto> lista = new ArrayList();\n Connection con = null;\n try {\n con = Recurso.Conexion.getPool().getDataSource().getConnection();\n String sql = \"SELECT codigo,sum(vrl_apuesta) \"\n + \"FROM ticket\"\n + \" where \"\n + \" fecha='\" + fecha + \"' and moneda='\" + moneda + \"' group by codigo\";\n\n PreparedStatement str;\n str = con.prepareStatement(sql);\n ResultSet rs = str.executeQuery();\n\n while (rs.next()) {\n TicketDto dto = new TicketDto();\n dto.setCodigo(rs.getString(1));\n dto.setValor(rs.getInt(2));\n dto.setMoneda(moneda);\n lista.add(dto);\n }\n str.close();\n rs.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n } finally {\n if (con != null) {\n try {\n con.close();\n } catch (SQLException ex) {\n Logger.getLogger(GestorPremio.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return lista;\n }\n }",
"List<Celda> obtenerCeldasValidas(Celda origen);",
"public void buscarDatos() throws Exception {\r\n try {\r\n String parameter = lbxParameter.getSelectedItem().getValue()\r\n .toString();\r\n String value = tbxValue.getValue().toUpperCase().trim();\r\n\r\n Map<String, Object> parameters = new HashMap();\r\n parameters.put(\"parameter\", parameter);\r\n parameters.put(\"value\", \"%\" + value + \"%\");\r\n\r\n getServiceLocator().getHospitalizacionService().setLimit(\r\n \"limit 25 offset 0\");\r\n\r\n List<Hospitalizacion> lista_datos = getServiceLocator()\r\n .getHospitalizacionService().listar(parameters);\r\n rowsResultado.getChildren().clear();\r\n\r\n for (Hospitalizacion hospitalizacion : lista_datos) {\r\n rowsResultado.appendChild(crearFilas(hospitalizacion, this));\r\n }\r\n\r\n gridResultado.setVisible(true);\r\n gridResultado.setMold(\"paging\");\r\n gridResultado.setPageSize(20);\r\n\r\n gridResultado.applyProperties();\r\n gridResultado.invalidate();\r\n gridResultado.setVisible(true);\r\n\r\n } catch (Exception e) {\r\n MensajesUtil.mensajeError(e, \"\", this);\r\n }\r\n }",
"public List<ActDetalleActivo> listarDetalleActivoLaboratorio(long codigoSalaLaboratorio,long codigoTipo,String amie, int estado,int anio);",
"public void distribuirAportes1(){\n\n if(null == comprobanteSeleccionado.getAporteuniversidad()){\n System.out.println(\"comprobanteSeleccionado.getAporteuniversidad() >> NULO\");\n }\n\n if(null == comprobanteSeleccionado.getAporteorganismo()){\n System.out.println(\"comprobanteSeleccionado.getAporteorganismo() >> NULO\");\n }\n\n if(null == comprobanteSeleccionado.getMontoaprobado()){\n System.out.println(\"comprobanteSeleccionado.getMontoaprobado() >> NULO\");\n }\n\n try{\n if(comprobanteSeleccionado.getAporteuniversidad().floatValue() > 0f){\n comprobanteSeleccionado.setAporteorganismo(comprobanteSeleccionado.getMontoaprobado().subtract(comprobanteSeleccionado.getAporteuniversidad()));\n comprobanteSeleccionado.setAportecomitente(BigDecimal.ZERO);\n }\n } catch(NullPointerException npe){\n System.out.println(\"Error de NullPointerException\");\n npe.printStackTrace();\n }\n\n }",
"List<Asistencia> getAsistenciasReporte(Integer fclId, Date inicio, Date fin);",
"@DirectMethod\r\n\tpublic List<LlenaComboGralDto> obtenerEmpresasArbolFondeo (int noEmpresaRaiz)\r\n\t{\r\n\t\tList<LlenaComboGralDto> lista = new ArrayList<LlenaComboGralDto>();\r\n\t\ttry{\r\n\t\t\tif(Utilerias.haveSession(WebContextManager.get()) && Utilerias.tienePermiso(WebContextManager.get(),50)){\r\n\t\t\t\tBarridosFondeosService barridosFondeosService = (BarridosFondeosService)contexto.obtenerBean(\"barridosFondeosBusinessImpl\");\r\n\t\t\t\tlista = barridosFondeosService.obtenerEmpresasArbolFondeo(noEmpresaRaiz);\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\tbitacora.insertarRegistro(new Date().toString() + \" \" + Bitacora.getStackTrace(e)\r\n\t\t\t+\"P:BarridosFondeos, C:BarridosFondeosAction, M:obtenerEmpresasArbolFondeo\");\t\t\t\r\n\t\t}\r\n\t\treturn lista;\r\n\t}",
"public List<ReporteComprasVentasRetenciones> getReporteExportaciones(int mes, int anio, int idOrganizacion)\r\n/* 260: */ {\r\n/* 261:344 */ StringBuffer sql = new StringBuffer();\r\n/* 262:345 */ sql.append(\"SELECT new ReporteComprasVentasRetenciones(tc.codigo, tc.nombre, COUNT(tc.codigo), \");\r\n/* 263:346 */ sql.append(\" (CASE WHEN tc.codigo = '04' and COALESCE(dpadre.indicadorDocumentoExterior, false) = true THEN -SUM(fcs.baseImponibleTarifaCero) ELSE SUM(fcs.valorFobRefrendo) END), \");\r\n/* 264:347 */ sql.append(\" 'Exportaciones')\");\r\n/* 265:348 */ sql.append(\" FROM FacturaClienteSRI fcs \");\r\n/* 266:349 */ sql.append(\" LEFT OUTER JOIN fcs.tipoComprobanteSRI tc \");\r\n/* 267:350 */ sql.append(\" LEFT OUTER JOIN fcs.facturaCliente fc \");\r\n/* 268:351 */ sql.append(\" LEFT OUTER JOIN fc.documento d \");\r\n/* 269:352 */ sql.append(\" LEFT OUTER JOIN fc.facturaClientePadre fcpadre \");\r\n/* 270:353 */ sql.append(\" LEFT OUTER JOIN fcpadre.documento dpadre \");\r\n/* 271:354 */ sql.append(\" WHERE MONTH(fcs.fechaEmision) =:mes \");\r\n/* 272:355 */ sql.append(\" AND YEAR(fcs.fechaEmision) =:anio \");\r\n/* 273:356 */ sql.append(\" AND fc.estado!=:estadoAnulado \");\r\n/* 274:357 */ sql.append(\" AND fc.indicadorSaldoInicial!=true \");\r\n/* 275:358 */ sql.append(\" AND COALESCE(dpadre.indicadorDocumentoExterior, d.indicadorDocumentoExterior) = true \");\r\n/* 276:359 */ sql.append(\" AND fc.idOrganizacion = :idOrganizacion\");\r\n/* 277:360 */ sql.append(\" GROUP BY tc.codigo, tc.nombre, dpadre.indicadorDocumentoExterior \");\r\n/* 278:361 */ sql.append(\" ORDER BY tc.codigo, tc.nombre \");\r\n/* 279: */ \r\n/* 280:363 */ Query query = this.em.createQuery(sql.toString());\r\n/* 281:364 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 282:365 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 283:366 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 284:367 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 285:368 */ return query.getResultList();\r\n/* 286: */ }",
"public void introducirPagosALojamientoHotelFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo){\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);\n try {\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT ALOJAMIENTO.Id,ALOJAMIENTO.Id_Reservacion,RESERVACION.Fecha_Entrada, RESERVACION.Fecha_Salida,RESERVACION.Precio FROM RESERVACION JOIN ALOJAMIENTO WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND RESERVACION.Fecha_Entrada>=? AND RESERVACION.Fecha_Entrada<=? AND RESERVACION.Check_In=1;\");\n declaracion.setDate(1,fechaInicialSql);\n declaracion.setDate(2,fechaFinalSQL);// pago de alojamiento en rango fchas\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {\n Object objeto[] = new Object[6];// pago de alojamiento en rango fchas\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);\n objeto[2] = resultado.getDate(3);\n objeto[3] = resultado.getDate(4);// pago de alojamiento en rango fchas\n objeto[4] = resultado.getInt(5);\n String fechaInicialProbar=objeto[2].toString();\n String fechaFinalProbar=objeto[3].toString();// pago de alojamiento en rango fchas\n String precioProbar = objeto[4].toString();// pago de alojamiento en rango fchas\n int total=habitacion.hacerTotalAlojamiento(fechaInicialProbar, fechaFinalProbar, precioProbar);\n objeto[5]= total;\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }",
"public void introducirPagosALojamientoClienteFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo,String dpiCliente){\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);// pago de alojamiento en rango fchas\n try {\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT ALOJAMIENTO.Id,ALOJAMIENTO.Id_Reservacion,RESERVACION.Fecha_Entrada, RESERVACION.Fecha_Salida,RESERVACION.Precio FROM RESERVACION JOIN ALOJAMIENTO WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND RESERVACION.Fecha_Entrada>=? AND RESERVACION.Fecha_Entrada<=? AND RESERVACION.Dpi_Cliente=? AND RESERVACION.Check_In=1;\");\n declaracion.setDate(1,fechaInicialSql);\n declaracion.setDate(2,fechaFinalSQL);// pago de alojamiento en rango fchas\n declaracion.setString(3, dpiCliente);\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {\n Object objeto[] = new Object[6];\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);\n objeto[2] = resultado.getDate(3);// pago de alojamiento en rango fchas\n objeto[3] = resultado.getDate(4);\n objeto[4] = resultado.getInt(5);\n String fechaInicialProbar=objeto[2].toString();\n String fechaFinalProbar=objeto[3].toString();// pago de alojamiento en rango fchas\n String precioProbar = objeto[4].toString();\n int total=habitacion.hacerTotalAlojamiento(fechaInicialProbar, fechaFinalProbar, precioProbar);\n objeto[5]= total;\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }",
"public List<Calificar> buscar_comentario(String email){\n List<Calificar> cal = null;\n Session session = sessionFactory.openSession();\n Transaction tx = null;\n \n try{\n \n tx = session.beginTransaction();\n String hql = \"from Calificar c where c.persona.correo = :correo\";\n Query query = session.createQuery(hql);\n query.setParameter(\"correo\", email);\n cal = (List<Calificar>)query.list();\n tx.commit();\n \n } catch (Exception e) {\n if (tx != null) {\n tx.rollback();\n }\n e.printStackTrace();\n } finally {\n session.close();\n }\n \n return cal;\n }",
"public List<SinistroPendente_FaixaVO> validaSelecionaSinistroPendente_Faixa(int tipo) {\n\n\t\tDecimalFormat percentForm = new DecimalFormat(\"0.00%\");\n\t\tDecimalFormat roundForm = new DecimalFormat(\"0.00\");\n\n\t\tList<SinistroPendente_FaixaVO> listaTratadaTotais = new ArrayList<SinistroPendente_FaixaVO>();\n\t\tList<SinistroPendente_FaixaVO> listaSinistroPendente = null;\n\t\tList<SinistroPendente_FaixaVO> listaFinal = new ArrayList<SinistroPendente_FaixaVO>();\n\n\t\tswitch (tipo) {\n\t\tcase 1: // faixa tempo\n\t\t\tlistaSinistroPendente = listaSinistroPendenteTempo;\n\t\t\tbreak;\n\t\tcase 2:// faixa valor\n\t\t\tlistaSinistroPendente = listaSinistroPendenteValor;\n\t\t\tbreak;\n\t\t}\n\n\t\tint totalNumSinistrosPendentes_Administrativo = 0;\n\t\tint totalNumSinistrosPendentes_Judicial = 0;\n\t\tint totalNumSinistrosPendentes_Total = 0;\n\n\t\tBigDecimal totalValorSinistrosPendentes_Administrativo = new BigDecimal(\"0\");\n\t\tBigDecimal totalValorSinistrosPendentes_Judicial = new BigDecimal(\"0\");\n\t\tBigDecimal totalValorSinistrosPendentes_Total = new BigDecimal(\"0\");\n\n\t\tString textoGrupoAnterior = \"\";\n\n\t\t// ============================\n\t\t// esse obj serve apenas para a lista nao ficar vazia\n\t\tSinistroPendente_FaixaVO totaNulo = new SinistroPendente_FaixaVO();\n\t\ttotaNulo.setGrupo(\"vazio\");\n\t\t// ============================\n\n\t\tlistaTratadaTotais.add(totaNulo);\n\t\tfor (int i = 0; i < listaSinistroPendente.size(); i++) {\n\n\t\t\tif (i == 0) {\n\n\t\t\t\ttextoGrupoAnterior = listaSinistroPendente.get(i).getGrupo();\n\n\t\t\t\ttotalNumSinistrosPendentes_Administrativo += listaSinistroPendente.get(i)\n\t\t\t\t\t\t.getNumSinistrosPendentes_Administrativo();\n\t\t\t\ttotalNumSinistrosPendentes_Judicial += listaSinistroPendente.get(i).getNumSinistrosPendentes_Judicial();\n\t\t\t\ttotalNumSinistrosPendentes_Total += listaSinistroPendente.get(i).getNumSinistrosPendentes_Total();\n\n\t\t\t\ttotalValorSinistrosPendentes_Administrativo = totalValorSinistrosPendentes_Administrativo\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Administrativo()));\n\t\t\t\ttotalValorSinistrosPendentes_Judicial = totalValorSinistrosPendentes_Judicial\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Judicial()));\n\t\t\t\ttotalValorSinistrosPendentes_Total = totalValorSinistrosPendentes_Total\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Total()));\n\n\t\t\t} else if (listaSinistroPendente.get(i).getGrupo().equals(textoGrupoAnterior)) {\n\n\t\t\t\ttextoGrupoAnterior = listaSinistroPendente.get(i).getGrupo();\n\n\t\t\t\ttotalNumSinistrosPendentes_Administrativo += listaSinistroPendente.get(i)\n\t\t\t\t\t\t.getNumSinistrosPendentes_Administrativo();\n\t\t\t\ttotalNumSinistrosPendentes_Judicial += listaSinistroPendente.get(i).getNumSinistrosPendentes_Judicial();\n\t\t\t\ttotalNumSinistrosPendentes_Total += listaSinistroPendente.get(i).getNumSinistrosPendentes_Total();\n\n\t\t\t\ttotalValorSinistrosPendentes_Administrativo = totalValorSinistrosPendentes_Administrativo\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Administrativo()));\n\t\t\t\ttotalValorSinistrosPendentes_Judicial = totalValorSinistrosPendentes_Judicial\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Judicial()));\n\t\t\t\ttotalValorSinistrosPendentes_Total = totalValorSinistrosPendentes_Total\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Total()));\n\n\t\t\t} else if (!(listaSinistroPendente.get(i).getGrupo().equals(textoGrupoAnterior))) {\n\n\t\t\t\tSinistroPendente_FaixaVO totalVO = new SinistroPendente_FaixaVO();\n\t\t\t\ttotalVO.setGrupo(textoGrupoAnterior);\n\t\t\t\ttotalVO.setFaixa(\"Total\");\n\t\t\t\ttotalVO.setValorSinistrosPendentes_Administrativo(\n\t\t\t\t\t\ttotalValorSinistrosPendentes_Administrativo.toString());\n\t\t\t\ttotalVO.setValorSinistrosPendentes_Judicial(totalValorSinistrosPendentes_Judicial.toString());\n\t\t\t\ttotalVO.setValorSinistrosPendentes_Total(totalValorSinistrosPendentes_Total.toString());\n\t\t\t\ttotalVO.setNumSinistrosPendentes_Administrativo(totalNumSinistrosPendentes_Administrativo);\n\t\t\t\ttotalVO.setNumSinistrosPendentes_Judicial(totalNumSinistrosPendentes_Judicial);\n\t\t\t\ttotalVO.setNumSinistrosPendentes_Total(totalNumSinistrosPendentes_Total);\n\t\t\t\tlistaTratadaTotais.add(totalVO);\n\n\t\t\t\ttextoGrupoAnterior = listaSinistroPendente.get(i).getGrupo();\n\n\t\t\t\ttotalValorSinistrosPendentes_Administrativo = new BigDecimal(\"0\");\n\t\t\t\ttotalValorSinistrosPendentes_Administrativo = totalValorSinistrosPendentes_Administrativo\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Administrativo()));\n\n\t\t\t\ttotalValorSinistrosPendentes_Judicial = new BigDecimal(\"0\");\n\t\t\t\ttotalValorSinistrosPendentes_Judicial = totalValorSinistrosPendentes_Judicial\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Judicial()));\n\n\t\t\t\ttotalValorSinistrosPendentes_Total = new BigDecimal(\"0\");\n\t\t\t\ttotalValorSinistrosPendentes_Total = totalValorSinistrosPendentes_Total\n\t\t\t\t\t\t.add(new BigDecimal(listaSinistroPendente.get(i).getValorSinistrosPendentes_Total()));\n\n\t\t\t\ttotalNumSinistrosPendentes_Administrativo = 0;\n\t\t\t\ttotalNumSinistrosPendentes_Administrativo += listaSinistroPendente.get(i)\n\t\t\t\t\t\t.getNumSinistrosPendentes_Administrativo();\n\n\t\t\t\ttotalNumSinistrosPendentes_Judicial = 0;\n\t\t\t\ttotalNumSinistrosPendentes_Judicial += listaSinistroPendente.get(i).getNumSinistrosPendentes_Judicial();\n\n\t\t\t\ttotalNumSinistrosPendentes_Total = 0;\n\t\t\t\ttotalNumSinistrosPendentes_Total += listaSinistroPendente.get(i).getNumSinistrosPendentes_Total();\n\n\t\t\t}\n\n\t\t}\n\t\tboolean insere = false;\n\t\tfor (int i = 0; i < listaTratadaTotais.size(); i++) {\n\t\t\tif (listaTratadaTotais.get(i).getGrupo().equalsIgnoreCase(textoGrupoAnterior)) {\n\t\t\t\tinsere = false;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tinsere = true;\n\t\t\t}\n\t\t}\n\t\tif (insere) {\n\t\t\tSinistroPendente_FaixaVO totaVO = new SinistroPendente_FaixaVO();\n\t\t\ttotaVO.setGrupo(textoGrupoAnterior);\n\t\t\ttotaVO.setFaixa(\"Total\");\n\t\t\ttotaVO.setValorSinistrosPendentes_Administrativo(totalValorSinistrosPendentes_Administrativo.toString());\n\t\t\ttotaVO.setValorSinistrosPendentes_Judicial(totalValorSinistrosPendentes_Judicial.toString());\n\t\t\ttotaVO.setValorSinistrosPendentes_Total(totalValorSinistrosPendentes_Total.toString());\n\n\t\t\ttotaVO.setNumSinistrosPendentes_Administrativo(totalNumSinistrosPendentes_Administrativo);\n\t\t\ttotaVO.setNumSinistrosPendentes_Judicial(totalNumSinistrosPendentes_Judicial);\n\t\t\ttotaVO.setNumSinistrosPendentes_Total(totalNumSinistrosPendentes_Total);\n\t\t\tlistaTratadaTotais.add(totaVO);\n\t\t}\n\t\tlistaTratadaTotais.remove(0);// remove o obj inserido acima com o texto\n\t\t\t\t\t\t\t\t\t\t// \"nulo\"\n\n\t\t// ###################################################\n\t\t// ###################################################\n\t\t// parte para calcular as porcentagens\n\t\t// ###################################################\n\n\t\t// este 'for' serve para vincular a lista de pendentes com a lista de\n\t\t// totais atraves do indice da lista de totais\n\t\ttextoGrupoAnterior = \"\";\n\t\tint tamLista = listaSinistroPendente.size();\n\t\tfor (int i = 0; i < tamLista; i++) {\n\t\t\tfor (int j = 0; j < listaTratadaTotais.size(); j++) {\n\t\t\t\tif (listaSinistroPendente.get(i).getGrupo().equalsIgnoreCase(listaTratadaTotais.get(j).getGrupo())) {\n\t\t\t\t\t// Exemplo: Na listaSinistroPendente na posicao i=5 o\n\t\t\t\t\t// produto eh \"Auto Correntista\". Na listaTratadaTotais\n\t\t\t\t\t// esse produto \"Auto Correntista\" eh j=1. Entao assim\n\t\t\t\t\t// saberei onde esta o total de \"Auto Correntista\" na\n\t\t\t\t\t// listaTratadaTotais.\n\t\t\t\t\tlistaSinistroPendente.get(i).setIndiceListaTotais(j);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// este 'for' serve para organizar as listas de pendentes e a lista de\n\t\t// totais\n\t\tint inseriu = 0;\n\t\tint ultimoIndice = 0;\n\t\tfor (int j = 0; j < listaSinistroPendente.size(); j++) {\n\n\t\t\tif (listaSinistroPendente.get(j).getIndiceListaTotais() != ultimoIndice) {\n\t\t\t\tinseriu = 0;\n\t\t\t}\n\t\t\tif (inseriu == 0) {\n\t\t\t\tlistaFinal.add(listaTratadaTotais.get(listaSinistroPendente.get(j).getIndiceListaTotais()));\n\t\t\t\tultimoIndice = listaSinistroPendente.get(j).getIndiceListaTotais();\n\t\t\t\tinseriu = 1;\n\t\t\t}\n\n\t\t\tlistaFinal.add(listaSinistroPendente.get(j));\n\n\t\t}\n\n\t\tfor (int i = 0; i < listaFinal.size(); i++) {\n\t\t\tif (!(listaFinal.get(i).getFaixa().equalsIgnoreCase(\"Total\"))) {\n\n\t\t\t\tint indice = listaFinal.get(i).getIndiceListaTotais();\n\t\t\t\ttry {\n\t\t\t\t\tlistaFinal.get(i).setNumPercentSinistrosPendentes_Administrativo(\n\t\t\t\t\t\t\tpercentForm.format((double) (listaFinal.get(i).getNumSinistrosPendentes_Administrativo())\n\t\t\t\t\t\t\t\t\t/ (listaTratadaTotais.get(indice).getNumSinistrosPendentes_Administrativo())));\n\t\t\t\t\tlistaFinal.get(i).setValorPercentSinistrosPendentes_Administrativo(percentForm.format(\n\t\t\t\t\t\t\tnew BigDecimal(listaFinal.get(i).getValorSinistrosPendentes_Administrativo()).divide(\n\t\t\t\t\t\t\t\t\tnew BigDecimal(\n\t\t\t\t\t\t\t\t\t\t\tlistaTratadaTotais.get(indice).getValorSinistrosPendentes_Administrativo()),\n\t\t\t\t\t\t\t\t\t6, RoundingMode.HALF_DOWN)));\n\n\t\t\t\t} catch (ArithmeticException ae) {\n\t\t\t\t\tlistaFinal.get(i).setNumPercentSinistrosPendentes_Administrativo(\"0%\");\n\t\t\t\t\tlistaFinal.get(i).setValorPercentSinistrosPendentes_Administrativo(\"0%\");\n\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tlistaFinal.get(i).setNumPercentSinistrosPendentes_Judicial(\n\t\t\t\t\t\t\tpercentForm.format((double) (listaFinal.get(i).getNumSinistrosPendentes_Judicial())\n\t\t\t\t\t\t\t\t\t/ (listaTratadaTotais.get(indice).getNumSinistrosPendentes_Judicial())));\n\n\t\t\t\t\tlistaFinal.get(i).setValorPercentSinistrosPendentes_Judicial(percentForm\n\t\t\t\t\t\t\t.format(new BigDecimal(listaFinal.get(i).getValorSinistrosPendentes_Judicial()).divide(\n\t\t\t\t\t\t\t\t\tnew BigDecimal(\n\t\t\t\t\t\t\t\t\t\t\tlistaTratadaTotais.get(indice).getValorSinistrosPendentes_Judicial()),\n\t\t\t\t\t\t\t\t\t6, RoundingMode.HALF_DOWN)));\n\n\t\t\t\t} catch (ArithmeticException ae) {\n\t\t\t\t\tlistaFinal.get(i).setNumPercentSinistrosPendentes_Judicial(\"0%\");\n\t\t\t\t\tlistaFinal.get(i).setValorPercentSinistrosPendentes_Judicial(\"0%\");\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tlistaFinal.get(i).setNumPercentSinistrosPendentes_Total(\n\t\t\t\t\t\t\tpercentForm.format((double) (listaFinal.get(i).getNumSinistrosPendentes_Total())\n\t\t\t\t\t\t\t\t\t/ (listaTratadaTotais.get(indice).getNumSinistrosPendentes_Total())));\n\n\t\t\t\t\tlistaFinal.get(i).setValorPercentSinistrosPendentes_Total(percentForm\n\t\t\t\t\t\t\t.format(new BigDecimal(listaFinal.get(i).getValorSinistrosPendentes_Total()).divide(\n\t\t\t\t\t\t\t\t\tnew BigDecimal(listaTratadaTotais.get(indice).getValorSinistrosPendentes_Total()),\n\t\t\t\t\t\t\t\t\t6, RoundingMode.HALF_DOWN)));\n\n\t\t\t\t} catch (ArithmeticException ae) {\n\t\t\t\t\tlistaFinal.get(i).setNumPercentSinistrosPendentes_Total(\"0%\");\n\t\t\t\t\tlistaFinal.get(i).setValorPercentSinistrosPendentes_Total(\"0%\");\n\t\t\t\t}\n\n\t\t\t} // if\n\t\t} // for\n\n\t\tfor (int i = 0; i < listaFinal.size(); i++) {\n\n\t\t\tlistaFinal.get(i).setValorSinistrosPendentes_Administrativo(uteis.insereSeparadoresMoeda(roundForm\n\t\t\t\t\t.format(Double.parseDouble(listaFinal.get(i).getValorSinistrosPendentes_Administrativo()))));\n\t\t\tlistaFinal.get(i).setValorSinistrosPendentes_Judicial(uteis.insereSeparadoresMoeda(\n\t\t\t\t\troundForm.format(Double.parseDouble(listaFinal.get(i).getValorSinistrosPendentes_Judicial()))));\n\t\t\tlistaFinal.get(i).setValorSinistrosPendentes_Total(uteis.insereSeparadoresMoeda(\n\t\t\t\t\troundForm.format(Double.parseDouble(listaFinal.get(i).getValorSinistrosPendentes_Total()))));\n\n\t\t}\n\n\t\treturn listaFinal;\n\t}",
"public List<Empleado> buscarTodos() {\n\t\tList<Empleado> listEmpleados;\n\t\tQuery query = entityManager.createQuery(\"SELECT e FROM Empleado e WHERE estado = true\");\n\t\tlistEmpleados = query.getResultList();\n\t\tIterator iterator = listEmpleados.iterator();\n\t\twhile(iterator.hasNext())\n\t\t{\n\t\t\tSystem.out.println(iterator.next());\n\t\t}\n\t\treturn listEmpleados;\n\t}",
"private void generaProcesoCoactivo(List<ObligacionCoactivoDTO> obligaciones, ConfiguracionCoactivoDTO configuracion)\n throws CirculemosNegocioException {\n\n if (obligaciones != null && !obligaciones.isEmpty() && configuracion != null) {\n\n // Crea proceso coactivo\n ProcesoDTO procesoDTO = registrarProcesoCoactivo();\n\n // Crea Participantes\n PersonaDTO persona = iRFachadaAdminNegocio\n .consultarPersona(obligaciones.get(0).getCoactivo().getPersona().getId());\n registrarParticipante(persona, procesoDTO);\n\n // Se crea el coactivo\n Coactivo coactivo = registrarCoactivo(obligaciones, procesoDTO, configuracion);\n\n // Se crean las obligaciones\n registrarObligaciones(obligaciones, coactivo, procesoDTO);\n\n // Actualizacion de estado a mandamiento de pago\n TrazabilidadProcesoDTO trazabilidadMandamiento = iRFachadaProceso\n .actualizarEstadoProceso(procesoDTO.getId(), EnumEstadoProceso.ECUADOR_COACTIVO_MANDAMIENTO, false);\n try {\n em.flush();\n\n boolean financiacionIncumplida = false;\n for (ObligacionCoactivoDTO obligacionCoactivoDTO : obligaciones) {\n financiacionIncumplida = validarProcesoFianciacionIncumplido(\n obligacionCoactivoDTO.getNumeroObligacion());\n if (financiacionIncumplida) {\n financiacionIncumplida = true;\n break;\n }\n }\n\n if (financiacionIncumplida) {\n // TODO genera auto de pago especial\n } else {\n // Genera documento apertura\n if (validarDireccionPersona(persona)) {\n registrarDocumentoCoactivo(EnumTipoDocumentoGenerado.AUTO_PAGO, trazabilidadMandamiento,\n coactivo, EnumTipoDocumentoProceso.COACTIVO_AUTO_PAGO, null);\n } else {\n registrarDocumentoCoactivo(EnumTipoDocumentoGenerado.AUTO_PAGO_SIN_DIRECCION,\n trazabilidadMandamiento, coactivo,\n EnumTipoDocumentoProceso.COACTIVO_AUTO_PAGO_SIN_DIRECCION, null);\n }\n }\n\n // Genera documento posesion\n registrarDocumentoCoactivo(EnumTipoDocumentoGenerado.ACTA_DE_POSESION, trazabilidadMandamiento,\n coactivo, EnumTipoDocumentoProceso.COACTIVO_ACTA_DE_POSESION, null);\n\n } catch (CirculemosAlertaException e) {\n logger.error(\"Error en generación de documentos de mandamiento de pago\", e);\n throw new CirculemosNegocioException(ErrorCoactivo.GenerarCoactivo.COAC_002001);\n }\n\n // Verifica si se debe generar los documentos con el siguiente parametro : 225 Generar documentos de notificacion\n generarNotificacion(procesoDTO, coactivo);\n\n // Generacion de oficio de solicitud de bienes\n generarSolicitudBien(configuracion, procesoDTO, coactivo);\n\n // Valida si debe registrar el coactivo en axis\n registrarCoactivoAxis(coactivo, persona);\n\n } else {\n throw new CirculemosNegocioException(ErrorCoactivo.GenerarCoactivo.COAC_002002);\n }\n }",
"private prestarComputador obtenerComputador() {\n String d = dFormat.format(TXTFechaDeEntrega.getDate());\n prestarComputador elcomputador = new prestarComputador();\n elcomputador.setFechaDeEntrega(dFormat.format(TXTFechaDeEntrega.getDate()));\n elcomputador.setSerialComputadorDoy(TXTSerialEquipo.getText());\n elcomputador.setIdBibliotecario(TXTIdBibliotecario.getText());\n elcomputador.setIdUsuario(TXTIdUsuario.getText());\n elcomputador.setFechaDePrestamo(TXTFechaDePrestamo.getText());\n return elcomputador;\n }",
"public List<SpasaCRN> obtenerSpasaFiltros() {\n\n if (conectado) {\n try {\n String bool = \"false\";\n List<SpasaCRN> filtrosCRNs = new ArrayList();\n\n String Query = \"SELECT * FROM `spasa_filtros` WHERE anio = YEAR(NOW()) AND ciclo = CURRENT_CICLO() ;\";\n Logy.mi(\"Query: \" + Query);\n Statement st = Conexion.createStatement();\n ResultSet resultSet;\n resultSet = st.executeQuery(Query);\n while (resultSet.next()) {\n\n SpasaCRN crn = new SpasaCRN();\n SpasaMateria mat = new SpasaMateria();\n crn.setCodigoProf(resultSet.getString(\"usuario\")); //modificado ahora que se cambio in a String\n crn.setCrnCpr(resultSet.getString(\"crn\"));\n String mc = resultSet.getString(\"materia_cod\");\n if (mc != null && !mc.isEmpty() && !mc.equals(\"null\")) {\n crn.setMateriaRuta(mc);\n mat.setMateriaRuta(mc);\n }\n String m = resultSet.getString(\"materia_nom\");\n if (m != null && !m.isEmpty() && !m.equals(\"null\")) {\n mat.setNombreMat(m);\n }\n String d = resultSet.getString(\"departamento_nom\");\n if (d != null && !d.isEmpty() && !d.equals(\"null\")) {\n mat.setNombreDepto(d);\n }\n String dia = resultSet.getString(\"dia\");\n if (dia != null && !dia.isEmpty() && !dia.equals(\"null\")) {\n crn.setDiaHr(dia);\n }\n String h = resultSet.getString(\"hora\");\n if (h != null && !h.isEmpty() && !h.equals(\"null\")) {\n crn.setHiniHr(h);\n }\n crn.setMateria(mat);\n filtrosCRNs.add(crn);\n }\n\n return filtrosCRNs;\n\n } catch (SQLException ex) {\n Logy.me(\"No se pudo consultar tabla spasa_filtros : \" + ex.getMessage());\n return null;\n }\n } else {\n Logy.me(\"No se ha establecido previamente una conexion a la DB\");\n return null;\n }\n }",
"private int contabilizaHorasNoLectivas(ArrayList<FichajeRecuentoBean> listaFichajesRecuento, ProfesorBean profesor, boolean guardar, int mes) {\r\n int segundos=0;\r\n for (FichajeRecuentoBean fichajeRecuento : listaFichajesRecuento) {\r\n// System.out.println(fichajeRecuento.getFecha()+\" \"+fichajeRecuento.getHoraEntrada()+\"->\"+fichajeRecuento.getHoraSalida()+\" => \"+UtilsContabilizar.dimeDuracion(fichajeRecuento.getHoraEntrada(),fichajeRecuento.getHoraSalida()));\r\n segundos+=UtilsContabilizar.dimeDuracion(fichajeRecuento.getHoraEntrada(),fichajeRecuento.getHoraSalida());\r\n \r\n DetalleInformeBean detalleInforme=new DetalleInformeBean();\r\n detalleInforme.setIdProfesor(profesor.getIdProfesor());\r\n detalleInforme.setTotalHoras(UtilsContabilizar.dimeDuracion(fichajeRecuento.getHoraEntrada(),fichajeRecuento.getHoraSalida()));\r\n detalleInforme.setFecha(fichajeRecuento.getFecha());\r\n detalleInforme.setHoraIni(fichajeRecuento.getHoraEntrada());\r\n detalleInforme.setHoraFin(fichajeRecuento.getHoraSalida());\r\n detalleInforme.setTipoHora(\"NL\");\r\n if(guardar && detalleInforme.getTotalHoras()>0)GestionDetallesInformesBD.guardaDetalleInforme(detalleInforme, \"contabilizaHorasNoLectivas\", mes);\r\n \r\n }\r\n return segundos;\r\n }",
"@Override\r\n\tpublic List<Object> consultarVehiculos() {\r\n\t\t\r\n\t\tFormat formato = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\t\r\n\t\treturn AdminEstacionamientoImpl.getParqueadero().stream().map(\r\n\t\t\t\t temp -> {HashMap<String, String> lista = new HashMap<String, String>(); \r\n\t\t\t\t lista.put( \"placa\", temp.getVehiculo().getPlaca() );\r\n\t\t\t\t lista.put( \"tipo\", temp.getVehiculo().getTipo() );\r\n\t\t\t\t lista.put( \"fechaInicio\", formato.format( temp.getFechaInicio() ) );\r\n\r\n\t\t\t\t return lista;\r\n\t\t\t\t }\r\n\t\t\t\t).collect(Collectors.toList());\r\n\t}",
"public void seleccionarTipoComprobante() {\r\n if (com_tipo_comprobante.getValue() != null) {\r\n tab_tabla1.setCondicion(\"fecha_trans_cnccc between '\" + cal_fecha_inicio.getFecha() + \"' and '\" + cal_fecha_fin.getFecha() + \"' and ide_cntcm=\" + com_tipo_comprobante.getValue());\r\n tab_tabla1.ejecutarSql();\r\n tab_tabla2.ejecutarValorForanea(tab_tabla1.getValorSeleccionado());\r\n } else {\r\n tab_tabla1.limpiar();\r\n tab_tabla2.limpiar();\r\n }\r\n tex_num_transaccion.setValue(null);\r\n calcularTotal();\r\n utilitario.addUpdate(\"gri_totales,tex_num_transaccion\");\r\n }",
"@Test()\n public void testListarComprasEfetuadas() {\n System.out.println(\"listarComprasEfetuadas\");\n String busca = \"\";\n ControleCompra instance = new ControleCompra();\n List<Compra> expResult = listaComprasEfetuadas;\n List<Compra> result = instance.listarComprasEfetuadas(busca);\n assertEquals(expResult, result);\n }",
"private Filtro getFiltroFissiGiornoConto(Date data, int codConto) {\n /* variabili e costanti locali di lavoro */\n Filtro filtro = null;\n Filtro filtroDate = null;\n Filtro filtroInizio = null;\n Filtro filtroSincro;\n Filtro filtroVuota;\n Filtro filtroIntervallo;\n Filtro filtroFine;\n Filtro filtroConto = null;\n Modulo modConto;\n Date dataVuota;\n\n try { // prova ad eseguire il codice\n\n modConto = Progetto.getModulo(Conto.NOME_MODULO);\n\n filtroDate = new Filtro();\n\n filtroInizio = FiltroFactory.crea(Cam.dataInizioValidita.get(),\n Filtro.Op.MINORE_UGUALE,\n data);\n filtroSincro = FiltroFactory.crea(Cam.dataSincro.get(), Filtro.Op.MINORE, data);\n dataVuota = Lib.Data.getVuota();\n filtroVuota = FiltroFactory.crea(Cam.dataSincro.get(), dataVuota);\n\n filtroFine = FiltroFactory.crea(Cam.dataFineValidita.get(),\n Filtro.Op.MAGGIORE_UGUALE,\n data);\n filtroIntervallo = new Filtro();\n filtroIntervallo.add(filtroSincro);\n filtroIntervallo.add(filtroFine);\n\n filtroDate.add(filtroIntervallo);\n filtroDate.add(Filtro.Op.OR, filtroVuota);\n\n /* filtro per il conto */\n filtroConto = FiltroFactory.codice(modConto, codConto);\n\n filtro = new Filtro();\n filtro.add(filtroInizio);\n filtro.add(filtroDate);\n filtro.add(filtroConto);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n /* valore di ritorno */\n return filtro;\n }",
"@DirectMethod \r\n\tpublic List<LlenaComboGralDto> llenarCmbArbol(boolean bExistentes){\r\n\t\tList<LlenaComboGralDto> listEmpRaiz = new ArrayList<LlenaComboGralDto>();\r\n\t\tif(!Utilerias.haveSession(WebContextManager.get()))\r\n\t\t\treturn listEmpRaiz;\r\n\t\ttry{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\tBarridosFondeosService barridosFondeosService = (BarridosFondeosService) contexto.obtenerBean(\"barridosFondeosBusinessImpl\");\r\n\t\t\tlistEmpRaiz = barridosFondeosService.consultarArboles(bExistentes);\r\n\t\t}catch(Exception e){\r\n\t\t\tbitacora.insertarRegistro(new Date().toString() + \" \" + Bitacora.getStackTrace(e)\r\n\t\t\t\t\t+ \"P: BarridosFondeos C: BarridosFondeosAction M: llenarCmbArbol\");\r\n\t\t}\r\n\t\treturn listEmpRaiz;\r\n\t}",
"public static ArrayList<Actividad> selectActividadesInforme(String login, String fechaI, String fechaF) throws ParseException {\n //Comprobar que la fecha de Inicio no es posterior a hoy\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n java.util.Date fechaIU = formatter.parse(fechaI);\n Date hoy = Calendar.getInstance().getTime();\n if (fechaIU.compareTo(hoy) > 0) {\n return null;\n } else {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n //Selecciona actividades de fase de proyectos \"En Curso\" de determinado usuario;\n String query = \"SELECT * FROM Actividades a,Fases f,Proyectos p WHERE a.idFase=f.id AND f.idProyecto=p.id AND p.estado='E' AND a.login=?\";\n ArrayList<Actividad> actividades = new ArrayList<Actividad>();\n try {\n ps = connection.prepareStatement(query);\n ps.setString(1, login);\n rs = ps.executeQuery();\n while (rs.next()) {\n String fechaInicio = String.format(\"%04d-%02d-%02d\", rs.getInt(8), rs.getInt(7), rs.getInt(6));\n String fechaFin = String.format(\"%04d-%02d-%02d\", rs.getInt(11), rs.getInt(10), rs.getInt(9));\n\n Actividad a = new Actividad(rs.getInt(1), login, rs.getString(3), rs.getString(4), rs.getInt(5), fechaInicio, fechaFin, rs.getInt(12), rs.getString(13).charAt(0), rs.getInt(14));\n\n //Comprobar si la actividad obtenida está entre el rango de fechas introducido por el usuario\n if (comprobarFechaEntreFechas(fechaI, fechaF, a)) {\n actividades.add(a);\n }\n }\n rs.close();\n ps.close();\n pool.freeConnection(connection);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return actividades;\n }\n }",
"public ActDetalleActivo buscarPorSerial(String serial,String amie, int estado,int anio);",
"public List<HistoriaLaboral> getHistoriasQueAfectanDesignacion(Emp emp);",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<ComTicketsDependencia> codigosdisponibles(Long ide) {\n\t\t\r\n\t\treturn em.createQuery(\"select ct.id,ct.ticket from ComTicketsDependencia c inner join c.comTicket ct where c.dependencia.id=\"+ide+\" and c.comTicket.estado=1 and c.comPeriodo.estado='1' order by ct.id \").getResultList();\r\n\t}"
]
| [
"0.7263363",
"0.7093165",
"0.68070984",
"0.6783118",
"0.67685336",
"0.67443913",
"0.6657131",
"0.66010463",
"0.6589227",
"0.6574401",
"0.6563854",
"0.6542153",
"0.6539811",
"0.65363026",
"0.652854",
"0.65273404",
"0.6479628",
"0.6471034",
"0.6459994",
"0.6455052",
"0.64382875",
"0.64247984",
"0.64220923",
"0.64066786",
"0.6405236",
"0.63934505",
"0.639012",
"0.6360998",
"0.635387",
"0.6332632",
"0.6311864",
"0.63112843",
"0.6304845",
"0.6295548",
"0.62880033",
"0.6285308",
"0.62738794",
"0.627245",
"0.6272028",
"0.627143",
"0.6266463",
"0.6258099",
"0.625367",
"0.6249266",
"0.62452066",
"0.6235801",
"0.62354743",
"0.6235303",
"0.62341905",
"0.6232902",
"0.6231499",
"0.6228237",
"0.62273026",
"0.6224058",
"0.6218705",
"0.62179697",
"0.6214821",
"0.62119645",
"0.6210674",
"0.62065935",
"0.6203175",
"0.61938417",
"0.6190021",
"0.6187308",
"0.6184233",
"0.6174928",
"0.61735415",
"0.61716425",
"0.6169502",
"0.6168756",
"0.616869",
"0.6161795",
"0.6156128",
"0.61515665",
"0.6144856",
"0.614092",
"0.61406356",
"0.614049",
"0.6122074",
"0.6119965",
"0.61188895",
"0.61172956",
"0.61151475",
"0.61142606",
"0.6110643",
"0.60974574",
"0.609305",
"0.6093044",
"0.6088967",
"0.608587",
"0.60834837",
"0.6078137",
"0.6078132",
"0.6075832",
"0.60750425",
"0.60750204",
"0.6072952",
"0.60687184",
"0.6066571",
"0.60625494"
]
| 0.8194202 | 0 |
1. declare a 2D array of integers with 3, 1D arrays that each hold 3 integers | public static void main(String[] args) {
Random m = new Random();
int [][] dArray = new int[3][3];
// 2. use two for loops to set all the elements in the 2D array to
// a different integer
// BE SURE TO USE THE ARRAY'S length VARIABLE
for (int i = 0; i < dArray.length; i++) {
for (int j = 0; j < dArray[i].length; j++) {
dArray[i][j] = m.nextInt(9)+1;
}
}
// 3. print the third element from the second 1D array (2DArray[1][2])
System.out.println(dArray[1][2]);
// 4. set the third element from the second 1D array to a different
// value
dArray[1][2] = 10;
// 5. print the element again and verify the value has changed
System.out.println(dArray[1][2]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int[][][] init3DArray(int count){\r\n return new int[count][count][count];\r\n }",
"public static void main (String[] args) {\n int[][] twoD = new int[3][4];\n// Where x is an integer\n// [[x, x, x, x],\n// [x, x, x, x],\n// [x, x, x, x]]\n\n// int[][][] threeD = new int[3][4][3];\n\n// 4x3\n int[][] twoDInit = {{1, 3, 5}, {4, 3, 5}, {1, 4, 5}, {4, 3, 5}};\n\n for (int i = 0; i < twoDInit.length; i++) {\n for (int j = 0; j < twoDInit[i].length; j++) {\n System.out.println(twoDInit[i][j]);\n }\n }\n\n for (int[] ints : twoDInit) {\n for (int anInt : ints) {\n System.out.println(anInt);\n }\n }\n\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 7; j++) {\n System.out.print(\"*\");\n }\n System.out.println();\n }\n\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < i + 1; j++) {\n System.out.print(\"*\");\n }\n System.out.println();\n }\n }",
"public static int [][][] buildMat3d() {\n //defines array to be 3 X 7X 9 dimensioned\n int mat3d [][][]= new int [3][7][9];\n //for loop which runs 3 times\n for(int s=0; s<3; s++) {\n //for loop which runs a different amount of times\n for(int j=0; j<(3+2*s); j++) {\n //for loop which does the same\n for(int c=0; c<(s+j+1); c++) {\n //defines values based on raondom generation\n mat3d[s][j][c]= (int)(Math.random()*99);\n \n }\n }\n }\n //returns the resulting array\n return mat3d;\n }",
"public static void main(String[] args) { \r\n int[][] a = new int[3][5]; // прямоугольный массив\r\n int size1 = a.length;\r\n int size2 = a[0].length;\r\n int[][] b = new int[3][]; // массив переменной длины (тут - треугольный)\r\n b[0] = new int[1];\r\n b[1] = new int[2];\r\n b[2] = new int[3];\r\n int c[] = new int[] {1,2,3,};\r\n c = new int[]{0,1,2,3}; // а вот так не сработает: c = {0,1,2,3};\r\n \r\n int[] array1D= {0,1,2,3}; \r\n int[][] array2D= {{0,1,5,10},{2,3,1,0,5,55,16},{0,1}};\r\n int[][][] array3D= {\r\n { {2,3,1,0},\r\n {2,3,1,0},\r\n {2,3,1,0}},\r\n \r\n { {2,3,1,0},\r\n {2,3,1,0},\r\n {2,3,1,0}},\r\n \r\n { {2,3,1,0},\r\n {2,3,1,0},\r\n {2,3,1,0}}};\r\n System.out.println(\"============array1D==========\");\r\n System.out.println(array1D);\r\n System.out.println(Arrays.toString(array1D)); //Работает на глубину одного измерения (для одномерных масивов)\r\n System.out.println(\"============array2D==========\");\r\n System.out.println(array2D);\r\n System.out.println(Arrays.toString(array2D)); \r\n System.out.println(Arrays.deepToString(array2D));\r\n System.out.println(\"============array3D==========\");\r\n System.out.println(array3D);\r\n System.out.println(Arrays.toString(array3D));\r\n System.out.println(Arrays.deepToString(array3D));\r\n }",
"private static void demoMultiDArrays() {\r\n\t\tint[][] nums = new int[3][5];\r\n\t\tnums[0][2] = 10;\r\n//\t\tcompact, hard to read version: **note: slower. its worse in every way.**\r\n//\t\tnums[nums.length-1][nums[nums.length-1].length-1] = 14;\r\n\t\tint lastRow = nums.length-1;\r\n\t\tint lastCol = nums[lastRow].length-1;\r\n\t\tnums[lastRow][lastCol] = 14;\r\n//\t\tcompact, hard to read version: **note: slower. its worse in every way.**\r\n//\t\tnums[0][0] = nums[0][2] + nums[nums.length-1][nums[nums.length-1].length-1];\r\n\t\tnums[0][0] = nums[0][2]+nums[lastRow][lastCol];\r\n\t\t\r\n\t\t//return length of the cols in nums\r\n\t\t//return the length of the rows in nums\r\n\t\tfor (int[] rowData : nums) {\r\n\t\t\tSystem.out.print(\"[\");\r\n\t\t\tfor (int colData : rowData) {\r\n\t\t\t\tSystem.out.print(colData);\r\n\t\t\t\tSystem.out.print(\",\\t\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"], \");\r\n\t\t}\r\n\t\t\r\n\t}",
"public static int[][] init() {\n int[][] arr={\n {0,1,0,1,0,0,0},\n {0,0,1,0,0,1,0},\n {1,0,0,1,0,1,0},\n {0,0,1,0,0,1,0},\n {0,0,1,1,0,1,0},\n {1,0,0,0,0,0,0}\n };\n return arr;\n }",
"public static int[][] init2DArray(int count){\r\n return new int[count][count];\r\n }",
"@Test\n public void testCreateRowIndices3(){\n int[][] a = new int[4][2];\n a[0][0] = 0;\n a[0][1] = 0;\n a[1][0] = 0;\n a[1][1] = 1;\n a[2][0] = 0;\n a[2][1] = 2;\n a[3][0] = 2;\n a[3][1] = 1;\n\n double[][] input = new double[4][4];\n\n for(int i = 0 ; i < a.length ; i++){\n input[a[i][0]][a[i][1]] = 1;\n }\n\n int[][] myIndices = HarderArrayProblems.createRowIndices(input);\n for(int i = 0 ; i < a.length ; i++){\n assertEquals(a[i][0], myIndices[i][0]);\n assertEquals(a[i][1], myIndices[i][1]);\n }\n }",
"public static void main(String[] args) {\n\tint[] a = new int[3];\r\n\t\r\n\t// At the time of construction we must specify the size\r\n\t//int[] a = new int[]; => Gives compile time error.\r\n\t\r\n\tint[] b = new int[0]; //=> Legal to have zero size array\r\n\t\r\n\tint[] c = new int[-6]; //=> no compile time error but gives run time exception\r\n\t\r\n\t// Array size can be specified using byte,short,int,char types of data.\r\n\t\r\n\tint[] d = new int['a']; //char type\r\n\t\r\n\tbyte e = 10;\r\n\tint[] f = new int[e]; //byte type\r\n\t\r\n\tshort g = 20;\r\n\tint[] h = new int[g]; //short type\r\n\t\r\n //int[] i = new int[58l]; // Compile time error\r\n //int[] j = new int[10.2]; //Compile time error\r\n\t\r\n\t\r\n\t//========> Construction of multi dimensional Arrays <=========//\r\n\t\r\n\t// In Java multi dimensional arrays are implemented by using Array of Arrays concept\r\n\t\r\n\tint[][] i = new int[3][]; \r\n\ti[0] = new int[2];\r\n\ti[1] = new int[3];\r\n\ti[2] = new int[8];\r\n\t\r\n\t\r\n\tint[][][] j = new int[2][][];\r\n\tj[0] = new int[3][];\r\n\tj[0][0] = new int[1];\r\n\tj[0][1] = new int[2];\r\n\tj[0][2] = new int[3];\r\n\tj[1] = new int[2][2];\r\n\t\r\n\t\r\n\t\r\n\t\r\n}",
"public static void main(String[] args) {\n for (int i = 1; i < 3; i++){\n for(int j = 0; j < 4; j++){\n System.out.println(\"i=\" + i + \" j=\" + j);\n }\n }\n //2D arrays put arrays inside of arrays\n int[][] grid = {\n {1,2,3},\n {4,5,6},\n {7,8,9}\n };\n }",
"public static void main(String[] args) {\n\r\n\t\tint[][] array = new int[5][5];\r\n\t\t\r\n\t//좌측 코드는 5행 5열 2차원 배열을 생성함\r\n\t\t//25개의 방이 생성되고 메모리에 총 100바이트 생성함\r\n\t\t\r\n\t\tint[][] array = new int[][] {\r\n\t\t\t{100,20,30},\r\n\t\t\t{30,40,50},\r\n\t\t\t{40,50,60}\r\n\t\t};//선언과 동시에 3행 3열의 값을 초기화를 해주고 있다. 메모리에 총 9*4=36byte가 생성됨ㄴ\r\n\t\t}",
"public native int[][] __int2dArrayMethod( long __swiftObject, int[][] arg );",
"public static void arrayCreation() {\n int[] arr = new int[3];\n // as we are using new operator and that is how we create objects hence arrays\n // are called objects\n // every array in java is an object\n System.out.println(arr.getClass()\n .getSimpleName()); // int[]\n System.out.println(arr.getClass()\n .getName()); // [I\n\n int[] a1 = new int[3];\n int[][] a2 = new int[3][3];\n double[] a3 = new double[3];\n short[] a4 = new short[3];\n byte[] a5 = new byte[3];\n boolean[] a6 = new boolean[3];\n long[] a7 = new long[3];\n float[] a8 = new float[3];\n Integer[] a9 = new Integer[3];\n\n System.out.println(a1.getClass()\n .getName()); // [I\n System.out.println(a2.getClass()\n .getName()); // [[I\n System.out.println(a3.getClass()\n .getName()); // [D\n System.out.println(a4.getClass()\n .getName()); // [S\n System.out.println(a5.getClass()\n .getName()); // [B\n System.out.println(a6.getClass()\n .getName()); // [Z\n System.out.println(a7.getClass()\n .getName()); // [J\n System.out.println(a8.getClass()\n .getName()); // [F\n System.out.println(a9.getClass()\n .getName()); // [Ljava.lang.Integer;\n\n // at the time of the array initialization we should compulsory specify the size\n // new int[3] we should specify the size else it will lead to compilation error\n\n // It is legal to have size zero in java\n int[] a = new int[0];\n System.out.println(a);\n\n }",
"int main()\n {\n int tri[][] = {{1, 0, 0},\n {4, 8, 0},\n {1, 5, 3}};\n return 0;\n }",
"public int[][] matrixCID(String[] array){\n\t\tint[][] matrix = new int[array.length-1][5];\n\t\tfor(int i = 1; i < array.length; i++){\n\t\t\tString[] words = toWord(array[i]);\t\n\t\t\tmatrix[i-1][0] = Integer.valueOf(words[0]); //CID\n\t\t\tmatrix[i-1][1] = Integer.valueOf(words[2]); //POP\n\t\t\tmatrix[i-1][2] = 0; //default length\n\t\t\tmatrix[i-1][3] = 0; //default chunk size\n\t\t\tmatrix[i-1][4] = 0; //default chunk pieces\n\t\t}\n\t\treturn matrix;\n\t}",
"public static void main(String[] args)\n {\n int[][] ints;\n int[][] ints1;\n\n\n\n\n ints = new int[][]{\n {1, 2, 3, 4, 5, 6, 7, 8, 9},\n {10, 11, 12, 13, 14, 15, 16, 17, 18},\n {19, 20, 21, 22, 23, 24, 25, 26, 27},\n {28, 29, 30, 31, 32, 33, 34, 35, 36},\n {37, 38, 39, 40, 41, 42, 43, 44, 45},\n {46, 47, 48, 49, 50, 51, 52, 53, 54},\n {55, 56, 57, 58, 59, 60, 61, 62, 63},\n {64, 65, 66, 67, 68, 69, 70, 0, 71},\n {73, 74, 75, 76, 77, 78, 79, 80, 72}\n };\n\n ints = new int[][]{\n {1,0},\n {2,3},\n };\n ints1 = new int[][]{\n {1, 2, 3},\n {4, 5, 6},\n {7, 0, 8}\n };\n\n ints1 = new int[][]{\n {1, 2, 3},\n {4, 8, 5},\n {7, 0, 6}\n };\n ints = new int[][]{\n {5, 0, 4},\n {2, 3, 8},\n {7,1,6}\n };\n ints1 = new int[][]{\n {1, 6, 4},\n {7, 0, 8},\n {2, 3, 5}\n };\n\n ints1 = new int[][]{\n {6, 0, 5},\n {8, 7, 4},\n {3, 2, 1}\n };\n ints1 = new int[][]{\n {11, 0, 4, 7},\n {2, 15, 1, 8},\n {5, 14, 9, 3},\n {13, 6, 12, 10 }\n };\n\n\n ints1 = new int[][]{\n {14, 13, 5, 3},\n {0, 1, 8, 12},\n {6, 2, 4, 10},\n {11, 9, 15, 7 }\n };\n\n ints1 = new int[][]{\n {8, 4, 7},\n {1,5,6},\n {3,2,0}\n };\n\n\n ints1 = new int[][]{\n {8, 4, 7},\n {1,5,6},\n {3,2,0}\n };\n\n\n ints = new int[][]{\n {1, 2, 3},\n {4, 6,5},\n {7, 8,0}\n };\n ints1 = new int[][]{\n {8, 4, 7},\n {1,5,6},\n {3,2,0}\n };\n ints = new int[][]{\n {1,0},\n {2,3},\n };\n System.out.println(System.currentTimeMillis());\n Board board = new Board(ints);\n Solver solution = new Solver(board);\n\n for (Board el :solution.solution())\n {\n System.out.println(el);\n }\n System.out.println(System.currentTimeMillis());\n\n\n }",
"public Matrix3x3rc (long[] in_array) throws WrongLength{ //throws error of type WrongLength if input array length is not 9\n\t\tif (in_array.length != 9){\n\t\t\tthrow new WrongLength (9, in_array.length, \"in_array\");\n\t\t}\n\t\telse{ //changes global record if length of input array == 9\n\t\t\t//since every 3 elements of the input array correspond to a row of the matrix, every 3 elements are stored in\n\t\t\t//a column register, then the column registers are stored in a row register\n\t\t\tcolRow3 a1 = new colRow3(in_array[0], in_array[1], in_array[2]); //stores 1st row\n\t\t\tcolRow3 b1 = new colRow3(in_array[3], in_array[4], in_array[5]); //stores 2nd row\n\t\t\tcolRow3 c1 = new colRow3(in_array[6], in_array[7], in_array[8]); //stores 3rd row\n\t\t\tthis.mat = new Row3(a1, b1, c1); //stores all 3 record in global record\n\t\t}\n\t}",
"public static void main(String[] args) {\n\r\n\t\tint a[][] = new int[2][3];\r\n\r\n\t\ta[0][0] = 2;\r\n\t\ta[0][1] = 4;\r\n\t\ta[0][2] = 5;\r\n\t\ta[1][0] = 3;\r\n\t\ta[1][1] = 4;\r\n\t\ta[1][2] = 7;\r\n\r\n\t\t// int b[][]= {{2,4,5},{3,4,7}}.....; you can declare Multidimesion as well\r\n\r\n\t\t// System.out.println(a[1][0]);\r\n\r\n\t\tfor (int i = 0; i < 2; i++)\r\n\r\n\t\t{\r\n for(int j=0; j<3;j++)\r\n {\r\n \t System.out.println(a[i][j]+ \"\");\r\n }\r\n\t\t} \r\n\r\n\t}",
"public void constructArray(){\n\t\tfor (int col = 0; col < cols; col++){\n\t\t\tfor (int row = 0; row < rows; row++){\n\t\t\t\tmap[col][row] = new Pixel();\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) {\n int arrayName[] = new int[]{'a','b','c','1','2'};\n String objArray[] = new String[]{\"Shreya\",\"Paul\"};\n System.out.println(arrayName);\n System.out.println(objArray);\n //Arrays are objects and refer to a collection of primitive data types or other objects.(same data type)\n int [] multiarray []; // 2 dimensional or multi dimensional array\n // no elements of an array are created when it’s declared, it’s invalid to define the size of an array with its declaration.\n //int [3] declarearray[2]; this line fails as no elements are created but we have given the size\n // An array type can be any of the following:\n // Primitive data type ,Interface ,Abstract class ,Concrete class\n // Arrays can be of any data type other than null.\n int arr[] []= new int[3][];\n System.out.println(\"this is \"+arr);\n int intArray[]; // it is declaration\n intArray = new int[2]; // allocation\n for(int i=0;i<intArray.length;i++){\n intArray[i] = 4+i; // initializing the loop\n }\n System.out.println(intArray[1]);\n int multidimArray[][];\n multidimArray = new int[2][2];\n for (int i=0;i<multidimArray.length;i++){\n for (int j=0;j<multidimArray.length;j++){\n multidimArray[i][j] = j+i;\n System.out.println(multidimArray[1][0]);\n }\n }\n String all3[] = new String[]{\"apple\",\"call\",\"ball\",\"doll\"}; // creates an array of string and initializes\n all3[2] = null; // sets the value of array index 2 to null\n for (String val:all3) {\n System.out.println(val);\n }\n String ar[] = {\"app\",\"bpp\"};\n int aw[] = {1,2}; // these 3 lines are single line declarations,allocations and initializations\n int multarra[][] = {{1,2},{3,4,5},{}}; // the length is 3\n System.out.println(multarra.length);\n // int intArray2[] = new int[2]{0, 1}; this line fails as When you combine an array declaration, allocation, and initialization in a single step, you can’t specify the size of the array.\n // The size of the array is calculated by the number of values that are assigned to the array.\n int intArray2[] = new int[]{0, 1}; // this is acceptable\n // a multidimensional array can be asymmetrical. An array can define a different number of columns for each of its rows.\n String multiStrArr[][] = new String[][]{\n {\"A\", \"B\"},\n null,\n {\"Jan\", \"Feb\", \"Mar\"}};\n System.out.println(multiStrArr[2][2]);\n multiStrArr[2][2] = null;\n System.out.println(multiStrArr[2][2]);\n System.out.println(multiStrArr[1]);\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\tint[][] arr=new int[][]{{21,22},{32,25},{25,58}};\r\nfor (int i = 0; i < arr.length; i++) {\r\n\tfor (int j = 0; j < 2; j++) {\r\n\t\tSystem.out.println(arr[i][j]+\" \");\r\n\t\t\r\n\t}\r\n\tSystem.out.println(\" \");\r\n\t\r\n}\r\n//int[][][] arr2=new int[][][] {{{10,12},{30}},{{30,15},{80}}};\r\n//for (int i = 0; i < arr2.length; i++) {\r\n//\tfor (int j = 0; j < 2; j++) {\r\n//\t\tfor (int j2 = 0; j2 < 3; j2++) {\r\n//\t\t\tSystem.out.println(arr2[i][j][j2]+\" \");\r\n//\t\t\t\r\n//\t\t}\r\n//\t\tSystem.out.println(\" \");\r\n//\t\t\r\n//\t}\r\n//\t\r\n//}\r\n\t}",
"public Object[][] get2DArray();",
"public static MySet[] arrangeDataP3P4(Integer[][][] data) {\r\n\t\tdataSet = data;\r\n\t\tMySet p3p4Sol = new Set1P3<Integer>();\r\n\t\t\r\n\t\tfor(int i = 0; i < data[0].length; i++) {\r\n\t\t\tfor(int j = 0; j < data.length; j++) {\r\n\t\t\t\t\r\n\t\t\t\tfor(int k = 0; k<data[j][i].length; k++) {\t\t\t\t\t\r\n\t\t\t\t\t\tp3p4Sol.add(data[j][i][k]);\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t}\t\r\n\t\t\r\n\t\tMySet[] setp3p4 = new MySet[1];\r\n\t\tsetp3p4[0] = p3p4Sol;\r\n\t\t\r\n\t\treturn setp3p4;\r\n\t\t}",
"public static void main(String [] args) {\n\t\tint [][] numbers =new int[2][3];\n\t\t\n\t //enter into array into row index 0 and column index 2\n\t\tnumbers[0][2] =8; \n\t\tnumbers[1][0] =5;\n\t\tnumbers[0][0] =9;\n\t\tnumbers[0][1] =6;\n\t\tnumbers[1][1] =2;\n\t\tnumbers[1][2]= 3;\n\t\t\n\t\n\t\t\n\t\t\n\t\t//2nd way of creating 2D-Array\n\t\tint [][] numbers2 = {{5,6,8},\n\t\t\t\t {9,2,3}\n\t\t };\n\t\t\n\t\tSystem.out.println(\"Let`s get some values from numbers2\");\n\t\t//first get it, then print it\n\t\tint value =numbers2[1][0];\n System.out.println(value);\n \n //get and print in one step\n System.out.println(numbers2[1][1]);\n\t \n \n //1D array is married to for loop\n //2D array is married to nested loop\n \n \n //how many rows?\n int row= numbers2.length;\n \n //how many coloumns iin first row?\n int coloumns=numbers2[0].length;\n \n for(int row=0; row<numbers2.length; row++) {\n \tSystem.out.println(\"I am in the \"+row+\" row\");\n \tfor(int col=0; col<numbers2[row].length; col++) {\n \t\tSystem.out.println(\"I am in the column\" +col);\n \t\tSystem.out.println(\"The value is \"+numbers2[row][col]);\n \t}\n \tSystem.out.println();\n }\n \n\n}",
"public static void main(String... args)\n{\nint[][] b = {\n\t{1,2,3},\n\t{4,5,6},\n\t{7,8,9}\n\t};\n//int[][] c = new int[4][];\n//System.out.println(b[1][0]);\n//int[][][] d = new int[3][3][3];\n//int[][][] e = new int[][][]{\n//\t{{1,2,3},{4,5,6},{7,8,9}},\n//\t{{1,2,3},{4,5,6},{7,8,9}},\n//\t{{1,2,3},{4,5,6},{7,8,9}}\n//\t};\n\nObject[][][] cubbies = new Object[3][0][5];\nint[][] java = new int[2][2];\nint bla ='a';\n\nchar[] c = new char[2];\n//int length = c.size();\nList<String> ob1 = new ArrayList<>();\nob1.size();\n\n//int[][] array3 = {1,2,3},{0};\n\n\t//System.out.println(b[0][0].length);\nOUTER: for(int[] row: b)\n{\n\tINNER: for(int i=0;i<row.length;i++)\n\t{\n\t\tif(row[i]%2==0)\n\t\tcontinue INNER;\n\t\tSystem.out.print(\" \"+row[i]);\n\t}\n\tSystem.out.println();\n}\n}",
"static int[][] getColumns(int[] array){\n int[][] rezultArray = new int[n][n];\n int index = 0;\n for (int i = 0; i < n; i++){\n for (int j = i; j < n * n; j += n){\n rezultArray[i][index++] = array[j];\n }\n index = 0;\n }\n return rezultArray;\n }",
"Matrix(int r,int c)\n {\n this.r=r;\n this.c=c;\n arr=new int[r][c];\n }",
"public Maze3d(int y,int z,int x)\r\n\t{\r\n\t\tthis.maze = new int[y][z][x];\r\n\t\tfor(int i = 0;i<y;i++)\r\n\t\t{\r\n\t\t\tfor(int j = 0;j<z;j++)\r\n\t\t\t{\r\n\t\t\t\tfor(int k = 0;k<x;k++)\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.maze[i][j][k]=1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"private static int[] generateArray(int i, int j) {\n int[] col = new int[j+1];\n for(int k = 0; k <= j; k++)\n {\n col[k] = (i+k)%Algo.x.length;\n } \n return col;\n }",
"@SuppressWarnings(\"unused\")\n\tpublic static void main(String[] args) {\n\n\t\tint[] myArray = new int[2];\n\t\tmyArray[0] = 1;\n\t\tmyArray[1] = 2;\n\n\t\t// 2D array symmetrical\n\n\t\tint[][] array2d = new int[2][4]; // 2 rows and 4 columns\n\t\tint another2dArray[][] = new int[2][4];\n\n\t\tint[] other2dArray[] = new int[2][4]; // Valid 2 dimensional array\n\n\t\t// 2D Asymmetrical array declaration\n\n\t\tString[][] myAsymmetricalAray = new String[][] { \n\t\t\t { \"One\", \"Two\" }, \t\t\t\t // 1st row 2 columns\n\t\t\t\t{ \"Three\", \"Four\", \"Five\" }, \t\t // 2nd row 3 columns\n\t\t\t\t{ \"Six\", \"Seven\", \"Eight\", \"Nine\" }, // 3rd row with 4 columns\n\t\t\t\tnull\n\n\t\t};\n\n\t\t// Para cada primeira dimensão, existe um número variável para a segunda\n\t\t// dimensão\n\t\t// Isso não seria possível iniciando o array da forma fixa tradicional\n\n\t\t// [0] -> 2 colunas\n\t\t// [1] -> 3 colunas\n\t\t// [2] -> 4 colunas\n\n\t\tSystem.out.print(myAsymmetricalAray[0][0] + \" \");\n\t\tSystem.out.print(myAsymmetricalAray[0][1] + \" \");\n\t\tSystem.out.println();\n\n\t\tSystem.out.print(myAsymmetricalAray[1][0] + \" \");\n\t\tSystem.out.print(myAsymmetricalAray[1][1] + \" \");\n\t\tSystem.out.print(myAsymmetricalAray[1][2] + \" \");\n\t\tSystem.out.println();\n\n\t\tSystem.out.print(myAsymmetricalAray[2][0] + \" \");\n\t\tSystem.out.print(myAsymmetricalAray[2][1] + \" \");\n\t\tSystem.out.print(myAsymmetricalAray[2][2] + \" \");\n\t\tSystem.out.print(myAsymmetricalAray[2][2] + \" \");\n\n\t\t// 3D Array\n\t\tint[][][] array3D = new int[3][3][3];\n\t\tint oneMorearray3D[][][] = new int[3][3][3];\n\t\t\n\n\t\tint[] oneMorearray3D2[][] = new int[3][3][3]; // very confusing but legal declaration\n\n\t\t// Initialization\n\t\tint[][][] threeDArray = { \n\t\t\t\t{ { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } }, \t\t\t//Page 1\n\t\t\t\t{ { 10, 11, 12 }, { 13, 14, 15 }, { 16, 17, 18 } }, //Page 2\n\t\t\t\t{ { 19, 20, 21 }, { 22, 23, 24 }, { 25, 26, 27 } } //Page 3\n\t\t\t\t\n\t\t};\n\n\t}",
"public interface Array2D {\n}",
"public static void main(String[] args) {\n\r\nint sale[][][] = new int[][][] {{{1,2,3,4},{5,6,7,8}},{{9,10,11,12,13},{14,15,16,17}}};\r\n\r\nfor(int i=0; i<2; i++)\r\n\tfor(int j=0; j<2; j++)\r\n\t\tfor( int k=0; k<2; k++)\r\n\t\t\tSystem.out.println(sale[i][j][k]);\r\n\r\n\r\n\t}",
"@Test\n public void testCreateTranspose3(){\n double[][] a = new double[4][2];\n for(int i = 0 ; i < a.length ; i++){\n for(int j = 0 ; j < a[0].length ; j++){\n a[i][j] = Math.random();\n }\n }\n double[][] newA = HarderArrayProblems.createTranspose(a);\n checkTranspose(a, newA);\n }",
"public static void main(String[] args) {\n\t\tint[] [] numbers = {{1,2,3}, {10,20,30,40,50},{100,200,300}};\n\t// if we need first conteiner second value its gonna be int [0] [1] (value = 2)\n\t// \tif we need third conteiner third value its gonna be int [2] [2] (value = 300)\n\t\t\n\t\tSystem.out.println(numbers[0][0]);\n\t\t\n\t\tint [] [] nums = new int[3][];\n\t\tSystem.out.println(nums[1][3]);\n\t\t\n\t\tint [] ages = {26,25,50,10};\n\t\t//numbers[0] = new int[4];\n\t\tnums[0]=ages;\n\t\tSystem.out.println(nums[0][2]);\n\t\t\n}",
"public ArrayList<ArrayList<Integer>> threeSum(int[] num) {\n // Start typing your Java solution below\n // DO NOT write main() function\n\n // A three pointer solution\n ArrayList<ArrayList<Integer>> res = new ArrayList<ArrayList<Integer>>();\n if (num.length < 3) return res;\n Arrays.sort(num);\n HashSet hashSet = new HashSet();\n\n for (int i = 0; i < num.length - 2; i++) {\n int leftP = i + 1;\n int rightP = num.length - 1;\n\n while (leftP < rightP) {\n if (num[i] + num[leftP] + num[rightP] > 0) rightP--;\n else if (num[i] + num[leftP] + num[rightP] < 0) leftP++;\n else {\n ArrayList<Integer> temp = new ArrayList<Integer>();\n temp.add(num[i]);\n temp.add(num[leftP]);\n temp.add(num[rightP]);\n if (hashSet.add(temp)) res.add(temp);\n rightP--;\n leftP++;\n }\n }\n }\n return res;\n }",
"@Test\n public void testCreateRowIndices2(){\n int[][] a = new int[4][2];\n a[0][0] = 0;\n a[0][1] = 0;\n a[1][0] = 0;\n a[1][1] = 1;\n a[2][0] = 0;\n a[2][1] = 2;\n a[3][0] = 2;\n a[3][1] = 1;\n\n double[][] input = new double[4][3];\n\n for(int i = 0 ; i < a.length ; i++){\n input[a[i][0]][a[i][1]] = 1;\n }\n\n int[][] myIndices = HarderArrayProblems.createRowIndices(input);\n for(int i = 0 ; i < a.length ; i++){\n assertEquals(a[i][0], myIndices[i][0]);\n assertEquals(a[i][1], myIndices[i][1]);\n }\n\n }",
"public static String[][][] soRandom() {\n Random r = new Random();\n int length = r.nextInt(10) + 1;\n //3D is length\n String[][][] array = new String[length][][];\n //array = new String[length][][];\n //System.out.println(length);\n \n //create 2D's with random length\n for (int i = 0; i < array.length; i++) {\n int length1 = r.nextInt(10) + 1;\n //System.out.println(length1);\n array[i] = new String[length1][];\n\n }\n //create 1D's with random length\n for (int i = 0; i < array.length; i++) {\n for (int j = 0; j < array[i].length; j++) {\n int length2 = r.nextInt(10) + 1;\n //System.out.println(length2);\n array[i][j] = new String[length2];\n\n }\n\n\n }\n\n //return empty randomized 3D array\n return array;\n\n }",
"@Test\n public void testCreateRowIndices1(){\n\n double[][] input = new double[4][3];\n int[][] myIndices = HarderArrayProblems.createRowIndices(input);\n assertEquals(0, myIndices.length);\n assertEquals(0, myIndices[0].length);\n }",
"public static int[][] raggedArray(){\n int n=(int)(Math.random()*11);\n n+=10; \n //this randomly assigns n to between 10 and 20\n int[][] ragged=new int[n][];\n //initialize this array with n first components\n //forloop to assign each inner array a length\n for(int i=0; i<n; i++){\n int m=(int)(Math.random()*11);\n m+=10; //m is between 10 and 20\n ragged[i]=new int[m];\n //another for loop to assign values\n for(int k=0; k<m; k++){\n int val=(int)(Math.random()*1001);\n int sign=(int)(Math.random()*2);\n if(sign==0){\n \n }\n else{\n val*=-1;\n //makes it 50/50 to be negative\n }\n ragged[i][k]=val;\n //assigns value to that spot of array\n }\n }\n return ragged;\n }",
"public static void main(String[] args) {\n\t\tint ma[][] = new int[3][2];\n\t\t//how to print multi-dimentional array\n\t\tSystem.out.println(Arrays.deepToString(ma)); //[ [0, 0], [0, 0], [0, 0] ]\n\t\t\n\t\t//how to assing values to the elements\n\t\tma[0][1] = 2;\n\t\tSystem.out.println(Arrays.deepToString(ma)); //[ [0, 2], [0, 0], [0, 0] ]\n\t\t\n\t\tma[2][0] = 5;\n\t\tSystem.out.println(Arrays.deepToString(ma)); //[ [0, 2], [0, 0], [5, 0] ]\n\t\t\n\t\tma[0][0] = 1;\n\t\tSystem.out.println(Arrays.deepToString(ma)); //[ [1, 2], [0, 0], [5, 0] ]\n\t\t\n\t\tma[1][0] = 3;\n\t\tSystem.out.println(Arrays.deepToString(ma)); //[ [1, 2], [3, 0], [5, 0] ]\n\t\t\n\t\tma[1][1] = 4;\n\t\tSystem.out.println(Arrays.deepToString(ma)); //[ [1, 2], [3, 4], [5, 0] ]\n\t\t\n\t\tma[2][1] = 6;\n\t\tSystem.out.println(Arrays.deepToString(ma)); //[ [1, 2], [3, 0], [5, 6] ]\n\t\t\n\t\tint maa[][] = { {1}, {3, 4}, {5, 6, 7} };\n\t\tSystem.out.println(Arrays.deepToString(maa));\n\t\t\n\t\t//how to print a specific inner arrays on the console\n\t\tSystem.out.println(Arrays.toString(maa[1])); //[3,4]\n\t\t\n\t\t// how to print a specific element in a multidimentioanl array\n\t\tSystem.out.println(maa[2][1]); // 6\n\t\t\n\t\t// How to print all elements one by one on the console in the same line with aa \"*\" at the beginning \n\t\t//of very elemnt\n\t\t\n\t\tfor(int i=0; i<maa.length; i++) {\n\t\t\t\n\t\t\tfor (int k=0; k<maa[i].length; k++) {\n\t\t\t\tSystem.out.print(\"*\" + maa[i][k]); //*1*3*4*5*6*7\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\t//How to find the product of all elements in the array \"maa\"\n\n\t\tint product = 1; // for addition begin with 1\n\t\tfor(int i=0; i<maa.length; i++) {\n\t\t\tfor(int k=0; k<maa[i].length; k++) {\n\t\t\t\tproduct = product * maa[i][k];\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"The product of all elements: \" + product); //The product of all elements: 2520\n\t\t\n\t\t// How to find the sum of all elements (Homework)\n\t\t\n\t\tint sum = 0; // for sum begin with 0\n\t\tfor(int i=0; i<maa.length; i++) {\n\t\t\tfor(int k=0; k<maa[i].length; k++) {\n\t\t\t\tsum = sum + maa[i][k];\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"The sum of all elements: \" + sum); //The sum of all elements: 26\n\t\t\n\n\t\t//yeni bi array yaz otomatik\n\t\tint count=1;\n\t\t\tfor(int i=0;i<3;i++) {\n\t\t\tfor(int k=0;k<2;k++) {\n\t\t\t\tma[i][k]=count;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(Arrays.deepToString(ma)); //[[1, 2], [3, 4], [5, 6]]\n\t\n\t\t \n\t}",
"public static void createArrays() {\r\n\t\tRandom rand = new Random();\r\n\t\tfor (int i = 0; i < N; i++) {\r\n\t\t\tint size = rand.nextInt(5) + 5;\r\n\t\t\tTOTAL += size;\r\n\t\t\tArrayList<Integer> numList = new ArrayList<>();\r\n\t\t\tfor (int j = 0; j < size; j++) {\r\n\t\t\t\tint value = rand.nextInt(1000) + 1;\r\n\t\t\t\tnumList.add(value);\r\n\t\t\t}\r\n\t\t\tCollections.sort(numList);\r\n\t\t\tarrayMap.put(i + 1, numList);\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n int[][] array=new int[3][5];\n int[][] array1=new int[3][];\n int[][] array3=new int[][]{};\n int[] a[]={};\n\n int[][] array4=new int[][] {\n {1,2,3},\n {4,5,6,7,9,10},\n {9,10,11,15}\n };\n System.out.println(array4.length);\n System.out.println(array4[0].length);\n System.out.println(array4[1].length);\n System.out.println(array4[0][1]);\n System.out.println(array4[2][3]);\n\n int sum=0;\n for (int i=0; i<array4.length; i++) {\n for (int j=0; j<array4[i].length; j++) {\n sum=sum+array4[i][j];\n System.out.print(array4[i][j]+\" \");\n }\n }\n System.out.println();\n System.out.println(\"Sum of all numbers is: \" +sum);\n\n }",
"public static void arrayAlgoritm(List<int[]> ints) {\n int size=1;\n for (int[] array: ints) {\n size *= array.length;\n }\n\n // Creating a list of indexes. Every index corresponds\n // to a single array\n List<Index> indexList = new ArrayList<>( );\n ints.forEach( array -> indexList.add( new Index( array ) ) );\n\n int[] result;\n List<int[]> finalArrays = new ArrayList<>( );\n\n boolean flag = true;\n\n while (flag) {\n // Creating an array by taking one number from each\n result = new int[ints.size()];\n for (int i=0; i<ints.size(); i++) {\n result[i] = ints.get( i )[indexList.get( i ).getCurrentIndex()];\n }\n\n finalArrays.add( result );\n incrementIndexes(indexList);\n\n // If the size has been reached, this means that all\n // the possible combinations have been extracted\n if (finalArrays.size() == size) flag = false;\n }\n System.out.println(\"Final list size = \" + finalArrays.size());\n finalArrays.forEach( array -> {\n for (int i: array) {\n System.out.print(i + \", \");\n }\n System.out.println(\"==============================\");\n } );\n\n\n }",
"public static void main(String[] args) {\r\n\t\t// creating 2D array\r\n//\t\tchar arrayCharacter[][] = new char[5][2];\r\n//\t\t// inserting values in it\r\n//\t\t//1st row\r\n//\t\tarrayCharacter[0][0] = 'a';\r\n//\t\tarrayCharacter[0][1] = 'b';\r\n//\t\t//2nd row\r\n//\t\tarrayCharacter[1][0] = 'c';\r\n//\t\tarrayCharacter[1][1] = 'd';\r\n//\t\t//3rd row\r\n//\t\tarrayCharacter[2][0] = 'e';\r\n//\t\tarrayCharacter[2][1] = 'f';\r\n//\t\t//4th row\r\n//\t\tarrayCharacter[3][0] = 'g';\r\n//\t\tarrayCharacter[3][1] = 'h';\r\n//\t\t//5th row\r\n//\t\tarrayCharacter[4][0] = 'i';\r\n//\t\tarrayCharacter[5][1] = 'j';\r\n\t\t\r\n\t\tchar arrayCharacter[][] = {{'a','b'},{'c','d'},{'e','f'},{'g','h'},{'i','j'}};\r\n\t\t\r\n//\t\tSystem.out.println(arrayCharacter[3][1]);\r\n//\t\tSystem.out.println(arrayCharacter[0][0]+\" \"+arrayCharacter[4][1]);\r\n\t\t\r\n//\t\tSystem.out.println(\"Number of rows: \"+arrayCharacter.length); // number of rows\r\n//\t\tSystem.out.println(\"Number of column: \"+arrayCharacter[0].length); // number of columns\r\n\t\t\r\n\t\t// traversing into 2D array -> using 2 for loops: 1st for loop for row & 2nd for loop or column\r\n//\t\tfor(int i=0;i<arrayCharacter.length; i++) { // traverses through rows\r\n//\t\t\tfor(int j=0; j<arrayCharacter[i].length; j++) { // traverses through column\r\n//\t\t\t\tSystem.out.print(arrayCharacter[i][j]+\"|\");\r\n//\t\t\t}\r\n//\t\t}\r\n\t\t\r\n\r\n\t\tint arrayInt[][] = {{1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15}};\r\n\t\t\r\n\t\tSystem.out.println(\"Number of rows: \"+arrayInt.length); // number of rows\r\n\t\tSystem.out.println(\"Number of column: \"+arrayInt[0].length); // number of columns\r\n\t\t\r\n\t\tfor(int i=0;i<arrayInt.length; i++) { // traverses through rows\r\n\t\t\tfor(int j=0; j<arrayInt[i].length; j++) { // traverses through column\r\n\t\t\t\tSystem.out.print(arrayInt[i][j]+\"|\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// Assignment:\r\n//\t\t\t1. 1D array => FirstName, LastName, DOB, Age then traverse through using both for & while loop to extract data\r\n//\t\t\t2. 2D array => Customer Name, email address, phone number then traverse through it using for loop to extract data -> try while as well\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\tint[][] arr = new int[2][3];\n\t\tint tmp=10;\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tarr[i][j]=tmp;\n\t\t\t\ttmp+=10;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tfor (int j = 0; j < arr[0].length; j++) {\n\t\t\t\tSystem.out.println(arr[i][j]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"=================\");\n\t\t\n\t\t//동적 배열 가능\n\t\tint[][] arr2=new int[3][];\n\t\tarr2[0]=new int[5];\n\t\tarr2[0]=new int[10];\n\t\t\n\t}",
"public static void main(String[] args) {\n int [][] flats; // A 2-D Array\n flats = new int[3][3];\n flats[0][0] = 101; flats[1][0] = 201; flats[2][0] = 301;\n flats[0][1] = 102; flats[1][1] = 202; flats[2][1] = 302;\n flats[0][2] = 103; flats[1][2] = 203; flats[2][2] = 303;\n\n\n //Displaying the Array (for loop)\n System.out.println(\"Printing a 2-D array using for loop\");\n for (int i=0; i<flats.length; i++){\n for (int j=0; j<flats[i].length; j++) {\n System.out.print(flats[i][j]);\n System.out.print(\" \");\n }\n System.out.print(\"\\n\");\n }\n }",
"public static void main(String[] args) {\n\t\tint[][] array = new int[5][6];\r\n\t\tint[] x = {1,2};array[0] = x;\r\n\t\tSystem.out.println(\"array[0][1] is \" + array[0][1]);\r\n\t\tSystem.out.println(Arrays.deepToString(array));\r\n\t\t\r\n\t\tint[][] arr = {{1,2}, {3,4}, {5,6}};\r\n\t\tfor (int i = arr.length - 1; i >= 0; i--) \r\n\t\t{for (int j = arr[i].length - 1; j >= 0; j--)\r\n\t\t\tSystem.out.print(arr[i][j] + \" \");\r\n\t\tSystem.out.println();\r\n\t\t}\r\n\t\tint[][] array1 = {{1,2}, {3,4}, {5,6}};\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < array1.length; i++)\r\n\t\t\tsum += array1[i][0];\r\n\t\tSystem.out.println(sum);\r\n\t\r\n\tint [][]matrix = new int [10] [10];\r\n\t\r\n\tfor (int row = 0; row < matrix.length; row++) {\r\n\t\tfor (int column = 0; column < matrix[row].length; column++) {\r\n\t\tmatrix[row][column] = (int)(Math.random() * 100); }}\r\n\tSystem.out.println(Arrays.deepToString(matrix));\r\n\r\n\tfor (int i = 0; i < matrix.length; i++) {\r\n\t\tfor (int j = 0; j < matrix[i].length; j++) {\r\n\t\t\tint i1 = (int)(Math.random() * matrix.length);\r\n\t\t\tint j1 = (int)(Math.random() * matrix[i].length);\r\n\t\t\tint temp = matrix[i][j];\r\n\t\t\tmatrix[i][j] = matrix[i1][j1];\r\n\t\t\tmatrix[i1][j1] = temp;\r\n\t\t}\r\n\t}System.out.println(Arrays.deepToString(matrix));\r\n\t}",
"int[] shape(){\n int[] dimensions = new int[2];\n dimensions[0] = this.rows;\n dimensions[1] = this.cols;\n return dimensions;\n }",
"public static void main(String[] args) {\n\t\t\n\t\tint[] arr1D = {1,2,3};\n\t\t\n\t//\t2 dimensional array: array that contains multiple 1 dimensional arrays\n\t\t\n\t\tint[][] arr2D = { {1,2,3} , {4,5,6} };\n\t\t\n\t\t\n\t\tString[] arr = {\"A\" ,\"B\"};\n\t\t\n\t\t//\t\t\t\t\t\t 0 1 0 1 2\n\t\tString[][] str2D = { {\"A\" ,\"B\"} , {\"C\" ,\"D\",\"E\"} };\n\t\t//\t\t\t\t\t\t\t 0 1\n\t\t\n// [represents the index number of 1 dimensional arrays ][ represents the index number of the values]\n\t\t\n\t\t\t\t// print A:\n\t\t\t\tSystem.out.println( str2D[0][0] );\n\t\t\t\t\n\t\t\t\t// print D:\n\t\t\t\tSystem.out.println( str2D[1][1] );\n\t\t\t\t\n\t\t\t\t//print E:\n\t\t\t\tSystem.out.println(str2D[1][2]);\n\t\t\n\t\t\t\t// print [A ,B]:\n\t\t\t\tSystem.out.println( str2D[0] );\n\t\t\t\tSystem.out.println( Arrays.toString( str2D[0] ) );\n\t\t\t\t\n\t\t\t\t// print [C, D, E]:\n\t\t\t\tSystem.out.println( str2D[1] );\n\t\t\t\tSystem.out.println( Arrays.toString( str2D[1] ));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//print [[A,B], [C, D, E]]\n\t\t\t\tSystem.out.println( Arrays.toString(str2D) );\n\t\t\t\tSystem.out.println( Arrays.deepToString( str2D ) );\n\t\n\t\t\t// Arrays.deepToString(variableName ): converts multi-Dimensional Arrays to STring value\n\t\t\t\n\t\t\t\t\n\t\t\t// \t 0 1 0 1 0 1 \n\t\t\tint[][] Numbers2D = {\t{1,2} , {3, 4} , {5, 6, 7, 8, 9 , 10} };\n\t\t\t//\t\t\t\t\t 0 1 2\n\t\t\t\t\n\t\t\t\t// print 6:\n\t\t\tSystem.out.println( Numbers2D[2][1] );\n\t\t\t\n\t\t\t\t// print 10:\n\t\t\tSystem.out.println( Numbers2D[2][5] );\n\t\t\t\n\t\t\t\t// print {5, 6, 7, 8, 9 , 10}:\n\t\t\tSystem.out.println( Numbers2D[2] );\n\t\t\tSystem.out.println( Arrays.toString( Numbers2D[2] ) );\n\t\t\t\n\t\t\t\t// print the entire 2D array:\n\t\t\tSystem.out.println(Arrays.deepToString( Numbers2D ));\n\t\t\t\t\n\t\t\t\t\n\t\t// 3 dimensional array contains multiple 2 dimensional arrays\n\t\tint[][] Array2D = { {1,2}, {3,4} };\n\t\t//\t\t\t\t\t\t\t 0 1 0 1\n\t\tint[][][] Array3D = { { {1,2}, {3,4} } , { {5, 6}, {7, 8} } };\n// 0 1\t\n//[index numbers of 2D array][ index number of 1D array] [ index number of value]\n\n\t\t\t//print 8:\n\t\tSystem.out.println(Array3D[1][1][1]);\n\t\t\n\t\t// print {5, 6}:\n\t\tSystem.out.println( Array3D[1][0] );\n\t\tSystem.out.println( Arrays.toString( Array3D[1][0] ) );\n\t\t\n\t\t// print { {5, 6}, {7, 8} }:\n\t\tSystem.out.println( Array3D[1] );\n\t\tSystem.out.println( Arrays.toString( Array3D[1] ) );\n\t\tSystem.out.println( Arrays.deepToString( Array3D[1] ));\n\t\t\n\t\t\n\t\t// print the entire 3d array:\n\t\t\tSystem.out.println(Arrays.deepToString( Array3D ));\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\tint[][][] numbers3D = { { {1,2} } , { {3,4} } };\t\n\t\t\n\t\t\n\t\t\n\t//\t4 dimensional array contains multiple 3 dimensional arrays\n\tint[][][][] numbers4D = { { { {1,2} } , { {3,4} } } , { { {1,2} } , { {3,4} } } };\t\n\t\n\t\n\t\n\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\r\nint arr[][]= {{1,2,3},{4,5,6},{7,8,9}};\r\nfor(int row=0;row<3;row++)\t{\t\r\n\tfor(int col=0;col<3;col++) {\r\n\t\tSystem.out.print(arr[row][col]+\" \");}\r\nSystem.out.println();\r\n}\r\n\t}",
"public static void main(String args[]){\n int int2DArr[][] = new int[4][5];\n int k=0;\n for (int i=0;i<4;i++) {\n for (int j=0;j<5;j++){\n int2DArr[i][j] = k++;\n }\n }\n for (int i=0;i<4;i++) {\n for (int j=0;j<5;j++){\n System.out.print(int2DArr[i][j] + \" \");\n }\n System.out.println();\n }\n }",
"private static void fillArray(int[][] array) {\n for (int i = 0; i < array.length; i++)\n for (int j = 0; j < array[i].length; j++)\n array[i][j] = i + j;\n\n // The following lines do nothing\n array = new int[1][1];\n array[0][0] = 239;\n }",
"private void declareArrays() {\n int iNumTimesteps = m_oLegend.getNumberOfTimesteps(),\n i, j, k;\n \n //Create arrays to hold raw data.\n mp_fLiveTreeVolumeTotals = new double[m_iNumSpecies][iNumTimesteps + 1][m_iNumSizeClasses];\n mp_fSnagVolumeTotals = new double[m_iNumSpecies][iNumTimesteps + 1][m_iNumSizeClasses]; \n mp_iLiveTreeCounts = new long[m_iNumSpecies][iNumTimesteps + 1][m_iNumSizeClasses];\n mp_iSnagCounts = new long[m_iNumSpecies][iNumTimesteps + 1][m_iNumSizeClasses];\n mp_fLiveTreeDBHTotal = new double[m_iNumSpecies][iNumTimesteps + 1];\n mp_fSnagDBHTotal = new double[m_iNumSpecies][iNumTimesteps + 1];\n mp_fTallestLiveTrees = new float[m_iNumSpecies+1][iNumTimesteps + 1][10];\n mp_fTallestSnags = new float[m_iNumSpecies+1][iNumTimesteps + 1][10];\n \n //Initialize all values with 0s\n for (i = 0; i < mp_fTallestLiveTrees.length; i++) {\n for (j = 0; j < mp_fTallestLiveTrees[i].length; j++) {\n for (k = 0; k < mp_fTallestLiveTrees[i][j].length; k++) {\n mp_fTallestLiveTrees[i][j][k] = 0;\n mp_fTallestSnags[i][j][k] = 0;\n }\n }\n }\n \n for (i = 0; i < m_iNumSpecies; i++) {\n for (j = 0; j <= iNumTimesteps; j++) {\n mp_fLiveTreeDBHTotal[i][j] = 0;\n mp_fSnagDBHTotal[i][j] = 0;\n for (k = 0; k < m_iNumSizeClasses; k++) {\n mp_iLiveTreeCounts[i][j][k] = 0;\n mp_iSnagCounts[i][j][k] = 0;\n mp_fLiveTreeVolumeTotals[i][j][k] = 0;\n mp_fSnagVolumeTotals[i][j][k] = 0;\n }\n }\n }\n }",
"private int[][] convertToTwnDimensionMatrix(int[] oneDimensionMatrix, int varNum)\r\n\t{\r\n\t\t// oneDimensionMatrix: the one dimension matrix that you want to convert:\r\n\t\t// matrixSize: the size (equals to the row or the column length) of the two dimension matrix of the result\r\n\t\tint[][] result = new int[varNum][varNum];\r\n\t\t\r\n\t\tfor (int m = 0; m < varNum; m++)\r\n\t\t{\r\n\t\t\tfor (int n = 0; n < varNum; n++)\r\n\t\t\t{\r\n\t\t\t\tresult[m][n] = oneDimensionMatrix[m*varNum + n];\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t return result;\r\n\t}",
"public static void sort(int mat3d[][]) {\n \n }",
"@Test\r\n\tvoid deepArrayCopyElementsMultiDim() {\r\n\t\tInteger[][] intArr = new Integer[10][];\r\n\t\tfor (int i = 0; i < 10; i++) {\r\n\t\t\tintArr[i] = new Integer[4];\r\n\t\t\tfor (int j = 0; j < 4; j++) {\r\n\t\t\t\tintArr[i][j] = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tInteger[][] clone = ArrayUtil.deepArrayCopy(intArr);\r\n\t\tassertTrue(Arrays.deepEquals(intArr, clone));\r\n\t}",
"public Matrix3D(double[] d1) {\n super(3,3);\n int k = -1;\n for (int i=0 ; i<3 ; i++) { // loop over rows\n for (int j=0 ; j<3 ; j++) { // loop over columns\n k++;\n set(i,j,d1[k]); // d[i][j] = d1[k];\n }\n }\n }",
"public Maze3d(int[][][] m)\r\n\t{\r\n\t\tthis.maze = m;\r\n\t}",
"Array createArray();",
"public static int[][][] read(String filename) {\n\n\t\t// Calling the right file\n\t\tStdIn.setInput(filename); \n\t\t// This is for ״P3״\n\t\tStdIn.readString(); \n\t\t// The number of columns from file\n\t\tint columns = StdIn.readInt(); \n\t\t// The number of row from file\n\t\tint rows = StdIn.readInt(); \n\t\t // Creating the 3 dim matrix\n\t\tint[][][] readMatrix = new int[rows][columns][3];\n\t\tStdIn.readInt(); // This is the number of colors\n\n\t\tfor (int i = 0; i < rows; i++) {\n\t\t\tfor (int j = 0; j < columns; j++) {\n\t\t\t\tfor (int k = 0; k < 3; k++) {\n\t\t\t\t\t// Getting the value in a 3d matrix\n\t\t\t\t\treadMatrix[i][j][k] = StdIn.readInt(); \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn readMatrix;\n\t}",
"public static void main(String[] args) { \n\t\t\n\t\tint[] numbers = new int[2] ; \n\t\t\n\t\tint[] nums1 = {1,45,32,10} ; \n\t\tint[] nums2 = {2,5,31} ; \n\t\t\n\t\tint[] numsOfNum[] = new int[2][];\n\t\tSystem.out.println( Arrays.deepToString(numsOfNum) );\n\t\t\n\t\tnumsOfNum[0] = nums1 ; \n\t\tnumsOfNum[1] = nums2 ; \n\t\t\n\t\tSystem.out.println( Arrays.deepToString(numsOfNum) );\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\n for(int i=0; i<3;i++){\n // arr[i] = new Array1(i+3,i*2);\n //arr[0] = arr.getArray(3,5);\n\n }\n\n }",
"public int[] threeLuckyNumbers() {\n\t\tint[] intArray = new int[3];\n\t\tRandom rand = new Random(); \n\t\tint rand_int1 = rand.nextInt(101);\n\t\tint rand_int2 = rand.nextInt(101);\n\t\tint rand_int3 = rand.nextInt(101);\n\t\tintArray[0] = rand_int1;\n\t\tintArray[1] = rand_int2;\n\t\tintArray[2] = rand_int3;\n\t\t\n\t\t\n\t\t\n\t\treturn intArray;\n\t}",
"public Card[][] createArray() {\n //Reset the random number array\n numsArray = new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};\n\n //Initialize a 4x4 array of cards and an integer to hold the random number\n Card[][] cArr = new Card[4][4];\n int randNum;\n\n //Iterate through the array of cards and assign each card a random number\n //and location in the surface view\n for (int i = 0; i < 4; i++) {\n for (int j = 0; j < 4; j++) {\n randNum = randNums();\n cArr[i][j] = new Card((j * 350) + 250,(i * 350) + 20, randNum);\n }\n }\n\n //Return the 2D array of cards\n return cArr;\n }",
"public static void initTwoD(int[][] array) {\n System.out.println(\"Entering random numbers in matrix of \" + array.length + \" rows and \" + array[0].length + \" columns: \");\n for (int row = 0; row < array.length; row++) {\n for (int column = 0; column < array[0].length; column++) {\n array[row][column] = (int) (Math.random() * 100);\n }\n }\n\n }",
"public int[][] initMatrix(int n)\n {\n\t// create an empty 2d array and return it! Simple stuff here.\n\t int[][] retMatrix = new int[n][n];\n\t return retMatrix;\n }",
"private void makeArrays()\n\t{\n\t\tfor (String key : sub.keySet())\n\t\t\tsub.put(key, ((List<String>) sub.get(key)).toArray(s0));\n\t\tfor (String key : attrs.keySet())\n\t\t\tattrs.put(key, ((List<String>) attrs.get(key)).toArray(s0));\n\t\tfor (String key : defs.keySet())\n\t\t\tdefs.put(key, ((List<String>) defs.get(key)).toArray(s0));\n\t\tfor (String key : smodes.keySet())\n\t\t{\n\t\t\tList<Integer> list = (List<Integer>) smodes.get(key);\n\t\t\tint[] array = new int[list.size()];\n\t\t\tfor (int i = 0; i < list.size(); i++)\n\t\t\t\tarray[i] = list.get(i);\n\t\t\tsmodes.put(key, array);\n\t\t}\n\t\tfor (String key : amodes.keySet())\n\t\t{\n\t\t\tList<Integer> list = (List<Integer>) amodes.get(key);\n\t\t\tint[] array = new int[list.size()];\n\t\t\tfor (int i = 0; i < list.size(); i++)\n\t\t\t\tarray[i] = list.get(i);\n\t\t\tamodes.put(key, array);\n\t\t}\n\t}",
"public void displayData(int[][] arr);",
"public abstract int[] toIntArray();",
"public static native PointerByReference OpenMM_3D_DoubleArray_create(int size1, int size2, int size3);",
"public Matrice(int dim){\n\t\tnr=dim;\n\t\tnc=nr;\n\t\tmat = new int[nr][nc];\n\t}",
"private static void iterationArr(int n) {\n int[][] ints = new int[n][n];\n ints[0][0] = 1;\n for (int i = 0; i < n - 1; i++) {\n ints[i + 1][0] = ints[i][0] + i + 1;\n }\n for (int i = 1; i < n; i++) {//表列\n for (int j = 0; j < n - 1; j++) {//表行\n ints[j][i] = ints[j + 1][i - 1] + 1;\n }\n }\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n - i; j++) {\n System.out.printf(ints[i][j] + \"\\t\");\n }\n System.out.println();\n }\n }",
"int[][] multiple(int size) {\n\t\t size++; // наверняка пользователь захочет получить таблицу до того номера ВКЛЮЧИТЕЛЬНО, который укажет во входных параметрах\n\t\t int[][] mult = new int[size][size]; \n\t\t for (int i = 0; i < size; i++) {\n\t\t\t for (int j = 0; j < size; j++) {\n\t\t\t\t mult[i][j] = i * j;\n\t\t\t }\n\t\t }\n\t\t return mult;\n\t }",
"public static void main(String[] args) {\n\t\t\n\t\tint [][] numbers = {{2,3,4},{6,7,8}};\n\t\tSystem.out.println(Arrays.deepToString(numbers));\n\t\t//multidimensional arrays\n\n\t}",
"public static void main(String[] args) {\n int twoD[][] = new int [4][];\r\n twoD[0] = new int[1];\r\n twoD[1] = new int[2];\r\n twoD[2] = new int[3];\r\n twoD[3] = new int[4];\r\n System.out.println(\"2차원 배열에서 형의길이는\" + twoD.length);\r\n System.out.println(\"첫 번쨰 형의 요소 수는\" + twoD[0].length);\r\n System.out.println(\"첫 번쨰 형의 요소 수는\" + twoD[1].length);\r\n System.out.println(\"첫 번쨰 형의 요소 수는\" + twoD[2].length);\r\n System.out.println(\"첫 번쨰 형의 요소 수는\" + twoD[3].length);\r\n \r\n int i,j,k = 0;\r\n for( i=0; i < twoD.length; i++ )\r\n \tfor(j=0; j< twoD[0].length; j ++)\r\n \t{\r\n \t\ttwoD[i][j] = k;\r\n \t\tk++;\r\n \t\t}\r\n for(i=0; i < twoD.length; i++ )\r\n {\r\n \tfor(j=0; j < twoD[i].length; j++)\r\n \t\tSystem.out.println(twoD[i][j] + \" \");\r\n \tSystem.out.println();\r\n }\r\n\t}",
"public static void main(String[] args) {\n int[] someInts2 = new int[3];\n// int[] someInts3 = new int[1, 2, 3,];\n int[] someInts4 = {1, 2, 3,};\n\n// someInts1 = {1, 2, 3};\n someInts2[0] = 1;\n// System.out.println(someInts2[0]);\n// System.out.println(someInts2[1]);\n// int aInt = someInts4[2];\n// System.out.println(aInt);\n System.out.println(someInts4.length);\n\n }",
"public static void RepeatedElementsRow(int[][] array) {\n\n }",
"public native long[][] __long2dArrayMethod( long __swiftObject, long[][] arg );",
"public List<List<Integer>> threeSum(int[] nums) {\r\n\r\n\t\treturn null;\r\n\t}",
"public static List<List<Integer>> threeSum(int[] arr) {\n Set<List<Integer>> solutionSet = new HashSet<>();\n\n if (arr == null || arr.length < 3) {\n return new ArrayList<>(solutionSet);\n }\n\n Arrays.sort(arr);\n\n for (int i = 0; i < arr.length - 2; i++) {\n int j = i+1;\n int k = arr.length - 1;\n\n while (j < k) {\n int threeSum = arr[i] + arr[j] + arr[k];\n if (threeSum == 0) {\n List<Integer> solution = new ArrayList<>();\n solution.add(arr[i]);\n solution.add(arr[j]);\n solution.add(arr[k]);\n solutionSet.add(solution);\n\n j++;\n k--;\n\n while (j<k && arr[j] == arr[j+1]) {\n j++;\n }\n while (j<k && arr[k] == arr[k-1]) {\n k--;\n }\n } else if (threeSum < 0) {\n j++;\n } else {\n k--;\n }\n }\n }\n return new ArrayList<>(solutionSet);\n }",
"private static Set<List<Integer>> createNtuples(Dataset dataset) {\r\n\t\tList<Set<Integer>> ntupleList = new ArrayList<>();\r\n\r\n\t\tfor (Integer dimensionSize : dataset.getSize()) {\r\n\t\t\tSet<Integer> set = new TreeSet<>();\r\n\t\t\tfor (Integer i = 0; i < dimensionSize; i++) {\r\n\t\t\t\tset.add(i);\r\n\t\t\t}\r\n\t\t\tntupleList.add(set);\r\n\t\t}\r\n\r\n\t\treturn Sets.cartesianProduct(ntupleList);\r\n\t}",
"public IntArraySpliterator(int[] param1ArrayOfint, int param1Int1, int param1Int2, int param1Int3) {\n/* 1011 */ this.array = param1ArrayOfint;\n/* 1012 */ this.index = param1Int1;\n/* 1013 */ this.fence = param1Int2;\n/* 1014 */ this.characteristics = param1Int3 | 0x40 | 0x4000;\n/* */ }",
"public static int[] array(int[] arr1, int[] arr2) {\n\n int[] arr3 = new int[arr1.length + arr2.length]; //now the length = 5\n int j = 0;//will represent indexes of 3rd array\n\n for (int each : arr1) { //1, 2, 3\n arr3[j++] = each;\n }\n\n for (int each : arr2) {\n arr3[j++] = each;\n }\n\n return arr3;\n }",
"public int[][] arrayToMatriz(int vec[]) {\r\n\t\tint matriz[][] = new int[3][3];\r\n\t\tint cont = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < matriz.length; i++) {\r\n\t\t\tfor (int j = 0; j < matriz.length; j++) {\r\n\t\t\t\tmatriz[i][j] = vec[cont];\r\n\t\t\t\tcont++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn matriz;\r\n\t}",
"private void init() {\r\n\tlocals = new float[maxpoints * 3];\r\n\ti = new float[] {1, 0, 0};\r\n\tj = new float[] {0, 1, 0};\r\n\tk = new float[] {0, 0, 1};\r\n\ti_ = new float[] {1, 0, 0};\r\n\tk_ = new float[] {0, 0, 1};\r\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 static void main(String[] args) {\n int[] arr = {1, 2, 3};\n int[] arr2 = {1, 2, 3, 1};\n int[] arr3 = {1, 2, 3};\n }",
"private static Integer[][] createRandomStart(Integer dimension) {\n Integer[][] startmatrix = new Integer[dimension][dimension];\n for (int i = 0; i < dimension; i++) {\n for (int j = 0; j < dimension; j++) {\n startmatrix[i][j] = (int)(Math.random() * 2);\n }\n }\n return startmatrix;\n }",
"private static short[][] tempArray(short[] arr, int N) {\n short[][] result = new short[N][N];\n int k = 0;\n for (int i = 0; i < N; i++)\n for (int j = 0; j < N; j++)\n result[i][j] = arr[k++];\n return result;\n }",
"public static IntegerVarArray make(int[] buffer) {\n\t\treturn new IntegerVarArray(buffer);\n\t}",
"public Matrix(int[][] array)\n {\n matrix = array;\n }",
"public static IntegerVarArray make(int count) {\n\t\treturn new IntegerVarArray(count);\n\t}",
"public static void main(String[] args) {\n// In in = new In(args[0]);\n// int n = in.readInt();\n// int[][] blocks = new int[n][n];\n\n }",
"public static void main(String[] args) {\n\t\tint a = 4; // single variable\n\t\tint b[] = new int[5]; // declares an array and allocate memory for the values: Method 1\n\t\tb[0] = 1;\n\t\tb[1] = 2;\n\t\tb[2] = 3;\n\t\tb[3] = 4;\n\t\tb[4] = 5;\n\t\t\n\t\tfor(int i = 0; i <b.length; i++) {\n\t\t\tSystem.out.print(b[i]);\n\t\t}\n\t\tSystem.out.println();\n\t\tint c[] = {4,2,3,4,5};\n\t\tfor(int i = 0; i <c.length; i++) {\n\t\t\tSystem.out.print(c[i]);\n\t\t}\n\t\tSystem.out.println();\n\t\tint m[][] = new int[2][2];\n\t\tm[0][0] = 2;\n\t\tm[0][1]= 3;\n\t\tm[1][0] = 4;\n\t\tm[1][1] = 5;\n\t\t\n\t\tSystem.out.println(m[1][0] + \"*\");\n\t\t\n\t\tfor(int i = 0; i<m.length; i++) {\n\t\t\tfor(int j = 0; j<m.length; j++) {\n\t\t\t\tSystem.out.println(m[i][j]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\tint n[][] = {{2,3}, {4,5}, {5,6}};\n\t\tfor(int i = 0; i<3; i++) {\n\t\t\tfor(int j = 0; j<2; j++) {\n\t\t\t\tSystem.out.print(n[i][j] + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\n\t}",
"public static void main(String[] args) {\n\t\tint[] marks = {10,20,30,60,40,50,70}; // element = 7\n\t\tint[] marks2 = new int[10]; \n\t\tmarks2[0] = 10;\n\t\tmarks2[1] = 10;\n\t\tmarks2[2] = 10;\n\t\tmarks2[3] = 10;\n\t\tmarks2[4] = 10;\n\t\tmarks2[5] = 10;\n\t\tmarks2[6] = 10;\n\t\tmarks2[7] = 10;\n\t\tmarks2[8] = 10;\n\t\tmarks2[9] = 10;\n\t\t\n\t\t// array works on index concept.\n\t\t// 7 - length of this array\n\t\t// highest index - 6\n\t\t// System.out.println(marks.length); // size = 7\n\t\t\n//\t\tfor(int i = 0; i < marks2.length; i++) {\n//\t\t\tSystem.out.println(marks2[i]);\n//\t\t}\n\t\t\n\t\tfor(int i = (marks.length-1) ; i >= 0 ;i--) {\n\t\t\tSystem.out.println(marks[i]);\n\t\t}\n\t\t\n\t\t// advantages\n\t\t// keep the collection\n\t\t// fastest available collection in any object oriented language\n\t\t// when we create array - we have to give size of that array \n\t\t// 10 of int(4) = 10*4 = 40 byte (JVM )\n\t\t\n\t\t// disavantage \n\t\t// array - we cannot chnage the size \n\t\t\n\t\t\n\t\t// multidimentional - 1D array\n\t\t// 2D array - 2 dimentions\n\t\tint[][] matrix = {{10,20},{20,30}}; // directly values \n\t\t\n\t\tint[][] matrix2 = new int[2][2]; // directly values\n\t\tmatrix2[0][0] = 10;\n\t\tmatrix2[0][1] = 20;\n\t\tmatrix2[1][0] = 20;\n\t\tmatrix2[1][1] = 30;\n\t\t\n\t\tint[][] matrix1 = new int[2][6]; // size\n\t\t// student 1 marks\n\t\tmatrix1[0][0] = 10;\n\t\tmatrix1[0][1] = 20;\n\t\tmatrix1[0][2] = 20;\n\t\tmatrix1[0][3] = 20;\n\t\tmatrix1[0][4] = 20;\n\t\tmatrix1[0][5] = 20;\n\t\t// student 2 marks\n\t\tmatrix1[1][0] = 10;\n\t\tmatrix1[1][1] = 20;\n\t\tmatrix1[1][2] = 20;\n\t\tmatrix1[1][3] = 20;\n\t\tmatrix1[1][4] = 20;\n\t\tmatrix1[1][5] = 20;\n\t\t\n\t\t\n\t\t\n\t}",
"private static int[] createArray(int n) {\n\t \tint[] array = new int[n];\n\t \tfor(int i=0; i<n; i++){\n\t \t\tarray[i] = (int)(Math.random()*10);\n\t \t}\n\t\t\treturn array;\n\t\t}",
"public IntArr_byteArrArr(int[] integers, byte[][] byteArrArr) {\n\t\tsuper();\n\t\tassert integers.length == byteArrArr.length;\n\t\tint byteLength=byteArrArr[0].length;\n\t\tfor(byte[] onebyteArr:byteArrArr){//each element in byteArrArr should be equal length!\n\t\t\tassert byteLength == onebyteArr.length;\n\t\t}\n\t\tthis.integers = integers;\n\t\tthis.byteArrArr = byteArrArr;\n\t}",
"@Override\n public void makeArray(Grid myGrid) {\n allShapes = new Triangle[myGrid.gridRows()][myGrid.gridColumns()];\n for (int r = 0; r < myGrid.gridRows(); r++) {\n for (int c = 0; c < myGrid.gridColumns(); c++) {\n Triangle mynewPixel = new Triangle(r, c, triangleBase(), cellHeight());\n allShapes[r][c] = mynewPixel;\n }\n }\n }",
"private void setupTimesTablesArray() {\n for (int i=0; i < ARRAY_SIZE; ++i)\n for (int j=0; j < ARRAY_SIZE; ++j)\n timesTables[i][j] = i * j;\n }",
"public static void createArrays() {\n\t\tinitArrays();\n\t\tcreateNodeTable();\n\t\tcreateEdgeTables();\n\t\t// Helper.Time(\"Read File\");\n\t\tcreateOffsetTable();\n\t}"
]
| [
"0.7203237",
"0.6990288",
"0.68914425",
"0.6626403",
"0.6539448",
"0.6322225",
"0.6206704",
"0.6165338",
"0.6161341",
"0.6116383",
"0.60465264",
"0.6040346",
"0.60268676",
"0.59853274",
"0.59273624",
"0.5926586",
"0.5920973",
"0.59077406",
"0.58959407",
"0.58793825",
"0.5877124",
"0.58570844",
"0.58184284",
"0.58065647",
"0.5806058",
"0.5792205",
"0.5780578",
"0.5720424",
"0.5712524",
"0.57068396",
"0.57048476",
"0.569619",
"0.56888396",
"0.5686563",
"0.568614",
"0.56847274",
"0.5679189",
"0.5678704",
"0.5676215",
"0.56648105",
"0.56608367",
"0.5660538",
"0.5633803",
"0.5633192",
"0.56305647",
"0.5630313",
"0.5625294",
"0.5610957",
"0.5588129",
"0.55780035",
"0.55663866",
"0.55597",
"0.5557143",
"0.5554722",
"0.55515987",
"0.55440587",
"0.5543492",
"0.554299",
"0.5540366",
"0.55380046",
"0.55356497",
"0.55265677",
"0.5517891",
"0.5514245",
"0.5486481",
"0.5474775",
"0.5471787",
"0.54635686",
"0.5462983",
"0.54570466",
"0.54534537",
"0.54417723",
"0.5422874",
"0.54196346",
"0.5418283",
"0.5405755",
"0.5403252",
"0.5401631",
"0.53951585",
"0.5393378",
"0.5391328",
"0.53889865",
"0.5378742",
"0.5378658",
"0.53757906",
"0.53724015",
"0.53702503",
"0.5367278",
"0.5365523",
"0.5360335",
"0.53602713",
"0.53532314",
"0.53430986",
"0.5336327",
"0.5333707",
"0.5327786",
"0.53199613",
"0.53190583",
"0.53113574",
"0.5310173"
]
| 0.55176765 | 63 |
Returns a new instance of this fragment for the given section number. | public static EventsOrStatesFragment newInstance(int sectionNumber, boolean showEvents) {
EventsOrStatesFragment fragment = new EventsOrStatesFragment();
Bundle args = new Bundle();
args.putInt(ARG_SECTION_NUMBER, sectionNumber);
args.putBoolean(ARG_SHOW_EVENTS, showEvents);
fragment.setArguments(args);
return fragment;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static MainFragment newInstance(int sectionNumber) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static CurrentInfoFragment newInstance(int sectionNumber) {\n CurrentInfoFragment fragment = new CurrentInfoFragment();\n Bundle args = new Bundle();\n args.putInt(ZooGate.ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static Fragment newInstance(int sectionNumber) {\n Fragment fragment=null;\n switch (sectionNumber){\n case 1:fragment=new ContactosFragment();\n break;\n case 2:fragment=new SeriesFragment();\n break;\n case 3:fragment=new FavoritosFragment();\n break;\n }\n return fragment;\n }",
"public static LibraryFragment newInstance(int sectionNumber) {\n LibraryFragment fragment = new LibraryFragment();\n Bundle args = new Bundle();\n return fragment;\n }",
"public static ItemFragment newInstance(int section_number){\n ItemFragment fragment = new ItemFragment();\n Bundle args = new Bundle();\n args.putInt(\"SECTION_NUMBER\",section_number);\n fragment.setArguments(args);\n return fragment;\n }",
"public static HistoryFragment newInstance(int sectionNumber) {\n\n //System.out.println(\"INFOs:: new_instance HISTORY...\");\n HistoryFragment fragment = new HistoryFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n\n return fragment;\n }",
"public static MatchmakingFragment newInstance(int sectionNumber) {\n MatchmakingFragment fragment = new MatchmakingFragment();\n fragment.currentMatchCount = 0;\n fragment.getUser_type();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\r\n\r\n PlaceholderFragment fragment = new PlaceholderFragment();\r\n Bundle args = new Bundle();\r\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\r\n fragment.setArguments(args);\r\n return fragment;\r\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\r\n PlaceholderFragment fragment = new PlaceholderFragment();\r\n Bundle args = new Bundle();\r\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\r\n fragment.setArguments(args);\r\n return fragment;\r\n }",
"public static BannerFragment newInstance(int sectionNumber) {\r\n BannerFragment fragment = new BannerFragment();\r\n Bundle args = new Bundle();\r\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\r\n fragment.setArguments(args);\r\n return fragment;\r\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n\t\t\tPlaceholderFragment fragment = new PlaceholderFragment();\n\t\t\tBundle args = new Bundle();\n\t\t\targs.putInt(ARG_SECTION_NUMBER, sectionNumber);\n\t\t\tfragment.setArguments(args);\n\t\t\treturn fragment;\n\t\t}",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n\t\t\tPlaceholderFragment fragment = new PlaceholderFragment();\n\t\t\tBundle args = new Bundle();\n\t\t\targs.putInt(ARG_SECTION_NUMBER, sectionNumber);\n\t\t\tfragment.setArguments(args);\n\t\t\treturn fragment;\n\t\t}",
"public static FragmentNearMe newInstance(int sectionNumber) {\n\t\tFragmentNearMe fragment = new FragmentNearMe();\n\t\tBundle args = new Bundle();\n\t\targs.putInt(ARG_SECTION_NUMBER, sectionNumber);\n\t\tfragment.setArguments(args);\n\t\treturn fragment;\n\t}",
"public static MapFragment newInstance(int sectionNumber) {\n MapFragment fragment = new MapFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\r\n\t\t\tPlaceholderFragment fragment = new PlaceholderFragment();\r\n\t\t\tBundle args = new Bundle();\r\n\t\t\targs.putInt(ARG_SECTION_NUMBER, sectionNumber);\r\n\t\t\tfragment.setArguments(args);\r\n\t\t\treturn fragment;\r\n\t\t}",
"public static PlaceholderFragment newInstance(int sectionNumber) {\r\n\t\t\tPlaceholderFragment fragment = new PlaceholderFragment();\r\n\t\t\tBundle args = new Bundle();\r\n\t\t\targs.putInt(ARG_SECTION_NUMBER, sectionNumber);\r\n\t\t\tfragment.setArguments(args);\r\n\t\t\treturn fragment;\r\n\t\t}",
"public static FriendsFragment newInstance(int sectionNumber) {\n \tFriendsFragment fragment = new FriendsFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static MyAccountFragment newInstance(int sectionNumber) {\n MyAccountFragment fragment = new MyAccountFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static FindItemFragment newInstance(int sectionNumber) {\n FindItemFragment fragment = new FindItemFragment();\n Bundle args = new Bundle();\n /*args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);*/\n\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static DishesFragment newInstance(int sectionNumber) {\n DishesFragment fragment = new DishesFragment();\n Bundle args = new Bundle();\n args.putInt(PAGE, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber, MainActivity activity) {\n PlaceholderFragment fragment = new PlaceholderFragment(activity);\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static ArticlesFragment newInstance(int sectionNumber) {\n \tArticlesFragment fragment = new ArticlesFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static NewsfeedFragment newInstance(int sectionNumber) {\n NewsfeedFragment fragment = new NewsfeedFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\r\n PlaceholderFragment fragment = new PlaceholderFragment();\r\n Bundle args = new Bundle();\r\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\r\n args.putString(\"alb_post\",inte.getStringExtra(\"detailJSON\"));\r\n fragment.setArguments(args);\r\n return fragment;\r\n }",
"public static Favourite newInstance(int sectionNumber) {\n Favourite fragment = new Favourite();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static CalendarViewFragment newInstance(int sectionNumber) {\n CalendarViewFragment fragment = new CalendarViewFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment;\n if (sectionNumber == 1) {\n fragment = new WaitListFragment();\n }\n else {\n fragment = new PlaceholderFragment();\n }\n\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static ShoppingListView newInstance(int sectionNumber) {\n ShoppingListView fragment = new ShoppingListView();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static TaskHistoryFragment newInstance(int sectionNumber) {\n TaskHistoryFragment fragment = new TaskHistoryFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static SalaryFragment newInstance(int sectionNumber) {\n SalaryFragment fragment = new SalaryFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(USER_NAME, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static FragmentClientTourPage7 newInstance(int sectionNumber) {\n\t\tFragmentClientTourPage7 fragment = new FragmentClientTourPage7();\n\t\tBundle args = new Bundle();\n\t\targs.putInt(ARG_SECTION_NUMBER, sectionNumber);\n\t\tfragment.setArguments(args);\n\t\treturn fragment;\n\t}",
"public static LoginFragment newInstance(int section_number) {\n LoginFragment fragment = new LoginFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, section_number);\n fragment.setArguments(args);\n return fragment;\n }",
"public static CharacterCreationFragment newInstance(int sectionNumber, Bundle args) {\n CharacterCreationFragment fragment = new CharacterCreationFragment();\n// Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n\t\t// We need to set arguments of this fragment. That's why I've added Bundle object as an\n\t\t// argument.\n fragment.setArguments(args);\n return fragment;\n }",
"public static ShoppingListSettings newInstance(int sectionNumber) {\n ShoppingListSettings fragment = new ShoppingListSettings();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static AuthorizeFragment newInstance(int sectionNumber) {\n\t\tAuthorizeFragment fragment = new AuthorizeFragment();\n\t\tBundle args = new Bundle();\n\t\targs.putInt(ARG_SECTION_NUMBER, sectionNumber);\n\t\tfragment.setArguments(args);\n\t\treturn fragment;\n\n\t}",
"public static EndGameTabFragment newInstance(int sectionNumber) {\n EndGameTabFragment fragment = new EndGameTabFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static ProjectScreen newInstance(int sectionNumber) {\n ProjectScreen fragment = new ProjectScreen();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static BandLocationDistanceFragment newInstance(int sectionNumber) {\n BandLocationDistanceFragment fragment = new BandLocationDistanceFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static HomeFragment newInstance(int sectionNumber, JSONObject userInfoJson) {\n HomeFragment fragment = new HomeFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n fragment.setUserInfoJson(userInfoJson);\n return fragment;\n }",
"public static SubmitPromptFragment newInstance(int sectionNumber) {\n SubmitPromptFragment fragment = new SubmitPromptFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n\n fragment.setArguments(args);\n return fragment;\n }",
"public static ChangesViewFragment newInstance() {\n\t\tChangesViewFragment fragment = new ChangesViewFragment();\n\t\tBundle args = new Bundle();\n\t\targs.putInt(HomeViewActivity.ARG_SECTION_NUMBER, 2);\n\t\tfragment.setArguments(args);\n\t\treturn fragment;\n\t}",
"public static HiPingFragment newInstance(int index) {\n HiPingFragment fragment = new HiPingFragment();\n Bundle bundle = new Bundle();\n bundle.putInt(ARG_SECTION_NUMBER, index);\n fragment.setArguments(bundle);\n return fragment;\n }",
"@Override\n\t\tpublic Fragment getItem(int position) {\n\t\t\tFragment fragment = new SectionFragment(); \n\t\t\tBundle args = new Bundle();\n\t\t\targs.putInt(SectionFragment.ARG_SECTION_NUMBER, position + 1);\n\t\t\tfragment.setArguments(args);\n\t\t\t\n\t\t\t\n\t\t\treturn fragment;\n\t\t\t\n\t\t}",
"public ScanFragment(int sectionNumber) {\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n scanListener = new MyButtonScanListener(this);\n searchListener = new MyButtonSearchListener();\n setArguments(args);\n }",
"public Section newSection() {\n\t\tSection page = new Section();\r\n\t\tpage.setWpPublished(DateUtils.now());\r\n\t\treturn page;\r\n\t}",
"public SummaryFragment newInstance()\n {\n return new SummaryFragment();\n }",
"void create(Section section);",
"public static PlaceholderFragment newInstance(int sectionNumber, String title_green, String title_black, String message, int imageId) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n args.putString(ARG_SECTION_TITLE_GREEN, title_green);\n args.putString(ARG_SECTION_TITLE_BLACK, title_black);\n args.putString(ARG_SECTION_MESSAGE, message);\n args.putInt(ARG_SECTION_IMAGE, imageId);\n fragment.setArguments(args);\n return fragment;\n }",
"public static Fragment Home_Tab_start(String Id, String section) {\n BodyTab_Sub fragment = new BodyTab_Sub();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, Id);\n args.putString(ARG_PARAM2, section);\n fragment.setArguments(args);\n return fragment;\n }",
"public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"Section createSection();",
"public static SummaryFragment newInstance() {\n SummaryFragment fragment = new SummaryFragment();\n return fragment;\n }",
"@Override\n public Fragment getItem(int position) {\n Bundle args = new Bundle();\n AttVFragment fragment = new AttVFragment();\n args.putInt(AttVFragment.ARG_SECTION_NUMBER, position);\n fragment.setArguments(args);\n return fragment;\n }",
"public final SectionsBottomFragment invoke() {\n return new SectionsBottomFragment();\n }",
"@Override\n public Fragment getItem(int position) {\n if (position == 0) {\n return new SectionFragment();\n } else if (position == 1) {\n return new SectionFragment();\n }\n else if (position == 2) {\n return new SectionFragment();\n }\n else if (position == 3) {\n return new SectionFragment();\n }\n\n return null;\n }",
"public static SelectionFragment newInstance() {\n SelectionFragment fragment = new SelectionFragment();\n return fragment;\n }",
"public static PurchaseFragment newInstance(int position) {\n PurchaseFragment f = new PurchaseFragment();\n // Supply index input as an argument.\n Bundle args = new Bundle();\n f.setArguments(args);\n return f;\n }",
"public static Fragment3 newInstance() {\n Fragment3 fragment = new Fragment3();\n return fragment;\n }",
"public static CommentFragment newInstance() {\n CommentFragment fragment = new CommentFragment();\n\n return fragment;\n }",
"public static BitFragment newInstance() {\n BitFragment fragment = new BitFragment();\n return fragment;\n }",
"public static MyCourseFragment newInstance() {\n MyCourseFragment fragment = new MyCourseFragment();\r\n// fragment.setArguments(args);\r\n return fragment;\r\n }",
"public static CategoryFragment newInstance() {\n CategoryFragment categoryFragment = new CategoryFragment();\n return categoryFragment;\n\n }",
"public static DetailsFragment newInstance(@IntRange(from = 1, to = 3) int kittenNumber) {\n Bundle args = new Bundle();\n args.putInt(ARG_KITTEN_NUMBER, kittenNumber);\n\n DetailsFragment fragment = new DetailsFragment();\n fragment.setArguments(args);\n\n return fragment;\n }",
"public static NewGameFragment newInstance() {\n return new NewGameFragment();\n }",
"public static MyFragment getInstance(int position) {\n\n //Construct the fragment\n MyFragment myFragment = new MyFragment();\n\n //New bundle instance\n Bundle args = new Bundle();\n\n //Passing in the Integer position of the fragment into the argument\n args.putInt(\"position\", position);\n\n //Setting the argument of the fragment to be the position\n myFragment.setArguments(args);\n\n //Return the fragment\n return myFragment;\n }",
"public static FootprintFragment newInstance() {\n FootprintFragment fragment = new FootprintFragment();\n\n return fragment;\n }",
"public static AmountFragment newInstance() {\n return new AmountFragment();\n }",
"public static CVFragment newInstance(int i) {\n CVFragment myFragment = new CVFragment();\n\n Bundle args = new Bundle();\n args.putInt(\"pageInt\", i);\n myFragment.setArguments(args);\n\n return myFragment;\n }"
]
| [
"0.78378177",
"0.7716026",
"0.7709604",
"0.7697141",
"0.76830727",
"0.7609837",
"0.75962704",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.75684774",
"0.7566755",
"0.7556652",
"0.75518084",
"0.7512951",
"0.7512951",
"0.7499292",
"0.7499292",
"0.74967164",
"0.7477256",
"0.74589443",
"0.74589443",
"0.74486655",
"0.74470174",
"0.7399344",
"0.73876894",
"0.7385176",
"0.7376838",
"0.73713773",
"0.7341543",
"0.72737294",
"0.7253907",
"0.7189542",
"0.7177517",
"0.7166224",
"0.7161499",
"0.70798904",
"0.70611525",
"0.70295745",
"0.70085603",
"0.69375855",
"0.6923947",
"0.68993014",
"0.6896615",
"0.6888979",
"0.631946",
"0.6299278",
"0.61741877",
"0.6170166",
"0.60617167",
"0.6060405",
"0.5984377",
"0.58474",
"0.5825218",
"0.58187133",
"0.5811954",
"0.5682838",
"0.56816673",
"0.56239486",
"0.55953616",
"0.55423",
"0.5526563",
"0.5525056",
"0.5493117",
"0.5490216",
"0.54890954",
"0.5450192",
"0.5430668",
"0.54253167",
"0.53967595",
"0.53958136",
"0.5390051",
"0.53661567",
"0.53558797",
"0.53529596"
]
| 0.5887245 | 77 |
getItem is called to instantiate the fragment for the given page. Return a PlaceholderFragment (defined as a static inner class below). | @Override
public Fragment getItem(int position) {
return EventsOrStatesFragment.newInstance(position + 1, showEvents);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position);\n }",
"@Override\n public Fragment getItem(int position) {\n return WebPageFragment.newInstance(position);\n }",
"@NonNull\n\t\t@Override\n\t\tpublic androidx.fragment.app.Fragment getItem(int position) {\n\t\t\treturn PlaceholderFragment.newInstance(position + 1);\n\t\t}",
"@Override\n\t\tpublic Fragment getItem(int position) {\n\t\t\tFragment fragment;\n\t\t\tif (fragments.isEmpty() || fragments.size() <= position) {\n\t\t\t\tfragment = new PlaceholderFragment(position);\n\t\t\t\tBundle args = new Bundle();\n\t\t\t\targs.putInt(PlaceholderFragment.ARG_SECTION_NUMBER, position);\n\t\t\t\tfragment.setArguments(args);\n\n\t\t\t\tfragments.add(position, fragment);\n\t\t\t} else {\n\t\t\t\tfragment = fragments.get(position);\n\t\t\t}\n\n\t\t\treturn fragment;\n\t\t}",
"@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }",
"@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }",
"@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }",
"@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }",
"@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }",
"@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }",
"@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }",
"@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }",
"@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }",
"@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }",
"@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }",
"@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }",
"@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }",
"@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }",
"@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }",
"@Override\r\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\r\n }",
"@Override\n public Fragment getItem(int position) {\n \t mFragment[position] = PlaceholderFragment.newInstance(position);\n return mFragment[position];\n }",
"@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n\n }",
"@Override\n public Fragment getItem(int position) {\n return PlaceholderFragment.newInstance(position + 1);\n }",
"@NonNull\n public abstract Fragment getItem(int position);",
"@NonNull\r\n @Override\r\n public Fragment getItem(int position) {\n switch (position) {\r\n case 0:\r\n return new SubmitFragment();\r\n\r\n case 1:\r\n return new SearchFragment();\r\n }\r\n throw new RuntimeException(\"Can not get item.\");\r\n }",
"public static FavViewPagerItemFragment getInstance(String pageTitle){\n\n FavViewPagerItemFragment fragment = new FavViewPagerItemFragment();\n\n Bundle args = new Bundle();\n args.putString(PAGE_TITLE, pageTitle);\n fragment.setArguments(args);\n //System.out.println(\"ViewPagerItemFragment getInstance--------------\" + fragment);\n //System.out.println(\"receive x from activity\" + fragment);\n return fragment;\n }",
"@Override\n public Fragment getItem(int position) {\n switch (position){\n case 0:\n recogidaFragment = RecogidaFragment.newInstance(\"Nombre\", \"Apellidos\");\n return recogidaFragment;\n case 1:\n entregaFragment = EntregaFragment.newInstance(\"Nombre\",\"Apellidos\");\n return entregaFragment;\n }\n return null;\n // Return a PlaceholderFragment (defined as a static inner class below).\n }",
"@Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0:\n return PageFragment.newInstance(0);\n case 1:\n return MentionFragment.newInstance(0);\n\n default:\n return null;\n }\n }",
"public abstract @NonNull\n Fragment getItem(int position);",
"@Override\n public Fragment getItem(int curent_page){\n switch (curent_page){\n case 0:\n WeatherAndForecastFragment fragment1 = new WeatherAndForecastFragment();\n return fragment1;\n case 1:\n WeatherAndForecastFragment fragment2 = new WeatherAndForecastFragment();\n return fragment2;\n case 2:\n WeatherAndForecastFragment fragment3 = new WeatherAndForecastFragment();\n return fragment3;\n\n default:\n return null;\n }\n }",
"@Override\n public Fragment getItem(int position) {\n int imageId = imgs.getResourceId(position, -1);\n return PlaceholderFragment.newInstance(position + 1, premium_title_green[position], premium_title_black[position], premium_messages[position], imageId);\n }",
"@Override\n public Fragment getItem(int position) {\n Fragment fragment = new Fragment();\n switch (position)\n {\n case 0:\n fragment = carCheckBasicInfoFragment;\n break;\n case 1:\n fragment = carCheckFrameFragment;\n break;\n case 2:\n fragment = carCheckIntegratedFragment;\n break;\n }\n return fragment;\n }",
"@Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0:\n return AddPlaceholderFragment.newInstance();\n case 1:\n return mChange;\n case 2:\n return mDelete;\n }\n return null;\n }",
"@Override\n public Fragment getItem(int position) {\n if (position == 0)\n return new RootFragment();\n else\n return new StaticFragment();\n }",
"@Override\n public Fragment getItem(int position) {\n switch (position){\n case 0:\n return new ItemAuctionFragment();\n case 1:\n return new ItemBidsFragment();\n default:\n return null;\n }\n }",
"@Override\n public Fragment getItem(int position) {\n //Fragment frag = new HomeScreenFragment();\n //return frag;\n switch (position)\n {\n case 0:\n return new HomeScreenFragment();\n case 2:\n return new AddRestaurantFragment();\n default:\n return new Fragment();\n }\n }",
"@Override\r\n public Fragment getItem(int position) {\r\n\r\n switch (position) {\r\n case 0:\r\n\r\n hFragment = createClientFragment(\"Homme\");\r\n return hFragment;\r\n\r\n case 1:\r\n\r\n fFragment = createClientFragment(\"Femme\");\r\n return fFragment;\r\n\r\n\r\n case 2:\r\n eFragment = createClientFragment(\"Enfant\");\r\n return eFragment;\r\n default:\r\n return null;\r\n }\r\n }",
"@Override\n public Fragment getItem(int position) {\n // Create a new fragment according to the position of the ViewPager\n if (position == 0) {\n return new BlogFragment();\n } else if (position == 1) {\n return new MapFragment();\n }\n return null;\n }",
"@Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0:\n return DetailsFragment.newInstance(position);\n case 1:\n return MapsFragment.newInstance(position);\n }\n return null;\n }",
"@Override\n\t\tpublic Fragment getItem(int position) {\n\t\t\tswitch (position) {\n\t\t\tcase 0 :\n\t\t\t\t// Home fragment\n\t\t\t\treturn new HomeFragment();\n\t\t\tcase 1 :\n\t\t\t\t// Exercises fragment\n\t\t\t\treturn new ExercisesFragment();\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}",
"@Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0:\n return pageHome;\n case 1:\n return pageJava;\n case 2:\n return pageAndroid;\n default:\n return pageHome;\n }\n }",
"@Override\r\n\t\tpublic Fragment getItem(int position) {\r\n\t\t\tTabInfo info = getTabs().get(position);\r\n\t\t\treturn Fragment.instantiate(getContext(), info.clss.getName(), info.args);\r\n\t\t}",
"@Override\n\tpublic Fragment getItem(int position) {\n\t\tif(this.getRegisteredFragment(position)!=null){\n\t\t\treturn getRegisteredFragment(position);\n\t\t}else{\n\t\t\t//return FavFragment.newInstance();//QiangContentFragment.newInstance(position);\n\t\t\treturn QiangContentFragment.newInstance(position);\n\t\t}\n//\t\treturn MenuContentFragment.newInstance(\"pager\" + position);\n\t}",
"@Override\n public Fragment getItem(int position) {\n MainFragment fragment=new MainFragment();\n fragment.setType(position);\n return fragment;\n }",
"@Override\n\t\tpublic Fragment getItem(int position) {\n\t\t\tFragment fragment;\n\t\t\tswitch (position) {\n\t\t\tcase 0:\n\t\t\t\tfragment = ToDoFragment.newInstance(userId, userName);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tfragment = ToGoFragment.newInstance();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tfragment = ToDoFragment.newInstance(userId, userName);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn fragment;\n\t\t}",
"@Override\r\n public Fragment getItem(int position) {\r\n try {\r\n switch (position) {\r\n case 0:\r\n return new HomeInfoFragment();\r\n case 1:\r\n return new BlogsFragment();\r\n case 2:\r\n return new HomeFeedsFragment();\r\n case 3:\r\n return new NetworkingOptionFragment();\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return null;\r\n }",
"@Override\n public Fragment getItem(int position) {\n Light light = ambiance.lights.get(position);\n PlaceholderFragment pf = PlaceholderFragment.newInstance(position);\n pf.ambiance = ambiance;\n pf.lights = light;\n return pf;\n }",
"@Override\n public Fragment getItem(int position) {\n\n if (position == 0) {\n return new HotelFragment();\n } else if (position == 1) {\n return new MallFragment();\n } else if (position == 2) {\n return new RestaurentFragment();\n } else {\n return new HistoricalSiteFragment();\n }\n }",
"@Override\n\tpublic Fragment getItem(int position) {\n\t\treturn ContentFragment.newInstance(contents.getChapterFile(position));\n\t}",
"@Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0:\n return MainFragment.newInstance();\n case 1:\n return LoginFragment.newInstance();\n default:\n return null;\n }\n }",
"@Override\n public Object instantiateItem(ViewGroup container, int position) {\n Fragment fragment = (Fragment) super.instantiateItem(container, position);\n registeredFragments.put(position, fragment);\n return fragment;\n }",
"@Override\n public Fragment getItem(int position) {\n switch (position)\n {\n case 0:\n return new Test();\n case 1:\n return new Facility_manager();\n }\n return null;\n }",
"@Override\n public Fragment getItem(int position) {\n if (position == 0) {\n return new FieldSearchFragment();\n } else {\n return new MatchSearchFragment();\n }\n }",
"public FindItemFragment() {\n }",
"@Override\n public Fragment getItem(int position) {\n if(articlesList != null && articlesList.size() > position) {\n return PlaceholderFragment.newInstance(articlesList.get(position),category);\n }\n return PlaceholderFragment.newInstance(null,null);\n }",
"@NonNull\n @Override\n public Fragment getItem(int position) {\n if (position == 0){\n return new AccommodationFragment();\n }else if (position == 1){\n return new FoodFragment();\n }else if(position == 2){\n return new DrinkFragment();\n }else {\n return new FunFragment();\n }\n }",
"@Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0: // Fragment # 0 - This will show FirstFragment\n return Alarm_Fragment_1.newInstance(0, \"Page #1\");\n case 1: // Fragment # 0 - This will show FirstFragment different title\n return Alarm_Fragment_2.newInstance(1, \"Page # 2\");\n case 2: // Fragment # 1 - This will show SecondFragment\n return Alarm_Fragment_3.newInstance(2, \"Page # 3\");\n case 3 : return Alarm_Fragment_4.newInstance(3, \"Page # 4\");\n case 4 : return Alarm_Fragment_5.newInstance(5, \"Page # 5\");\n //return Frag5.newInstance(4, \"Page # 5\");\n case 5 : return Alarm_Fragment_6.newInstance(6, \"Page # 6\");\n default:\n return null;\n }\n }",
"@Override\n\t\tpublic Fragment getItem(int position) {\n\t\t\tswitch (position) {\n\t\t\t\t//case 0:return PlaceholderFragment.newInstance(position + 1);//defaultFragment();\n\t\t\t\tcase MANAGE_RECORDINGS:\n\t\t\t\t\treturn ManageRecordingsFrame.newInstance(position);\n\t\t\t\tcase SEARCH_FOR_STATIONS:\n\t\t\t\t\treturn SearchForStationsFrame.newInstance(position);\n\t\t\t\tcase MANAGE_STATIONS:\n\t\t\t\t\treturn ManageFavoriteStationsFrame.newInstance(position);\n\t\t\t\tcase FAVORITE_STATIONS:\n\t\t\t\tdefault:\n\t\t\t\t\treturn FavoriteStationsFrame.newInstance(0);//\n\t\t\t}\n\t\t}",
"@Override\n public Fragment getItem(int position) {\n\n Fragment fragment = null;\n Bundle bundle = new Bundle();\n bundle.putString(\"e\", \"test\");\n switch (position) {\n case 0:\n fragment = new OriginalFragment();\n // fragment.setArguments(bundle);\n break;\n\n case 1:\n fragment = new DecodedFragment();\n fragment.setArguments(bundle);\n }\n return fragment;\n }",
"@Override\n public Fragment getItem(int position) {\n\n switch (position) {\n case 0:\n\n return MainFragment.newInstance(position + 1);\n\n case 1:\n\n return NewContactFragment.newInstance(\"\", \"\");\n\n case 2:\n\n return CallLogFragment.newInstance(1);\n }\n return null;\n }",
"@NonNull\n @Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0:\n return FragmentA.newInstance(\"This is First Fragment\");\n case 1:\n return FragmentB.newInstance(\"This is second Fragment\");\n case 2:\n return FragmentC.newInstance(\"This is Third Fragment\");\n }\n return FragmentA.newInstance(\"This is Default Fragment\");\n }",
"@Override\n public Object instantiateItem(ViewGroup container, int position) {\n Fragment fragment = (Fragment) super.instantiateItem(container, position);\n registeredFragments.put(position, fragment);\n return fragment;\n }",
"@Override\n public Fragment getItem(int position) {\n\n Fragment fragment = null;\n\n switch (position) {\n case 0:\n fragment = new PublicTabFragment();\n break;\n case 1:\n if (Utilities.isUser()) {\n fragment = new MeTabFragment();\n } else {\n fragment = new PromptLoginFragment();\n }\n break;\n default:\n fragment = new PublicTabFragment();\n break;\n }\n\n return fragment;\n }",
"@Override\n public Fragment getItem(int position) {\n //To do\n //return the corresponded fragment according to position\n //remember that the position can not be out of [0, 2]\n\n switch (position) {\n case 0:\n return CollectionFragment.newInstance(0, \"\");\n case 1:\n return CollectionFragment.newInstance(1, \"\");\n default:\n return null;\n }\n\n //To do closed\n }",
"@Override\n public Fragment getItem(int position) {\n Log.d(\"DEBUG\", \"Position : \" + position);\n //return PlaceholderFragment.newInstance(position + 1);\n\n\n switch (position) {\n case 0:\n return SectionsFragment1.newInstance(position + 1);\n case 1:\n return SectionsFragment2.newInstance(position + 1);\n case 2:\n return SectionsFragment3.newInstance(position + 1);\n }\n\n return null;\n\n }",
"@Override\n public Fragment getItem(int position) {\n switch (position){\n case 0:\n return FirstFragment.newInstance(\"\",\"\");\n case 1:\n return ATMFragment.newInstance(\"\",\"\");\n default:\n return FirstFragment.newInstance(\"\",\"\");\n }\n }",
"@Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0:\n return FirstFragment.newInstance();\n case 1:\n return SecondFragment.newInstance();\n case 2:\n return ThirdFragment.newInstance();\n default:\n return null;\n }\n }",
"@Override\r\n\tpublic Fragment getItem(int position) {\n\t\tswitch(position) {\r\n\t\t\tcase 2:\t\t\r\n\t\t\t\treturn new FriendsFragment();\r\n\t\t\tcase 0: \r\n\t\t\t\treturn new LibraryFragment();\r\n\t\t\tcase 3:\r\n\t\t\t\treturn new InboxFragment();\r\n\t\t\tcase 1:\r\n\t\t\t\treturn new BorrowedFragment();\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"@Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0:\n FirstFragment firstFragment = new FirstFragment();\n return firstFragment;\n case 1:\n SecondFragment secondFragment = new SecondFragment();\n return secondFragment;\n case 2:\n ThirdFragment thirdFragment = new ThirdFragment();\n return thirdFragment;\n default:\n return null;\n }\n }",
"@Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0: // Fragment # 0 - This will show FirstFragment\n return FootprintMineFragment.newInstance();\n case 1: // Fragment # 0 - This will show FirstFragment different title\n return FootprintAllFragment.newInstance();\n default:\n return null;\n }\n }",
"@NonNull\n @Override\n public Fragment getItem(int position) {\n return fragments.get(position);\n }",
"@NonNull\n @Override\n public Fragment getItem(int position) {\n return pagerFragments.get(position);\n }",
"@Override\n\tpublic Fragment getItem(int position) {\n\t\t\n\t\t\n\t\tFragment fragment=new EmojiFragment(this.activity);\n\t\treturn fragment;\n\t\t\n//\t\tFragment fragment = new DummySectionFragment();\n//\t\tBundle args = new Bundle();\n//\t\targs.putInt(DummySectionFragment.ARG_SECTION_NUMBER, position + 1);\n//\t\tfragment.setArguments(args);\n//\t\treturn fragment;\n\t}",
"@Override\n public Fragment getItem(int position) {\n Bundle bundle = new Bundle();\n bundle.putString(\"placeid\",placeid);\n bundle.putString(\"data\",jsonData);\n switch (position){\n case 0:\n InfoFragment fragment = new InfoFragment();\n fragment.setArguments(bundle);\n return fragment;\n case 1:\n PhotosFragment fragment1 = new PhotosFragment();\n fragment1.setArguments(bundle);\n return fragment1;\n case 2:\n MapFragment fragment2 = new MapFragment();\n fragment2.setArguments(bundle);\n return fragment2;\n case 3:\n ReviewFragment fragment3 = new ReviewFragment();\n fragment3.setArguments(bundle);\n return fragment3;\n }\n return null;\n }",
"@Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0:\n return new FastFoodFragmentFaisal();\n case 1:\n return new PorotaFragmentFaisal();\n case 2:\n return new PithaFragmentFaisal();\n case 3:\n return new POMFragmentFaisal();\n default:\n return null;\n }\n }",
"@Override\n public Fragment getItem(int position) {\n if (position == 0){\n return MainFragment.newInstance();\n } else {\n return RepositoryFragment.newInstance();\n }\n }",
"@Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0:\n FragmentAboutUs aboutFragment = new FragmentAboutUs();\n\n return aboutFragment;\n case 1:\n FragmentContactUs contactUsFragment = new FragmentContactUs();\n return contactUsFragment;\n case 2:\n FragmentDonate donateFragment = new FragmentDonate();\n return donateFragment;\n case 3:\n FragmentHelp helpFragment = new FragmentHelp();\n return helpFragment;\n default:\n return null;\n }\n }",
"@Override\n\tpublic Fragment getItem(int position) \n\t{\n if (position == SimpleCarouselTest.FIRST_PAGE)\n \tscale = SimpleCarouselTest.BIG_SCALE;\n else\n \tscale = SimpleCarouselTest.SMALL_SCALE;\n \n position = position % SimpleCarouselTest.PAGES;\n return MyFragment.newInstance(context, position, scale);\n\t}",
"@Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0:\n return new About();\n case 1:\n return new play();\n case 2:\n return new Rules();\n default:\n return new play();\n }\n }",
"@Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0: // Fragment # 0 - This will show FirstFragment\n System.out.println(\"ana fl case 0:\" + song.coverURL);\n return result_fragment.newInstance(song.coverURL, song.title, song.artist, song.album);\n\n case 1: // Fragment # 1 - This will show FirstFragment different title\n return LyricsFragment.newInstance(song.lyrics);\n default:\n return null;\n }\n }",
"@Override\n public Fragment getItem(int arg0) {\n return mFragments.get(arg0);\n }",
"@Override\n public Fragment getItem(int position) {\n\n switch (position) {\n case 0: // Fragment # 0 - This will show WelcomeActivity\n Context context;\n return WelcomeActivity.newInstance(0, R.string.page0);\n case 1: // Fragment # 1 - This will show FirstFragment\n return FirstFragment.newInstance(1, R.string.page1);\n case 2: // Fragment # 2 - This will show SecondFragment\n return SecondFragment.newInstance(2, R.string.page2);\n case 3: // Fragment # 1 - This will show ThirdFragment\n return ThirdFragment.newInstance(3, R.string.page3);\n case 4:// Fragment # 1 - This will show FourthFragment\n return FourthFragment.newInstance(4,R.string.page4);\n default:\n return null;\n }\n }",
"@Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0:\n ToursFragment toursFragment = new ToursFragment();\n return toursFragment;\n case 1:\n MapFragment mapFragment = new MapFragment();\n return mapFragment;\n case 2:\n LandmarkCardsFragment cardsFragment = new LandmarkCardsFragment();\n return cardsFragment;\n default:\n return null;\n }\n }",
"@Override\n\t\tpublic Fragment getItem(int position) {\n\t\t\tFragment fragment = new SectionFragment(); \n\t\t\tBundle args = new Bundle();\n\t\t\targs.putInt(SectionFragment.ARG_SECTION_NUMBER, position + 1);\n\t\t\tfragment.setArguments(args);\n\t\t\t\n\t\t\t\n\t\t\treturn fragment;\n\t\t\t\n\t\t}",
"@Override\n public Fragment getItem(int position) {\n Bundle args = new Bundle();\n AttVFragment fragment = new AttVFragment();\n args.putInt(AttVFragment.ARG_SECTION_NUMBER, position);\n fragment.setArguments(args);\n return fragment;\n }",
"@Override\n public Fragment getItem(int position) {\n if(position==0){\n return new TabItemFragment();\n }else{\n return new AnotherTabItemFragment();\n }\n\n }",
"@Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0:\n uiManageParty tab1 = new uiManageParty();\n return tab1;\n\n case 1:\n uiHostPlayLists tab2 = new uiHostPlayLists();\n return tab2;\n\n case 2:\n uiHostNowPlaying tab3 = new uiHostNowPlaying();\n return tab3;\n\n default:\n return null;\n }\n }",
"@Override\n public android.support.v4.app.Fragment getItem(int position) {\n if (position == 0) {\n return new TouristSpots();\n } else if (position == 1) {\n return new Hotels();\n } else if (position == 2) {\n return new Restaurant();\n } else {\n return new Beaches();\n }\n }",
"@Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0: // Fragment # 0 - This will show FirstFragment\n return DishListFragment.newInstance(0);\n case 1:\n return DishListFragment.newInstance(1);\n case 2:\n return DishListFragment.newInstance(2);\n default:\n return null;\n }\n }",
"@Override\r\n\tpublic Fragment getItem(int arg0) {\n\t\t\r\n\t\tswitch (arg0) {\r\n\t\t\r\n case 0:\r\n \t \r\n \t return new MyTasks();\r\n \t \r\n \t \r\n case 1:\r\n \t \r\n \t return new PlannedActivities();\r\n \t \r\n \t \r\n /* case 2:\r\n \t \r\n \t return new MOPWheatHome();*/\r\n \t \r\n case 2:\r\n \t return new MyRetailers();\r\n \t // return new ExpensesHome();\r\n \r\n case 3:\r\n \t return new FarmerHome();\r\n case 4:\r\n \t return new Stock();\r\n case 5:\r\n \t return new UpcomingDemoHome();\r\n case 6:\r\n \t return new Reports_FA();\r\n /* case 4:\r\n \t \r\n \t return new MOPMustardHome();\r\n \t \r\n case 5:\r\n \t \r\n \t return new RetailerHomeScreen();*/\r\n \t \r\n /*case 6:\r\n \t \r\n \t return new PotashContent();\r\n \t */\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public static Fragment selectFragment(int itemId) {\n switch (itemId){\n case R.id.menu_home: {\n return new HomeFragment();\n }\n case R.id.menu_search: {\n return new SearchFragment();\n }\n case R.id.menu_profile: {\n return new ProfileFragment();\n }\n default:\n return null;\n }\n }",
"@Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0: // Fragment # 0 - This will show FirstFragment\n return new ListFragment();\n case 1: // Fragment # 0 - This will show FirstFragment different title\n return new GridFragment();\n\n default:\n return null;\n }\n }",
"@Override\n\tpublic Fragment getItem(int position) {\n\t\treturn fragments.get(position);\n\t}",
"@Override\n public Fragment getItem(int position) {\n return fragments.get(position);\n }",
"@Override\n public Fragment getItem(int position) {\n return fragments.get(position);\n }",
"@Override\r\n\t\tpublic Fragment getItem(int arg0) {\n\t\t\treturn (fragments == null || fragments.size() == 0) ? null\r\n\t\t\t\t\t: fragments.get(arg0);\r\n\t\t}",
"@Override\n public Fragment getItem(int position) {\n switch (position){\n case 0:\n FgFollow fgFollow = new FgFollow();\n return fgFollow;\n case 1:\n FgMySimulation fgMySimulation = new FgMySimulation();\n return fgMySimulation;\n default:\n return null;\n }\n }",
"@Override\n public Fragment getItem(int position) {\n Fragment fragment = null;\n switch (position){\n case 0:\n fragment = new FragmentTrailer();\n break;\n case 1:\n fragment = new FragmentReviews();\n break;\n default:\n fragment = null;\n break;\n }\n\n return fragment;\n }",
"@Override\n public Fragment getItem(int position) {\n return ListFragment.newInstance(context.getResources().getString(pageTitles[position]), darkTheme);\n }",
"public ItemFragment() {\n }",
"@Override\n public Fragment getItem(int position) {\n return NewsFragment.newInstance(position, newsModelArrayList.get(position));\n\n }"
]
| [
"0.72919405",
"0.71684223",
"0.7127443",
"0.70753",
"0.7005576",
"0.7005576",
"0.7005576",
"0.7005576",
"0.7005576",
"0.7005576",
"0.7005576",
"0.7005576",
"0.7005576",
"0.7005576",
"0.7005576",
"0.7005576",
"0.7005576",
"0.7005576",
"0.6994497",
"0.6977012",
"0.6955742",
"0.69320095",
"0.6914859",
"0.6794996",
"0.6776744",
"0.6727436",
"0.6712751",
"0.6681511",
"0.6657108",
"0.6613559",
"0.6604032",
"0.65767413",
"0.6553636",
"0.64801115",
"0.6475211",
"0.6450498",
"0.64061654",
"0.63978314",
"0.6368691",
"0.6359723",
"0.63587713",
"0.6355121",
"0.6350108",
"0.6341756",
"0.6334175",
"0.6302196",
"0.6285721",
"0.62838304",
"0.62773514",
"0.6264539",
"0.62512124",
"0.62434685",
"0.62412214",
"0.6236256",
"0.6229988",
"0.62296504",
"0.6219737",
"0.6219583",
"0.6216078",
"0.619658",
"0.61961365",
"0.6194807",
"0.61857605",
"0.61754256",
"0.6171085",
"0.6169131",
"0.6138944",
"0.61385304",
"0.613822",
"0.61380816",
"0.6137722",
"0.61320436",
"0.6130034",
"0.6123893",
"0.61069894",
"0.61062616",
"0.60983455",
"0.6098245",
"0.6090433",
"0.6087301",
"0.60836804",
"0.60691166",
"0.6064317",
"0.60557634",
"0.6052215",
"0.6037165",
"0.60368323",
"0.6036116",
"0.6033474",
"0.602005",
"0.6018123",
"0.60165054",
"0.60101354",
"0.6005554",
"0.6005554",
"0.59842956",
"0.59836906",
"0.59829676",
"0.5982453",
"0.5976347",
"0.597616"
]
| 0.0 | -1 |
Show 2 total pages. | @Override
public int getCount() {
return 2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getPagesAmount();",
"long getAmountPage();",
"@Test\n\tpublic void shouldReturnSecondPageSortedByOriginalAmountAsc()\n\t{\n\n\t\tfinal SearchPageData<B2BDocumentModel> result = pagedB2BDocumentDao.getAllPagedDocuments(\n\t\t\t\tcreatePageableData(1, 2, \"byOriginalAmountAsc\"), Collections.singletonList(AccountSummaryAddonUtils\n\t\t\t\t\t\t.createFilterByCriteriaObject(StringUtils.EMPTY, StringUtils.EMPTY)));\n\n\t\tTestCase.assertEquals(2, result.getResults().size());\n\n\t\tTestCase.assertEquals(AMOUNT_75_31, result.getResults().get(0).getAmount().toString());\n\t\tTestCase.assertEquals(AMOUNT_85_20, result.getResults().get(1).getAmount().toString());\n\t}",
"public Integer getPerPage();",
"int getPageSize();",
"int getPageSize();",
"int getPageSize();",
"int getPageSize();",
"@Test\n public void getListingsPages_2() throws IOException {\n List<String> listingsPages = imobiParser.getListingPages(TEST_URL_PAGINATION_2);\n\n Assert.assertThat(listingsPages, notNullValue());\n Assert.assertThat(listingsPages.size(), is(16));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_2.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(1)))));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_2.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(5)))));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_2.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(10)))));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_2.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(16)))));\n }",
"int getPagesize();",
"int getPage();",
"long getPageSize();",
"long getPageSize();",
"long getPageSize();",
"public int getPages() {\n return pages;\n }",
"@Override\n\t\tpublic int getCount() {\n\t\t\t// Show 3 total pages.\n\t\t\treturn 3;\n\t\t}",
"public int getPages(){\n return pages;\n }",
"@Override\n public int getCount() {\n int TOTAL_PAGES = totalPages;\n return TOTAL_PAGES;\n }",
"public int getPageCount() { return _pages.size(); }",
"@Override\n public int getNumOfPageRows() {\n return 10;\n }",
"public int getRowsPerPage();",
"public int getPages()\n {\n return pages;\n }",
"public Integer getPageCount();",
"@Override\n public int numberOfPages() {\n // TODO Auto-generated method stub\n throw new UnsupportedOperationException(\"Unsupported operation\");\n }",
"public void setPages(int pages) {\n this.pages = pages;\n }",
"int getNumPages();",
"Integer getPage();",
"private void updateTotalPageNumbers() {\n totalPageNumbers = rows.size() / NUM_ROWS_PER_PAGE;\n }",
"@Override\n\tpublic Page showChargeCarByPage() {\n\t\tList<CarInfoDto> carInfolist = chargeCarMapper.selectCarInfoByPage();\n//\t\tint count = chargeCarMapper.selectCarInfoCount();\n\t\t\n\t\tString count = chargeCarMapper.selectCarInfoCount();\n\t\t//要有一个查询总数的sql\n\t\tSystem.out.println(\"----count----\"+count);\n\t\tPage page = new Page(Integer.parseInt(count), 10,\n\t\t\t\t1);\n\t\tpage.setList(carInfolist);\n\t\tSystem.out.println(carInfolist);\n\t\treturn page;\n\t}",
"private void show(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tInteger page = request.getParameter(\"page\") == \"\" || request.getParameter(\"page\") == null ? 1\r\n\t\t\t\t: Integer.valueOf(request.getParameter(\"page\"));\r\n\t\tint count = service.selectCount();\r\n\t\trequest.setAttribute(\"page\", page);\r\n\t\trequest.setAttribute(\"count\", count);\r\n\t\tList<Notice> list = service.selectAll((page - 1) * 5, 5);\r\n\t\trequest.setAttribute(\"list\", list);\r\n\r\n\t\trequest.getRequestDispatcher(\"/WEB-INF/jsp/GongGaoGuanLi.jsp\").forward(request, response);\r\n\t}",
"public Integer getCurrentPageSize();",
"Pages getPages();",
"public int getPages() {\n return pages;\n }",
"public int getPages() {\n return pages;\n }",
"public void setPages(int pages) {\n this.pages = pages;\n }",
"boolean hasPagesize();",
"private int getResultsPerPage()\n {\n final int RESULTS_0 = 16;\n final int RESULTS_1 = 32;\n final int RESULTS_2 = 46;\n \n int index = filterNumResults.getSelectedIndex();\n switch(index)\n {\n case 0: return RESULTS_0;\n case 1: return RESULTS_1;\n case 2: return RESULTS_2;\n default: return 0;\n }\n }",
"default Integer getPageSize() {\n return 10;\n }",
"int getPageNumber();",
"@Override\n public int getCount() {\n return PAGE_COUNT;\n }",
"public abstract void onLoadMore(int page, int totalItemsCount);",
"public abstract void onLoadMore(int page, int totalItemsCount);",
"@Test\r\n\tpublic void test_getAllEmployeesPage2() {\r\n\t\tgiven()\r\n\t\t\t\t.contentType(ContentType.JSON)//\r\n\t\t\t\t.queryParam(\"page\", \"2\")//\r\n\t\t\t\t.when()//\r\n\t\t\t\t.get(\"/api/v1/employees\")//\r\n\t\t\t\t.then()//\r\n\t\t\t\t.log()//\r\n\t\t\t\t.body()//\r\n\t\t\t\t.statusCode(200)//\r\n\t\t\t\t.body(\"number\", equalTo(2))//\r\n\t\t\t\t.body(\"content.size()\", equalTo(10));\r\n\r\n\t}",
"@Override\n public int getCount() {\n return PAGE_COUNT;\n }",
"@Override\r\n\tpublic int nombrePage() {\n\t\treturn 0;\r\n\t}",
"public int getTotalPages() {\r\n return totalPages;\r\n }",
"boolean hasPagination();",
"boolean hasPagination();",
"boolean hasPagination();",
"boolean hasPagination();",
"boolean hasPagination();",
"boolean hasPagination();",
"public int getTotalPages()\r\n {\r\n return pageNames.size()-1;\r\n }",
"private void pagination()\n {\n if (value==0)\n {\n aBoolean=true;\n setAdapter(postModels);\n value=1;\n count=count+10;\n }\n else if (value==1)\n {\n if (count<page_count)\n {\n aBoolean=true;\n count=count+10;\n temp_list.addAll(postModels);\n adapter.notifyDataSetChanged();\n }\n }\n }",
"@Override\n public void onPageChanged(int page, int pageCount) {\n }",
"@Test\n public void getListingsPages_1() throws IOException {\n List<String> listingsPages = imobiParser.getListingPages(TEST_URL_PAGINATION_1);\n\n Assert.assertThat(listingsPages, notNullValue());\n Assert.assertThat(listingsPages.size(), is(10));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_1.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(1)))));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_1.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(5)))));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_1.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(10)))));\n }",
"public static void take() {\r\n\t\t\r\n\t\tif (ths.page == 4) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}",
"@Override\n public int doStartTag() throws JspException {\n\n int pageCount = (this.recordCount + this.pageSize - 1) / this.pageSize;\n StringBuilder sb = new StringBuilder();\n\n if (this.recordCount != 0 && this.recordCount > this.pageSize) {\n sb.append(\"<ol class=\\\"paginator\\\">\");\n if (this.pageNo > pageCount) {\n this.pageNo = pageCount;\n }\n if (this.pageNo < 1) {\n this.pageNo = 1;\n }\n HttpServletRequest request = (HttpServletRequest) this.pageContext.getRequest();\n\n url = request.getAttribute(\"originalUrl\").toString();\n url += \"?\";\n if (StringUtil.isNotEmpty(request.getQueryString())) {\n String queryString = request.getQueryString();\n url += queryString.replaceAll(\"page=[0-9]*\", \"\");\n if (!url.endsWith(\"&\") && !url.endsWith(\"?\")) {\n url += \"&\";\n }\n }\n\n if (this.pageNo > 1) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--prev\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=\" + (this.pageNo - 1) + \"'><span class=\\\"paginator__item__text__icon\\\"></span></a></li>\");\n }\n int start = 1;\n if (this.pageNo > 4) {\n start = this.pageNo - 1;\n sb.append(\"<li class=\\\"paginator__item paginator__item--number\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=1'>1</a></li>\");\n sb.append(\"<li class=\\\"paginator__item paginator__item--number\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=2'>2</a></li>\");\n sb.append(\"<li class=\\\"paginator__item paginator__item--ellipsis\\\"><span class=\\\"paginator__item__text\\\"><span class=\\\"paginator__item__text__icon\\\"></span></span></li>\");\n }\n int end = this.pageNo + 1;\n if (end > pageCount) {\n end = pageCount;\n }\n for (int i = start; i <= end; i++) {\n if (this.pageNo == i) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--number paginator__item--current\\\"><span class=\\\"paginator__item__text\\\">\" + i + \"</span></li>\");\n } else {\n sb.append(\"<li class=\\\"paginator__item paginator__item--number\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=\" + i + \"'>\").append(i).append(\"</a></li>\");\n }\n }\n if (end < pageCount - 2) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--ellipsis\\\"><span class=\\\"paginator__item__text\\\"><span class=\\\"paginator__item__text__icon\\\"></span></span></li>\");\n }\n if (end < pageCount - 1) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--number\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=\" + (pageCount - 1) + \"'>\").append((pageCount - 1) + \"</a></li>\");\n }\n if (end < pageCount) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--number\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=\" + pageCount + \"'>\").append(pageCount + \"</a></li>\");\n }\n if (this.pageNo != pageCount) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--next\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=\" + (this.pageNo + 1) + \"'><span class=\\\"paginator__item__text__icon\\\"></span></a></li>\");\n }\n }\n if (anchor != null) {\n sb.append(\"<script type='text/javascript'>$('.paginator a').each(function(){var href=$(this).attr('href');$(this).attr('href',href+'\" + anchor + \"')});</script>\");\n }\n sb.append(\"</ol>\");\n try {\n this.pageContext.getOut().println(sb.toString());\n } catch (IOException e) {\n // TODO Auto-generated catch block\n\n e.printStackTrace();\n }\n return 0;\n }",
"@Override\r\n\tpublic int getPaging() {\n\t\treturn 0;\r\n\t}",
"public void setPage(int value) {\n this.page = value;\n }",
"protected int getTotalPages(FacesContext context) {\n String forValue = (String) getAttributes().get(\"for\");\n UIData uiData = (UIData) getForm(context).findComponent(forValue);\n if (uiData == null) {\n return 0;\n }\n int rowsPerPage = uiData.getRows(); \n int totalRows = uiData.getRowCount();\n int result = totalRows / rowsPerPage;\n if (0 != (totalRows % rowsPerPage)) {\n result++;\n }\n return result;\n }",
"public void page()\n {\n com.jayway.restassured.response.Response response= given().relaxedHTTPSValidation().when().get(\"http://18.222.188.206:3333/accounts?_page=3\");\n response.then().assertThat().statusCode(200);\n System.out.println(\"The list of accounts in the page 3 is displayed below:\");\n response.prettyPrint();\n }",
"@Test\n public void pageSizeTest() {\n // TODO: test pageSize\n }",
"public static int getTotalPage() {\n List<WebElement> PAGINATION = findElements(pagination);\n int size = PAGINATION.size() - 1;\n //Get the number of the second-last item which next to the \">\" icon\n WebElement lastPage = findElement(By.xpath(String.format(last_page, size)));\n return Integer.parseInt(lastPage.getText());\n }",
"public String getTotalPage() {\r\n return totalPage;\r\n }",
"@Test\n public void getListingsPages_3() throws IOException {\n List<String> listingsPages = imobiParser.getListingPages(TEST_URL_PAGINATION_ABSENT);\n\n Assert.assertThat(listingsPages, notNullValue());\n Assert.assertThat(listingsPages.size(), is(1));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_ABSENT.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(1)))));\n }",
"public int getPageTotalNumber(int totalNumber) {\n/* 70 */ int fullPage = totalNumber / 25;\n/* 71 */ return (totalNumber % 25 > 0) ? (fullPage + 1) : ((fullPage == 0) ? 1 : fullPage);\n/* */ }",
"PageInfo list(Date beginDate, Date endDate, List<Integer> resources, int pageNo, int pageSize);",
"private void nextButtonActionPerformed(ActionEvent e) {\n // TODO add your code here\n int remainItem = this.list.size() - 6 * (this.page + 1);\n\n if(remainItem <= 0){\n Warning.run(\"No more page here.\");\n }\n else{\n this.page++;\n this.update();\n }\n }",
"private void nextPage()\n {\n if(currentPage + 1 <= maxPage)\n {\n prevPageButton.setEnabled(true);\n if(currentPage + 2 > maxPage)\n nextPageButton.setEnabled(false);\n \n paginate(++currentPage, getResultsPerPage());\n updatePageLabel(currentPage, maxPage);\n }\n }",
"public void setPageInfo(){\n\t\tif(AllP>=1){\n\t\t\tPageInfo=\"<table border='0' cellpadding='3'><tr><td>\";\n\t\t\tPageInfo+=\"Show: \"+PerR+\"/\"+AllR+\" Records! \";\n\t\t\tPageInfo+=\"Current page: \"+CurrentP+\"/\"+AllP;\n\t\t\tPageInfo+=\"</td></tr></table>\";\t\t\t\n\t\t}\t\t\t\t\n\t}",
"private void paginate() {\n List<ItemModel> old = adapter.getItems();\n List<ItemModel> New = new ArrayList<>(addList());\n CardStackCallback callback = new CardStackCallback(old, New);\n DiffUtil.DiffResult result = DiffUtil.calculateDiff(callback);\n adapter.setItems(New);\n result.dispatchUpdatesTo(adapter);\n }",
"void showPage1(){\n displayPage();\n up.setVisible(false);\n if(page != maxPage){\n down.setVisible(true);\n }\n back.setVisible(true);\n next.setVisible(true);\n go.setVisible(true);\n txtPage.setVisible(true);\n for(int i = 0; i < lbl.size() && i < max;i++){\n lbl.get(i).setVisible(true);\n select.get(i).setVisible(true);\n deselect.get(i).setVisible(true);\n if(chars.contains(i)){\n select.get(i).setEnabled(false);\n deselect.get(i).setEnabled(true);\n }else{\n select.get(i).setEnabled(true);\n deselect.get(i).setEnabled(false);\n }\n }\n }",
"private int getPageEnd() {\n if(itemrow==0)\n return 1;\n if(itemrow%displaylimit!=0)\n return itemrow / displaylimit + 1;\n else\n return itemrow / displaylimit;\n }",
"public static String paginate(HttpServletRequest request, HttpServletResponse response) {\n List page = FastList.newInstance();\n Paginator paginator = PaginatorFactory.getPaginator(request);\n String action = UtilCommon.getParameter(request, \"action\");\n String pageNumberString = UtilCommon.getParameter(request, \"pageNumber\");\n \n if (paginator != null) {\n try {\n if (pageNumberString != null) {\n try {\n long pageNumber = Long.parseLong(pageNumberString);\n page = paginator.getPageNumber(pageNumber);\n }\n catch (NumberFormatException e) {\n Debug.logWarning(\"Failed to get page numer [\" + pageNumberString + \"] to to format error: \" + e.getMessage(), module);\n page = paginator.getCurrentPage();\n }\n }\n else if (action == null || \"getCurrentPage\".equals(action)) {\n page = paginator.getCurrentPage();\n }\n else if (\"getNextPage\".equals(action)) {\n page = paginator.getNextPage();\n }\n else if (\"getPreviousPage\".equals(action)) {\n page = paginator.getPreviousPage();\n }\n else if (\"getFirstPage\".equals(action)) {\n page = paginator.getFirstPage();\n }\n else if (\"getLastPage\".equals(action)) {\n page = paginator.getLastPage();\n }\n else {\n Debug.logWarning(\"Paginate action [\" + action + \"] not supported.\", module);\n page = paginator.getCurrentPage();\n }\n }\n catch (ListBuilderException e) {\n return doListBuilderExceptionResponse(request, response, paginator, e);\n }\n }\n return doPaginationResponse(request, response, paginator, page);\n }",
"@RequestMapping(value=\"/main1\") \n public String main(Model model,Integer start){\n int count=allpageService.getCount();\n System.out.println(count);\n //List<page> pages1=allpageService.getOne((start-1)*8, 8);//start是页数\n model.addAttribute(\"count\",count);//总数\n //model.addAttribute(\"pages\",pages);\n // model.addAttribute(\"pages1\",pages1);//一页\n return \"main\"; \n }",
"private int retornaPerPageEsperado(int page) {\n return given().\n param(\"page\",page).\n when().\n get(LISTA_USUARIOS_ENDPOINT).\n then().\n // faz de novo a requisicao pra checar se realmente bateu no endpoint\n statusCode(HttpStatus.SC_OK).\n // extrai o valor do campo per_page e atribui a variavel\n extract().\n path(\"per_page\");\n }",
"public static void main(String[] args) throws Exception {\n PdfDocument doc = new PdfDocument();\r\n //Set margin\r\n PdfUnitConvertor unitCvtr = new PdfUnitConvertor();\r\n PdfMargins margin = new PdfMargins();\r\n margin.setTop(unitCvtr.convertUnits(2.54f, PdfGraphicsUnit.Centimeter, PdfGraphicsUnit.Point));\r\n margin.setBottom(margin.getTop());\r\n margin.setLeft(unitCvtr.convertUnits(3.17f, PdfGraphicsUnit.Centimeter, PdfGraphicsUnit.Point));\r\n margin.setRight(margin.getLeft());\r\n\r\n drawCover(doc.getSections().add(), margin);\r\n drawContent(doc.getSections().add(), margin);\r\n drawPageNumber(doc.getSections().get(1), margin, 1, doc.getSections().get(1).getCount());\r\n\r\n //Save pdf file.\r\n doc.saveToFile(\"output/pagination.pdf\");\r\n doc.close();\r\n }",
"public int getNumberOfPages(HttpServletRequest request,\n SubmissionInfo subInfo) throws ServletException\n {\n // always just one page of initial questions\n return 1;\n }",
"public static void printAll() {\n\t\tint i=0;\n\t\twhile(i%2==0) {\n\t\t\ti+=2;\n\t\t\tSystem.out.print(i+\" \");\n\t\t\tif(i==100) break;\n\t\t}\n\t}",
"private void updatePageLabel(int current, int max)\n {\n String info = MessageFormat.format(\"Page {0}/{1}\", current, max);\n pageInfoLabel.setText(info);\n }",
"public void checkCountforButtonNextandPrevious() {\n Cursor coo = SQLAbsensi.fetchDatabaseAll();\n\n //Page Next\n if (firstDigit != 0) {\n pageCountStartAt = firstDigit * 10;\n int save = coo.getCount() / 10;\n if (save < firstDigit) {\n pageCountEndAt = (firstDigit + 1) * 10;\n } else {\n pageCountEndAt = firstDigit * 10 + (coo.getCount() % 10);\n myButton = (Button) findViewById(R.id.nextpagebutton);\n myButton.setVisibility(View.INVISIBLE);\n }\n } else {\n pageCountStartAt = 0;\n if (coo.getCount() > 10) {\n pageCountEndAt = 10;\n myButton = (Button) findViewById(R.id.nextpagebutton);\n myButton.setVisibility(View.VISIBLE);\n } else {\n pageCountEndAt = coo.getCount();\n }\n }\n\n //Page Previous\n if (firstDigit > 0) {\n myButton = (Button) findViewById(R.id.previouspagebutton);\n myButton.setVisibility(View.VISIBLE);\n } else {\n myButton = (Button) findViewById(R.id.previouspagebutton);\n myButton.setVisibility(View.INVISIBLE);\n }\n Refresh();\n\n }",
"@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n System.out.println(\"load more\" + totalItemsCount);\n loadMore(totalItemsCount);\n }",
"private void setShowPageSizeEntries(BoundwithForm boundwithForm) {\n List<Integer> pageSizes = documentSearchConfig.getPageSizes();\n if (org.apache.commons.collections.CollectionUtils.isEmpty(pageSizes)) {\n pageSizes.add(10);\n pageSizes.add(25);\n pageSizes.add(50);\n pageSizes.add(100);\n }\n boundwithForm.setShowPageSize(pageSizes.toString());\n }",
"void nextPage() throws IndexOutOfBoundsException;",
"PagingLink(int pageNumber) {\n setText(String.valueOf(pageNumber));\n }",
"boolean hasPageNo();",
"boolean hasPageNo();",
"@ImageOptions(flipRtl = true)\r\n\t\tImageResource simplePagerNextPage();",
"protected void loadNextPage(){\n\n if(!isShowingSearchedVotes) {\n setLoadingMoreItems(true);\n RikdagskollenApp.getInstance().getRiksdagenAPIManager().getVotes(new VoteCallback() {\n\n @Override\n public void onVotesFetched(List<Vote> votes) {\n setShowLoadingView(false);\n voteList.addAll(votes);\n getAdapter().notifyDataSetChanged();\n setLoadingMoreItems(false);\n }\n\n @Override\n public void onFail(VolleyError error) {\n setLoadingMoreItems(false);\n decrementPage();\n }\n }, getPageToLoad());\n\n incrementPage();\n }\n }",
"@Override\n\t\tpublic void onLoadMore() {\n\t\t\tpageIndex++;\n\t\t\tloadInfo(pageIndex, 1);\n\t\t\tif (DzqcStu.isDebug) {\n\t\t\t\tLog.i(\"pageIndex------\", pageIndex+\"\");\n\t\t\t}\n\t\t}",
"public void addPages() {\t\t\n\t\tpage1 = new Opera2ActionsTransformationWizardPage1(selection, operaModel);\n\t\taddPage(page1);\t\n\t}",
"@Override\n\t\tpublic void onLoadMore(int page, int totalItemsCount) {\n\t\t\tpresenter.loadRecordsPage(page);\n\t\t}",
"@Test\n\tpublic void testGetAllElementsUsingPaginationOfSecondPage() throws Exception {\n\t\tint size = 100;\n\t\tIntStream.range(1, size + 1).mapToObj(i -> \"element\" + i).map(ElementEntity::new)\n\t\t\t\t.forEach(this.elementDao::create);\n\n\t\t// WHEN I get elements of the page 1 and size 90\n\t\tElementBoundary[] result = this.restTemplate.getForObject(this.baseUrl + \"?page={page}&size={size}\",\n\t\t\t\tElementBoundary[].class, this.userEntity.getUserSmartspace(),\n\t\t\t\tthis.userEntity.getUserEmail(), 1, 90);\n\n\t\t// THEN I receive 10 elements\n\t\tassertThat(result).hasSize(10);\n\t\t\n\t\t\n\t}",
"public static void look() {\r\n\t\t\r\n\t\tif (ths.page == 2) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}",
"public int getGatheredPages() {\r\n return gatheredPages;\r\n }",
"@Override\n\tpublic void loadNextPage() {\n\t\tif(curr_content.isLastPage){\n\t\t\tPigAndroidUtil.showToast(mContext, \"以是最后一页:\", 3000);\n\t\t}else{\n\t\t\texchangeNext(m_bookFactory.getNextPageContent(next_content));\n\t\t}\n\t}",
"LiveData<PagedList<Response>> pagedList();",
"private int countPaging(final int commonCount, final int offsetLine) {\n\t\tint result = commonCount % offsetLine > 0 ? Math.floorDiv(commonCount, offsetLine) + 1\n\t\t\t\t: Math.floorDiv(commonCount, offsetLine);\n\t\treturn result;\n\t}",
"@Override\n\t\t\tpublic void onPageSelected(int position2) {\n\t\t\t\tnextPosition2 = position2;\n\t\t\t}",
"void showResults() throws IOException{\n\t\tCountService cs = CountService.getInstance();\n\t\t\n\t\tout.write(\"/------------------------Resultado Final------------------------/\" + \"\\n\" );\n\t\tout.write(\"O número total de links pesquisados é:\" + cs.getCount() + \"\\n\");\n\t\tout.write(\"O número de links Quebrados é:\" + cs.getCountQueb() + \"\\n\");\n\t\tout.write(\"O número de links ok é:\" + cs.getCountOk() + \"\\n\");\n\t\tout.write(\"O número de links Proibidos é:\" + cs.getCountProibido()+ \"\\n\");\n\t\tout.write(\"O número de métodos impedidos é:\" + cs.getCountImpedido()+ \"\\n\");\n\t\tout.write(\"O número de redirecionados é:\" + cs.getCountRedirecionado()+ \"\\n\");\n\t\tout.write(\"Erro Server:\" + cs.getCountErroServer()+ \"\\n\");\n\t\tout.write(\"Unknown Host Name:\" + cs.getCountUnknownHost()+ \"\\n\");\n\t\tout.write(\"Bad Gatway:\" + cs.getCount502()+ \"\\n\");\n\t\tout.write(\"O número resposta diferente de 4.. e 200 é:\" + cs.getCountPesq() + \"\\n\");\n\t\tout.write(\"/------------------------------------------------------------------/\" + \"\\n\");\n\t\tString dateTime = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\").format(new Date()); \n\t\tout.write(\"Fim dos testes: \" + dateTime + \"\\n\");\n\t\tSystem.out.println(\"Teste finalizado\");\n\t}"
]
| [
"0.66394883",
"0.6310845",
"0.6247585",
"0.61983025",
"0.61640596",
"0.61640596",
"0.61640596",
"0.61640596",
"0.61383164",
"0.6091821",
"0.5991357",
"0.5966327",
"0.5966327",
"0.5966327",
"0.5889809",
"0.58841777",
"0.5883868",
"0.586598",
"0.5829298",
"0.5827352",
"0.57951015",
"0.57908714",
"0.5780314",
"0.577099",
"0.5766914",
"0.5730893",
"0.57247216",
"0.57233757",
"0.5708504",
"0.5704697",
"0.56806695",
"0.5679879",
"0.566676",
"0.566676",
"0.56452703",
"0.5638047",
"0.5630627",
"0.56188864",
"0.56101614",
"0.55798686",
"0.5577108",
"0.5577108",
"0.5564818",
"0.55513513",
"0.55378515",
"0.54934156",
"0.5484387",
"0.5484387",
"0.5484387",
"0.5484387",
"0.5484387",
"0.5484387",
"0.54747206",
"0.5474592",
"0.544965",
"0.54324317",
"0.5422923",
"0.54110724",
"0.5400033",
"0.53992814",
"0.5389569",
"0.53816843",
"0.5378062",
"0.5377893",
"0.5373948",
"0.53616273",
"0.53540957",
"0.5350993",
"0.53432333",
"0.53404325",
"0.53377277",
"0.5333893",
"0.53248626",
"0.5323717",
"0.5319273",
"0.53169906",
"0.53005487",
"0.529459",
"0.5271312",
"0.5268514",
"0.52623874",
"0.5257511",
"0.5250412",
"0.52415",
"0.52366525",
"0.5234549",
"0.5233792",
"0.5233792",
"0.5229702",
"0.52225554",
"0.5217761",
"0.52175826",
"0.5210386",
"0.52045214",
"0.5204441",
"0.5204346",
"0.5204204",
"0.52028424",
"0.5185601",
"0.51826614",
"0.5180661"
]
| 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int side1=sc.nextInt();
int side2=sc.nextInt();
int side3=sc.nextInt();
int prmter=calcPermtrOfTrngle(side1,side2,side3);
System.out.println("perimeter of given sides of triangle: "+prmter);
sc.close();
} | {
"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 |
Get Role by roleId | public Role getByRoleId(long roleId); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Role getRoleById(int id);",
"public SecRole getRoleById(Long role_Id);",
"public static Role getById(long roleId) {\n for (Role role : values()) {\n if (role.getId() == roleId) return role;\n }\n return null;\n }",
"TDLRoleEntity getTDLRole(Long id);",
"@Override\r\n\tpublic Role getRoleById(int id) {\n\t\treturn getHibernateTemplate().get(Role.class, id);\r\n\t}",
"@Override\n\tpublic Role findTheRole(Integer id) {\n\t\treturn mapper.findTheRole(id);\n\t}",
"public Role getRole(int roleId) throws QuestionBankSystemException,\n\t\t\tQuestionBankException;",
"Role findById(int id);",
"@Override\n\tpublic Role findById(Integer id) {\n\t\treturn roleDao.findById(id);\n\t}",
"@Override\r\n\tpublic Role getRole(String roleID) {\n\t\treturn roleDao.getRole(roleID);\r\n\t}",
"@Override\r\n\tpublic Role findById(Serializable id) {\n\t\treturn roleDao.findById(id);\r\n\t}",
"public Role getRole(int role_id) {\n\t\tRole role = new Role();\n\t\tString sql = \"select * from role where role_id = ?;\";\n\t\tConnection conn = new DBUtilFactory().getConn();\n\t\ttry {\n\t\t\tps = conn.prepareStatement(sql);\n\t\t\tps.setInt(1, role_id);\n\t\t\trs = ps.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\t// stupid set method......\n\t\t\t\trole.setRole_describe(rs.getString(\"role_describe\"));\n\t\t\t\trole.setRole_id(rs.getInt(\"role_id\"));\n\t\t\t\trole.setRole_power(rs.getInt(\"role_power\"));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} finally {\n\t\t\tclearUp(conn);\n\t\t}\n\t\treturn role;\n\t}",
"public SysRole getSysRole(final Long roleId);",
"@Override\n\tpublic Role findById(int id) {\n\t\treturn this.roleMapper.selectByPrimaryKey(id);\n\t}",
"public Optional<Roles> selectByIdRole(int id){\n\treturn rolesDao.findById(id);\n\t}",
"@GetMapping(\"/role/{id}\")\n\t@ApiOperation(value = \"Get role\", notes = \"Pass id of the user whose role is to be retrieved\")\n\tpublic String getRole(@ApiParam(value = \"id of user\", required = true) @PathVariable(\"id\") String id) {\n\t\treturn userRepository.findById(id).get().getRole();\n\t}",
"public static String getRole(int id) throws SQLException {\n boolean cdt1 = Checker.checkValidRolesId(id);\n // if it is a valid role id, establish a connection\n if (cdt1) {\n Connection connection = DatabaseDriverHelper.connectOrCreateDataBase();\n String role = DatabaseSelector.getRole(id, connection);\n connection.close();\n return role;\n }\n return null;\n }",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleId() {\n return roleId;\n }",
"public String getRoleId() {\n return roleId;\n }",
"UsercontrollerRole selectByPrimaryKey(Integer roleId);",
"public Role RoleById(Integer id) {\n\t\treturn userDao.RoleById(id);\r\n\t}",
"public Long getRoleId() {\r\n return roleId;\r\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"public Long getRoleId() {\n return roleId;\n }",
"@Override\r\n\tpublic AdminRole getAdminRole(int roleid) {\n\t\treturn adminRoleDao.selectByPrimaryKey(roleid);\r\n\t}",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\n return roleId;\n }",
"public Integer getRoleId() {\r\n return roleId;\r\n }",
"public String getRoleId()\r\n\t{\r\n\t\treturn roleId;\r\n\t}",
"public String getrole(String id){\n User user = getById(id);\n return user.getRole();\n }",
"SysRole selectByPrimaryKey(String id);",
"public void setRoleId(String roleId) {\n this.roleId = roleId;\n }",
"@Override\n\tpublic Role get(Class<Role> entityClass, Serializable id) {\n\t\treturn baseDao.get(entityClass, id);\n\t}",
"public Long getRoleId() {\n\t\treturn roleId;\n\t}",
"JindouyunRole selectByPrimaryKey(Integer id);",
"@Transactional(propagation = Propagation.NOT_SUPPORTED)\r\n @Cacheable (value = \"Userrole\", key=\"#p0\")\r\n\tpublic GetRoleOutput getRole(UserroleId userroleId) {\r\n\r\n\t\tUserroleEntity foundUserrole = _userroleManager.findById(userroleId);\r\n\t\tif (foundUserrole == null) {\r\n\t\t\tlogHelper.getLogger().error(\"There does not exist a userrole wth a id=%s\", userroleId);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tRoleEntity re = _userroleManager.getRole(userroleId);\r\n\t\treturn mapper.roleEntityToGetRoleOutput(re, foundUserrole);\r\n\t}",
"public int getRoleId() {\r\n\t\treturn roleId;\r\n\t}",
"public Integer getRoleId() {\n\t\treturn roleId;\n\t}",
"public void setRoleId(Long roleId) {\r\n this.roleId = roleId;\r\n }",
"public void setRoleId(Integer roleId) {\r\n this.roleId = roleId;\r\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(String roleId)\r\n\t{\r\n\t\tthis.roleId = roleId;\r\n\t}",
"public void setRoleId(Long roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Long roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Long roleId) {\n this.roleId = roleId;\n }",
"public void setRoleId(Long roleId) {\n this.roleId = roleId;\n }",
"@Override\n\tpublic Role getRoleByuserId(int userId) {\n\t\treturn this.RoleDao.selectByPrimaryKey(userId);\n\t}",
"User_Role selectByPrimaryKey(Integer id);",
"public Integer RoleByUser(Integer id) {\n\t\treturn userDao.RoleByUser(id);\r\n\t}",
"public Long getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"public String getRoleid() {\n return roleid;\n }",
"@GetMapping(value = \"/{id}\")\n public ResponseEntity<Role> getById(@PathVariable(value = \"id\") String id) {\n\n Role role = roleService.getById(id);\n\n if (role == null) {\n return ResponseEntity.notFound().build();\n } else {\n return ResponseEntity.ok().body(role);\n }\n }",
"TblRoles findByIdRol(long idRol);",
"public void setRoleId(int roleId) {\r\n\t\tthis.roleId = roleId;\r\n\t}",
"public void setRoleId(String roleId) {\n\t\tthis.role_id = roleId;\n\t}",
"SysRoleFunction selectByPrimaryKey(Integer id);",
"SysRoleDO selectByPrimaryKey(Long id);",
"SecurityRole getRole();",
"UserRole loadUserRole(int id) throws DataAccessException;",
"public Integer getRoleid() {\r\n return roleid;\r\n }",
"@Override\n\tpublic User_role findById(Integer id) throws Exception{\n\t\treturn userMapper.findById(id);\n\t}",
"RoleResource selectByPrimaryKey(Integer roleResId);",
"public void setRoleId(Long roleId) {\n\t\tthis.roleId = roleId;\n\t}",
"@Transactional\n\tpublic UmTbUserRole findByID(long id) {\n\t\treturn dao.findByID(id);\n\t}",
"UserRole selectByPrimaryKey(String id);",
"UserRole selectByPrimaryKey(String id);",
"com.message.MessageInfo.RoleVO getRole();",
"public void setRoleId(Integer roleId) {\n\t\tthis.roleId = roleId;\n\t}",
"RoleUser selectByPrimaryKey(String id);",
"public MetaRole getMetaRole(int iRole);",
"BsUserRole selectByPrimaryKey(Integer id);",
"public BigDecimal getRoleId() {\r\n return roleId;\r\n }",
"@PermitAll\n @Override\n public Role getRole(String roleCode) {\n return getRepository().getEntity(Role.class, roleCode);\n }",
"public void setRoleid(Long roleid) {\n this.roleid = roleid;\n }",
"Optional<Role> findByName(RoleName roleName);",
"public Role getRole(final String roleName) {\n for (final Role role : roles) {\n if (roleName.equals(Role.extractRoleName(role.getQualifiedName()))) {\n return role;\n }\n }\n return null;\n }",
"String getRole();",
"String getRole();",
"public Integer getIdRole() {\n\t\treturn idRole;\n\t}",
"@Override\r\n\tpublic List<RolePermission> selectByRoleId(BigInteger roleId) {\n\t\treturn rolePermissionMapper.selectByRoleId(roleId);\r\n\t}",
"public void setRoleid(Integer roleid) {\r\n this.roleid = roleid;\r\n }",
"public void setRoleId(String roleId) {\n this.roleId = roleId == null ? null : roleId.trim();\n }"
]
| [
"0.8684049",
"0.8535913",
"0.7973827",
"0.787502",
"0.7844016",
"0.78381747",
"0.773506",
"0.76809126",
"0.7624546",
"0.75922257",
"0.7588466",
"0.75787944",
"0.75753635",
"0.75246555",
"0.7476787",
"0.7471571",
"0.743726",
"0.73727953",
"0.73727953",
"0.73727953",
"0.73394275",
"0.73287714",
"0.72885245",
"0.72818637",
"0.72818637",
"0.72818637",
"0.72818637",
"0.72814155",
"0.726888",
"0.726888",
"0.726888",
"0.726888",
"0.726888",
"0.726888",
"0.726888",
"0.726888",
"0.72620034",
"0.7225032",
"0.7219419",
"0.7184093",
"0.7099185",
"0.70472974",
"0.7039132",
"0.7028018",
"0.7022041",
"0.7013278",
"0.7012425",
"0.6992764",
"0.69737566",
"0.6972214",
"0.6972214",
"0.6972214",
"0.6972214",
"0.6972214",
"0.6972214",
"0.6972214",
"0.6972214",
"0.6962337",
"0.69572264",
"0.69572264",
"0.69572264",
"0.69572264",
"0.69061905",
"0.6900961",
"0.68883497",
"0.68795586",
"0.6872318",
"0.6872318",
"0.6872318",
"0.6852086",
"0.67866397",
"0.67807156",
"0.6778175",
"0.675323",
"0.67525226",
"0.67457664",
"0.67390215",
"0.6721236",
"0.6718195",
"0.6695826",
"0.66913927",
"0.668145",
"0.6679976",
"0.6679976",
"0.6675441",
"0.66732305",
"0.6600185",
"0.6592463",
"0.65067065",
"0.65014267",
"0.6498272",
"0.6497242",
"0.64897346",
"0.6461192",
"0.64565825",
"0.64565825",
"0.6449387",
"0.6431283",
"0.64200133",
"0.64095056"
]
| 0.89857477 | 0 |
get bookings with affordable price | @RequestMapping(value="/affordable/{price}", method=RequestMethod.GET)
@ApiMethod(description = "Get all hotel bookings there is a price per night less than provided value")
public List<HotelBooking> getAffordable(@ApiPathParam(name="price") @PathVariable double price) {
return this.bookingRepository.findByPricePerNightLessThan(price);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"OrderBook getOrderBook(String symbol, Integer limit);",
"List<List<Order>> getAllOrdersByPrice() throws OrderBookOrderException;",
"public BigDecimal getPriceList();",
"double getPricePerPerson();",
"public void listBooksByPrice(int price) {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price \" +\n \"FROM books \" +\n \"WHERE Price = ?\";\n\n try (Connection conn = this.connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n\n // Set values\n pstmt.setInt(1, price);\n\n ResultSet rs = pstmt.executeQuery();\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }",
"public Book[] getRecommendBook(){\n\t\n\t String stmnt = String.format(\n \"SELECT * FROM book \" );\n ResultSet rs = executeQuery(stmnt);\n ArrayList<Book> arr = resultSetPacker(rs, Book.class);\n\n return arr.toArray(new Book[arr.size()]);\n}",
"public void getBookAvailability() {\n getBookReservationEligibility();\n }",
"public BigDecimal getBSCA_ProfitPriceList();",
"public Book[] getRecommendBooks()\n {\n String stmnt = String.format(\n \"SELECT * FROM book LIMIT %d \",\n PAGE_LIMIT);\n ResultSet rs = executeQuery(stmnt);\n ArrayList<Book> arr = resultSetPacker(rs, Book.class);\n\n return arr.toArray(new Book[arr.size()]);\n\n }",
"List<PriceInformation> getPriceForProduct(ProductModel product);",
"@GET(\"/books/{isbn}/commercialOffers\")\n Call<Offers> getBestOffers(@Path(\"isbn\") String param);",
"public BigDecimal getPriceListEntered();",
"public Float getBookPrice() {\n return bookPrice;\n }",
"public HashMap<Long, OfferBook> getOfferBooks() {\n if (offerBooks == null) {\n\n return new HashMap<Long, OfferBook>();\n }\n return offerBooks;\n }",
"Book getLatestBook();",
"public BigDecimal getBSCA_ProfitPriceListEntered();",
"public List<Hotel> findByPriceBetween(double low, double high);",
"List<SpotPrice> getAll();",
"public ArrayList<Bookings> getMyBookings() {\n return myBookings;\n }",
"@Override\n public Set<Book> topBooksByPrice(Integer number) {\n List<Book> allBooks = this.repository.findAll();\n\n Set<Book> topBooks = new HashSet<>(allBooks);\n return topBooks.stream()\n .sorted(comparing(Book::getPrice, comparing(Math::abs))\n .reversed())\n .limit(number)\n .collect(Collectors.toSet());\n }",
"public Books getBooks(String title,String authors,String isbn,String publisher);",
"Price[] getTradePrices();",
"java.util.List<com.google.cloud.channel.v1.PurchasableOffer> \n getPurchasableOffersList();",
"List<OfferPrice> findByCustomer(Customer customer);",
"public List<Order> getOrdersByPrice(Integer low, Integer height) throws Exception;",
"com.google.cloud.channel.v1.PurchasableOffer getPurchasableOffers(int index);",
"public double getPotatoesPrice();",
"public BigDecimal getPriceEntered();",
"double getPrice();",
"double getPrice();",
"double getPrice();",
"List<SellOrder> findAscPendingOrdersByPriceTime(Date toTime, BigMoney price, OrderBookId orderBookId, int size);",
"List<Price> findAll();",
"List<Booking> getBookingByUserID(LibraryUser libraryUser);",
"public Collection<Object> findPurchaserSpendMoreMoney(){\n\t\tcheckAdminRole();\n\t\tCollection<Object> res=new ArrayList<Object>();\n\t\tres=purchaserRepository.findPurchaserSpendMoreMoney();\n\t\treturn res;\n\t}",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getBookOffering();",
"public List<BookReviewBean> getBookReviewsById(String bid) throws Exception {\n List<BookReviewBean> reviews = new ArrayList<BookReviewBean>();\n String query = \"SELECT poi.rating, poi.review FROM POItem poi INNER JOIN PO p ON poi.id=p.id AND p.status='ORDERED' INNER JOIN book b ON poi.bid=b.bid WHERE poi.bid=? AND poi.rating>0 ORDER BY poi.id DESC\";\n try (Connection con = this.ds.getConnection();\n PreparedStatement p = con.prepareStatement(query)) {\n p.setString(1, bid);\n ResultSet r = p.executeQuery();\n while (r.next()) {\n BookReviewBean review = new BookReviewBean(r.getInt(\"rating\"), r.getString(\"review\"));\n reviews.add(review);\n }\n return reviews;\n }\n }",
"public List<List<?>> getItemsWithHigherPrice(double price) {\n\t\tSqlFieldsQuery query = new SqlFieldsQuery(\"SELECT * FROM Item WHERE attr(22) > 0\");\n\n\t\t// Executing the query.\n\t\treturn ignite.getOrCreateCache(\"ItemCache\").query(query).getAll();\n\t}",
"java.util.List<cosmos.base.v1beta1.CoinOuterClass.Coin> \n getPriceList();",
"Set<Art> getArtByPrice(Double upper, Double lower);",
"public BigDecimal getPriceLimitEntered();",
"public Set<Booking> getBooking() {\n return booking;\n }",
"public double getPrice();",
"List<Book> getBooksFromPeriod(LocalDate from,LocalDate to);",
"List<Product> findByPrice(BigDecimal price);",
"List<Book> getAllBooks();",
"public List<Book> getBooks() {\r\n \t\t// switch dates\r\n \t\tif (filter_dateFrom.compareTo(filter_dateTo) > 0) {\r\n \t\t\tCalendar tmp = filter_dateFrom;\r\n \t\t\tfilter_dateFrom = filter_dateTo;\r\n \t\t\tfilter_dateTo = tmp;\r\n \t\t}\r\n \r\n \t\tDate yearFrom = filter_dateFrom.getTime();\r\n \t\tDate yearTo = filter_dateTo.getTime();\r\n \r\n \t\t// genre\r\n \t\tGenre genre = null;\r\n \t\tif (!filter_genre.isEmpty() && !filter_genre.equalsIgnoreCase(\"all\")) {\r\n \t\t\tgenre = genreMgr.findByName(filter_genre);\r\n \t\t\tif (genre == null) {\r\n \t\t\t\tSystem.err.println(\"Badly working database encoding!\");\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\treturn bookMgr.find(filter_name, filter_author, yearFrom, yearTo, genre, filter_isbn_issn);\r\n \t}",
"public Collection<ReservationDetails> getBookCopies(int bookId) throws RemoteException;",
"public BigDecimal getPriceListOld();",
"BigDecimal getPrice();",
"public Items[] findWherePriceEquals(double price) throws ItemsDaoException;",
"public BigDecimal getPriceLimit();",
"public Double getPrice();",
"public Book[] getFavoriteBooks()\n {\n String stmnt = String.format(\n \"SELECT * FROM book ORDER BY rating DESC LIMIT %d \",\n PAGE_LIMIT);\n ResultSet rs = executeQuery(stmnt);\n ArrayList<Book> arr = resultSetPacker(rs, Book.class);\n\n return arr.toArray(new Book[arr.size()]);\n\n }",
"List<SpotPrice> getAll(Integer pageNumber, Integer pageSize);",
"long getPrice();",
"@Override\n public int getPrice() {\n return 20;\n }",
"public void changePrice(Booking booking, float price);",
"double purchasePrice();",
"public BigDecimal getBSCA_ProfitPriceLimitEntered();",
"@Override\n\tpublic double getPrice() {\n\t\treturn 20;\n\t}",
"public ArrayList<Offer> getOffersbyCarID(Integer id);",
"String getPrice();",
"List<Bill> findBillsForReservation(long reservationId);",
"com.google.openrtb.OpenRtb.BidRequest getBidrequest();",
"public String getBSCA_PrintPrice2();",
"@Override\n public double getPrice() {\n return souvenir.getPrice() + 20;\n }",
"Booking getBookingById(BookingKey bookingKey);",
"Price getHighestPricedTrade(Collection<Trade> trades);",
"public List<Borrow> getIssuedBook() {\n\t\tList<Borrow> borrows = new ArrayList<Borrow>();\n\t\ttry (Connection conn = DriverManager.getConnection(this.hostUrl,this.username,this.password)) {\n\t\t System.out.println(\"Database connected!\");\n\t\t\tStatement st = null;\n\t\t\ttry {\n\t\t\t\tst = conn.createStatement();\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 ResultSet rs = null;\n\t String sql = \"SELECT br.id,br.book_id,br.user_id,br.issue_date,br.return_date,br.remarks,br.return_on,b.name,u.name FROM borrows br \" + \n\t \t\t\"LEFT JOIN users u ON u.id=br.user_id \" + \n\t \t\t\"LEFT JOIN books b on b.id=br.book_id \" + \n\t \t\t\"WHERE return_on is null \" + \n\t \t\t\"order by issue_date DESC\";\n\t try {\n\t\t\t\trs = st.executeQuery( sql );\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\ttry {\n\t\t\t\twhile (rs.next()) { \n\t\t\t\t\tBorrow borrow = new Borrow();\n\t\t\t\t\tborrow.setId(rs.getInt(1));\n\t\t\t\t\tborrow.setBook_id(rs.getInt(2));\n\t\t\t\t\tborrow.setUser_id(rs.getInt(3));\n\t\t\t\t\tborrow.setIssue_date(rs.getString(4));\n\t\t\t\t\tborrow.setReturn_date(rs.getString(5));\n\t\t\t\t\tborrow.setRemarks(rs.getString(6));\n\t\t\t\t\tborrow.setReturn_on(rs.getString(7));\n\t\t\t\t\tborrow.setBook_name(rs.getString(8));\n\t\t\t\t\tborrow.setUser_name(rs.getString(9));\n\t\t\t\t\t System.out.println(borrow.toString());\n\t\t\t\t\t borrows.add(borrow);\n\t\t\t\t }\n\t\t\t conn.close(); \n\t\t\t} catch (NumberFormatException | 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} catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t\treturn borrows;\n\t}",
"public void returnBook()\n\t{\n\t\tavailableBooks++;\n\t}",
"Price getTradePrice();",
"public BigDecimal getBSCA_ProfitPriceLimit();",
"List<IntegralBook> selectByExample(IntegralBookExample example);",
"BigDecimal getOpenPrice();",
"public double getPrice(){return price;}",
"@gw.internal.gosu.parser.ExtendedProperty\n public entity.ImpactTestingRateBook[] getRatebooks();",
"void getMarketOrders();",
"List<Book> getBooksByAuthorId(Integer authorId);",
"List<PriceRow> getPriceInformationsForProduct(ProductModel model);",
"public Pricing getPricingForId(int productId);",
"public double getPriceFromAvailability(Availability availability){\n for(int i=0; i<prices.size(); i++){\n if (prices.get(i).getFlightNumber().equals(availability.getFlightNumber()) && prices.get(i).getClassCode().equals(availability.getClassCode()) && prices.get(i).getEndDate().after(availability.getDepartureDate()) && prices.get(i).getStartDate().before(availability.getDepartureDate()) ){\n return prices.get(i).getPrice();\n }\n }\n return Integer.MAX_VALUE;\n }",
"abstract public double getPrice();",
"ObservableList<Booking> getFilteredBookingList();",
"public double getPrice() {\n double price = BASE_PRICE;\n for (Topping topping : toppings) {\n if (topping.isPremium()) {\n price += 1.25;\n } else {\n price += 0.75;\n }\n }\n return price;\n }",
"public float getPrices(Integer id);",
"List<Reservation> findReservationsByUserBookId (Long userId);",
"public ArrayList<Bike> getAllAvailableBikes() {\n bikelist = new ArrayList<>();\n \n try(Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(ALL_AVAILABLE_BIKES);\n ResultSet rs = ps.executeQuery()){\n \n while(rs.next()){\n Bike bike = getBikeFromRS(rs);\n bikelist.add(bike);\n }\n \n }catch(Exception e){\n System.out.println(\"Exception: \" + e);\n }\n return bikelist;\n }",
"public List<Book> getByAuthor(String name );",
"public void f3(List<Book> a) {\r\n List<Book> list = new ArrayList<>();\r\n for (Book o : a) {\r\n if (o.getPrice() >= 20) {\r\n list.add(o);\r\n }\r\n }\r\n //sort by ascending\r\n Collections.sort(list, new Comparator<Book>() {\r\n @Override\r\n public int compare(Book o1, Book o2) {\r\n if (o1.getPrice() > o2.getPrice()) {\r\n return 1;\r\n } else if (o1.getPrice() < o2.getPrice()) {\r\n return -1;\r\n } else {\r\n return 0;\r\n }\r\n }\r\n });\r\n //add\r\n int index = 0;\r\n for (int i = 0; i < a.size(); i++) {\r\n if (a.get(i).getPrice() >= 20) {\r\n a.remove(i);\r\n a.add(i, list.get(index));\r\n index++;\r\n }\r\n }\r\n }",
"public Set<Integer> listBookings(){\r\n\t\treturn bookings.keySet();\r\n\t}",
"boolean hasPrice();",
"boolean hasPrice();",
"boolean hasPrice();",
"public static ArrayList<BHP> getBHPsOnDemand(Resident resident, Date date) {\n\n List<Prescription> listPrescriptions = PrescriptionTools.getOnDemandPrescriptions(resident, date);\n LocalDate lDate = new LocalDate(date);\n long begin = System.currentTimeMillis();\n EntityManager em = OPDE.createEM();\n ArrayList<BHP> listBHP = new ArrayList<BHP>();\n\n try {\n Date now = new Date();\n\n String jpql = \" SELECT bhp \" +\n \" FROM BHP bhp \" +\n \" WHERE bhp.prescription = :prescription \" +\n \" AND bhp.soll >= :from AND bhp.soll <= :to AND bhp.dosis > 0 \";\n Query queryOnDemand = em.createQuery(jpql);\n\n for (Prescription prescription : listPrescriptions) {\n queryOnDemand.setParameter(\"prescription\", prescription);\n queryOnDemand.setParameter(\"from\", lDate.toDateTimeAtStartOfDay().toDate());\n queryOnDemand.setParameter(\"to\", SYSCalendar.eod(lDate).toDate());\n\n ArrayList<BHP> listBHP4ThisPrescription = new ArrayList<BHP>(queryOnDemand.getResultList());\n\n PrescriptionSchedule schedule = prescription.getPrescriptionSchedule().get(0);\n // On Demand prescriptions have exactly one schedule, hence the .get(0).\n // There may not be more than MaxAnzahl BHPs resulting from this prescription.\n if (listBHP4ThisPrescription.size() < schedule.getMaxAnzahl()) {\n // Still some BHPs to go ?\n for (int i = listBHP4ThisPrescription.size(); i < schedule.getMaxAnzahl(); i++) {\n BHP bhp = new BHP(schedule);\n bhp.setIst(now);\n bhp.setSoll(date);\n bhp.setSollZeit(SYSCalendar.BYTE_TIMEOFDAY);\n bhp.setDosis(schedule.getMaxEDosis());\n bhp.setState(BHPTools.STATE_OPEN);\n listBHP4ThisPrescription.add(bhp);\n }\n }\n listBHP.addAll(listBHP4ThisPrescription);\n // outcome BHPs\n// listBHP.addAll(new ArrayList<BHP>(queryOutcome.getResultList()));\n }\n\n Collections.sort(listBHP, getOnDemandComparator());\n } catch (Exception se) {\n OPDE.fatal(se);\n } finally {\n em.close();\n }\n SYSTools.showTimeDifference(begin);\n return listBHP;\n }",
"public static Collection<BookReview> getALL() {\n }",
"public double getPrice() {\n return price;\n }",
"private int calculatePrice() {\n int price = numberOfCoffees * 5;\n\n return price;\n\n\n }",
"public double totalPrices()\r\n {\r\n double total = 0;\r\n //Write a loop here to total the book prices. Each object in the ArrayList bookList is a Book, so you can\r\n //use the getter as you loop through and add the price to total\r\n if(bookList != null){\r\n for(Book book: bookList){\r\n total += book.getPrice();\r\n }\r\n }\r\n return total;\r\n }",
"@Override\r\n\tpublic List<Price> queryPriceBei(Date start,Date end) {\n\t\tList<Price> list = homePageDao.queryPriceBei(start,end);\r\n\t\treturn list;\r\n\t}"
]
| [
"0.6097147",
"0.6080061",
"0.5957368",
"0.59478414",
"0.59373116",
"0.5881509",
"0.586784",
"0.5857796",
"0.58552045",
"0.58449936",
"0.58263445",
"0.58237475",
"0.5814309",
"0.58020633",
"0.57893866",
"0.57695067",
"0.57560366",
"0.570447",
"0.57005507",
"0.57004786",
"0.56971675",
"0.5690688",
"0.5669166",
"0.566",
"0.5648553",
"0.56236905",
"0.5597539",
"0.55973583",
"0.559224",
"0.559224",
"0.559224",
"0.5573127",
"0.5553439",
"0.5546332",
"0.5545381",
"0.553831",
"0.5531451",
"0.55305755",
"0.55204314",
"0.5508033",
"0.5501431",
"0.5496108",
"0.5480738",
"0.547077",
"0.5469874",
"0.54667103",
"0.5463437",
"0.5461756",
"0.54614913",
"0.5453281",
"0.54484415",
"0.54439163",
"0.54375535",
"0.54337406",
"0.54294395",
"0.5428606",
"0.5424672",
"0.54207146",
"0.5420633",
"0.5415567",
"0.54085904",
"0.54083866",
"0.53643405",
"0.5357356",
"0.53569126",
"0.53557646",
"0.5355664",
"0.53550076",
"0.5347012",
"0.5346805",
"0.53332734",
"0.53290325",
"0.53231865",
"0.53227013",
"0.5317162",
"0.53154784",
"0.5307024",
"0.53029674",
"0.53027767",
"0.5302156",
"0.53018385",
"0.530165",
"0.52952003",
"0.5287665",
"0.52795666",
"0.52793366",
"0.5278212",
"0.5277864",
"0.5277133",
"0.5277005",
"0.52720016",
"0.52652365",
"0.52652365",
"0.52652365",
"0.5261159",
"0.5259208",
"0.5258589",
"0.525626",
"0.5245999",
"0.5243421"
]
| 0.67778766 | 0 |
Spring Data JPA repository for the User entity. | public interface UserRepository extends JpaRepository<User, String> {
Optional<User> findOneByUsername(String username);
boolean existsByUsername(String username);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Repository\npublic interface UserRepository extends JpaRepository<User, Long> {\n\n /**\n * Find a user by given id\n *\n * @param id db id of the user\n * @return user object\n */\n User findById(long id);\n\n /**\n * Find a user by given username\n *\n * @param username username of the user\n * @return user object\n */\n User findUserByUsername(String username);\n\n\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User, Long> {\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User, Long> {\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User, Long> {\n}",
"@Repository\npublic interface UserRepository extends CrudRepository<User, Long> {\n User findByUsername(String username);\n\n User findByEmail(String email);\n}",
"public interface UserRepository extends JpaRepository<User, Long> {\n List<User> findByFirstName(String firstName);\n User findByUserId(String userId);\n User findByEmail(String email);\n User save(User user);\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User,Integer> {\n User findOne(int id);\n User findByUsername(String username);\n User findByToken(String token);\n User findByEmail(String email);\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User,Long> {\n User findUserByUsername(String username);\n}",
"public interface UserRepository extends JpaRepository<UserEntity, Long> {\n\n UserEntity findByUsername(String username);\n}",
"public interface UserRepository extends CrudRepository<User, Long> {\n\n User findById(long id);\n\n List<User> findAll();\n\n User save(User user);\n\n User findByEmail(String email);\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User,Long> {\n}",
"public interface UserRepository extends JpaRepository<User, Long>{\n}",
"public interface UserRepository extends CrudRepository<User, Long> {\r\n\t\r\n\tUser findByUsername(String username);\r\n\r\n\tUser findByActivationCode(String code);\r\n\t\r\n\tList<User> findAllByRoles(Role role);\r\n\r\n\tUser findById(long id);\r\n\r\n\r\n\r\n\t\r\n\r\n}",
"public interface UserRepository extends JpaRepository<User, String> {\n User findByUsername(String username);\n}",
"public interface UserRepository extends JpaRepository<User, Integer> {\n User findByUsername(String username);\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User,Long>{\n\n User findById(long id);\n\n\n //User findByUsername(String username);\n\n User findByWxOpenId(String wxOpenId);\n}",
"@Repository\npublic interface UserRepository extends CrudRepository<User, Long> {\n User findByEmail(String email);\n}",
"@Repository\r\npublic interface UserRepository extends CrudRepository<User,Long>{\r\n User findByUsername(String username);\r\n}",
"public interface UserRepository extends JpaRepository<User, String> {\n\n User findByEmail(String email);\n\n}",
"public interface UserRepository extends CrudRepository<User, Integer> {\n User findByUsername(String username);\n}",
"@Repository\npublic interface UserDao extends JpaRepository<User, Integer> {\n User findByUsernameAndPassword(String username,String password);\n\n User findByUsername(String username);\n}",
"public interface UserRepository extends Repository<User, Long> {\n User save(User user);\n User findByLogin(String login);\n User findById(long id);\n}",
"public interface UserRepository extends JpaRepository<Users, Integer> {\n Users findByEmail(String email);\n}",
"public interface UserRepository extends CrudRepository<User, Long> {\n List<User> findByUsername(String username);\n}",
"@Repository\npublic interface UserRepository extends CrudRepository<User,Long> {\n // Fetches a single (or none) user by the specified username\n User findByUsername(String username);\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User,Integer>{\n}",
"public interface UserRepository extends JpaRepository<User, Long> {\n\n User findByNome(String nome);\n\n User findByLogin(String login);\n\n\n}",
"public interface UserRepository extends CrudRepository<User, Integer>\n{\n public User findByUsername(String username);\n}",
"public interface UserRepository extends CrudRepository<User, String> {\n}",
"public interface UserRepository extends JpaRepository<User, Long> {\n /**\n * @param username Username to be searched from the JPA database\n * @return User object if one was found\n */\n User findByName(String username);\n\n /**\n * @param name Username or part of a username to be searched\n * @return List of users if the search criteria was met\n */\n List<User> findByNameContaining(String name);\n\n /**\n * @param email Email of user to be searched\n * @return User object if one was found with the provided email\n */\n User findByEmailIs(String email);\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User, Integer> {\n Optional<User> findOneById(String userId);\n Optional<User> findOneByIdAndPassword(String userId, String password);\n Optional<User> findOneUserByName(String email);\n List<User> findAll();\n}",
"@Repository(\"userRepository\")\npublic interface UserRepository extends PagingAndSortingRepository<User, Long> {\n\n /**\n * Find user by the Email.\n *\n * @param email user email\n * @return user\n */\n User findByEmail(String email);\n\n /**\n * List all the active users.\n *\n * @param active active status\n * @return users list\n */\n List<User> findUserByActive(Integer active);\n\n /**\n * List active users with pagination.\n *\n * @param pageable page\n * @param active active status\n * @return user\n */\n @Query(value = \"SELECT user FROM User user WHERE user.active = :active\")\n Page<User> findByUserIsActive(Pageable pageable, @Param(\"active\") Integer active);\n \n \n /**\n * Find user by the username.\n *\n * @param userName user name.\n * @return user\n */\n @Query(value = \"SELECT user FROM User user WHERE user.active = 1 AND user.userName = :userName\")\n User findByUsername(@Param(\"userName\") String userName);\n \n /**\n * Find user by the emailId.\n *\n * @param email email.\n * @return user\n */\n @Query(value = \"SELECT user FROM User user WHERE user.active = 1 AND user.email = :email\")\n User findByEmailId(@Param(\"email\") String email);\n\n}",
"public interface UserRepository extends CrudRepository<User, Long> {\n\n User findByName(String name);\n}",
"@Repository\r\npublic interface UserRepository extends JpaRepository<User, Long> {\r\n\r\n\tUser findUserByToken(String token);\r\n}",
"public interface UserRepository extends JpaRepository<User , Long>{\n\n User findByEmail(final String email);\n}",
"public interface UserRepository extends JpaRepository<User, Integer>, JpaSpecificationExecutor<User> {\n User findByLogin(String login);\n\n User findByPhoneNumber(String phoneNumber);\n}",
"@Transactional\n@Component\npublic interface UserRepository extends CrudRepository<User,Integer> {\n List<User> findByName(String name);\n User findByPseudo(String pseudo);\n}",
"public interface UserRespository extends JpaRepository<User,Long>{\n}",
"public interface UserRepository extends CrudRepository<User, Long> {\n\n public User findAllByName(String name);\n\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User, Long> {\n Optional<User> findByEmail(String email);\n\n Optional<User> findByUsernameOrEmail(String username, String email);\n\n @Query(\"SELECT name, username, email FROM User WHERE Id = :userId\")\n Optional<User> findUserInfoById(@Param(\"userId\") Long userId);\n\n List<User> findByIdIn(List<Long> userIds);\n\n Optional<User> findByUsername(String email);\n\n Boolean existsByUsername(String username);\n\n Boolean existsByEmail(String email);\n\n}",
"public interface UserRepository extends CrudRepository<User, Integer> {\n}",
"public interface UserRepository extends CrudRepository<User, Integer> {\n}",
"@Service\n@Transactional\npublic interface UserRepository extends JpaRepository<User, Long> {\n\n User findUserByUsername(String username);\n}",
"@Repository\npublic interface AppUserRepository extends CrudRepository<AppUser, Long> {\n\n AppUser findByUsername(String username);\n}",
"@Repository\npublic interface UserRepository extends CrudRepository<User, Integer>{\n User findByUserName(String userName);\n User findByToken(String token);\n User findByPartnerId(int id);\n User findByStudentId(int id);\n User findByStudentIdAndStatus(int id, String status);\n List<User> findByRole(Role role);\n}",
"@Repository\npublic interface UsuariosPerfilRepository extends JpaRepository<UsuarioPerfil, Integer> {\n\n\tUsuario findByUsername(String username);\t\n\n}",
"@Repository\npublic interface SysUserRepository extends JpaRepository<SysUser,Integer> {\n}",
"@Repository\npublic interface UserRepository extends BaseRepository<User,Long> {\n\n User findByAccount(String account);\n}",
"public interface UserRepo extends JpaRepository<User, Long> {\n User findByUsername(String username);\n\n User findByActivationCode(String code);\n}",
"public interface TPUserRepository extends JpaRepository<TPUser, Long> {\n\n}",
"@RestController\npublic interface UserRepository extends CrudRepository<User, Long> {\n\t\n\tpublic List<User> findByEmail(String email);\n\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User, Long> {\n\n User findByUserName(String username);\n\n Long countByEmail(String email);\n}",
"@Repository\npublic interface UsersIdentityRepository extends JpaRepository<UsersIdentity, Long> {\n}",
"@Repository\npublic interface UsersRepository extends CrudRepository<User, Integer> {\n // select * from user username = ?\n public User findByUsername(String username);\n\n public User findById(Integer id);\n}",
"public interface UserRepo extends CrudRepository<User, Integer> {\n\n}",
"public interface UserActionRepository extends CrudRepository<UserEntity, Long> {\r\n List<UserEntity> findByEmailAndPassword(String username, String password);\r\n}",
"@Repository\r\npublic interface UserRepository extends JpaRepository<UserBean,Integer> {\r\n\r\n// Long countByMUserAccount(String mUserAccount);\r\n//\r\n// Long deleteByDelFlag(String delFlag);\r\n//\r\n// List<UserBean> removeByDelFlag(String delFlag);\r\n//\r\n// List<UserBean> readByMUserAccountAAndMUSERAndMUserPassword(String mUserAccount,String mUserPassword);\r\n//\r\n// List<UserBean> readByMUserAccountOrOrderByCreateTimeAsc(String mUserAccount, Date createTime);\r\n\r\n List<UserBean> findByMUserAccountAndMUserPassword(String mUserAccount,String mUserPassword);\r\n\r\n UserBean save(UserBean userBean);\r\n}",
"@Repository\npublic interface UserRepository extends CrudRepository<UserDao,Long> {\n\n UserDao findByName(String username);\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User,Integer> {\n //implementation will be provided to run time\n}",
"public interface AppUserRepository extends JpaRepository<AppUser, Integer> {\n AppUser findOneByUsername(String username);\n}",
"@Repository\npublic interface UserDetailsRepository extends JpaRepository<UserDetails, Long> {\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User,Long>{\n public User findByAccountId(String accountId);\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User, Integer> {\n\n /**\n * Returns employees who are not involved in one of the projects.\n *\n * @return list of free employees\n */\n @Query(\"select u from User u where u.project is null and u.role = 'EMPLOYEE'\")\n List<User> getFreeEmployees();\n\n /**\n * Returns project managers who are not involved in one of the projects.\n *\n * @return list of free project managers\n */\n @Query(\"select u from User u where u.managedProject is null and u.role = 'PM'\")\n List<User> getFreeManagers();\n\n /**\n * Returns the user by specified first and last names.\n *\n * @param firstName of the required user\n * @param lastName of the required user\n * @return specified user\n */\n @Query(\"select u from User u where u.firstName = :firstName and u.lastName = :lastName\")\n User getUserByFirstAndLastName(@Param(\"firstName\") String firstName,\n @Param(\"lastName\") String lastName);\n\n /**\n * Returns the user by specified username.\n *\n * @param username of the required user\n * @return specified user\n */\n @Query(\"select u from User u where u.username = :username\")\n User getUserByUsername(@Param(\"username\") String username);\n\n /**\n * Returns the user by specified email.\n *\n * @param email of the required user\n * @return specified user\n */\n @Query(\"select u from User u where u.email = :email\")\n User getUserByEmail(@Param(\"email\") String email);\n\n /**\n * Returns all employees in the system.\n *\n * @return list of all employees\n */\n @Query(\"select u from User u where u.role = 'EMPLOYEE'\")\n List<User> getAllEmployees();\n\n /**\n * Returns all managers in the system.\n *\n * @return list of all employees\n */\n @Query(\"select u from User u where u.role = 'PM'\")\n List<User> getAllManagers();\n\n /**\n * Returns the total number of customers in the system.\n *\n * @return total number of customers\n */\n @Query(\"select count(u) from User u where u.role = 'CUSTOMER'\")\n Long getTotalCustomersCount();\n\n /**\n * Returns the total number of employees in the system.\n *\n * @return total number of employees\n */\n @Query(\"select count(u) from User u where u.role = 'EMPLOYEE'\")\n Long getTotalEmployeesCount();\n\n /**\n * Returns the latest hired employees.\n *\n * @param pageable abstract interface for pagination information\n * @return list of latest hired employees\n */\n @Query(\"select u from User u where u.role = 'EMPLOYEE' order by u.hireDay desc\")\n List<Task> getLatestHiredEmployees(Pageable pageable);\n}",
"@Repository\npublic interface UserAuthorityRepository extends CrudRepository<UserAuthority, Long> {\n\tPage<UserAuthority> findAll(Pageable pageable);\n\n\tList<UserAuthority> findByUser(RegisteredUser registeredUser);\n\n\t@Query(value = \"select * from authorities where username = :username\", nativeQuery = true)\n\tList<UserAuthority> findByUsername(@Param(\"username\") String username);\n}",
"@Repository\npublic interface IUserRepository extends JpaRepository<UserOB,Long> {\n @Query(\"SELECT u FROM UserOB u WHERE u.active = ?1\")\n List<UserOB> findUserByActivity (Boolean aActive);\n @Query(\"SELECT u FROM UserOB u WHERE u.login LIKE ?1\")\n UserOB findUserByLogin (String aLogin);\n @Query(\"SELECT u FROM UserOB u WHERE u.email LIKE ?1\")\n UserOB findUserByEmail (String aEmail);\n @Query(\"SELECT u FROM UserOB u WHERE u.name = ?1\")\n List<UserOB> findUserByName (String aName);\n @Query(\"SELECT u FROM UserOB u WHERE u.surname = ?1\")\n List<UserOB> findUserBySurname (String aSurname);\n @Query(\"SELECT u FROM UserOB u WHERE u.name = ?1 AND u.surname = ?2\")\n List<UserOB> findUserByNameAndSurname (String aName, String aSurname);\n @Query(\"SELECT u FROM UserOB u WHERE u.role.name = ?1\")\n List<UserOB> findUserByRole(String aRoleOB);\n\n\n}",
"public interface UserRepository extends GenericRepository<User> {\n\n /**\n * Gets the user with such login and password combination.\n *\n * @param login user login\n * @param password user password\n * @return corresponding User instance or null if such instance is absent\n * @throws DaoException if it fails during User instance retrieval\n */\n User getUserByLoginAndPassword(String login, String password) throws DaoException;\n\n /**\n * Checks if there is a User with the indicated login.\n *\n * @param login login to be checked\n * @return true if there is already a User with the login or false otherwise.\n * @throws DaoException if it fails during lookup process\n */\n boolean doesSuchLoginExist(String login) throws DaoException;\n\n}",
"@Repository\npublic interface ILoginRepository extends JpaRepository<Login, Long> {\n\n\t\n\t// Method declarations.\n\t/**\n\t * \n\t * <p>Method that find a user by user name.\n\t * \n\t * @param username User name\n\t * @return User name object.\n\t * */\n Login findByUserName (String username);\n}",
"@Repository\npublic interface UsuarioRepository extends JpaRepository<EUsuario, Long> {\n\t\n\t/**\n\t * Buscar por ID\n\t * \n\t * @param usuarioId\n\t * @return EUsuario\n\t */\n\tpublic EUsuario findById(long usuarioId);\n\t\n\t/**\n\t * Buscar por nome ou parcial\n\t * \n\t * @param nome\n\t * @return List<EUsuario>\n\t */\n\tpublic List<EUsuario> findByNome(String nome);\n\t\n\t/**\n\t * Buscar por login\n\t * \n\t * @param login\n\t * @return EUsuario\n\t */\n\tpublic EUsuario findByLogin(String login);\n\t\n\t/**\n\t * Buscar por Cargo\n\t * \n\t * @param cargo\n\t * @return List<EUsuario>\n\t */\n\tpublic List<EUsuario> findByCargo(String cargo);\n\t\n\t/**\n\t * Buscar por Nivel de Acesso\n\t * \n\t * @param nivelAcesso\n\t * @return List<EUsuario>\n\t */\n\tpublic List<EUsuario> findByNivelAcesso(int nivelAcesso);\n\t\n\t/**\n\t * Executa query no banco\n\t * \n\t * @param query\n\t * @return List<EUsuario>\n\t */\n\t@Query(\"SELECT u FROM EUsuario u WHERE u.nome LIKE :query\")\n\tpublic List<EUsuario> findByQuery(@Param(\"query\") String query);\n\t\n}",
"public interface UserRepository extends JpaRepository<User, Integer> {\n\n User findByUserName(String userName);\n\n User findByUserNameAndUserType(String userName, Integer userType);\n\n @Query(\"from User u where u.userName=:userName\")\n User findUser(@Param(\"userName\") String userName);\n\n}",
"public interface UserRepository extends CrudRepository<User, Integer>{\n User findFirstByUserName(String userName);\n}",
"public interface UsersRepository extends CrudRepository<Users,String> {\n}",
"@Repository\npublic interface BaseUserRepository extends JpaRepository<BaseUser,String> {\n\n}",
"public interface UserRepo extends BaseRepo<User, Integer>, UserCustomRepo {\n\tpublic User findByUserEmail(String userEmail);\n}",
"public interface UserRepository extends CrudRepository<User,Integer> {\n\n User findByAccount(String account);\n}",
"@Repository\npublic interface UserDao extends BaseDao<User, Integer> {\n User getUserByEmail(String email);\n}",
"public interface AdminUserRepository extends JpaRepository<User,Integer>{\n}",
"public interface UsersRepository extends CrudRepository<Users, Integer> {\n\n}",
"public interface UserRepository extends CrudRepository<User, String> {\n\n @Query(\"select u from User u where u.username=:username and u.password=:password\")\n public User login(@Param(\"username\") String username, @Param(\"password\") String password);\n\n @Query(\"select u from User u where u.mobile=:mobile and u.password=:password\")\n public User loginByMobile(@Param(\"mobile\") String mobile, @Param(\"password\") String password);\n\n User findUserByMobile(String mobile);\n}",
"public interface AdUserRepository extends JpaRepository<AdUser, Long>{\n\n /**\n * <h2>根据用户名查找用户记录</h2>\n * */\n AdUser findByUsername(String username);\n\n}",
"public interface UserRoleRepository extends JpaRepository<UserRoleEntity, Long> {\n\n List<UserRoleEntity> findByUser(UserEntity entity);\n}",
"public interface UsersRepo extends CrudRepository<Users, Long>\n{\n}",
"public interface UserRepository extends PagingAndSortingRepository<User, Long> {\n}",
"public interface UserRepository extends PagingAndSortingRepository<User, String>, JpaSpecificationExecutor<User> {\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<SysUser, Long> {\n\n @Query(value =\" from SysUser u where u.username= :userName \")\n public SysUser findByUserName(@Param(\"userName\") String userName);\n}",
"public interface UserRepository extends JpaRepository<User, Long> {\r\n\r\n /**\r\n * 读写分离中的写模型的查找对象只根据实体对象的唯一标识\r\n * spring-data jpa中自动实现,可以不用另行定义\r\n */\r\n User findById(String id);\r\n\r\n}",
"public interface UserRepository {\n public List<User> list();\n\n public void add(User user);\n\n public User load(Long id);\n\n public void update(User user);\n\n public void delete(Long id);\n}",
"public interface UserRepository extends CrudRepository<User, Long>\n{\n\n User findByEmail(String email);\n List<User> findAllByOrderByIdAsc();\n}",
"public interface UserRepository extends JpaRepository<User, Long>, UserRepositoryCustom {\n\t@Query(\"SELECT u FROM User u LEFT JOIN FETCH u.roles\")\n\tList<User> findAllEager();\n\n\t@Query(\"SELECT u FROM User u LEFT JOIN FETCH u.roles r LEFT JOIN FETCH r.privileges rp WHERE u.id = :id\")\n\tUser findOneEager(@Param(\"id\") Long id);\n\n\t@Query(\"SELECT u FROM User u WHERE u.username = :username\")\n\tUser findByUsername(@Param(\"username\") String username);\n\n\t@Query(\"SELECT u FROM User u LEFT JOIN FETCH u.roles r LEFT JOIN FETCH r.privileges rp WHERE u.username = :username\")\n\tUser findByUsernameEager(@Param(\"username\") String username);\n}",
"public interface UserCustomRepository {\n\n}",
"public interface UserDetailsRepository extends CrudRepository<UserDetails, Long> {\n}",
"public interface UserDao extends JpaRepository<UserInfo, Long> {\n UserInfo findByUserName(String userName);\n}",
"@NoRepositoryBean\npublic interface UserBaseRepository<T extends User> extends CrudRepository<T, Long> {\n\n\t/**\n\t * Method findFirstByEmail\n\t * \n\t * @param email the user email.\n\t * @return the user having the passed email or null if no user is found.\n\t */\n\tpublic T findFirstByEmail(String email);\n\n}",
"public interface UserRepository extends JpaRepository<User, Long> {\n\n @Query(\"select u From User u where u.email='SYSTEM'\")\n User findSystemUser();\n\n @Query(\"select u From User u where u.email = :username\")\n List<User> loadUsersByUserName(@Param(\"username\") String username);\n\n @Query(\"select u from User u join u.roles r where r.name = :rolename\")\n List<User> loadUsersByRoleName(@Param(\"rolename\")String rolename);\n\n @Query(\"select u From User u Where u.email like :ctx Or u.userNumber like :ctx Or u.profile.phone like :ctx\")\n List<User> findByEmailOrUserNumberOrPhone(@Param(\"ctx\") String compare);\n}",
"@Repository\npublic interface WareUserRepository extends JpaRepository<WareUser,Long> {\n WareUser findByUsername(String username);\n WareUser findByMobile(String mobile);\n}",
"public interface UserRepository extends JpaRepository<User, String> {\r\n\r\n\tList<User> findByNameLike(String name); \r\n\t\r\n\r\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User, Long> {\n\n Optional<User> findOneByActivationKey(String activationKey);\n\n List<User> findAllByActivatedIsFalseAndCreatedDateBefore(Instant dateTime);\n\n Optional<User> findOneByResetKey(String resetKey);\n\n Optional<User> findOneByEmail(String email);\n\n Optional<User> findOneByLogin(String login);\n\n @EntityGraph(attributePaths = \"authorities\")\n User findOneWithAuthoritiesById(Long id);\n\n @EntityGraph(attributePaths = \"authorities\")\n @Cacheable(cacheNames=\"users\")\n Optional<User> findOneWithAuthoritiesByLogin(String login);\n\n Page<User> findAllByLoginNot(Pageable pageable, String login);\n\n @Query(\"select Max(user.id) from User user\")\n Long getLastId();\n\n @Query(\"select userExt from UserExt userExt where userExt.user.id = :userID\")\n UserExt findUserExtByUserId(@Param(\"userID\") Long userID);\n\n}",
"@Repository\npublic interface IUserRepository extends JpaRepository<UserOB, Long> {\n\n @Query(\"SELECT u FROM UserOB u WHERE u.name = ?1 AND u.lastName = ?2\")\n List<UserOB> findByFullName(String aName, String aLastName);\n\n @Query(\"SELECT u FROM UserOB u WHERE u.email = ?1\")\n UserOB findByEmail(String email);\n\n @Query(\"SELECT u FROM UserOB u WHERE u.company.id = ?1\")\n List<UserOB> findByCompanyId(Long aId);\n\n @Query(\"SELECT u FROM UserOB u WHERE u.typUzytkownika =?1\")\n List<UserOB> findByUserType(ETypUzytkownika aType);\n\n}",
"@Repository\npublic interface IJpaUserDAO extends JpaRepository<JpaUser,Long>{\n\n JpaUser findByName(String name);\n\n JpaUser findByNameAndAge(String name, Integer age);\n\n}",
"@Repository\npublic interface UserMapper {\n\n User findById(@Param(\"id\") Integer id);\n User findBypassword(User user);\n void addUser(User user);\n\n}",
"public interface ParametrageAppliRepository extends CrudRepository<ParametresAppliDTO, Integer> {\n /**\n * This method will find an User instance in the database by its email.\n * Note that this method is not implemented and its working code will be\n * automatically generated from its signature by Spring Data JPA.\n */\n\n public ParametresAppliDTO findByTypeEnvironnement(int idTypeEnvironement);\n\n\n}",
"@Repository\npublic interface BoardRepository extends JpaRepository<Board, Long> {\n\tBoard findByUser(User user);\n}"
]
| [
"0.7788384",
"0.77266103",
"0.77266103",
"0.77266103",
"0.77101535",
"0.7673711",
"0.76494795",
"0.7637344",
"0.76358175",
"0.7624807",
"0.76134866",
"0.76099986",
"0.76023585",
"0.75999415",
"0.7574195",
"0.7567044",
"0.75621367",
"0.7501558",
"0.74831223",
"0.74527997",
"0.7442509",
"0.7436775",
"0.7419216",
"0.7416678",
"0.74086916",
"0.74037236",
"0.74027026",
"0.7398414",
"0.7388614",
"0.73849165",
"0.73805404",
"0.73752534",
"0.7347949",
"0.7328627",
"0.7321615",
"0.7304983",
"0.72687656",
"0.72680557",
"0.7263368",
"0.7245348",
"0.7234699",
"0.7234699",
"0.7224286",
"0.72211134",
"0.72132343",
"0.721189",
"0.72097486",
"0.7186937",
"0.7185542",
"0.71819365",
"0.71710545",
"0.71485084",
"0.71434385",
"0.7115536",
"0.7098819",
"0.7094561",
"0.7093578",
"0.709064",
"0.7086765",
"0.70705616",
"0.7056724",
"0.7046209",
"0.7044599",
"0.7038543",
"0.70011973",
"0.6999217",
"0.6997875",
"0.6989766",
"0.6973131",
"0.6972521",
"0.69647026",
"0.694878",
"0.6947441",
"0.6941766",
"0.6932584",
"0.69219667",
"0.6920567",
"0.69115967",
"0.69048744",
"0.6900099",
"0.6864558",
"0.68645525",
"0.6859172",
"0.68359256",
"0.67975163",
"0.6797222",
"0.67895347",
"0.6787729",
"0.67822355",
"0.6776451",
"0.6772856",
"0.6770099",
"0.6768977",
"0.6762038",
"0.6742868",
"0.6738054",
"0.67328584",
"0.672251",
"0.67182004",
"0.67137605",
"0.67133445"
]
| 0.0 | -1 |
A special database query that can perfom a flexible query and build/populate a table | public static ObservableList<Omni> Quaeres(Omni bean) throws SQLException {
ObservableList<Omni> result = FXCollections.observableArrayList();
ResultSet rs = null;
String query = "SELECT * FROM $table WHERE $column like ?";
String sql = query.replace("$table", bean.getTable()).replace("$column", bean.getColumn());
try(
Connection conn = DbUtil.getConn(DbType.MYSQL);
PreparedStatement stmt = conn.prepareStatement(sql);
) {
int inputType = bean.getInputType();
switch (inputType) {
case 1:
stmt.setInt(1, bean.getNumber());
break;
case 2:
stmt.setString(1, "%" + bean.getWord() +"%");
break;
default:
System.out.println("What");
break;
}
rs = stmt.executeQuery();
while(rs.next()) {
//////////COLUMN NAMES/////////////
ArrayList<String> columnNames = new ArrayList();
ArrayList<String> columnTypes = new ArrayList();
ResultSetMetaData rsmd = rs.getMetaData();
for (int i = 1; i < rsmd.getColumnCount() + 1; i++) {
columnNames.add(rsmd.getColumnName(i));
columnTypes.add(rsmd.getColumnTypeName(i));
}
/////////COLUMN VALUES///////////////
Omni output = new Omni();
int lenght = columnNames.size();
switch(lenght) {
case 2:
System.out.println("The table is diplomatocourses");
output = new Omni(
rs.getInt(1),
rs.getInt(2));
break;
case 3:
System.out.println("The table is attendance");
output = new Omni(
rs.getString(1),
rs.getInt(2),
rs.getInt(3));
break;
case 4:
System.out.println("The table is submissions");
output = new Omni(
rs.getInt(1),
rs.getInt(2),
rs.getInt(3),
rs.getInt(4));
break;
case 5:
if ("INT".equals(columnTypes.get(1))) {
System.out.println("The table is assessment");
output = new Omni(
rs.getInt(1),
rs.getInt(2),
rs.getString(3),
rs.getString(4),
rs.getString(5));
} else {
System.out.println("The table is diploma");
output = new Omni(
rs.getInt(1),
rs.getString(2),
rs.getString(3),
rs.getString(4),
rs.getString(5));
}
break;
case 6:
if ("INT".equals(columnTypes.get(4))) {
System.out.println("The table is courses");
output = new Omni(
rs.getInt(1),
rs.getString(2),
rs.getString(3),
rs.getString(4),
rs.getInt(5),
rs.getInt(6));
} else {
System.out.println("The table is admin");
output = new Omni(
rs.getInt(1),
rs.getString(2),
rs.getString(3),
rs.getString(4),
rs.getString(5),
rs.getString(6));
}
break;
case 8:
System.out.println("The table is caseworker");
output = new Omni(
rs.getInt(1),
rs.getString(2),
rs.getString(3),
rs.getString(4),
rs.getString(5),
rs.getString(6),
rs.getString(7),
rs.getString(8));
break;
case 11:
System.out.println("The table is students");
output = new Omni(
rs.getInt(1),
rs.getInt(2),
rs.getInt(3),
rs.getString(4),
rs.getString(5),
rs.getString(6),
rs.getString(7),
rs.getInt(8),
rs.getInt(9),
rs.getInt(10),
rs.getInt(11));
break;
default:
System.out.println("What");
}
bean.setColumnNames(columnNames);
bean.setColumnTypes(columnTypes);
result.add(output);
System.out.println(output);
}
} catch (Exception e) {
System.out.println(e);
return null;
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"SelectQuery createSelectQuery();",
"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 }",
"private String constructSQL() {\n\t\tString sql = \"\";\n\t\tif (!minAgeSet) {\n\t\t\tsql = \"SELECT E.EMP_ID, E.EMP_FULLNAME\" + \" FROM \" + empTable\n\t\t\t+ \" E\";\n\t\t} else {\n\t\t\tsql = \"SELECT E.EMP_ID, E.EMP_FULLNAME\" + \" FROM \" + empTable\n\t\t\t+ \" E WHERE E.EMP_BIRTH_DATE <= ? \";\n\t\t}\n\n\t\toriSqlLength = sql.length();\n\n\t\tStringTokenizer empTok = new StringTokenizer(employee, \",\");\n\t\tStringTokenizer calcTok = new StringTokenizer(calcGroup, \",\");\n\t\tStringTokenizer payTok = new StringTokenizer(payGroup, \",\");\n\t\tStringTokenizer teamTok = new StringTokenizer(team, \",\");\n\n\t\t// check if any of the selects have been used.\n\n\t\tif (empTok.hasMoreTokens() && !empTok.nextToken().equalsIgnoreCase(all))\n\t\t\tsql = groupSelect(\"employee\", sql);\n\t\tif (calcTok.hasMoreTokens()\n\t\t\t\t&& !calcTok.nextToken().equalsIgnoreCase(all))\n\t\t\tsql = groupSelect(\"calcGroup\", sql);\n\t\tif (payTok.hasMoreTokens() && !payTok.nextToken().equalsIgnoreCase(all))\n\t\t\tsql = groupSelect(\"payGroup\", sql);\n\t\tif (teamTok.hasMoreTokens()\n\t\t\t\t&& !teamTok.nextToken().equalsIgnoreCase(all))\n\t\t\tsql = groupSelect(\"team\", sql);\n\t\t\n\t\treturn sql;\n\t}",
"public abstract Statement queryToRetrieveData();",
"SELECT createSELECT();",
"public static QueryDelegate generateTableQuery(String tableName) {\n String FROM_QUERY = \" FROM \" + tableName;\n String SELECT_QUERY=\" SELECT * \" +\n FROM_QUERY;\n String COUNT_QUERY = \"SELECT count(*) \" + FROM_QUERY;\n String CONTAINS_QUERY = \"SELECT * FROM \" + tableName + \" WHERE id = ?\";\n\n return generateQueryDelegate(SELECT_QUERY, COUNT_QUERY, CONTAINS_QUERY);\n }",
"public void makeSql() {\n\t\tfor(int i=0; i<arr_sql.length; i++) {\n\t\t\tarr_sql[i] = new StringBuffer();\n\t\t}\n\t\t\n\t\t/*\n\t\t * 공통코드 쿼리\n\t\t * 대리점구분 : CU006\n\t\t * 직판구분 : CU012\n\t\t * 지역 : SY006\n\t\t * 계약상태 : CU013\n\t\t * 사용유무 : SY011\n\t\t * 보증보험회사 : CU010\n\t\t * 하위대리점여부 : CU011\n\t\t */\n\t\tarr_sql[0].append (\"SELECT\t\t\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append (\"\t' ' head, ' ' detail, '전체' detail_nm \\n\")\n\t\t\t\t .append (\"FROM DUAL \\n\")\n\t\t\t\t .append (\"UNION ALL \\n\")\n\t\t\t\t .append (\"SELECT \\n\")\n\t\t\t\t .append (\"\tB.head, B.detail, B.detail_nm \\n\")\n\t\t\t\t .append (\"FROM \\n\")\n\t\t\t\t .append (\"\tSALES.TSY011 A, \\n\")\n\t\t\t\t .append (\"\tSALES.TSY010 B \\n\")\n\t\t\t\t .append (\"WHERE 1=1 \\n\")\n\t\t\t\t .append (\" AND A.head = B.head \\n\")\n\t\t\t\t .append (\" AND B.head = ? \\n\")\n\t\t\t\t .append (\" AND LENGTH (rtrim(B.detail)) > 0 \\n\");\n\t\t\n\t\t/*\n\t\t * 대리점 조회\n\t\t */\n\t\tarr_sql[1].append(\"SELECT T1.client_sid\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처SID \t*/\n\t \t\t .append(\"\t\t ,T1.vend_cd \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* [회계]거래처 코드 \t*/\n\t \t\t .append(\"\t\t ,T1.client_cd \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처 코드 \t*/\n\t \t\t .append(\"\t\t ,T1.client_nm \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처 명 \t*/\n\t \t\t .append(\"\t\t ,T1.client_gu \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처구분 :CU005 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.agen_gu \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 대리점구분 :CU006 \t*/\n\t \t\t .append(\"\t\t ,T1.dir_yn \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 직판여부 :CU012 \t*/\n\t \t\t .append(\"\t\t ,T1.area_cd \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지역코드 :SY006 \t*/\n\t \t\t .append(\"\t\t ,T1.sal_dam_sid \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 영업담당자코드[TSY410] */\n\t \t\t .append(\"\t\t ,T1.client_dam_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처담당자 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.tel_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 전화번호 \t*/\n\t \t\t .append(\"\t\t ,T1.mobile_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 휴대전화 \t*/\n\t \t\t .append(\"\t\t ,T1.fax_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* FAX번호 \t*/\n\t \t\t .append(\"\t\t ,T1.e_mail \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 이메일 \t*/\n\t \t\t .append(\"\t\t ,T1.zip_cd \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 우편번호[TSY110] */\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.address1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 주소1 \t*/\n\t \t\t .append(\"\t\t ,T1.address2 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 주소2 \t*/\n\t \t\t .append(\"\t\t ,T1.commi_rate \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t \t\t .append(\"\t\t ,T1.cunt_status \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 계약상태 :CU013 \t*/\n\t \t\t .append(\"\t\t ,T1.bancod \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행코드 [BANKCODE] */\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.bank_acc_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행계좌번호 \t*/\n\t \t\t .append(\"\t\t ,T1.bank_acct_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 예금주 \t*/\n\t \t\t .append(\"\t\t ,T1.use_yn \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 사용여부 :SY011 \t*/ \n\t \t\t .append(\"\t\t ,T1.client_url\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 홈페이지 URL\t\t\t\t*/\n\t \t\t .append(\"\t\t ,T2.sal_dam_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 영업담당자명 \t*/\n\t \t\t .append(\"\t\t ,T3.vend_nm \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 거래처명 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T4.bannam \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행명 \t*/\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU006',T1.agen_gu) AS agen_gu_name \t\t\t\t\t\\n\")\t/* 대리점구분명 \t\t\t\t*/ \n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU012',T1.dir_yn) AS dir_yn_name \t\t\t\t\t\\n\")\t/* 직판여부명 \t\t\t\t*/ \n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY006',T1.area_cd) AS area_nm\t\t\t\t\t\t\t\\n\")\t/* 지역명 \t\t\t\t*/\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU013',T1.cunt_status) AS cunt_status_name \t\t\t\\n\")\t/* 계약상태명 \t\t\t\t*/\n\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY011',T1.use_yn) AS use_yn_name \t\t\t\\n\")\t/* 사용여부명 \t\t\t \t*/\n\n\t \t\t .append(\"FROM SALES.TCU030 T1 LEFT OUTER JOIN SALES.TSY410 T2 ON T1.SAL_DAM_SID = T2.SAL_DAM_SID \\n\")\n\t \t\t .append(\"\t\t LEFT OUTER JOIN ACCOUNT.GCZM_VENDER T3 ON T1.VEND_CD = T3.VEND_CD \t\t\t\t\t\\n\")\n\t \t\t .append(\"\t\t LEFT OUTER JOIN ACCOUNT.BANKCODE T4 ON T1.BANCOD = T4.BANCOD \t\t\t\t\t\\n\")\n\t \t\t .append(\"WHERE 1 = 1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\n\t \t\t .append(\"\t\t AND T1.client_GU = '1' \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t/*\n\t\t * 계약정보 조회\n\t\t */\n\t\tarr_sql[2].append(\"SELECT T1.client_sid\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t .append(\"\t\t ,T1.cont_date\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,T1.expire_date\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,TO_NUMBER(T1.insur_amt) AS insur_amt\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,T1.insur_comp_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ('CU010',T1.insur_comp_cd) AS insur_comp_cd_name\t\t\\n\") \t/* 보증보험회사명 \t\t*/ \n\t\t\t\t .append(\"FROM SALES.TCU031 T1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"WHERE 1=1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t \n\t\n\t\t/*\n\t\t * 지점정보 조회\n\t\t */\n\t\tarr_sql[3].append(\"SELECT T1.client_sid\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 매출처SID \t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지점코드 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.area_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,T1.client_down_yn \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t .append(\"\t\t ,T1.empno \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.tel_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.mobile_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.fax_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_url \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY006', T1.area_cd) AS area_nm\t\t\t\t\t\t\t\\n\") \t/* 지역명:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU011',T1.client_down_yn) AS client_down_yn_name \t\\n\")\t/* 하위대리점여부명 \t\t*/\n\t\t\t\t .append(\"FROM SALES.TCU032 T1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t\n\t\t\n\t\t/*\n\t\t * 대리점 등록\n\t\t */\n\n\t\tarr_sql[4].append(\"INSERT INTO SALES.TCU030 (\")\n\t\t\t\t .append(\"\t\t\t\t client_sid \\n\")\t\n\t\t\t\t .append(\"\t\t\t\t,vend_cd \\n\")\t/* [회계]거래처 코드 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_cd \\n\")\t/* 매출처 코드 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_nm \\n\")\t/* 매출처 명 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_gu \\n\")\t/* 매출처구분 :CU005 \t*/\n\t\t\t\t .append(\"\t\t\t\t,agen_gu \\n\")\t/* 대리점구분 :CU006 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,dir_yn \\n\")\t/* 직판여부 :CU012 \t*/\n\t\t\t\t .append(\"\t\t\t\t,area_cd \\n\")\t/* 지역코드 :SY006 \t*/\n\t\t\t\t .append(\"\t\t\t\t,sal_dam_sid \\n\")\t/* 영업담당자코드[TSY410] \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_dam_nm \\n\")\t/* 매출처담당자 \t*/\n\t\t\t\t .append(\"\t\t\t\t,tel_no \\n\")\t/* 전화번호 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,mobile_no \\n\")\t/* 핸드폰 \t*/\n\t\t\t\t .append(\"\t\t\t\t,fax_no \\n\")\t/* FAX번호 \t*/\n\t\t\t\t .append(\"\t\t\t\t,e_mail \\n\")\t/* 이메일 \t*/\n\t\t\t\t .append(\"\t\t\t\t,zip_cd \\n\")\t/* 소재지우편번호[TSY110] */\n\t\t\t\t .append(\"\t\t\t\t,address1 \\n\")\t/* 소재지주소1 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,address2 \\n\")\t/* 소재지주소2 \t*/\n\t\t\t\t .append(\"\t\t\t\t,commi_rate \t\\n\") \t/* 수수료율 \t*/\n\t\t\t\t .append(\"\t\t\t\t,cunt_status \\n\")\t/* 계약상태 :CU013 \t*/\n\t\t\t\t .append(\"\t\t\t\t,bancod\t\t\t\\n\") \t/* 은행코드 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t\t\t,bank_acc_no \\n\")\t/* 은행계좌번호[BANKCODE] \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,bank_acct_nm\t\\n\")\t/* 예금주 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t\t\t,use_yn\t\t\t\\n\")\t/* 사용여부 \t\t\t\t\t*/\n\t\t\t\t\n\t\t\t\t .append(\"\t\t \t\t,u_date \t\\n\") \t/* 최종수정일자 \t*/\n\t \t\t .append(\"\t\t \t\t,u_empno \t\\n\")\t/* 최종수정자사번 \t*/\n\t \t\t .append(\"\t\t \t\t,u_ip \\n\")\t/* 최종수정IP */\t\t\t\n\t \t\t .append(\"\t\t\t\t,client_url\t\t\\n\")\t/* 홈페이지 */\n\t\t\t\t .append(\"\t\t\t)\t\t\t\t\t\\n\")\n\t\t\t\t \n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\tSALES.SWS_TCU030_ID.NEXTVAL,?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,SYSTIMESTAMP,?,?,?\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\n\t\n\t\t\n\t\t/*\n\t\t * 계약정보 등록\n\t\t */\n\t\tarr_sql[5].append(\"INSERT INTO SALES.TCU031 ( \t\\n\")\n\t\t\t\t .append(\" \t client_SID\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t .append(\"\t\t ,cont_date\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,expire_date\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,insur_amt\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,insur_comp_cd\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date\t\t\t\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t .append(\"\t\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t \n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\t\t\t\n\t\t/*\n\t\t * 지점정보 등록\n\t\t */\n\t\t\n\t\tarr_sql[6].append(\"INSERT INTO SALES.TCU032 ( \t\\n\")\n\t\t\t\t .append(\"\t\t client_SID\t\t\t\\n\") \t/* 매출처SID \t\t*/\n\t\t\t\t .append(\"\t\t ,branch_cd\t\t\t\t\\n\")\t/* 지점코드 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_nm \t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,area_cd\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,client_down_yn \t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,empno \t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,tel_no \t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,mobile_no \t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,fax_no \t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_url \t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date \t\t\t\t\\n\")\t/* 최종수정일자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\")\t/* 최종수정자사번 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_ip \t\t\t\t\\n\")\t/* 최종수정IP \t\t*/\n\t\t\t\t .append(\"\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\n\t\t/*\n\t\t * 대리점 수정\n\t\t */\n\n\t\tarr_sql[7].append(\"UPDATE SALES.TCU030 SET \t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t vend_cd\t\t= ? \t\t\t\t\\n\")\t/* [회계]거래처 코드 \t*/\n\t\t\t\t .append(\"\t\t,client_nm\t\t= ? \t\t\t\t\\n\")\t/* 매출처 명 \t*/\n\t\t\t\t .append(\"\t\t,agen_gu\t\t= ? \t\t\t\t \t\\n\")\t/* 대리점구분 :CU006 \t*/\n\t\t\t\t .append(\"\t\t,dir_yn\t\t\t= ? \t\t\t\t\\n\")\t/* 직판여부 :CU012 \t*/\n\t\t\t\t .append(\"\t\t,area_cd \t= ? \t\t\t\t\t\\n\")\t/* 지역코드 :SY006 \t*/\n\n\t\t\t\t .append(\"\t\t,sal_dam_sid\t= ? \t\t\t\t\t\\n\")\t/* 영업담당자코드[TSY410] */\n\t\t\t\t .append(\"\t\t,client_dam_nm\t= ? \t\t\t\t\t\\n\")\t/* 매출처담당자 \t*/\n\t\t\t\t .append(\"\t\t,tel_no = ?\t\t\t\t\t\t\\n\")\t/* 전화번호 \t*/\n\t\t\t\t .append(\"\t\t,mobile_no = ?\t\t\t\t\t\t\\n\")\t/* 핸드폰 \t*/\n\t\t\t\t .append(\"\t\t,fax_no = ?\t\t\t\t\t\t\\n\")\t/* FAX번호 \t*/\n\n\t\t\t\t .append(\"\t\t,e_mail = ?\t\t\t\t\t\t\\n\")\t/* 이메일 \t*/\n\t\t\t\t .append(\"\t\t,zip_cd = ?\t\t\t\t\t\t\\n\")\t/* 소재지우편번호[TSY110] \t*/\n\t\t\t\t .append(\"\t\t,address1 = ?\t\t\t\t\t\t\\n\")\t/* 소재지주소1 \t*/\n\t\t\t\t .append(\"\t\t,address2 = ?\t\t\t\t\t\t\\n\")\t/* 소재지주소2 \t*/\n\t\t\t\t .append(\"\t\t,commi_rate \t= ?\t\t\t\t\t\t\\n\") \t/* 수수료율 \t*/\n\n\t\t\t\t .append(\"\t\t,cunt_status = ?\t\t\t\t\t\t\\n\")\t/* 계약상태 :CU013 \t*/\n\t\t\t\t .append(\"\t\t,bancod\t\t\t= ?\t\t\t\t\t\t\\n\") \t/* 은행코드\t \t\t\t\t*/\n\t\t\t\t .append(\"\t\t,bank_acc_no = ?\t\t\t\t\t\t\\n\")\t/* 은행계좌번호[BANKCODE]\t\t*/\n\t\t\t\t .append(\"\t\t,bank_acct_nm\t= ?\t\t\t\t\t\t\\n\")\t/* 예금주 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t,use_yn\t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 사용여부 \t\t\t\t\t*/\n\n\t\t\t\t .append(\"\t\t,u_date \t= SYSTIMESTAMP\t\t\\n\") \t/* 최종수정일자 \t*/\n\t \t\t .append(\"\t\t,u_empno \t= ?\t\t\t\t\t\t\\n\")\t/* 최종수정자사번 \t*/\n\t \t\t .append(\"\t\t,u_ip = ?\t\t\t\t\t\t\\n\")\t/* 최종수정IP */\n\t \t\t .append(\"\t,client_url = ?\t\t\t\t\t\t\\n\")\t/* 홈페이지 */\n\t\t\t\t .append (\"WHERE client_sid \t= ? \t\t\t\t\\n\");\n\t\t\t\t \n\t\t/*\n\t\t * 계약정보 수정\n\t\t */\n\t\tarr_sql[8].append(\"UPDATE SALES.TCU031 SET\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t cont_date\t\t\t= ?\t\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,expire_date\t\t= ?\t\t\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,insur_amt\t\t\t= ?\t\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,insur_comp_cd\t\t= ?\t\t\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date\t\t\t= SYSTIMESTAMP\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t= ?\t\t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t= ?\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t .append (\"WHERE client_sid \t\t= ? AND cont_date = ? \\n\");\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\t\n\t\t/*\n\t\t * 지점정보 수정\n\t\t */\n\t\t\n\t\tarr_sql[9].append(\"UPDATE SALES.TCU032 SET \t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t branch_nm \t\t= ?\t\t\t\t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,area_cd\t\t\t= ?\t\t\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,client_down_yn \t= ?\t\t\t\t\t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,empno \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,tel_no \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,mobile_no \t\t= ?\t\t\t\t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,fax_no \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_url \t\t= ?\t\t\t\t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date \t\t\t= SYSTIMESTAMP\t\t\t\t\t\t\\n\")\t/* 최종수정일자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t= ?\t\t\\n\")\t/* 최종수정자사번 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_ip \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 최종수정IP \t\t*/\n\t\t\t\t .append (\"WHERE client_sid = ? AND branch_cd \t= ?\t\t\\n\");\n\t\t\n\t\t arr_sql[10].append(\"DELETE FROM SALES.TCU030 WHERE client_sid = ?\");\t\n\t\t arr_sql[11].append(\"DELETE FROM SALES.TCU031 WHERE client_sid = ? AND cont_date = ?\");\n\t\t arr_sql[12].append(\"DELETE FROM SALES.TCU032 WHERE client_sid = ? AND branch_cd = ?\");\n\t\t \n\t\t \n\t\t /*\n\t\t * Client SID 얻어오기\n\t\t */\n\t\t\t\n\t\t\tarr_sql[13].append(\"SELECT client_sid FROM SALES.TCU030 WHERE client_cd = ?\\n\");\n\t\t\t\n\t\t/*\n\t\t * 수수료율 조회\n\t\t */\n\t\t\tarr_sql[14].append(\"SELECT\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t.append(\" T1.CLIENT_SID AS CLIENT_SID\t\\n\") /* 매출처SID */\n\t\t\t\t\t\t.append(\" ,T1.FR_DATE AS FR_DATE \t\\n\") /* 시작일자 */\n\t\t\t\t\t\t.append(\" ,T1.TO_DATE AS TO_DATE \t\\n\") /* 종료일자 */\n\t\t\t\t\t\t.append(\" ,T1.WEEKEND_YN AS WEEKEND_YN \t\\n\") /* 주말여부 */\n\t\t\t\t\t\t.append(\" ,T1.COMMI_RATE AS COMMI_RATE\t\\n\") /* 수수료율 */\n\t\t\t\t\t\t.append(\"FROM SALES.TCU033 T1 \t\\n\")\n\t\t\t\t\t\t.append(\"WHERE 1=1 \t\t\t\t\t\t\t\\n\");\n\t\t\t\t\t\t\n\t\t/*\n\t\t * 수수료율 등록\n\t\t */\n\t\t\t\n\t\t\tarr_sql[15].append(\"INSERT INTO SALES.TCU033 ( \t\\n\")\n\t\t\t\t\t\t .append(\" \t CLIENT_SID\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t\t\t .append(\"\t\t ,FR_DATE\t\t\t\t\\n\") \t/* 시작일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,TO_DATE\t\t\t\\n\")\t/* 종료일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,COMMI_RATE\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,WEEKEND_YN\t\t\t\\n\")\t/* 주말여부 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_DATE\t\t\t\t\\n\")\t/* 최종입력일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_EMPNO \t\t\t\t\\n\") \t/* 최종입력자사번 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_IP\t\t\t\t\t\\n\")\t/* 최종입력IP \t*/\t\t\t\t\t\t \n\t\t\t\t\t\t .append(\"\t\t ,u_date\t\t\t\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t\t\t .append(\"\t\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t \n\t\t\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t\t?,?,?,?, ?,\t\t\\n\")\t\n\t\t\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?, SYSTIMESTAMP,?,?\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t)\");\n\t\t/*\n\t\t * 수수료율 수정\n\t\t */\n\t\t\tarr_sql[16].append(\"UPDATE SALES.TCU033 SET\t\t\t\t\t\t\\n\") \n\t\t\t\t\t .append(\"\t\t TO_DATE\t\t\t= ?\t\t\t\t\t\\n\")\t/* 종료일자 \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,COMMI_RATE\t\t= ?\t\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t\t\t\t\t .append(\"\t\t ,WEEKEND_YN\t\t= ?\t\t\t\t\t\\n\")\t/* 주말여부 \t*/\n\t\t\t\t\t \n\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,u_date\t\t\t= SYSTIMESTAMP\t\\n\")\t/* 최종수정일자 \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,u_empno \t\t\t= ?\t\t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t= ?\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append (\"WHERE client_sid \t\t= ? AND FR_DATE = ? AND WEEKEND_YN=? \\n\"); \n\t\t/*\n\t\t * 수수료율 삭제\n\t\t */\n\t\tarr_sql[17].append(\"DELETE FROM SALES.TCU033 WHERE client_sid = ? AND fr_date = ? AND WEEKEND_YN=? \");\t \n\t\t\t \n\n\t}",
"Query query();",
"private RunQueriesEx setupQueries() {\n RunQueriesEx queries = new RunQueriesEx();\n \n //for each column in our table, update one of our lists\n for(int i = 0; i < this.dataTable.getColumnCount(); i++) {\n this.updateList(i);\n }\n \n updateEmptyLists(); //pads any lists that didn't get updates with empty strings\n \n //add a new query for each row in the table\n for(int i = 0; i < this.dataTable.getRowCount(); i++) {\n queries.add(this.createQueryFromRow(i));\n }\n \n return queries;\n }",
"SQLQuery createSQLQuery(final String query);",
"protected String buildDataQuery() {\n StringBuilder sql = new StringBuilder(\"select\");\n String delim = \" \";\n for (String vname : getColumnNames()) {\n sql.append(delim).append(vname);\n delim = \", \";\n }\n \n Element ncElement = getNetcdfElement();\n \n String table = ncElement.getAttributeValue(\"dbTable\");\n if (table == null) {\n String msg = \"No database table defined. Must set 'dbTable' attribute.\";\n _logger.error(msg);\n throw new TSSException(msg);\n }\n sql.append(\" from \" + table);\n \n String predicate = ncElement.getAttributeValue(\"predicate\");\n if (predicate != null) sql.append(\" where \" + predicate);\n \n //Order by time.\n String tname = getTimeVarName();\n sql.append(\" order by \"+tname+\" ASC\");\n \n return sql.toString();\n }",
"@Test void testInterpretTable() {\n sql(\"select * from \\\"hr\\\".\\\"emps\\\" order by \\\"empid\\\"\")\n .returnsRows(\"[100, 10, Bill, 10000.0, 1000]\",\n \"[110, 10, Theodore, 11500.0, 250]\",\n \"[150, 10, Sebastian, 7000.0, null]\",\n \"[200, 20, Eric, 8000.0, 500]\");\n }",
"List<Assist_table> selectByExample(Assist_tableExample example);",
"public static void main(String args[]){\n String sql = \"select * from TBLS limit 2\";\n String sqlComplex = \"select testpartition.filename,format_.o,title.s,identifier.o,id.o,date_.o \" +\n \"from testpartition join format_ on (testpartition.filename=format_.s) \" +\n \"join title on (testpartition.filename=title.s) \" +\n \"join identifier on (testpartition.filename=identifier.s) \" +\n \"join id on (testpartition.filename=id.s) \" +\n \"join date_ on (testpartition.filename=date_.s) \" +\n \"where testpartition.gid0=1 and testpartition.sid=2 and testpartition.fid<100000 and testpartition.pfid=0\";\n String sqlOriginal = \"select idTable.filename,format_.o,title.s,identifier.o,id.o,date_.o \" +\n \"from idTable join format_ on (idTable.filename=format_.s) \" +\n \"join title on (idTable.filename=title.s) \" +\n \"join identifier on (idTable.filename=identifier.s) \" +\n \"join id on (idTable.filename=id.s) \" +\n \"join date_ on (idTable.filename=date_.s) \" +\n \"where idTable.gid0=1 and idTable.sid=2 and idTable.fid<100000\";\n\n QueryRewrite my = new QueryRewrite(sqlOriginal);\n String sqlRewrite = my.rewrite();\n System.out.println(sqlRewrite);\n\n\n }",
"abstract protected String buildSQL(BatchSQLEnum sql);",
"List<TABLE41> selectByExample(TABLE41Example example);",
"public static void parseQueryString(String queryString) {\n\n System.out.println(\"STUB: Calling parseQueryString(String s) to process queries\");\n System.out.println(\"Parsing the string:\\\"\" + queryString + \"\\\"\");\n queryString = queryString.toLowerCase();\n String colName = queryString.substring(0,queryString.indexOf(\"from\")+5).trim();\n String colNames[] = removeWhiteSpacesInArray(colName.split(\" \"));\n ArrayList<String> queryStringList = new ArrayList<String>(Arrays.asList(colNames));\n queryStringList.remove(\"select\");\n queryStringList.remove(\"from\");\n String condition = \"\";\n String keyValueCond[] = new String[]{};\n String tableName = \"\";\n if(queryString.contains(\"where\")) {\n tableName = queryString.substring(queryString.indexOf(\"from\") + 5, queryString.indexOf(\"where\")).trim();\n condition = queryString.substring(queryString.indexOf(\"where\")+6, queryString.length()).trim();\n keyValueCond = removeWhiteSpacesInArray(condition.split(\" \"));\n }else\n tableName = queryString.substring(queryString.indexOf(\"from\")+5).trim();\n try {\n Table table = new Table(tableName.concat(\".tbl\"));\n int noOfRecords = table.page.getNoOfRecords();\n long pos = table.page.getStartofContent();\n TreeMap<String, String> colOrder = columnOrdinalHelper.getColumnsInOrdinalPositionOrder(tableName);\n int recordLength = Integer.parseInt(recordLengthHelper.getProperties(tableName.concat(\".\").concat(Constant.recordLength)));\n if(keyValueCond.length>0){\n\n }else{\n Iterator it = colOrder.entrySet().iterator();\n while (it.hasNext()){\n Map.Entry<String, String> entryPair = (Map.Entry<String, String>) it.next();\n// ReadResult<Object> readResult = table.page.readIntasByte(pos);\n// System.out.println(readResult.getT());\n ReadResult<Object> readResult = RecordFormat.readRecordFormat(columnTypeHelper.getProperties(entryPair.getValue()),table,pos);\n System.out.println(\"RESULT COLUMN NAME : \"+entryPair.getValue()+\" Value : \"+readResult.getT());\n\n }\n\n }\n\n\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"protected String generateSQL() {\n String fields = generateFieldsJSON();\n return String.format(QUERY_PATTERN, fields, esQuery.generateQuerySQL(), from, size);\n }",
"GroupQuery createQuery();",
"List<Table2> selectByExample(Table2Example example);",
"private String createFindAll() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"SELECT \");\n\t\tsb.append(\" * \");\n\t\tsb.append(\" FROM \");\n\t\tsb.append(type.getSimpleName());\n\t\treturn sb.toString();\n\t}",
"@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 }",
"public abstract String doTableConvert(String sql);",
"public static DBResponse selectFromTable(DBTable table, String[] returnFields, String[] whereFields, Object[] whereValues, String operand,\r\n String orderByField, String orderByOperand) {\r\n if (table == null || returnFields == null || whereFields == null || whereValues == null) {\r\n LOGGER.error(\"No null arguments are accepted for this function.\");\r\n return null;\r\n }\r\n if (returnFields.length == 0) {\r\n LOGGER.error(\"No return fields specified. If you want all fields, pass a 1-length array with \\\"*\\\" as the field.\");\r\n return null;\r\n }\r\n if (whereFields.length != whereValues.length) {\r\n LOGGER.error(\"Length of where fields and values arrays do not match.\");\r\n return null;\r\n }\r\n DBResponse response = new DBResponse();\r\n PreparedStatement preparedStmt = null;\r\n ResultSet rs = null;\r\n Connection connection = null;\r\n String query = \"SELECT \";\r\n if (returnFields.length == 1 && returnFields[0].equals(\"*\")) {\r\n query = query.concat(\"* FROM \");\r\n } else {\r\n for (String field : returnFields) {\r\n query = query.concat(field)\r\n .concat(\", \");\r\n }\r\n query = query.substring(0, query.length() - 2);\r\n query = query.concat(\" FROM \");\r\n }\r\n query = query.concat(table.name());\r\n if (whereFields.length > 0) {\r\n query = query.concat(\" WHERE \");\r\n for (int i = 0; i < whereFields.length; i++) {\r\n String field = whereFields[i];\r\n Object value = whereValues[i];\r\n if (value instanceof DBSyntax) {\r\n if (value.equals(DBSyntax.IS_NULL)) {\r\n query = query.concat(field)\r\n .concat(\" IS NULL \")\r\n .concat(operand)\r\n .concat(\" \");\r\n } else if (value.equals(DBSyntax.IS_NOT_NULL)) {\r\n query = query.concat(field)\r\n .concat(\" IS NOT NULL \")\r\n .concat(operand)\r\n .concat(\" \");\r\n } else {\r\n query = query.concat(field)\r\n .concat(\" = ? \")\r\n .concat(operand)\r\n .concat(\" \");\r\n }\r\n } else {\r\n query = query.concat(field)\r\n .concat(\" = ? \")\r\n .concat(operand)\r\n .concat(\" \");\r\n }\r\n }\r\n query = query.substring(0, query.length() - 2 - operand.length());\r\n }\r\n if (orderByField != null && orderByOperand != null) {\r\n query = query.concat(\" ORDER BY \")\r\n .concat(orderByField)\r\n .concat(\" \")\r\n .concat(orderByOperand);\r\n }\r\n try {\r\n connection = connectionPool.getConnection();\r\n preparedStmt = connection.prepareStatement(query);\r\n int j = 1;\r\n for (Object value : whereValues) {\r\n if (value instanceof DBSyntax) {\r\n if (!(value.equals(DBSyntax.IS_NULL) || value.equals(DBSyntax.IS_NOT_NULL))) {\r\n preparedStmt.setObject(j, value);\r\n j++;\r\n }\r\n } else {\r\n preparedStmt.setObject(j, value);\r\n j++;\r\n }\r\n }\r\n rs = preparedStmt.executeQuery();\r\n ArrayList<TreeMap<String, Object>> results = new ArrayList<>();\r\n ResultSetMetaData metadata = rs.getMetaData();\r\n int count = metadata.getColumnCount();\r\n while (rs.next()) {\r\n TreeMap<String, Object> map = new TreeMap<>();\r\n for (int i = 1; i <= count; i++) {\r\n map.put(metadata.getColumnName(i), rs.getObject(i));\r\n }\r\n results.add(map);\r\n }\r\n response.setReturnedRows(results);\r\n response.setSuccessful(true);\r\n return response;\r\n } catch (Exception e) {\r\n LOGGER.error(\"Failed to select data from table!\", e);\r\n response.setSuccessful(false);\r\n response.setMessage(e.getMessage());\r\n return response;\r\n } finally {\r\n DbUtils.closeQuietly(rs);\r\n DbUtils.closeQuietly(preparedStmt);\r\n DbUtils.closeQuietly(connection);\r\n }\r\n }",
"@Override\n\tpublic TypedQuery<Plan> constructQuery(Map<String, String> customQuery) {\n\t\tCriteriaBuilder cb = null;\n\t\ttry {\n\t\t\tcb = em.getCriteriaBuilder();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tCriteriaQuery<Plan> cq = cb.createQuery(Plan.class);\n\t\tRoot<Plan> plan = cq.from(Plan.class);\n\t\tPredicate existingpredicate = null;\n\t\tint predicateCount=0;\n\t\tPredicate masterPredicate=null;\n\n\t\ttry {\n\n\t\t\tfor (Map.Entry<String,String> entry : customQuery.entrySet()) \n\t\t\t{\n\t\t\t\tif(plan.get(entry.getKey().toString()) != null)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t//Query for range values with comma(,) as delimiter\n\t\t\t\t\tif(entry.getValue().contains(\",\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tint minRange=Integer.parseInt(customQuery.get(entry.getKey().toString()).split(\",\")[0]);\n\t\t\t\t\t\tint maxRange=Integer.parseInt(customQuery.get(entry.getKey().toString()).split(\",\")[1]);\n\t\t\t\t\t\tif(predicateCount==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmasterPredicate = cb.between(plan.get(entry.getKey().toString()),minRange, maxRange );\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\texistingpredicate = cb.between(plan.get(entry.getKey().toString()),minRange, maxRange );\n\t\t\t\t\t\t\tmasterPredicate=cb.and(masterPredicate,existingpredicate);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpredicateCount++;\n\t\t\t\t\t}\n\t\t\t\t\t//Query for equals values\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(predicateCount==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmasterPredicate = cb.equal(plan.get(entry.getKey().toString()), customQuery.get(entry.getKey().toString()));\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\texistingpredicate = cb.equal(plan.get(entry.getKey().toString()), customQuery.get(entry.getKey().toString()));\n\t\t\t\t\t\t\tmasterPredicate=cb.and(masterPredicate,existingpredicate);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpredicateCount++;\n\t\t\t\t\t\t//cq.where(predicate);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcq.where(masterPredicate);\n\t\tTypedQuery<Plan> query = em.createQuery(cq);\n\t\treturn query;\n\t}",
"@Override\r\n\tpublic String generate() {\r\n\t\tStringBuilder query = new StringBuilder();\r\n\r\n\t\tquery.append(\"INSERT INTO \").append(tableName).append(\" (\");\r\n\t\tfor (int i = 0; i < fieldNames.size(); i++) {\r\n\t\t\tquery.append(fieldNames.get(i));\r\n\t\t\tif (i < fieldNames.size() - 1) {\r\n\t\t\t\tquery.append(\", \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tquery.append(\") VALUES (\");\r\n\t\tfor (int i = 0; i < fieldValues.size(); i++) {\r\n\t\t\tquery.append(\"'\").append(fieldValues.get(i)).append(\"'\");\r\n\t\t\tif (i < fieldValues.size() - 1) {\r\n\t\t\t\tquery.append(\", \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tquery.append(\");\");\r\n\t\treturn query.toString();\r\n\t}",
"public abstract DatabaseQuery createDatabaseQuery(ParseTreeContext context);",
"public QueryCore buildQuery() throws SQLException\n {\n if(l != null)\n {\n for(int i=0;i<l.size();i++)\n {\n prepStm.setObject(i+1,l.get(i));\n }\n }\n return this;\n }",
"public abstract List createQuery(String query);",
"@SuppressWarnings({\"DuplicateExpressions\", \"DuplicatedCode\"})\n public static DataTable executeQuery(String query) throws DataFormatException, FileNotFoundException{\n if(query.isBlank()){\n throw new IllegalArgumentException(\"The query cannot be blank.\");\n }\n\n query = getItemInsideOuterParentheses(query.trim());\n\n String firstLetter = query.substring(0, 1);\n if(firstLetter.equals(MINUS) || firstLetter.equals(UNION) || firstLetter.equals(JOIN) || firstLetter.equals(CROSS_PRODUCT)){\n //noinspection GrazieInspection\n throw new IllegalArgumentException(\"The first item cannot be a two-table operator. It can't be \" + firstLetter + \", which is what you put.\");\n }\n\n //noinspection SwitchStatementWithoutDefaultBranch\n switch(query.substring(0, 4)){\n case SELECT:\n return executeQuery(getItemInsideOuterParentheses(query.substring(query.indexOf(\"}\") + 1))).selectWhere(getItemInsideOuterCurlyBraces(query.substring(query.indexOf(\"{\"), query.indexOf(\"}\") + 1)));\n case PROJECT:\n return executeQuery(getItemInsideOuterParentheses(query.substring(query.indexOf(\"}\") + 1))).project(getItemInsideOuterCurlyBraces(query.substring(query.indexOf(\"{\"), query.indexOf(\"}\") + 1)).split(\",\"));\n }\n\n int firstOperator = Integer.MAX_VALUE;\n String firstOperatorName = null;\n\n if(query.contains(MINUS)){\n firstOperator = query.indexOf(MINUS);\n firstOperatorName = MINUS;\n }\n if(query.contains(UNION) && (query.indexOf(UNION) < firstOperator)){\n firstOperator = query.indexOf(UNION);\n firstOperatorName = UNION;\n }\n if(query.contains(JOIN) && (query.indexOf(JOIN) < firstOperator)){\n firstOperator = query.indexOf(JOIN);\n firstOperatorName = JOIN;\n }\n if(query.contains(CROSS_PRODUCT) && (query.indexOf(CROSS_PRODUCT) < firstOperator)){\n firstOperator = query.indexOf(CROSS_PRODUCT);\n firstOperatorName = CROSS_PRODUCT;\n }\n if(query.contains(INTERSECT) && (query.indexOf(INTERSECT) < firstOperator)){\n firstOperator = query.indexOf(INTERSECT);\n firstOperatorName = INTERSECT;\n }\n\n if(firstOperatorName != null){\n String beforeOperator = query.substring(0, firstOperator);\n String afterOperator = query.substring(firstOperator + 1);\n\n // Since “INTE“ is not a single character, it won't work in the switch above.\n return switch(firstOperatorName){\n case MINUS -> executeQuery(beforeOperator).minus(executeQuery(afterOperator));\n case UNION -> executeQuery(beforeOperator).unionWith(executeQuery(afterOperator));\n case JOIN -> executeQuery(beforeOperator).joinWith(executeQuery(afterOperator));\n case INTERSECT -> executeQuery(beforeOperator).intersectWith(executeQuery(afterOperator));\n case CROSS_PRODUCT -> executeQuery(beforeOperator).crossWith(executeQuery(afterOperator));\n default -> throw new UnsupportedOperationException(\"IDK man, the compiler forced me to put this in here.\");\n };\n }\n\n // If none of the above are satisfied, then we are at a raw table name, so we need to fetch that.\n String tableName = getItemInsideOuterParentheses(query);\n if(tableName.contains(\")\") || tableName.contains(DataTable.EQUALS) || tableName.contains(DataTable.LESS_THAN) || tableName.contains(DataTable.GREATER_THAN) || tableName.contains(MINUS) || tableName.contains(UNION) || tableName.contains(\n INTERSECT) || tableName.contains(JOIN) || tableName.contains(SELECT) || tableName.contains(PROJECT) || tableName.contains(CROSS_PRODUCT)){\n throw new DataFormatException(\n \"The string parsing algorithm was done incorrectly. Please try a simpler query so that the developer does not lose points on this very hard project. Thanks much. The algorithm thinks the table name is \" + \"\\\"\" + tableName +\n \"\\\".\");\n }\n\n File tableFile = new File(tableName + \".txt\");\n if(!tableFile.exists()){\n throw new FileNotFoundException(\"Bruh, please state a table that actually exists, as \" + tableFile + \".txt doesn't. The file must be of the extension \\\".txt\\\" (all lowercase).\");\n }\n\n return new DataTable(tableFile);\n }",
"public abstract List createNativeSQLQuery(String query);",
"FromTable createFromTable();",
"public abstract String createQuery();",
"public Query createQuery(String hql, Object... params) ;",
"private String buildQuery(String ... sql) {\n\t\tfinal StringBuffer sb = new StringBuffer();\n\t\t\n\t\tfor (String s : sql) {\n\t\t\tsb.append(ParsingUtil.QUERY + \" \" + s + \"\\n\");\n\t\t}\n\t\t\n\t\treturn sb.toString(); \n\t}",
"static DbQuery createValueQuery() {\n DbQuery query = new DbQuery();\n query.order = OrderBy.VALUE;\n return query;\n }",
"protected StringBuilder generateQuery() {\n StringBuilder sb = new StringBuilder();\n sb.append(\" FROM \") \n .append(dao.getParameterClass(0).getName())\n .append(\" d WHERE (:incorrectEvent = '' OR d.incorrectEvent.id = :incorrectEvent) \")\n .append(\"AND (d.createDate BETWEEN :dateFrom AND :dateTo ) \")\n .append(\"AND ( ((:incorrectEvent ='' AND :incorrectEventName!='' AND UPPER(d.incorrectEvent.name) LIKE :incorrectEventName) \")\n .append(\" OR (:incorrectEvent ='' AND :incorrectEventName!='' AND UPPER(d.incorrectEvent.name) LIKE :incorrectEventName)) \")\n .append(\" OR (:search='' OR d.searchField LIKE :search) ) \");\n return sb;\n }",
"protected JPAQuery<T> createQuery() {\n\t\tJPAQuery<T> query = new JPAQuery<>(entityManager);\n\t\tquery.from(getDslRoot());\n\t\treturn query;\n\t}",
"CampusSearchQuery generateQuery();",
"Query createQuery(final String query);",
"public abstract String toSQL();",
"public abstract <T> List<? extends T> createQuery(String query, Class<T> type, int firstResult, int maxResult);",
"private String createSelectQuery(String field) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"SELECT\");\n\t\tsb.append(\" * \");\n\t\tsb.append(\" FROM \");\n\t\tsb.append(type.getSimpleName());\n\t\tsb.append(\" WHERE \" + field + \" =?\");\n\t\treturn sb.toString();\n\t}",
"public QueryExecution createQueryExecution(Query qry);",
"public abstract void applyToQuery(DatabaseQuery theQuery, GenerationContext context);",
"Table regularSelect(String name, String[] columns, String[] tablesList) {\n Table t1;\n Table t2;\n tablesList = new LinkedHashSet<String>(Arrays.asList(tablesList)).toArray(new String[0]);\n\n //Parse Arithmetic Op\n LinkedList<LinkedList> arithOp = p.arithOp(columns);\n\n // creates a new table from all columns - before running operators\n if (arithOp != null) {\n //get real column names, operated columns, and operation\n LinkedList<String> columnsToKeep = p.realCols(columns);\n LinkedList<String> colNames = arithOp.get(0);\n LinkedList<String> lhs = arithOp.get(1);\n LinkedList<String> rhs = arithOp.get(2);\n LinkedList<String> operators = arithOp.get(3);\n\n t1 = tables.get(tablesList[0]);\n t1 = selectColumns(name, tablesList[0], t1.getColNames());\n\n for (int i = 1; i < tablesList.length; i++) {\n t2 = tables.get(tablesList[i]);\n t2 = selectColumns(name, tablesList[i], t2.getColNames());\n t1 = joinTwoTables(name, t1, t2);\n tables.put(t1.getName(), t1);\n\n }\n\n /**run over the arithOp Columns that needs to be handeled\n * - t1 is the new combined table! And inserts the new column.*/\n for (int i = 0; i < operators.size(); i += 1) {\n t1.insertNewColumn(t1.arithmaticOperator(colNames.get(i),\n lhs.get(i), rhs.get(i), operators.get(i)));\n }\n t1.removeColumn(columnsToKeep);\n return t1;\n }\n\n if (columns[0].equals(\"*\")) {\n t1 = tables.get(tablesList[0]);\n t1 = selectColumns(name, tablesList[0], t1.getColNames());\n\n for (int i = 1; i < tablesList.length; i++) {\n t2 = tables.get(tablesList[i]);\n t2 = selectColumns(name, tablesList[i], t2.getColNames());\n t1 = joinTwoTables(name, t1, t2);\n tables.put(t1.getName(), t1);\n }\n\n return t1;\n // Check similar and distinct column names of tables\n } else {\n t1 = tables.get(tablesList[0]);\n t1 = selectColumns(name, tablesList[0], columns);\n for (int i = 1; i < tablesList.length; i++) {\n t2 = tables.get(tablesList[i]);\n t2 = selectColumns(name, tablesList[i], columns);\n t1 = joinTwoTables(name, t1, t2);\n tables.put(t1.getName(), t1);\n }\n\n return t1;\n }\n\n }",
"public void constructQuery(String query) {\n\t\tQuery q = QueryFactory.create(query);\n\t\tQueryExecution qe = QueryExecutionFactory.create(q, model);\n\t\tModel result = qe.execConstruct();\n\t\tprintModel(result);\n\t\tmodel.add(result);\n\t\tqe.close();\n\t}",
"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 }",
"@Override\n public void constructQuery() {\n try {\n super.constructQuery();\n sqlQueryBuilder.append(Constants.QUERY_SELECT);\n appendColumnName();\n appendPrimaryTableName();\n appendConditions(getJoinType());\n appendClause(joinQueryInputs.clauses, true);\n sqlQueryBuilder.append(Constants.SEMI_COLON);\n queryDisplayListener.displayConstructedQuery(sqlQueryBuilder.toString());\n } catch (NoSuchClauseFoundException noSuchClauseFoundException) {\n queryDisplayListener.showException(noSuchClauseFoundException.getExceptionMessage());\n }\n }",
"public abstract ResultList executeSQL(RawQuery rawQuery);",
"@Test void testInterpretTableFunctionWithDynamicType() {\n SchemaPlus schema = rootSchema.add(\"s\", new AbstractSchema());\n final TableFunction table1 =\n TableFunctionImpl.create(Smalls.DYNAMIC_ROW_TYPE_TABLE_METHOD);\n schema.add(\"dynamicRowTypeTable\", table1);\n final String sql = \"select *\\n\"\n + \"from table(\\\"s\\\".\\\"dynamicRowTypeTable\\\"('\"\n + \"{\\\"nullable\\\":false,\\\"fields\\\":[\"\n + \" {\\\"name\\\":\\\"i\\\",\\\"type\\\":\\\"INTEGER\\\",\\\"nullable\\\":false},\"\n + \" {\\\"name\\\":\\\"d\\\",\\\"type\\\":\\\"DATE\\\",\\\"nullable\\\":true}\"\n + \"]}', 0))\\n\"\n + \"where \\\"i\\\" < 0 and \\\"d\\\" is not null\";\n sql(sql).returnsRows();\n }",
"public void createQuery(String s) throws HibException;",
"protected void constructTable(Logger l, Statement s, int run)\n throws SQLException{\n createTable(s, run);\n insertResults(l,s,run);\n }",
"public Relation group(ArrayList<String> params, ArrayList<String> aggregates, ArrayList<String> groupBy){\n Relation table = new Relation();\n\n // Create columns for new table\n for(int i = 0; i < params.size(); i++){\n Col c = getColumnByName(params.get(i));\n\n String name = params.get(i);\n\n if(!aggregates.get(i).isEmpty()){\n name += \"-\" + aggregates.get(i);\n }\n\n table.insertColumn(new Col(name, c.getType(), c.getMaxLength(), c.getDecimalsAllowed(), false));\n }\n\n if(groupBy.size() == 1 && groupBy.get(0).charAt(0) == '('){\n\n Relation r = select(params, EMPTY_LIST, EMPTY_LIST);\n ArrayList<String> values = new ArrayList<>();\n\n for(int i = 0; i < params.size(); i++){\n\n if(aggregates.get(i).isEmpty()){\n values.add(r.getColumnByName(params.get(i)).getRec(0).getLastEntry().getData());\n }\n else{\n if(aggregates.get(i).equals(\"avg\")){\n values.add(Double.toString(r.average(params.get(i))));\n }\n else if(aggregates.get(i).equals(\"count\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Integer.toString(r.count(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"sum\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.sum(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"min\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.min(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"max\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.max(p, c, a)));\n\n }\n else{\n System.out.println(\"Relation.group: Unexpected scenerio occurred\");\n System.exit(2);\n }\n }\n\n }\n\n table.insert(values);\n values.clear();\n\n return table;\n }\n\n //Get distinct group values\n HashSet<String> distinct = new HashSet<>();\n HashMap<String, Relation> tables = new HashMap<>();\n Relation temp = new Relation();\n\n ArrayList<Col> columns = new ArrayList<>();\n for(String group : groupBy){\n columns.add(getColumnByName(group));\n temp.insertColumn(getColumnByName(group));\n }\n\n for(int i = 0; i < columns.get(0).size(); i++){\n ArrayList<Rec> rec = temp.getRecordsByRowIndex(i);\n String groups = \"\";\n\n for(Rec value : rec){\n groups += value.getLastEntry().getData() + \",\";\n }\n\n groups = groups.substring(0, groups.length()-1);\n\n distinct.add(groups);\n }\n\n /*Col col = getColumnByName(groupBy);\n for(Rec rec : col.getRecs()){\n distinct.add(rec.getLastEntry().getData());\n }*/\n\n for(String d : distinct) {\n\n ArrayList<String> p = new ArrayList<>();\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n String[] split = d.split(\",\");\n for(int i = 0; i < split.length; i++) {\n c.add(groupBy.get(i) + \" = \" + split[i]);\n }\n\n for(int i = 1; i < split.length; i++){\n a.add(\"AND\");\n }\n\n Relation r = this.select(p, c, a);\n tables.put(d, r);\n }\n\n for(String d : distinct){\n\n Relation r = tables.get(d);\n ArrayList<String> values = new ArrayList<>();\n\n for(int i = 0; i < params.size(); i++){\n\n if(aggregates.get(i).isEmpty()){\n values.add(r.getColumnByName(params.get(i)).getRec(0).getLastEntry().getData());\n }\n else{\n if(aggregates.get(i).equals(\"avg\")){\n values.add(Double.toString(r.average(params.get(i))));\n }\n else if(aggregates.get(i).equals(\"count\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n String[] split = d.split(\",\");\n for(int j = 0; j < split.length; j++) {\n c.add(groupBy.get(j) + \" = \" + split[j]);\n }\n\n for(int j = 1; j < split.length; j++){\n a.add(\"AND\");\n }\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Integer.toString(r.count(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"sum\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n String[] split = d.split(\",\");\n for(int j = 0; j < split.length; j++) {\n c.add(groupBy.get(j) + \" = \" + split[j]);\n }\n\n for(int j = 1; j < split.length; j++){\n a.add(\"AND\");\n }\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.sum(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"min\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n String[] split = d.split(\",\");\n for(int j = 0; j < split.length; j++) {\n c.add(groupBy.get(j) + \" = \" + split[j]);\n }\n\n for(int j = 1; j < split.length; j++){\n a.add(\"AND\");\n }\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.min(p, c, a)));\n }\n else if(aggregates.get(i).equals(\"max\")){\n ArrayList<String> c = new ArrayList<>();\n ArrayList<String> a = new ArrayList<>();\n\n String[] split = d.split(\",\");\n for(int j = 0; j < split.length; j++) {\n c.add(groupBy.get(j) + \" = \" + split[j]);\n }\n\n for(int j = 1; j < split.length; j++){\n a.add(\"AND\");\n }\n\n ArrayList<String> p = new ArrayList<>();\n p.add(params.get(i));\n\n values.add(Double.toString(r.max(p, c, a)));\n\n }\n else{\n System.out.println(\"Relation.group: Unexpected scenerio occurred\");\n System.exit(2);\n }\n }\n\n }\n\n table.insert(values);\n values.clear();\n\n }\n\n return table;\n\n }",
"protected void constructTable(Logger l, Statement s, int run)\n throws SQLException{\n createTable(s, run);\n insertResults(l,s,run);\n }",
"private String createSelectQuery(String field)\n {\n StringBuilder sb = new StringBuilder();\n sb.append(\"SELECT \");\n sb.append(\" * \");\n sb.append(\" FROM \");\n sb.append(type.getSimpleName());\n sb.append(\" WHERE \");\n sb.append(field);\n sb.append(\" =?\");\n return sb.toString();\n }",
"@Test\n public void createSqlQuerySucceed()\n {\n // arrange\n // act\n QuerySpecification querySpecification = new QuerySpecificationBuilder(\"*\", QuerySpecificationBuilder.FromType.ENROLLMENTS).createSqlQuery();\n\n // assert\n Helpers.assertJson(querySpecification.toJson(), \"{\\\"query\\\":\\\"select * from enrollments\\\"}\");\n }",
"public Query build(Type type) throws WrapperException\r\n\t{\r\n\t\tif(type == Type.SELECT)\r\n\t\t{\r\n\t\t\tZQuery query = new ZQuery();\r\n\t\t\tquery.addFrom(froms);\r\n\t\t\tquery.addSelect(selects);\r\n\t\t\tquery.addWhere(where);\r\n\t\t\tif(!orderBys.isEmpty())\r\n\t\t\t\tquery.addOrderBy(orderBys);\r\n\t\t\t\r\n\t\t\treturn new Query(query.toString(), model);\r\n\t\t}\r\n\t\telse if(type == Type.UPDATE)\r\n\t\t{\r\n\t\t\tZUpdate update = new ZUpdate(imperativeTable.getName());\r\n\t\t\tupdate.addWhere(where);\r\n\t\t\tupdate.addSet(columnValues);\r\n\t\t\treturn new Query(update.toString(), model);\r\n\t\t}\r\n\t\telse if(type == Type.DELETE)\r\n\t\t{\r\n\t\t\tZDelete delete = new ZDelete(imperativeTable.getName());\r\n\t\t\tdelete.addWhere(where);\r\n\t\t\t\r\n\t\t\treturn new Query(delete.toString(), model);\r\n\t\t}\r\n\t\telse if(type == Type.INSERT)\r\n\t\t{\r\n\t\t\tZInsert insert = new ZInsert(imperativeTable.getName());\r\n\t\t\t\r\n\t\t\tVector<String> columns = new Vector<String>();\r\n\t\t\tZExpression values = new ZExpression(\",\");\r\n\t\t\tfor(String columnName : columnValues.keySet())\r\n\t\t\t{\r\n\t\t\t\tcolumns.addElement(columnName);\r\n\t\t\t\tvalues.addOperand(columnValues.get(columnName));\r\n\t\t\t}\r\n\t\t\tinsert.addColumns(columns);\r\n\t\t\tinsert.addValueSpec(values);\r\n\t\t\t\t\t\t\r\n\t\t\treturn new Query(insert.toString(), model);\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"protected String createFindBy(String nume) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"SELECT \");\n\t\tsb.append(\" * \");\n\t\tsb.append(\" FROM \");\n\t\tsb.append(type.getSimpleName());\n\t\tsb.append(\" WHERE \");\n\t\treturn sb.toString();\n\t}",
"public SQLQuery _buildQuery(E event) throws SQLException, ErrorResponseException {\n withoutIdField = true;\n return buildQuery(event);\n }",
"private void table(String where_condition){\n \n String query = \"SELECT reports.id,patients.patient_name,reports.report,doctors.doctor_name,reports.admitted FROM reports INNER JOIN patients on reports.patient_id = patients.id INNER JOIN doctors on reports.doctor_id = doctors.id WHERE (reports.patient_id = \"+global_patient_id+\") \"+where_condition+\" ORDER BY reports.id DESC\" ;\n\n ResultSet rs = null;\n \n try\n {\n rs = database().prepareStatement(query).executeQuery();\n displayTable.setModel(DbUtils.resultSetToTableModel(rs));\n displayTable.setVisible(true);\n }\n catch(Exception ex)\n { JOptionPane.showMessageDialog(null,ex); }\n}",
"public List sqlQuery(String sql,Object... params);",
"@Test\n public void testWhere_withValidQuery() {\n String column0 = \"user_id\";\n String column1 = \"age\";\n int idValue0 = 0;\n int ageValue0 = 23;\n int idValue1 = 1;\n int ageValue1 = 22;\n int idValue2 = 2;\n int ageValue2 = 18;\n\n try {\n String sql = \"CREATE TABLE ModelExtension (\" +\n column0 + \" int, \" +\n column1 + \" int)\";\n PreparedStatement pstmt = Setup.getConnection().prepareStatement(sql);\n pstmt.execute();\n sql = \"INSERT INTO ModelExtension (\" +\n column0 + \", \" +\n column1 + \") VALUES (\" +\n idValue0 + \", \" +\n ageValue0 + \"), (\" +\n idValue1 + \", \" +\n ageValue1 + \"), (\" +\n idValue2 + \", \" +\n ageValue2 + \")\";\n pstmt = Setup.getConnection().prepareStatement(sql);\n pstmt.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n assertTrue(false);\n }\n\n List<ModelExtension> models = child.findAll().where(column1 + \">20\").execute(ModelExtension.class);\n\n assertEquals(2, models.size());\n assertEquals(idValue0, models.get(0).get(column0));\n assertEquals(ageValue0, models.get(0).get(column1));\n assertEquals(idValue1, models.get(1).get(column0));\n assertEquals(ageValue1, models.get(1).get(column1));\n }",
"QueryType createQueryType();",
"private static SqlScalars generateSqlForPerson(OptionsId options) {\n SqlScalars sqlScalars = new SqlScalars();\n // Make sure to set the alias for the files for the Transformation into the class\n sqlScalars.addToSql(\"SELECT DISTINCT p.id,p.name,\");\n sqlScalars.addToSql(\"p.first_name AS firstName,\");\n sqlScalars.addToSql(\"p.last_name AS lastName,\");\n sqlScalars.addToSql(\"p.birth_day AS birthDay,\");\n sqlScalars.addToSql(\"p.birth_place AS birthPlace,\");\n sqlScalars.addToSql(\"p.birth_name AS birthName,\");\n sqlScalars.addToSql(\"p.death_day AS deathDay,\");\n sqlScalars.addToSql(\"p.death_place AS deathPlace\");\n sqlScalars.addToSql(DataItemTools.addSqlDataItems(options.splitDataItems(), \"p\").toString());\n sqlScalars.addToSql(\"FROM person p\");\n\n if (options.getId() > 0L) {\n sqlScalars.addToSql(\"WHERE p.status\" + SQL_IGNORE_STATUS_SET);\n sqlScalars.addToSql(\"AND id=:id\");\n sqlScalars.addParameter(LITERAL_ID, options.getId());\n } else {\n if (MapUtils.isNotEmpty(options.splitJobs())) {\n sqlScalars.addToSql(\", cast_crew c\");\n }\n sqlScalars.addToSql(\"WHERE p.status\" + SQL_IGNORE_STATUS_SET);\n\n if (MapUtils.isNotEmpty(options.splitJobs())) {\n sqlScalars.addToSql(\"AND p.id=c.person_id\");\n sqlScalars.addToSql(\"AND c.job IN (:jobs)\");\n sqlScalars.addParameter(\"jobs\", options.getJobTypes());\n }\n\n // Add the search string\n sqlScalars.addToSql(options.getSearchString(false));\n // This will default to blank if there's no sort required\n sqlScalars.addToSql(options.getSortString());\n }\n\n sqlScalars.addScalar(LITERAL_ID, LongType.INSTANCE);\n sqlScalars.addScalar(LITERAL_NAME, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_FIRST_NAME, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_LAST_NAME, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_BIRTH_DAY, DateType.INSTANCE);\n sqlScalars.addScalar(LITERAL_BIRTH_PLACE, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_BIRTH_NAME, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_DEATH_DAY, DateType.INSTANCE);\n sqlScalars.addScalar(LITERAL_DEATH_PLACE, StringType.INSTANCE);\n\n // add Scalars for additional data item columns\n DataItemTools.addDataItemScalars(sqlScalars, options.splitDataItems());\n\n return sqlScalars;\n }",
"public Items[] findByDynamicSelect(String sql, Object[] sqlParams) throws ItemsDaoException;",
"Table condSelect(String name, String[] columns, String[] tablesList, String[] conds) {\n Table t1;\n Table t2;\n tablesList = new LinkedHashSet<String>(Arrays.asList(tablesList)).toArray(new String[0]);\n\n //Parse Comparison and Arithmetic Operations\n LinkedList<LinkedList> compOp = p.compOp(conds);\n LinkedList<LinkedList> arithOp = p.arithOp(columns);\n\n //Check if Comparison operation exist in the statement -- if null should return ERROR\n if (compOp == null) {\n return null;\n }\n //Unwrap Comparison information\n LinkedList<String> rhsComp = compOp.get(0);\n LinkedList<String> lhsComp = compOp.get(1);\n LinkedList<String> operationComp = compOp.get(2);\n //Check if arithemtic operations exist in the statement\n if (arithOp != null) {\n LinkedList<String> columnsToKeep = p.realCols(columns);\n LinkedList<String> colNames = arithOp.get(0);\n LinkedList<String> lhs = arithOp.get(1);\n LinkedList<String> rhs = arithOp.get(2);\n LinkedList<String> operators = arithOp.get(3);\n\n // creates a new table from all columns - before running operators\n t1 = tables.get(tablesList[0]);\n t1 = selectColumns(name, tablesList[0], t1.getColNames());\n\n for (int i = 1; i < tablesList.length; i++) {\n t2 = tables.get(tablesList[i]);\n t2 = selectColumns(name, tablesList[i], t2.getColNames());\n t1 = joinTwoTables(name, t1, t2);\n tables.put(t1.getName(), t1);\n }\n /**run over the arithOp Columns that needs to be handeled\n * - t1 is the new combined table! And inserts the new column.*/\n for (int i = 0; i < operators.size(); i += 1) {\n t1.insertNewColumn(t1.arithmaticOperator(colNames.get(i),\n lhs.get(i), rhs.get(i), operators.get(i)));\n }\n t1.removeColumn(columnsToKeep);\n for (int i = 0; i < operationComp.size(); i++) {\n\n t1.comparisonOperation(lhsComp.get(i), rhsComp.get(i), operationComp.get(i));\n }\n return t1;\n }\n if (columns[0].equals(\"*\")) {\n t1 = tables.get(tablesList[0]);\n t1 = selectColumns(name, tablesList[0], t1.getColNames());\n\n for (int i = 1; i < tablesList.length; i++) {\n t2 = tables.get(tablesList[i]);\n t2 = selectColumns(name, tablesList[i], t2.getColNames());\n t1 = joinTwoTables(name, t1, t2);\n tables.put(t1.getName(), t1);\n }\n for (int i = 0; i < operationComp.size(); i++) {\n t1.comparisonOperation(lhsComp.get(i), rhsComp.get(i), operationComp.get(i));\n }\n return t1;\n //Check similar and distinct column names of tables\n } else {\n t1 = tables.get(tablesList[0]);\n t1 = selectColumns(\"temp\", tablesList[0], t1.getColNames());\n\n\n for (int i = 1; i < tablesList.length; i++) {\n t2 = tables.get(tablesList[i]);\n t2 = selectColumns(\"temp\", tablesList[i], t2.getColNames());\n t1 = joinTwoTables(\"temp\", t1, t2);\n tables.put(t1.getName(), t1);\n }\n for (int i = 0; i < operationComp.size(); i++) {\n t1.comparisonOperation(lhsComp.get(i), rhsComp.get(i), operationComp.get(i));\n }\n return selectColumns(name, t1.getName(), columns);\n }\n }",
"public Ruta[] findByDynamicSelect(String sql, Object[] sqlParams) throws RutaDaoException;",
"@Test\n public void createSqlQueryWithWhereAndGroupBySucceed()\n {\n // arrange\n // act\n QuerySpecification querySpecification = new QuerySpecificationBuilder(\"*\", QuerySpecificationBuilder.FromType.ENROLLMENTS).where(\"validWhere\").groupBy(\"validGroupBy\").createSqlQuery();\n\n // assert\n Helpers.assertJson(querySpecification.toJson(), \"{\\\"query\\\":\\\"select * from enrollments where validWhere group by validGroupBy\\\"}\");\n }",
"public Faq[] findByDynamicSelect(String sql, Object[] sqlParams) throws FaqDaoException;",
"protected void generateFromClause( WrqInfo wrqInfo, SQLStatementWithParams sqlStatement ) throws BindingException\n {\n sqlStatement.append(\" FROM \");\n WrqBindingSet bs = wrqInfo.getResultingBindingSet();\n resolvedBindingSets.addAll(bs.getResolvedBindingSets());\n sqlStatement.append(wrqInfo.getSQLSelectWithParams()); \n }",
"public void query(ComplexCar[] cars) throws DatabaseTestException;",
"public boolean createTable(String input) throws IOException{\n\t\tString orgQuery = input;\n\t\torgQuery = orgQuery.trim();\n\t\tString query = input.toLowerCase().trim();\n\t\tboolean queryFailed = false;\n\t\t//Schema Instance \n\t\tSchema currentSchema = Schema.getSchemaInstance();\n\t\tString currentSchemaName = currentSchema.getCurrentSchema();\n\n\t\t//TableSchemaManager Instance\n\t\tTableSchemaManager currentTableSchemaManager = TableSchemaManager.getTableSchemaManagerInstance();\n\n\t\t//Extracting Table name\n\t\ttableName = orgQuery.substring(query.indexOf(\"table \")+6,query.indexOf(\"(\")).trim();\n\n\t\t//Updating SCHEMA.TABLE.TBL\n\t\tif(updateInformationSchemaTable()){\n\t\t\tqueryFailed = true;\n\t\t\treturn queryFailed;\n\t\t}\n\n\t\t//Extracting Table contents\n\t\tString tableContentsWithQuotes = orgQuery.substring(orgQuery.indexOf(\"(\")+1,orgQuery.length());\n\t\tString tableContents = tableContentsWithQuotes.replace(\"))\", \")\");\n\t\ttableContents = tableContents.trim();\n\n\t\tTableSchemaManager.ordinalMap = new TreeMap<Integer,List<String>>();\n\t\tTableSchemaManager.tableMap = new TreeMap<String,TreeMap<Integer,List<String>>>();\n\t\t\n\t\t//Creating n instances of Table helper\n\t\tString[] createTableContents = tableContents.split(\"\\\\,\"); \n\t\tnoOfColumns = createTableContents.length;\n\t\tCreateTableHelper[] th = new CreateTableHelper[noOfColumns];\n\n\t\t\n\t\t//Handles single row of Create Table \n\t\tfor(int item = 0; item < noOfColumns ; item++){\n\t\t\tth[item] = new CreateTableHelper(); \n\t\t\t//To remove any leading or trailing spaces\n\t\t\tcreateTableContents[item] = createTableContents[item].trim();\n\t\t\tString columnName = createTableContents[item].substring(0, createTableContents[item].indexOf(\" \"));\n\t\t\tth[item].setColumnName(columnName);\n\n\t\t\t//Setting Primary Key\n\t\t\tString primaryKeyExp = \"(.*)[pP][rR][iI][mM][aA][rR][yY](.*)\";\n\t\t\tif (createTableContents[item].matches(primaryKeyExp))\n\t\t\t\tth[item].setPrimaryKey(true);\n\t\t\telse\n\t\t\t\tth[item].setPrimaryKey(false);\n\n\t\t\t//Setting Null Value\t\n\t\t\tString notNullExp = \"(.*)[nN][uU][lL][lL](.*)\";\n\t\t\tif (createTableContents[item].matches(notNullExp))\n\t\t\t\tth[item].setNull(true);\n\t\t\telse\n\t\t\t\tth[item].setNull(false);\n\n\t\t\t//Extracting data types \n\t\t\t//BYTE\n\t\t\tString byteExp = \"(.*)[bB][yY][tT][eE](.*)\";\n\t\t\tif (createTableContents[item].matches(byteExp)){\n\t\t\t\tth[item].setDataType(\"BYTE\");\n\t\t\t}\n\t\t\t//SHORT\n\t\t\tString shortExp = \"(.*)[sS][hH][oO][rR][tT](.*)\";\n\t\t\tif (createTableContents[item].matches(shortExp)){\n\t\t\t\tth[item].setDataType(\"SHORT\");\n\t\t\t}\n\t\t\t//INT\n\t\t\tString intExp = \"(.*)[iI][nN][tT](.*)\";\n\t\t\tif (createTableContents[item].matches(intExp)){\n\t\t\t\tth[item].setDataType(\"INT\");\n\t\t\t}\n\t\t\t//LONG\n\t\t\tString longExp = \"(.*)[lL][oO][nN][gG](.*)\";\n\t\t\tif (createTableContents[item].matches(longExp)){\n\t\t\t\tth[item].setDataType(\"LONG\");\n\t\t\t}\n\t\t\t//CHAR\n\t\t\tString charExp = \"(.*)[cC][hH][aA][rR](.*)\";\n\t\t\tif (createTableContents[item].matches(charExp)){\n\t\t\t\tString size = createTableContents[item].substring(createTableContents[item].indexOf(\"(\")+1, createTableContents[item].indexOf(\")\"));\n\t\t\t\tth[item].setDataType(\"CHAR(\" + size + \")\");\n\t\t\t}\n\t\t\t//VARCHAR\n\t\t\tString varcharExp = \"(.*)[vV][aA][rR][cC][hH][aA][rR](.*)\";\n\t\t\tif (createTableContents[item].matches(varcharExp)){\n\t\t\t\tString size = createTableContents[item].substring(createTableContents[item].indexOf(\"(\")+1, createTableContents[item].indexOf(\")\"));\n\t\t\t\tth[item].setDataType(\"VARCHAR(\" + size + \")\");\n\t\t\t}\n\t\t\t//FLOAT\n\t\t\tString floatExp = \"(.*)[fF][lL][oO][aA][tT](.*)\";\n\t\t\tif (createTableContents[item].matches(floatExp)){\n\t\t\t\tth[item].setDataType(\"FLOAT\");\t\t\t\t\n\t\t\t}\n\t\t\t//DOUBLE\n\t\t\tString doubleExp = \"(.*)[dD][oO][uU][bB][lL][eE](.*)\";\n\t\t\tif (createTableContents[item].matches(doubleExp)){\n\t\t\t\tth[item].setDataType(\"DOUBLE\");\n\t\t\t}\n\t\t\t//DATETIME\n\t\t\tString dateTimeExp = \"(.*)[dD][aA][tT][eE][tT][iI][mM][eE](.*)\";\n\t\t\tif (createTableContents[item].matches(dateTimeExp)){\n\t\t\t\tth[item].setDataType(\"DATETIME\");\n\t\t\t}\n\t\t\t//DATE\n\t\t\tString dateExp = \"(.*)[dD][aA][tT][eE](.*)\";\n\t\t\tif (createTableContents[item].matches(dateExp)){\n\t\t\t\tth[item].setDataType(\"DATE\");\n\t\t\t}\n\n\t\t\tcurrentTableSchemaManager.newTableSchema(\n\t\t\t\t\ttableName,\n\t\t\t\t\titem,\n\t\t\t\t\tth[item].getColumnName(),\n\t\t\t\t\tth[item].getDataType(),\n\t\t\t\t\tth[item].isNull(),\n\t\t\t\t\tth[item].isPrimaryKey()\n\t\t\t\t\t);\n\n\t\t\t//Updating SCHEMA.COLUMNS.TBL\n\t\t\tupdateInformationSchemaColumn(\n\t\t\t\t\tth[item].getColumnName(),\n\t\t\t\t\titem,\n\t\t\t\t\tth[item].getDataType(),\n\t\t\t\t\tth[item].isNull(),\n\t\t\t\t\tth[item].isPrimaryKey()\n\t\t\t\t\t);\n\t\t\t//Create tables to insert index\n\t\t\tString newTableIndexName = currentSchemaName + \".\" + tableName + \".\" +th[item].getColumnName()+ \".tbl.ndx\";\n\t\t\tRandomAccessFile newTableIndexFile = new RandomAccessFile(newTableIndexName, \"rw\");\n\t\t\tnewTableIndexFile.close();\n\n\t\t}\n\n\t\tTableSchemaManager.tableMap.put(tableName, TableSchemaManager.ordinalMap);\n\t\tcurrentTableSchemaManager.updateTableSchema(currentSchemaName,tableName);\n\t\t\n\t\t//Create tables to insert data \n\t\tString newTableDataName = currentSchemaName + \".\" + tableName + \".tbl\";\n\t\tRandomAccessFile newTableDataFile = new RandomAccessFile(newTableDataName, \"rw\");\n\t\tnewTableDataFile.close();\n\t\treturn queryFailed;\n\t}",
"UsingCols createUsingCols();",
"public LearningResultHasActivity[] findByDynamicSelect(String sql, Object[] sqlParams) throws LearningResultHasActivityDaoException;",
"List<Basicinfo> selectByExample(BasicinfoCriteria example);",
"private String createInsertQuery()\n {\n int i = 0;\n StringBuilder sb = new StringBuilder();\n sb.append(\"INSERT INTO \");\n sb.append(type.getSimpleName());\n sb.append(\" (\");\n for(Field field:type.getDeclaredFields()) {i++; if(i != type.getDeclaredFields().length)sb.append(field.getName() +\", \"); else sb.append(field.getName());}\n sb.append(\")\");\n sb.append(\" VALUES (\");\n i = 0;\n for(Field field:type.getDeclaredFields()) {i++; if(i!= type.getDeclaredFields().length)sb.append(\"?, \"); else sb.append(\"?\");}\n sb.append(\");\");\n return sb.toString();\n }",
"public interface SqlQueries {\n\n /**\n * The constant QUOTATION.\n */\n String QUOTATION = \"'\";\n\n /**\n * The constant SELECT_ALL_CARS.\n */\n String SELECT_ALL_CARS = \"SELECT * FROM Car\";\n\n /**\n * The constant SELECT_ALL_USERS.\n */\n String SELECT_ALL_USERS = \"SELECT * FROM Users\";\n\n /**\n * The constant FIND_CAR_BY_ID.\n */\n String FIND_CAR_BY_ID = \"Select * from Car Where id = \";\n\n /**\n * The constant CREATE_A_CAR.\n */\n String CREATE_A_CAR = \"insert into car values({0},{1}, {2}, {3}, {4})\";\n\n}",
"private String createQuery(MultivaluedMap<String, String> filters, Boolean count) {\n String where = \"\";\n String fields = \"\";\n String orderBy = \"\";\n\n for (Map.Entry<String, List<String>> entry : filters.entrySet()) {\n switch (entry.getKey()) {\n case \"range\":\n where = (\"\".equals(where)) ? \" WHERE \" : \" AND \";\n String[] range = entry.getValue().get(0).split(\"-\");\n where += \"id >= \" + range[0] + \" AND id <= \" + range[1];\n break;\n case \"fields\":\n for (String field : entry.getValue()){\n fields = (\"\".equals(fields)) ? field : \",\" + field;\n }\n break;\n case \"asc\":\n orderBy = \" ORDER BY \" + entry.getValue() + \" ASC\";\n break;\n case \"desc\":\n orderBy = \" ORDER BY \" + entry.getValue() + \" DESC\";\n break;\n default:\n for (String condition : entry.getValue()) {\n where = (\"\".equals(where)) ? \" WHERE \" : \" AND \";\n where += entry.getKey() + \" = '\" + condition + \"'\";\n }\n }\n }\n\n fields = (\"\".equals(fields)) ? \"*\" : fields;\n fields = count ? \"(\" + fields + \")\" : fields;\n return \"SELECT \" + fields + \" FROM decodedFile \" + where + orderBy;\n }",
"@Override\n public ResultSet getResultsForAll(String onyen, String assignment, String type, String course, String section, String year, String season) throws SQLException {\n StringBuilder statement = new StringBuilder();\n int count = 0;\n statement.append(\"SELECT * FROM (\\n\");\n if (onyen != null && !onyen.isEmpty()) {\n count++;\n statement.append(\"SELECT * FROM result WHERE assignment_submission_id IN (SELECT id FROM assignment_submission WHERE user_uid IN (SELECT uid FROM user WHERE onyen = ?))\");\n }\n if (assignment != null && !assignment.isEmpty()) {\n if (count > 0) {\n statement.append(\"\\nUNION ALL\\n\");\n }\n count++;\n statement.append(\"SELECT * FROM result WHERE assignment_submission_id IN (SELECT id FROM assignment_submission WHERE assignment_catalog_id IN (SELECT id FROM assignment_catalog WHERE name = ?))\");\n }\n if (type != null && !type.isEmpty()) {\n if (count > 0) {\n statement.append(\"\\nUNION ALL\\n\");\n }\n count++;\n statement.append(\"SELECT * FROM result WHERE assignment_submission_id IN (SELECT id FROM assignment_submission WHERE assignment_catalog_id IN (SELECT id FROM assignment_catalog WHERE assignment_type_id IN (SELECT id FROM assignment_type WHERE name = ?)))\");\n }\n if (course != null && !course.isEmpty()) {\n if (count > 0) {\n statement.append(\"\\nUNION ALL\\n\");\n }\n count++;\n statement.append(\"SELECT * FROM result WHERE assignment_submission_id IN (SELECT id FROM assignment_submission WHERE assignment_catalog_id IN (SELECT id FROM assignment_catalog WHERE course_id IN (SELECT id FROM course WHERE name = ?)))\");\n }\n if (section != null && !section.isEmpty()) {\n count++;\n if (count > 0) {\n statement.append(\"\\nUNION ALL\\n\");\n }\n statement.append(\"SELECT * FROM result WHERE assignment_submission_id IN (SELECT id FROM assignment_submission WHERE assignment_catalog_id IN (SELECT id FROM assignment_catalog WHERE course_id IN (SELECT id FROM course WHERE section = ?)))\");\n }\n if (year != null && !year.isEmpty()) {\n if (count > 0) {\n statement.append(\"\\nUNION ALL\\n\");\n }\n count++;\n statement.append(\"SELECT * FROM result WHERE assignment_submission_id IN (SELECT id FROM assignment_submission WHERE assignment_catalog_id IN (SELECT id FROM assignment_catalog WHERE course_id IN (SELECT id FROM course WHERE term_id IN (SELECT id FROM term WHERE year = ?))))\");\n }\n if (season != null && !season.isEmpty()) {\n if (count > 0) {\n statement.append(\"\\nUNION ALL\\n\");\n }\n count++;\n statement.append(\"SELECT * FROM result WHERE assignment_submission_id IN (SELECT id FROM assignment_submission WHERE assignment_catalog_id IN (SELECT id FROM assignment_catalog WHERE course_id IN (SELECT id FROM course WHERE term_id IN (SELECT id FROM term WHERE season = ?))))\");\n }\n if (count > 0) {\n statement.append(\")\\n AS result GROUP BY id HAVING count(*) = \").append(count);\n } else {\n statement.setLength(0);\n statement.append(\"SELECT * FROM result\");\n }\n statement.append(\"\\nORDER BY date DESC;\");\n //System.out.println(statement.toString());\n PreparedStatement pstmt = connection.prepareStatement(statement.toString());\n int i = 1;\n if (onyen != null && !onyen.isEmpty()) {\n pstmt.setString(i++, onyen);\n }\n if (assignment != null && !assignment.isEmpty()) {\n pstmt.setString(i++, assignment);\n }\n if (type != null && !type.isEmpty()) {\n pstmt.setString(i++, type);\n }\n if (course != null && !course.isEmpty()) {\n pstmt.setString(i++, course);\n }\n if (section != null && !section.isEmpty()) {\n pstmt.setInt(i++, Integer.parseInt(section));\n }\n if (year != null && !year.isEmpty()) {\n pstmt.setInt(i++, Integer.parseInt(year));\n }\n if (season != null && !season.isEmpty()) {\n pstmt.setString(i, season);\n }\n return pstmt.executeQuery();\n }",
"HumidityQuery createHumidityQuery();",
"public String prepareTable(ColumnInfo[] layout,\n String from,\n String where,\n boolean multiSelection,\n String tableName,boolean addAccessSQL)\n {\n int columnIndex = 0;\n StringBuffer sql = new StringBuffer (\"SELECT \");\n setLayout(layout);\n\n clearColumns();\n\n setMultiSelection(multiSelection);\n\n // add columns & sql\n for (columnIndex = 0; columnIndex < layout.length; columnIndex++)\n {\n // create sql\n if (columnIndex > 0)\n {\n sql.append(\", \");\n }\n sql.append(layout[columnIndex].getColSQL());\n\n // adding ID column\n if (layout[columnIndex].isKeyPairCol())\n {\n sql.append(\",\").append(layout[columnIndex].getKeyPairColSQL());\n }\n\n // add to model\n addColumn(layout[columnIndex].getColHeader());\n\n // set the colour column\n if (layout[columnIndex].isColorColumn())\n {\n setColorColumn(columnIndex);\n }\n if (layout[columnIndex].getColClass() == IDColumn.class)\n {\n m_keyColumnIndex = columnIndex;\n }\n }\n\n // set editors (two steps)\n for (columnIndex = 0; columnIndex < layout.length; columnIndex++)\n {\n setColumnClass(columnIndex,\n layout[columnIndex].getColClass(),\n layout[columnIndex].isReadOnly(),\n layout[columnIndex].getColHeader());\n }\n\n sql.append( \" FROM \").append(from);\n sql.append(\" WHERE \").append(where);\n\n if (from.length() == 0)\n {\n return sql.toString();\n }\n //\n if (addAccessSQL)\n {\n String finalSQL = MRole.getDefault().addAccessSQL(sql.toString(),\n tableName,\n MRole.SQL_FULLYQUALIFIED,\n MRole.SQL_RO);\n\n logger.finest(finalSQL);\n\n return finalSQL;\n }\n else\n {\n return sql.toString();\n }\n }",
"private BaseQueryImpl<?> construct(CriteriaBuilderImpl cb, CommonTree tree) {\n \t\tfinal Tree type = tree.getChild(0);\n \t\tif (type.getType() == JpqlParser.SELECT) {\n \t\t\treturn this.constructSelectQuery(cb, tree);\n \t\t}\n \t\telse if (type.getType() == JpqlParser.DELETE) {\n \t\t\treturn this.constructDeleteQuery(cb, tree);\n \t\t}\n \t\telse {\n \t\t\treturn this.constructUpdateQuery(cb, tree);\n \t\t}\n \t}",
"private void armarQuery(String filtro) throws DatabaseErrorException {\n String query = null;\n if (filtro != null && filtro.length() > 0) {\n query = \"SELECT * FROM \" + CLASS_NAME + \" o WHERE o.nombre ILIKE '\" + filtro + \"%' ORDER BY o.nombre\";\n }\n cargarContenedorTabla(query);\n }",
"public Query createQuery(String hql, Object... values) {\n Assert.hasText(hql);\n Query query = getSession().createQuery(hql);\n for (int i = 0; i < values.length; i++) {\n query.setParameter(i, values[i]);\n }\n return query;\n }",
"@SuppressWarnings({\"unchecked\", \"fallthrough\"})\n public static Class<? extends DataObject> modelFromTables(Connection connection, String classname, Action action, String... tablenames) throws Exception {\n\n /*\n SQL generation\n\n INSERT INTO T ( cols ) VALUES ( vals );\n UPDATE T SET cols WHERE vals;\n DELETE FROM T WHERE vals;\n SELECT * FROM cols WHERE vals;\n */\n\n ClassPool pool = ClassPool.getDefault();\n // this line is necessary for web applications (web container class loader in play)\n pool.appendClassPath(new LoaderClassPath(org.xillium.data.DataObject.class.getClassLoader()));\n\n CtClass cc = pool.makeClass(classname);\n cc.addInterface(pool.getCtClass(\"org.xillium.data.DataObject\"));\n ConstPool cp = cc.getClassFile().getConstPool();\n\n List<String> fragments = new ArrayList<String>();\n Set<String> unique = new HashSet<String>();\n\n/*SQL*/ StringBuilder\n cols = new StringBuilder(), // CREATE: COLUMNS, RETRIEVE: TABLES, UPDATE: SET CLAUSES, DELETE: (not used), SEARCH: TABLES\n vals = new StringBuilder(), // CREATE: VALUES, RETRIEVE: COND'S, UPDATE: COND'S, DELETE: COND'S, SEARCH: COND'S\n flds = new StringBuilder();\n\n // for SEARCH only\n Map<String, List<Pair<Integer, Integer>>> voptional = new HashMap<String, List<Pair<Integer, Integer>>>();\n Map<String, List<Pair<Integer, Integer>>> foptional = new HashMap<String, List<Pair<Integer, Integer>>>();\n Map<String, String> nametrans = new HashMap<String, String>();\n\n DatabaseMetaData meta = connection.getMetaData();\n String schema = meta.getUserName();\n List<String> dominant = new ArrayList<String>();\n\n for (int i = 0; i < tablenames.length; ++i) {\n // Dominant tables are recognized and maintained in 'dominant' list\n if (tablenames[i].charAt(0) == DOMINANT_INDICATOR) {\n tablenames[i] = tablenames[i].substring(1);\n dominant.add(tablenames[i]);\n }\n\n PreparedStatement stmt = connection.prepareStatement(\"SELECT * FROM \" + tablenames[i]);\n ResultSetMetaData rsmeta = stmt.getMetaData();\n Map<String, Integer> colref = new HashMap<String, Integer>();\n for (int j = 1, jj = rsmeta.getColumnCount(); j <= jj; ++j) {\n colref.put(rsmeta.getColumnLabel(j), new Integer(j));\n }\n\n Set<String> primaryKeys = new HashSet<String>();\n ResultSet keys = meta.getPrimaryKeys(connection.getCatalog(), schema, tablenames[i]);\n while (keys.next()) {\n primaryKeys.add(keys.getString(PKEY_COLUMN));\n }\n keys.close();\n\n // RETRIEVE is not compatible with tables without a primary key\n if (primaryKeys.isEmpty() && action.op == Operation.RETRIEVE) {\n throw new RuntimeException(\"Primary key expected for RETRIEVE command, but missing on table \" + tablenames[i]);\n }\n\n // ISA keys and table join conditions\n Set<String> isaKeys = new HashSet<String>();\n if (i > 0) {\n keys = meta.getImportedKeys(connection.getCatalog(), schema, tablenames[i]);\n while (keys.next()) {\n String jointable = null;\n for (int j = 0; j < i; ++j) {\n if (keys.getString(FKEY_REFERENCED_TABLE).equals(tablenames[j])) {\n jointable = tablenames[j];\n break;\n }\n }\n if (jointable != null) {\n String column = keys.getString(FKEY_REFERENCING_COLUMN);\n isaKeys.add(column);\n if (action.op == Operation.RETRIEVE || action.op == Operation.SEARCH) {\n /*SQL*/ vals.append(tablenames[i]).append('.').append(column).append('=').append(jointable).append('.').append(column).append(\" AND \");\n }\n }\n }\n keys.close();\n }\n\n String alias = ((action.op == Operation.RETRIEVE || action.op == Operation.SEARCH) && tablenames.length > 1) ? tablenames[i]+'.' : \"\";\n\n if (action.op != Operation.RETRIEVE && action.op != Operation.SEARCH) {\n cols.setLength(0);\n vals.setLength(0);\n flds.setLength(0);\n } else {\n /*SQL*/ if (cols.length() > 0) cols.append(',');\n /*SQL*/ cols.append(tablenames[i]);\n }\n\n // Go through all columns in action.args for UPDATE and SEARCH operations\n Set<String> requested = new HashSet<String>();\n Set<String> required = new HashSet<String>();\n if (action.op == Operation.UPDATE) {\n // UPDATE: the elements in the SET clause => cols\n for (String column: calcUpdateColumns(action.args, colref, primaryKeys)) {\n // skip all key columns, which might be legally included through the restriction list\n if (primaryKeys.contains(column)) continue;\n // ... and SET others\n Integer idx = colref.get(column);\n if (idx != null) {\n /*SQL*/ if (cols.length() > 0) cols.append(',');\n /*SQL*/ String restriction = action.restriction == null ? null : action.restriction.get(column);\n if (restriction == null) {\n boolean reqd = action.isRequired(column);\n if (reqd) {\n /*SQL*/ cols.append(column).append(\"=?\");\n } else {\n /*SQL*/ cols.append(column).append(\"=COALESCE(?,\").append(column).append(')');\n }\n /*SQL*/ if (flds.length() > 0) flds.append(',');\n flds.append(fieldName(tablenames[i], column)).append(':').append(rsmeta.getColumnType(idx.intValue()));\n requested.add(column);\n if (reqd) required.add(column);\n } else {\n /*SQL*/ cols.append(column).append('=').append(restriction);\n }\n }\n }\n } else if (action.op == Operation.SEARCH && action.args != null) {\n // SEARCH: the elements in the WHERE clause => vals\n for (int c = 0; c < action.args.length; ++c) {\n // skip all ISA columns, which might be legally included through the restriction list\n if (isaKeys.contains(action.args[c])) continue;\n // else ...\n Integer idx = colref.get(action.args[c]);\n if (idx != null) {\n /*SQL*/ String restriction = action.restriction == null ? null : action.restriction.get(action.args[c]);\n /*SQL*/ if (restriction == null || restriction.charAt(0) == NEGATIVE_INDICATOR) {\n if (restriction != null) {\n /*SQL*/ vals.append(tablenames[i]).append('.').append(action.args[c]).append(\"<>\").append(restriction.substring(1)).append(\" AND \");\n }\n int vstart = vals.length(), fstart = flds.length();\n /*SQL*/ vals.append(tablenames[i]).append('.').append(action.args[c]).append(action.cmps[c]).append(\"? AND \");\n flds.append(fieldName(tablenames[i], action.args[c])).append(':').append(rsmeta.getColumnType(idx.intValue())).append(',');\n if (!action.reqd[c]) {\n traceOptional(voptional, action.args[c], vstart, vals.length());\n traceOptional(foptional, action.args[c], fstart, flds.length());\n }\n requested.add(action.args[c]);\n if (action.reqd[c]) required.add(action.args[c]);\n } else {\n /*SQL*/ vals.append(tablenames[i]).append('.').append(action.args[c]).append('=').append(restriction).append(\" AND \");\n }\n }\n }\n }\n\n ResultSet columns = meta.getColumns(connection.getCatalog(), schema, tablenames[i], \"%\");\n columns:while (columns.next()) {\n String name = columns.getString(COLUMN_NAME), fname = fieldName(tablenames[i], name);\n int idx = colref.get(name).intValue();\n\n if ((action.op == Operation.RETRIEVE || action.op == Operation.DELETE) && !primaryKeys.contains(name)) {\n continue;\n } else if (action.op == Operation.UPDATE && !requested.contains(name) && !primaryKeys.contains(name)) {\n continue;\n } else if (action.op == Operation.SEARCH && !requested.contains(name)) {\n continue;\n }\n\n /*SQL*/ String restriction = action.restriction == null ? null : action.restriction.get(name);\n switch (action.op) {\n case CREATE:\n if (action.args != null) for (int j = 0; j < action.args.length; ++j) {\n if (action.args[j].equals(name)) continue columns;\n }\n /*SQL*/ if (cols.length() > 0) {\n /*SQL*/ cols.append(',');\n /*SQL*/ vals.append(',');\n /*SQL*/ }\n /*SQL*/ cols.append(name);\n /*SQL*/ if (restriction == null || restriction.charAt(0) == NEGATIVE_INDICATOR) {\n /*SQL*/ vals.append('?');\n /*SQL*/ if (flds.length() > 0) flds.append(',');\n flds.append(fname).append(':').append(rsmeta.getColumnType(idx));\n } else {\n /*SQL*/ vals.append(restriction);\n }\n break;\n case RETRIEVE:\n if (i > 0) {\n // NOTE: ISA relation dictates that sub-tables' primary key == super-table's primary key\n // therefore the join condition generated above is sufficient already\n break;\n }\n // fall through for the super-table\n case DELETE:\n // only primary key columns\n generateCondition(restriction, vals, flds, alias + name, fname, rsmeta.getColumnType(idx));\n break;\n case UPDATE:\n // only primary key & updating columns\n if (primaryKeys.contains(name)) {\n generateCondition(restriction, vals, flds, name, fname, rsmeta.getColumnType(idx));\n }\n break;\n case SEARCH:\n // file optionals lists under field names\n nametrans.put(name, fname);\n voptional.put(fname, voptional.get(name));\n foptional.put(fname, foptional.get(name));\n break;\n }\n\n if ((restriction != null && restriction.charAt(0) != NEGATIVE_INDICATOR) || isaKeys.contains(name)) {\n continue;\n } else if (unique.contains(name)) {\n continue;\n //throw new RuntimeException(\"Duplicate column in ISA relationship detected \" + tablenames[i] + ':' + name);\n } else {\n unique.add(name);\n }\n\n CtField field = new CtField(pool.getCtClass(MetaDataHelper.getClassName(rsmeta, idx)), fname, cc);\n field.setModifiers(java.lang.reflect.Modifier.PUBLIC);\n AnnotationsAttribute attr = new AnnotationsAttribute(cp, AnnotationsAttribute.visibleTag);\n\n if (required.contains(name)) {\n addAnnotation(attr, cp, \"org.xillium.data.validation.required\");\n } else if (columns.getInt(IS_NULLABLE) == DatabaseMetaData.attributeNoNulls) {\n if ((action.op != Operation.UPDATE || primaryKeys.contains(name)) && action.op != Operation.SEARCH) {\n addAnnotation(attr, cp, \"org.xillium.data.validation.required\");\n }\n }\n\n if (rsmeta.getPrecision(idx) != 0) {\n addAnnotation(attr, cp, \"org.xillium.data.validation.size\", \"value\", new IntegerMemberValue(cp, rsmeta.getPrecision(idx)));\n }\n\n addAnnotation(attr, cp, \"org.xillium.data.persistence.crud.tablename\", \"value\", new StringMemberValue(tablenames[i], cp));\n\n field.getFieldInfo().addAttribute(attr);\n cc.addField(field);\n }\n columns.close();\n stmt.close();\n\n switch (action.op) {\n case CREATE:\n fragments.add(\"org.xillium.data.persistence.ParametricStatement\");\n fragments.add(flds.toString());\n fragments.add(\"INSERT INTO \" + tablenames[i] + '(' + cols.toString() + \") VALUES(\" + vals.toString() + ')');\n fragments.add(Strings.toCamelCase(tablenames[i], '_'));\n break;\n case UPDATE:\n if (cols.length() > 0) {\n fragments.add(\"org.xillium.data.persistence.ParametricStatement\");\n fragments.add(flds.toString());\n fragments.add(\"UPDATE \" + tablenames[i] + \" SET \" + cols.toString() + \" WHERE \" + vals.toString().replaceAll(\" AND *$\", \"\"));\n fragments.add(Strings.toCamelCase(tablenames[i], '_'));\n }\n break;\n case DELETE:\n fragments.add(\"org.xillium.data.persistence.ParametricStatement\");\n fragments.add(flds.toString());\n fragments.add(\"DELETE FROM \" + tablenames[i] + \" WHERE \" + vals.toString().replaceAll(\" AND *$\", \"\"));\n fragments.add(Strings.toCamelCase(tablenames[i], '_'));\n break;\n case RETRIEVE:\n case SEARCH:\n break;\n }\n }\n\n if (action.op == Operation.RETRIEVE) {\n fragments.add(\"org.xillium.data.persistence.ParametricQuery\");\n fragments.add(flds.toString());\n fragments.add(\"SELECT \" + selectTarget(dominant) + \" FROM \" + cols + \" WHERE \" + vals.toString().replaceAll(\" AND *$\", \"\"));\n fragments.add(\"\");\n } else if (action.op == Operation.SEARCH) {\n if (action.opts != null) {\n for (int i = 0; i < action.opts.length; ++i) {\n action.opts[i] = nametrans.get(action.opts[i]);\n }\n int count = 1 << action.opts.length;\n\n String vtext = vals.toString(), ftext = flds.toString();\n for (int i = 0; i < count; ++i) {\n char[] vchars = vtext.toCharArray(), fchars = ftext.toCharArray();\n for (int j = 0; j < action.opts.length; ++j) {\n List<Pair<Integer, Integer>> vlist = voptional.get(action.opts[j]);\n List<Pair<Integer, Integer>> flist = foptional.get(action.opts[j]);\n if (vlist == null || flist == null) {\n throw new RuntimeException(\"Column{\"+action.opts[j]+\"}NotInRelevantTables\");\n }\n if ((i & (1 << j)) == 0) {\n for (Pair<Integer, Integer> part: vlist) Arrays.fill(vchars, part.first, part.second, ' ');\n for (Pair<Integer, Integer> part: flist) Arrays.fill(fchars, part.first, part.second, ' ');\n }\n }\n\n fragments.add(\"org.xillium.data.persistence.ParametricQuery\");\n fragments.add(new String(fchars).replaceAll(\"\\\\s+\", \" \"));\n String vals0 = new String(vchars).replaceAll(\"\\\\s+\", \" \").replaceAll(\" AND *$\", \"\").trim();\n if (vals0.length() > 0) {\n fragments.add(\"SELECT \" + selectTarget(dominant) + \" FROM \" + cols + \" WHERE \" + vals0);\n } else {\n fragments.add(\"SELECT \" + selectTarget(dominant) + \" FROM \" + cols);\n }\n fragments.add(\"\");\n }\n } else {\n fragments.add(\"org.xillium.data.persistence.ParametricQuery\");\n fragments.add(flds.toString());\n if (vals.length() > 0) {\n fragments.add(\"SELECT \" + selectTarget(dominant) + \" FROM \" + cols + \" WHERE \" + vals.toString().replaceAll(\" AND *$\", \"\"));\n } else {\n fragments.add(\"SELECT \" + selectTarget(dominant) + \" FROM \" + cols);\n }\n fragments.add(\"\");\n }\n }\n\n CtField field = new CtField(pool.getCtClass(\"org.xillium.data.persistence.ParametricStatement[]\"), STATEMENT_FIELD_NAME, cc);\n field.setModifiers(java.lang.reflect.Modifier.PUBLIC | java.lang.reflect.Modifier.STATIC | java.lang.reflect.Modifier.FINAL);\n cc.addField(field, CtField.Initializer.byCallWithParams(\n pool.getCtClass(CrudCommand.class.getName()), \"buildStatements\", fragments.toArray(new String[fragments.size()])\n ));\n\n return (Class<? extends DataObject>)cc.toClass(CrudCommand.class.getClassLoader(), CrudCommand.class.getProtectionDomain());\n }",
"public Query createQuery() {\n\n String queryString = getQueryString();\n\n if (debug == true) {\n logger.info( \"Query String: {0}\", queryString);\n logger.info( \"Parameters: Max Results: {0}, First result: {1}, Order By: {2}, Restrictions: {3}, Joins: {4}\", new Object[]{maxResults, firstResult, orderBy, normalizedRestrictions, joins});\n }\n\n Query query = entityManager.createQuery(queryString);\n\n List<QueryParameter> parameters = getQueryParameters();\n for (QueryParameter parameter : parameters) {\n //dates (Date and Calendar)\n if (parameter.getTemporalType() != null && (parameter.getValue() instanceof Date || parameter.getValue() instanceof Calendar)) {\n if (parameter.getValue() instanceof Date) {\n if (parameter.getPosition() != null) {\n query.setParameter(parameter.getPosition(), (Date) parameter.getValue(), parameter.getTemporalType());\n } else {\n if (parameter.getProperty() != null) {\n query.setParameter(parameter.getProperty(), (Date) parameter.getValue(), parameter.getTemporalType());\n }\n }\n } else if (parameter.getValue() instanceof Calendar) {\n if (parameter.getPosition() != null) {\n query.setParameter(parameter.getPosition(), (Calendar) parameter.getValue(), parameter.getTemporalType());\n } else {\n if (parameter.getProperty() != null) {\n query.setParameter(parameter.getProperty(), (Calendar) parameter.getValue(), parameter.getTemporalType());\n }\n }\n }\n } else {\n if (parameter.getPosition() != null) {\n query.setParameter(parameter.getPosition(), parameter.getValue());\n } else {\n if (parameter.getProperty() != null) {\n query.setParameter(parameter.getProperty(), parameter.getValue());\n }\n }\n }\n }\n\n if (maxResults != null) {\n query.setMaxResults(maxResults);\n }\n if (firstResult != null) {\n query.setFirstResult(firstResult);\n }\n return query;\n }",
"public Query query(Table table) {\r\n return new Query(this, table);\r\n }",
"public void testProductInstanceAttributeQuery() {\n\n String\tsql\t= \"SELECT p.M_Product_ID, p.Discontinued, p.Value, p.Name, BOM_Qty_Available(p.M_Product_ID,?) AS QtyAvailable, bomQtyList(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceList, bomQtyStd(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceStd, BOM_Qty_OnHand(p.M_Product_ID,?) AS QtyOnHand, BOM_Qty_Reserved(p.M_Product_ID,?) AS QtyReserved, BOM_Qty_Ordered(p.M_Product_ID,?) AS QtyOrdered, bomQtyStd(p.M_Product_ID, pr.M_PriceList_Version_ID)-bomQtyLimit(p.M_Product_ID, pr.M_PriceList_Version_ID) AS Margin, bomQtyLimit(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceLimit, pa.IsInstanceAttribute FROM M_Product p INNER JOIN M_ProductPrice pr ON (p.M_Product_ID=pr.M_Product_ID) LEFT OUTER JOIN M_AttributeSet pa ON (p.M_AttributeSet_ID=pa.M_AttributeSet_ID) WHERE p.IsSummary='N' AND p.IsActive='Y' AND pr.IsActive='Y' AND pr.M_PriceList_Version_ID=? AND EXISTS (SELECT * FROM M_Storage s INNER JOIN M_AttributeSetInstance asi ON (s.M_AttributeSetInstance_ID=asi.M_AttributeSetInstance_ID) WHERE s.M_Product_ID=p.M_Product_ID AND asi.SerNo LIKE '33' AND asi.Lot LIKE '33' AND asi.M_Lot_ID=101 AND TRUNC(asi.GuaranteeDate)<TO_DATE('2003-10-16','YYYY-MM-DD') AND asi.M_AttributeSetInstance_ID IN (SELECT M_AttributeSetInstance_ID FROM M_AttributeInstance WHERE (M_Attribute_ID=103 AND Value LIKE '33') AND (M_Attribute_ID=102 AND M_AttributeValue_ID=106))) AND p.M_AttributeSetInstance_ID IN (SELECT M_AttributeSetInstance_ID FROM M_AttributeInstance WHERE (M_Attribute_ID=101 AND M_AttributeValue_ID=105) AND (M_Attribute_ID=100 AND M_AttributeValue_ID=102)) AND p.AD_Client_ID IN(0,11) AND p.AD_Org_ID IN(0,11,12) ORDER BY QtyAvailable DESC, Margin DESC\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[M_AttributeInstance|M_Storage=s,M_AttributeSetInstance=asi|M_AttributeInstance|M_Product=p,M_ProductPrice=pr,M_AttributeSet=pa|3]\", fixture.toString());\n }",
"tbls createtbls();",
"public List<IEntity> query(IQuery query) throws SQLException;",
"public interface SettingsEventQuery {\r\n public static final String[] COLUMNS = {\"keyField\", \"keyValue\"};\r\n public static final String CREATE_TABLE = (\"CREATE TABLE IF NOT EXISTS Settings(\" + COLUMNS[0] + \" TEXT, \" + COLUMNS[1] + \" TEXT )\");\r\n public static final String DROP_TABLE = \"DROP TABLE IF EXISTS Settings\";\r\n public static final int KEY_FIELD = 0;\r\n public static final int KEY_VALUE = 1;\r\n public static final String TABLE = \"Settings\";\r\n }",
"private String createInsertQuery() {\r\n StringBuilder query = new StringBuilder();\r\n query.append(\"insert into \").append(m_tableName)\r\n .append(\"(\").append(m_propertyNames[0]);\r\n for (int i = 1; i < m_propertyNames.length; i++) {\r\n query.append(\",\").append(m_propertyNames[i]);\r\n }\r\n query.append(\") values (?\");\r\n for (int i = 1; i < m_propertyNames.length; i++) {\r\n query.append(\",?\");\r\n }\r\n query.append(\")\");\r\n return query.toString();\r\n }",
"protected void createSubQueryJoinTable() throws ODataApplicationException {\r\n try {\r\n final List<JPAOnConditionItem> left = association\r\n .getJoinTable()\r\n .getJoinColumns(); // Team -->\r\n final List<JPAOnConditionItem> right = association\r\n .getJoinTable()\r\n .getInverseJoinColumns(); // Person -->\r\n createSelectClauseJoin(subQuery, queryRoot, right);\r\n Expression<Boolean> whereCondition = createWhereByAssociation(from, queryJoinTable, left);\r\n whereCondition = cb.and(whereCondition, createWhereByAssociation(queryJoinTable, queryRoot, right));\r\n subQuery.where(applyAdditionalFilter(whereCondition));\r\n } catch (final ODataJPAModelException e) {\r\n throw new ODataJPAQueryException(e, HttpStatusCode.INTERNAL_SERVER_ERROR);\r\n }\r\n\r\n }",
"private DBObject queryMeta(String query,\n\t\t\tCollection<Entry<String, String>> tableDefs, boolean debug)\n\t\t\tthrows IOException, DeserializationException {\n\t\tListenableFuture<Response> response = asyncClient.preparePost(yqlBaseURI).setParameters(toParameterMap(query, tableDefs, debug)).execute();\n\t\t\n\t\tInputStream in = null;\n\t\ttry {\n\t\t\tin = response.get().getResponseBodyAsStream();\n\t\t\treturn parse(in);\n\t\t} catch (InterruptedException | ExecutionException e) {\n\t\t\tthrow new IOException(\"Unable to fetch date from YQL endpoint!\" ,e);\n\t\t} finally {\n\t\t\tif(in!=null) {\n\t\t\t\tin.close();\n\t\t\t}\n\t\t}\n\t}",
"private StarTable runCheckedQuery( String adql, int maxrec,\n ColSpec[] colSpecs, int maxrow ) {\n Map<String,String> extraParams = new HashMap<String,String>();\n if ( maxrec >= 0 ) {\n extraParams.put( \"MAXREC\", Integer.toString( maxrec ) );\n }\n TapQuery tq;\n try {\n tq = new TapQuery( serviceUrl_, adql, extraParams, null, 0 );\n }\n catch ( IOException e ) {\n reporter_.report( ReportType.ERROR, \"TSER\",\n \"TAP job creation failed for \" + adql, e );\n return null;\n }\n StarTable table = tapRunner_.getResultTable( reporter_, tq );\n if ( table != null ) {\n int nrow = (int) table.getRowCount();\n if ( maxrec >=0 && nrow > maxrec ) {\n String msg = new StringBuffer()\n .append( \"More than MAXREC rows returned (\" )\n .append( nrow )\n .append( \" > \" )\n .append( maxrec )\n .append( \")\" )\n .append( \" for \" )\n .append( adql )\n .toString();\n reporter_.report( ReportType.ERROR, \"NREC\", msg );\n }\n if ( maxrow >= 0 && nrow > maxrow ) {\n String msg = new StringBuffer()\n .append( \"More rows than expected (\" )\n .append( nrow )\n .append( \") returned\" )\n .append( \" for \" )\n .append( adql )\n .toString();\n reporter_.report( ReportType.ERROR, \"NROW\", msg );\n }\n checkMeta( adql, colSpecs, table );\n }\n return table;\n }",
"protected abstract PreparedResult implement( RelRoot root );",
"Query queryOn(Connection connection);",
"public void createQuery(ResultSet rs, String Query) throws SQLException {\n this.data.add(new QueryConversionData(rs));\n this.queryHistory.add(Query);\n }",
"public static void main(String[] args) {\n\t\tString queryHql = \"select Map(a.id,a.name,b.brandId,b.productId) from ShopBrand as a,SysProductType b where a.id=b.aid \";\n\n\t\tString tableStatement = StringUtils.substringBetween(queryHql, \"from\",\n\t\t\t\t\"where\");\n\t\tString mappingStatement = StringUtils.substringBetween(queryHql, \"Map\",\n\t\t\t\t\"from\");\n\t\tmappingStatement = StringUtils.replaceOnce(mappingStatement, \"(\", \"\");\n\n\t\tSet<String> estimateTransformFields = Sets.newHashSet();\n\t\tfor (String t : Splitter.on(\",\").split(mappingStatement)) {\n\t\t\tt = t.trim();\n\t\t\testimateTransformFields.add(Splitter.on(\"as\").trimResults()\n\t\t\t\t\t.omitEmptyStrings().limit(2).splitToList(t).get(0));\n\t\t}\n\n\t\tboolean hasAlias = true;\n\t\tString singleEntityName = \"\";\n\t\tSet<String> estimateTableNames = Sets.newHashSet();\n\t\tBiMap<String, String> entityName2aliasBimap = HashBiMap.create();\n\t\tString separator;\n\t\tList<String> tList;\n\t\tfor (String t : Splitter.on(\",\").split(tableStatement)) {\n\t\t\tt = t.trim();\n\t\t\tif (t.contains(\"as\")) {\n\t\t\t\tseparator = \"as\";\n\t\t\t} else {\n\t\t\t\tseparator = \" \";\n\t\t\t}\n\t\t\ttList = Splitter.on(separator).trimResults().omitEmptyStrings()\n\t\t\t\t\t.limit(2).splitToList(t);\n\n\t\t\tif (tList.size() == 1) {\n\t\t\t\tsingleEntityName = tList.get(0);\n\t\t\t\thasAlias = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tentityName2aliasBimap.put(tList.get(0), tList.get(1));\n\t\t\testimateTableNames.add(Splitter.on(separator).trimResults()\n\t\t\t\t\t.omitEmptyStrings().limit(2).splitToList(t).get(0));\n\t\t}\n\t\tBiMap<String, String> alias2EntityNameBimap = entityName2aliasBimap\n\t\t\t\t.inverse();\n\n\t\tlogger.info(\"estimateTransformFields is:{}\", estimateTransformFields);\n\t\tlogger.info(\"estimateTableNames is:{}\", estimateTableNames);\n\t\tlogger.info(\"entityName2aliasBimap is:{}\", entityName2aliasBimap);\n\n\t\tMap<String, Set<String>> estimateResultMap = Maps.newHashMap();\n\t\tString tmpAlias;\n\t\tString tmpFiledNameWithoutAlias;\n\t\tString tmpEntityName;\n\t\tif (hasAlias) {\n\t\t\tfor (String field : estimateTransformFields) {\n\t\t\t\ttmpAlias = field.substring(0, 1);\n\t\t\t\ttmpFiledNameWithoutAlias = field.substring(2);\n\t\t\t\ttmpEntityName = alias2EntityNameBimap.get(tmpAlias);\n\t\t\t\tif (estimateResultMap.get(tmpEntityName) != null) {\n\t\t\t\t\testimateResultMap.get(tmpEntityName)\n\t\t\t\t\t\t\t.add(tmpFiledNameWithoutAlias);\n\t\t\t\t} else {\n\t\t\t\t\testimateResultMap.put(tmpEntityName,\n\t\t\t\t\t\t\tSets.newHashSet(tmpFiledNameWithoutAlias));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\testimateResultMap.put(singleEntityName, estimateTransformFields);\n\t\t}\n\t\tlogger.info(\"estimateResultMap is:{}\", estimateResultMap);\n\t}",
"public interface IQueryResolver {\n List<Field> equalCondition = new ArrayList();\n List<Field> greaterEqualCondition = new ArrayList();\n List<Field> lesserEqualCondition = new ArrayList();\n\n String getTableName();\n}"
]
| [
"0.64770645",
"0.61524",
"0.6126186",
"0.60541564",
"0.60351247",
"0.60116535",
"0.59611446",
"0.5938676",
"0.59362435",
"0.5881693",
"0.5881667",
"0.5875871",
"0.5875749",
"0.57912",
"0.5789787",
"0.57525796",
"0.5705871",
"0.56541556",
"0.56471664",
"0.5637305",
"0.56332624",
"0.56329775",
"0.56254214",
"0.56196576",
"0.5597384",
"0.55832297",
"0.5563312",
"0.5555572",
"0.5555299",
"0.5547438",
"0.55458057",
"0.5517543",
"0.5508136",
"0.54777294",
"0.54771316",
"0.54636633",
"0.54594827",
"0.54542094",
"0.5451592",
"0.5445003",
"0.54400223",
"0.5409579",
"0.5405325",
"0.5392811",
"0.5388886",
"0.53850883",
"0.5383373",
"0.53783447",
"0.53748864",
"0.5374005",
"0.53725475",
"0.537051",
"0.53638935",
"0.5358461",
"0.53548956",
"0.53504175",
"0.534471",
"0.5342009",
"0.53402346",
"0.5336595",
"0.5333423",
"0.53021187",
"0.5301863",
"0.53005725",
"0.52870077",
"0.5278562",
"0.5277016",
"0.52679646",
"0.52672654",
"0.5249569",
"0.52343947",
"0.52325237",
"0.52300626",
"0.52042127",
"0.5193232",
"0.5190564",
"0.5186808",
"0.5186506",
"0.51860124",
"0.51859564",
"0.51844573",
"0.51806086",
"0.5180008",
"0.51774144",
"0.5175799",
"0.51523226",
"0.5142228",
"0.5133867",
"0.51334",
"0.5130266",
"0.5130261",
"0.5130078",
"0.5129826",
"0.5126984",
"0.5119611",
"0.51155907",
"0.5101571",
"0.50963503",
"0.5093041",
"0.5091233",
"0.5089393"
]
| 0.0 | -1 |
flexible query that can add any type of user to the database | public static boolean addNewUser(User bean) throws SQLException{
String sql = "INSERT INTO $tablename (email, password, firstName, lastName) VALUES (?, ?, ?, ?)";
String query = sql.replace("$tablename", bean.getTable());
ResultSet keys = null;
try{
Connection conn = DbUtil.getConn(DbType.MYSQL);
PreparedStatement stmt = conn.prepareStatement(query, Statement.RETURN_GENERATED_KEYS);
stmt.setString(1, bean.getEmail());
stmt.setString(2, bean.getPassword());
stmt.setString(3, bean.getFirstName());
stmt.setString(4, bean.getLastName());
int affected = stmt.executeUpdate();
return affected == 1;
} catch (SQLException e) {
System.err.println(e);
return false;
} finally {
if(keys != null) {
keys.close();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void add(User user) throws SQLException;",
"void addUser(User user);",
"void addUser(User user);",
"public void addUser(User user);",
"public void addUser(String firstName, String lastName, String username, String password, char type)\r\n\t{\r\n\t\tdb.user_addUser(firstName, lastName, username, password, type);\t\r\n\t}",
"public void insertUser() {}",
"public Long addUser(User transientUser) throws Exception;",
"public int addUser(Users users);",
"public static boolean addUser(UserDetailspojo user) throws SQLException {\n Connection conn=DBConnection.getConnection();\n String qry=\"insert into users1 values(?,?,?,?,?)\";\n System.out.println(user);\n PreparedStatement ps=conn.prepareStatement(qry);\n ps.setString(1,user.getUserid());\n ps.setString(4,user.getPassword());\n ps.setString(5,user.getUserType());\n ps.setString(3,user.getEmpid());\n ps.setString(2,user.getUserName());\n //ResultSet rs=ps.executeQuery();\n int rs=ps.executeUpdate();\n return rs==1;\n //String username=null;\n }",
"public void addUser(UserModel user);",
"int insertSelective(UUser record);",
"@Override\n\tpublic void addUser(String email, String type) {\n\t\tif (type.equals(AbstractUser.BASIC))\n\t\t\tusers[counter++] = new BasicUser(email);\n\t\telse if (type.equals(AbstractUser.PREMIUM))\n\t\t\tusers[counter++] = new PremiumUser(email);\t\n\t}",
"public int insertUser(final User user);",
"int insertSelective(User record);",
"int insertSelective(User record);",
"int insertSelective(User record);",
"int insertSelective(User record);",
"int insertSelective(User record);",
"int insertSelective(User record);",
"int insertSelective(User record);",
"public synchronized User addUser(String userName, String type) throws UserNameAlreadyExistException, UserTypeDidntExistException {\n User newUser = null;\n\n if (type.equals(\"trader\")) {\n newUser = usersList.addTrader(userName);\n } else if (type.equals(\"admin\")) {\n newUser = usersList.addAdmin(userName);\n } else {\n throw new UserTypeDidntExistException(type);\n }\n return newUser;\n }",
"int insertSelective(AdminUser record);",
"int insertSelective(AdminUser record);",
"public void insert(User user);",
"public boolean newUser(String username, String password, int uType, String fName, String lName, String email){\n\t\ttry{\n\t\t\tresultSet = statement.executeQuery(\"select uid from User where username='\"+username+\"' or email='\"+email+\"'\");\n\t\t\tif(resultSet.next()){\n\t\t\t\tSystem.out.println(\"already in\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tresultSet = statement.executeQuery(\"select max(Uid) from User\");\n\t\t\tresultSet.next();\n\t\t\tint userNumber = resultSet.getInt(1)+1;\n\t\t\tstatement.executeUpdate(\"insert into User values(\"+userNumber+\",'\"+username+\"','\"+password+\"',\"+uType+\",'\"+fName+\"','\"+lName+\"','\"+email+\"',\"+1+\")\");\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn true;\n\t\t\n\t}",
"Long insertSelective(User record);",
"public boolean addUser(UserDTO user);",
"int insertSelective(ROmUsers record);",
"public void addUser(User user) {\n\t\t\r\n\t}",
"int insert(UUser record);",
"int insert(BaseUser record);",
"@Override\r\n\tpublic void add(User user) {\n\r\n\t}",
"int insertSelective(UUserRole record);",
"int insertSelective(RoleUser record);",
"int insertSelective(RegsatUser record);",
"@Override\r\n\tpublic void add(User1 user) {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tsession.save(user);\r\n\t}",
"int insert(User record);",
"int insert(User record);",
"int insert(User record);",
"int insert(User record);",
"int insert(User record);",
"int insert(User record);",
"int insert(User record);",
"int insert(User record);",
"public Boolean addUser(User user) throws ApplicationException;",
"Long insert(User record);",
"int insert(UUserRole record);",
"@Override\n\tpublic void insertUser(User user) {\n\t\t\n\t}",
"int insertSelective(LikeUser record);",
"private void addUser(HttpServletRequest req) throws PolygonException {\n //int id = Integer.parseInt(req.getParameter(\"id\"));\n String username = (String) req.getParameter(\"username\");\n String password = (String) req.getParameter(\"password\");\n String password2 = (String) req.getParameter(\"password2\");\n String email = (String) req.getParameter(\"email\");\n String type = (String) req.getParameter(\"type\");\n if (username.length() > 0 && password.length() > 0 && password.equals(password2) && type.length() > 0) {\n User user = new User(username, password, email, type);\n UsersMapper.insertUser(user);\n } else {\n String msg = \"Udfyld alle krævede felter\";\n throw new PolygonException(msg);\n }\n }",
"public void addUser(Customer user) {}",
"void addUser(BlogUser user) throws DAOException;",
"int insert(AdminUser record);",
"int insert(AdminUser record);",
"void registerUser(User newUser);",
"void addUser(String uid, String firstname, String lastname, String pseudo);",
"@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);",
"int insertSelective(UserRole record);",
"int insertSelective(UserRole record);",
"int insert(UserT record);",
"int insertSelective(UserT record);",
"int insertSelective(PlatformAdminRoleUser record);",
"int insert(ROmUsers record);",
"int insertSelective(MyUserRoleRelation record);",
"public void addUser(IndividualUser u) {\n try {\n PreparedStatement s = sql.prepareStatement(\"INSERT INTO Users (userName, firstName, lastName, friends) VALUES (?,?,?,?);\");\n s.setString(1, u.getId());\n s.setString(2, u.getFirstName());\n s.setString(3, u.getLastName());\n s.setString(4, u.getFriends().toString());\n s.execute();\n s.close();\n\n } catch (SQLException e) {\n sqlException(e);\n }\n }",
"int insert(RoleUser record);",
"public Boolean ins(User user);",
"@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}",
"public boolean addUsers(List<User> users);",
"Integer addUser(ServiceUserEntity user);",
"@Override\n\tpublic void addResult(User user) {\n\n\t}",
"@Test\n void add() {\n List<User> userList = Arrays.asList(\n new User(1L, \"star\", 20, \"123456\"),\n new User(2L, \"green\", 21, \"123456\"),\n new User(3L, \"red\", 22, \"123456\"),\n new User(4L, \"blue\", 23, \"123456\"),\n new User(5L, \"yellow\", 24, \"123456\"),\n new User(6L, \"black\", 26, \"123456\")\n );\n userRepository.saveAll(userList);\n }",
"int insertSelective(UserEntity record);",
"int insert(MyUserRoleRelation record);",
"void addUserSearchEntry(UserSearchEntry searchCriteria);",
"void userAddByAdmin(AdminUserAddDTO adminUserAddDTO) throws RecordExistException;",
"int insertSelective(SysUser record);",
"@Override\n\tpublic void insert(User objetc) {\n\t\tuserDao.insert(objetc);\n\t\t\n\t}",
"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}",
"int insert(UserRole record);",
"int insert(UserRole record);",
"void addUserSearch(UserSearch userSearch);",
"Long insert(User user);",
"public void addToUsers(Users users) {\n Connection connection = connectionDB.openConnection();\n PreparedStatement preparedStatement;\n try {\n preparedStatement = connection.prepareStatement(WP_USERS_ADD_USER);\n preparedStatement.setString(1, users.getUser_login());\n preparedStatement.setString(2, users.getUser_pass());\n preparedStatement.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n connectionDB.closeConnection(connection);\n }\n }",
"@Override\r\n\tpublic int insertRequest(UserDto user) {\n\t\treturn 0;\r\n\t}",
"void addNewUser(User user, int roleId) throws DAOException;",
"public boolean addUser(User newUser) {\n boolean addResult = false;\n\tString sql = \"INSERT INTO users\"\n + \"(user_name, hashed_password, email, hashed_answer, is_activated, pubkey) VALUES\"\n + \"(? , ? , ? , ? , ?, ?)\";\n \ttry {\t\t\t\n this.statement = connection.prepareStatement(sql);\n this.statement.setString(1, newUser.getUserName());\n this.statement.setString(2, newUser.getHashedPassword());\n this.statement.setString(3, newUser.getEmail()); \n this.statement.setString(4, newUser.getHashedAnswer()); \n this.statement.setInt(5, newUser.getIsActivated()); \n this.statement.setString(6, \"\");\n this.statement.executeUpdate();\n addResult = true;\n this.statement.close();\n\t}\n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return addResult; \n }",
"public Boolean addUser( User user){\n\t\tConnection connection = db.getConnection();\n\t\tPreparedStatement stmt = null;\n\t\ttry { \n\t\t\tString sql = \"INSERT INTO USER\" +\n\t\t\t\t\t\"(username, password, firstname, lastname, email, recordsindexed, batchid)\" + \n\t\t\t\t\t\"\t\t\t\t\t\tVALUES (?, ?, ?, ?, ?, ?, ?)\";\n\t\t\tstmt = connection.prepareStatement(sql); \n\t\t\tstmt.setString(1, user.getUsername()); \n\t\t\tstmt.setString(2, user.getPassword()); \n\t\t\tstmt.setString(3, user.getFirstname()); \n\t\t\tstmt.setString(4, user.getLastname()); \n\t\t\tstmt.setString(5, user.getEmail());\n\t\t\tstmt.setInt(6, user.getNumIndexedRecords());\n\t\t\tstmt.setInt(7, user.getCurBatchId());\n\n\t\t\tstmt.executeUpdate();\t\n\t\t\tstmt.close();\n\t\t} \n\t\tcatch (SQLException e) { \n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} \n\t\treturn true;\n\t}",
"ResponseMessage addUser(User user);",
"boolean addUser(int employeeId, String name, String password, String role);",
"@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}",
"User createUser(ResultSet resultSet, User user) throws SQLException;",
"@Override\n\tpublic String addUser(Map<String, Object> reqs) {\n\t\treturn null;\n\t}",
"public void add(String fullName, String username, String password, String accType, String email, String salary){\n\t\t\n\t\t// Determine position where new User needs to be added\n\t\tUser marker = new User();\t\t\t\t\t\t\t\t\t/* ====> Create a marker */\n\t\tmarker = this.getHead();\t\t\t\t\t\t\t\t\t/* ====> Set the marker at the beginning of the list */\n\t\t\n\t\t// Check if the list contains only the head\n\t\tif(marker.getNext()!= null){\n\t\tmarker = marker.getNext();\t\t\t\t\t\t\t\t\t/* ====> If not then skip the head */\n\t\t}\n\t\t\n\t\t\n\t\t/*Iterate through the whole list and compare Strings. Move the marker until it reaches the end or until the input\n\t\t * username is greater than the marker's username . */\n\t\twhile((marker.getNext() != null) && (username.compareTo(marker.getUsername())>0)){\n\t\t\t\t\tmarker = marker.getNext();\n\t\t\t\t}\t\t\n\t\t\n\t\t/* When marker finds a user whose username is greater than the input it moves the marker back a position so that the new\n\t\t * user can be appended to that marker */\n\t\tif(marker.getPrev() != null){\n\t\t\t\tif(username.compareTo(marker.getUsername())<0){\n\t\t\t\t\tmarker = marker.getPrev();\n\t\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t// Create new user with the method's parameters as properties. Append it to the marker\n\t\tUser newUser = new User(marker.getNext(), marker);\n\t\tnewUser.setFullName(fullName);\n\t\tnewUser.setUsername(username);\n\t\tnewUser.setPassword(password);\n\t\tnewUser.setAccType(accType);\n\t\tnewUser.setEmail(email);\n\t\tnewUser.setSalary(salary);\n\t\t\n\t\t// Set connections to the new User\n\t\tnewUser.getPrev().setNext(newUser);\n\t\tif(newUser.getNext() != null){\n\t\tnewUser.getNext().setPrev(newUser);\n\t\t}\n\n\t}",
"int insertSelective(WbUser record);",
"UserDTO addNewData(UserDTO userDTO);",
"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 }",
"public void addUser(String name, String pass, String type)\n {\n registeredUsers.add(name);\n registeredUsers.add(pass);\n registeredUsers.add(type);\n }",
"int insert(Userinfo record);",
"Boolean registerNewUser(User user);",
"public String addUserToDatabase(String firstName, String lastName, String email, String password, User_Types type){\n return this.addUserToDatabase(firstName, lastName, email, type, null, null, password, null);\n }"
]
| [
"0.68340594",
"0.66014373",
"0.66014373",
"0.6519629",
"0.64467615",
"0.641853",
"0.6394902",
"0.6388425",
"0.63509935",
"0.6334292",
"0.6332957",
"0.63300306",
"0.6322576",
"0.62930983",
"0.62930983",
"0.62930983",
"0.62930983",
"0.62930983",
"0.62930983",
"0.62930983",
"0.6278884",
"0.6258252",
"0.6258252",
"0.62487084",
"0.6234044",
"0.62092185",
"0.6192729",
"0.6186763",
"0.6162171",
"0.6152822",
"0.6137002",
"0.61358523",
"0.61289066",
"0.61168396",
"0.61122483",
"0.6105947",
"0.60937",
"0.60937",
"0.60937",
"0.60937",
"0.60937",
"0.60937",
"0.60937",
"0.60937",
"0.6078302",
"0.60747534",
"0.60612935",
"0.604488",
"0.6042973",
"0.6028182",
"0.60249907",
"0.60194105",
"0.6013005",
"0.6013005",
"0.6005961",
"0.5996793",
"0.5994965",
"0.598989",
"0.598989",
"0.5984948",
"0.59809947",
"0.59802884",
"0.59738356",
"0.5962216",
"0.5961581",
"0.5956294",
"0.5947341",
"0.5936966",
"0.59333926",
"0.593122",
"0.5930901",
"0.5930477",
"0.59298664",
"0.59298575",
"0.59195215",
"0.59149796",
"0.5903222",
"0.59012914",
"0.58989584",
"0.58980453",
"0.58980453",
"0.5894247",
"0.588888",
"0.58860344",
"0.58849096",
"0.5877976",
"0.58671683",
"0.5861643",
"0.58574843",
"0.5851405",
"0.5846848",
"0.58443993",
"0.5840238",
"0.58387405",
"0.5838406",
"0.5832119",
"0.58280116",
"0.58198404",
"0.5812363",
"0.5811826",
"0.58043444"
]
| 0.0 | -1 |
felxible query that can update any user types data | public static boolean updateUser (User bean) {
String sql = "UPDATE $tablename SET firstName = ?, lastName = ?, email = ? WHERE $idType = ?";
String query = sql.replace("$tablename", bean.getTable()).replace("$idType", bean.getIdType());
try(
Connection conn = DbUtil.getConn(DbType.MYSQL);
PreparedStatement stmt = conn.prepareStatement(query);
) {
stmt.setString(1, bean.getFirstName());
stmt.setString(2, bean.getLastName());
stmt.setString(3, bean.getEmail());
stmt.setInt(4, bean.getID());
int affected = stmt.executeUpdate();
return affected == 1;
} catch (Exception e) {
System.out.println(e);
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Update({\n \"update user_t\",\n \"set user_name = #{userName,jdbcType=VARCHAR},\",\n \"password = #{password,jdbcType=VARCHAR},\",\n \"age = #{age,jdbcType=INTEGER},\",\n \"ver = #{ver,jdbcType=INTEGER}\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int updateByPrimaryKey(User record);",
"int updateByPrimaryKeySelective(RegsatUser record);",
"@Update({\n \"update xxd_user\",\n \"set username = #{username,jdbcType=VARCHAR},\",\n \"password = #{password,jdbcType=VARCHAR},\",\n \"sex = #{sex,jdbcType=SMALLINT},\",\n \"phonenumber = #{phonenumber,jdbcType=VARCHAR},\",\n \"id_card = #{idCard,jdbcType=VARCHAR},\",\n \"bank_card = #{bankCard,jdbcType=VARCHAR},\",\n \"bank_location = #{bankLocation,jdbcType=VARCHAR},\",\n \"type = #{type,jdbcType=SMALLINT},\",\n \"salt = #{salt,jdbcType=VARCHAR}\",\n \"is_able = #{is_able,jdbcType=SMALLINT},\",\n \"create_time = #{create_time,jdbcType=VARCHAR}\",\n \"parent_id = #{parent_id,jdbcType=INTEGER}\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n int updateByPrimaryKey(XxdUser record);",
"int updateByPrimaryKey(SelectUserRecruit record);",
"void update(User user) throws SQLException;",
"int updateByPrimaryKeySelective(AdminUser record);",
"int updateByPrimaryKeySelective(AdminUser record);",
"void update(User user);",
"void update(User user);",
"@Update({\r\n \"update umajin.user_master\",\r\n \"set nickname = #{nickname,jdbcType=VARCHAR},\",\r\n \"sex = #{sex,jdbcType=INTEGER},\",\r\n \"age = #{age,jdbcType=INTEGER},\",\r\n \"birthday = #{birthday,jdbcType=DATE},\",\r\n \"regist_date = #{regist_date,jdbcType=TIMESTAMP},\",\r\n \"update_date = #{update_date,jdbcType=TIMESTAMP},\",\r\n \"disable = #{disable,jdbcType=INTEGER}\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n int updateByPrimaryKey(UserMaster record);",
"int updateByPrimaryKeySelective(R_dept_user record);",
"@Update({\n \"update tb_user\",\n \"set password = #{password,jdbcType=VARCHAR}\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n int updateByPrimaryKey(User record);",
"int updateByPrimaryKeySelective(LikeUser record);",
"int updateByPrimaryKeySelective(UUser record);",
"int updateByPrimaryKeySelective(User record);",
"int updateByPrimaryKeySelective(User record);",
"int updateByPrimaryKeySelective(User record);",
"int updateByPrimaryKeySelective(User record);",
"int updateByPrimaryKeySelective(User record);",
"int updateByPrimaryKeySelective(User record);",
"int updateByPrimaryKeySelective(User record);",
"int updateByPrimaryKeySelective(User record);",
"int updateByExample(User record, UserExample example);",
"public User updateUser(User user);",
"public void update(User user);",
"public void updateUserDataByType(UserData userData,String type) {\n\t\tSQLiteDatabase db = getReadableDatabase();\n\t\t// Cursor cursor = db.rawQuery(\"select * from city\",null);//得到游标\n\t\t//Cursor c = db.rawQuery(\"select * from user where usertype=?\", new String[]{type});// 得到游标\n\t\t//String sql = \"update user set username = 654321 where usertype = type\";\n\t\t//db.execSQL(sql);\n ContentValues values = new ContentValues();\n values.put(\"username\", userData.userName);\n values.put(\"password\", userData.passWord);\n \n db.update(\"user\", values, \"usertype=?\", new String[]{type});\n\t}",
"int updateByPrimaryKeySelective(UserEntity record);",
"int updateByPrimaryKeySelective(UserGift record);",
"public void updateMultipleRecord(){\n MongoCollection<Document> table = db.getCollection(\"user\");\n Document document = new Document();\n document.put(\"userName\", \"FreeUser\");\n document.put(\"status\", true);\n\n Document updateDocument=new Document(\"$set\", document);\n\n\n table.updateMany(eq(\"userType\", \"Free\"), updateDocument);\n }",
"@Override\n\tpublic void update(ERS_USERS entity) {\n\t\t\n\t}",
"int updateByPrimaryKeySelective(SelectUserRecruit record);",
"public User update(User user) throws DataAccessException;",
"int updateByPrimaryKey(BaseUser 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}",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKey(User record);",
"int updateByPrimaryKeySelective(ROmUsers record);",
"public boolean update(User u);",
"public User update(User user)throws Exception;",
"int updateByPrimaryKeySelective(UserPonumberGoods record);",
"int updateByPrimaryKeySelective(UserRole record);",
"int updateByPrimaryKeySelective(UserRole record);",
"int updateByPrimaryKeySelective(UserDO record);",
"void updateUser(UserDTO user);",
"int updateByPrimaryKey(UserEntity record);",
"int updateByPrimaryKey(AdminUser record);",
"int updateByPrimaryKey(AdminUser record);",
"<T extends BaseDto> void executeUpdate(String reqQuery, T req, Connection conn);",
"int updateByPrimaryKeySelective(OfUserWechat record);",
"int updateUserById( User user);",
"@Override\n\tpublic void update(User objetc) {\n\t\tuserDao.update(objetc);\n\t}",
"int updateByPrimaryKeySelective(WbUser record);",
"int updateByPrimaryKey(RegsatUser record);",
"public User update(User updatedInfo);",
"int updateByPrimaryKey(LikeUser record);",
"int updateByPrimaryKey(Userinfo record);",
"int updateByPrimaryKey(UserDO record);",
"int updateByPrimaryKey(UserGift record);",
"int updateByPrimaryKeySelective(UserInfoUserinfo record);",
"int updateByPrimaryKey(UUser record);",
"void updateUser(User entity) throws UserDaoException;",
"int updateByExampleSelective(User record, UserExample example);",
"int updateByPrimaryKey(R_dept_user record);",
"@UpdateProvider(type=XxdUserSqlProvider.class, method=\"updateByPrimaryKeySelective\")\n int updateByPrimaryKeySelective(XxdUser record);",
"@Override\n\tpublic void updateUser(user theUser) {\n\t}",
"int updateByPrimaryKeySelective(GirlInfo record);",
"int updateByPrimaryKeySelective(Visituser record);",
"int updateByPrimaryKeySelective(LitemallUserFormid record);",
"int updateByPrimaryKeySelective(PlatformAdminRoleUser record);",
"void updateUserById(String username, User userData);",
"abstract Integer processUpdateQuery(String collectionName, ArrayList<HashMap<String,Object>> data, boolean isNew);",
"public void update(User u) {\n\r\n\t}",
"int updateByPrimaryKeySelective(SysType record);",
"void updateUser(int id, UpdateUserDto updateUserDto);",
"int updateByPrimaryKeySelective(HospitalType record);",
"private void updatePersonalSlider(){\r\n\t\t//UPDATE personalSlider SET pGender='int', pExpression='int', pOrientation='int' WHERE userName='userName';\r\n\t\tString sqlCmd = \"UPDATE personalSlider SET pGender = '\" + commandList.get(2) + \"', pExpression = '\"\r\n\t\t\t\t+ commandList.get(3) + \"', pOrientation = '\" + commandList.get(4)\r\n\t\t\t\t+ \"' WHERE userName = '\" + commandList.get(1) + \"';\";\r\n\t\tSystem.out.println(sqlCmd);\r\n\t\ttry {//send the SQL command\r\n\t\t\tint rowsUpdated = stmt.executeUpdate(sqlCmd);//send command\r\n\r\n\t\t\tif(rowsUpdated == 0){//check if user was found (0 = no update)\r\n\t\t\t\tout.println(\"User not found\");\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(sqlCmd + \"\\t\" + rowsUpdated);\r\n\t\t} catch (SQLException e) {\r\n\t\t\terror = true;//set error condition\r\n\t\t\tout.println(\"sliderError\");//write the error code to the client\r\n\t\t\te.printStackTrace();//send to console\r\n\t\t}\r\n\t\tif (error == false)//if there is no error caught\r\n\t\t\tout.println(\"true\");//send success to the client\r\n\r\n\t}",
"int updateByPrimaryKey(SysUser record);",
"int updateByPrimaryKeySelective(RoleUser record);",
"@Override\r\n\tpublic int updateUser(Users user) {\n\t\treturn 0;\r\n\t}",
"int updateByPrimaryKeySelective(SysRoleUser record);",
"@Override\n public long updateJQLRaw(String password, Date birthDay, ContactType type, long id) {\n if (updateJQLRawPreparedStatement8==null) {\n // generate static SQL for statement\n String _sql=\"UPDATE contact SET birth_day=?, id=? WHERE password=? and type=?\";\n updateJQLRawPreparedStatement8 = KriptonDatabaseHelper.compile(_context, _sql);\n }\n KriptonContentValues _contentValues=contentValuesForUpdate(updateJQLRawPreparedStatement8);\n _contentValues.put(\"birth_day\", SQLTypeAdapterUtils.toData(DateAdapterType.class, birthDay));\n _contentValues.put(\"id\", id);\n\n _contentValues.addWhereArgs(SQLTypeAdapterUtils.toString(PasswordAdapterType.class, password));\n _contentValues.addWhereArgs(SQLTypeAdapterUtils.toString(EnumAdapterType.class, type));\n\n // generation CODE_001 -- BEGIN\n // generation CODE_001 -- END\n // log section BEGIN\n if (_context.isLogEnabled()) {\n\n // display log\n Logger.info(\"UPDATE contact SET birth_day=:birth_day, id=:id WHERE password=? and type=?\");\n\n // log for content values -- BEGIN\n Triple<String, Object, KriptonContentValues.ParamType> _contentValue;\n for (int i = 0; i < _contentValues.size(); i++) {\n _contentValue = _contentValues.get(i);\n if (_contentValue.value1==null) {\n Logger.info(\"==> :%s = <null>\", _contentValue.value0);\n } else {\n Logger.info(\"==> :%s = '%s' (%s)\", _contentValue.value0, StringUtils.checkSize(_contentValue.value1), _contentValue.value1.getClass().getCanonicalName());\n }\n }\n // log for content values -- END\n\n // log for where parameters -- BEGIN\n int _whereParamCounter=0;\n for (String _whereParamItem: _contentValues.whereArgs()) {\n Logger.info(\"==> param%s: '%s'\",(_whereParamCounter++), StringUtils.checkSize(_whereParamItem));\n }\n // log for where parameters -- END\n }\n // log section END\n int result = KriptonDatabaseHelper.updateDelete(updateJQLRawPreparedStatement8, _contentValues);\n return result;\n }",
"@Override\r\n\tpublic int update(User user) {\n\t\treturn 0;\r\n\t}",
"E update(IApplicationUser user, ID id, U updateDto);",
"public void update(User obj) {\n\t\t\n\t}",
"int updateByPrimaryKeySelective(UserTips record);",
"public interface UserRepository extends JpaRepository<User, Long> {\n public List<User> findByPosition(Long position);\n\n @Modifying\n @Query(\"update User u set u.department.id = ?1 where u.id in (?2)\")\n @Transactional\n void setDepartment(Long departmentId, List<Long> uidList);\n}",
"public static ResultInfo<EmptyResultObj> updUserInfo(Controller controller) {\n\t\tString idNum = controller.getPara(TAlipayUser.COL_ID);\n\t\tint flag = Db.update(\"update alipay_user set required_type=? where id_num=?\", \"1\", idNum);\n\t\tif (flag >= 1) {\n\t\t\treturn new ResultInfo<EmptyResultObj>(ResultCodes.RET_SUCCESS, \"auth success\");\n\t\t} else {\n\t\t\treturn new ResultInfo<EmptyResultObj>(ResultCodes.RET_FAILED, \"auth failed\");\n\t\t}\n\t}",
"int updateByPrimaryKey(UserRole record);",
"int updateByPrimaryKey(UserRole record);",
"public abstract int execUpdate(String query) ;",
"int updateByPrimaryKeySelective(BizUserWhiteList record);",
"int updateByPrimaryKeySelective(Admin record);",
"@Override\n\tpublic void updateUser(User pUser) {\n\t\t\n\t}"
]
| [
"0.6733364",
"0.6582855",
"0.6499152",
"0.64947516",
"0.6492656",
"0.6461854",
"0.6461854",
"0.64582884",
"0.64582884",
"0.6453981",
"0.6451454",
"0.6416019",
"0.64078194",
"0.6407525",
"0.6395302",
"0.6395302",
"0.6395302",
"0.6395302",
"0.6395302",
"0.6395302",
"0.6395302",
"0.6395302",
"0.63740116",
"0.636817",
"0.63632643",
"0.63311625",
"0.6316541",
"0.63032985",
"0.6301752",
"0.63009405",
"0.62943834",
"0.6290226",
"0.62816894",
"0.6275905",
"0.6248684",
"0.6248684",
"0.6248684",
"0.6248684",
"0.6248684",
"0.6248684",
"0.6248684",
"0.6248684",
"0.6248684",
"0.624587",
"0.62443006",
"0.62435514",
"0.62433666",
"0.62302315",
"0.62302315",
"0.6225073",
"0.62194294",
"0.6211644",
"0.6211534",
"0.6211534",
"0.62033916",
"0.6202531",
"0.6201302",
"0.61935",
"0.6181814",
"0.61811614",
"0.6173917",
"0.61577255",
"0.61574334",
"0.6152475",
"0.6149648",
"0.61409724",
"0.6138772",
"0.61172897",
"0.61070216",
"0.6103543",
"0.6103158",
"0.6103038",
"0.6095276",
"0.6093729",
"0.6087707",
"0.6083103",
"0.6079466",
"0.6078256",
"0.60767347",
"0.6075314",
"0.60690993",
"0.60635704",
"0.6058437",
"0.60556465",
"0.6048303",
"0.60415405",
"0.602926",
"0.60275406",
"0.6026312",
"0.60159254",
"0.6015333",
"0.601454",
"0.60084486",
"0.6002163",
"0.5997407",
"0.5997407",
"0.59921783",
"0.5988769",
"0.598829",
"0.59864473"
]
| 0.6229617 | 49 |
flexible query that can delete an entry for any user type | public static boolean deleteSelection(User bean, String idType){
String sql = "DELETE FROM $tablename WHERE $idType = ?";
String query = sql.replace("$tablename", bean.getTable()).replace("$idType", idType);
try{
Connection conn = DbUtil.getConn(DbType.MYSQL);
PreparedStatement stmt = conn.prepareStatement(query);
stmt.setInt(1, bean.getID());
int affected = stmt.executeUpdate();
return affected == 1;
} catch (SQLException e) {
System.out.println(e);
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean delete(Long id, Class<T> type);",
"public User delete(String user);",
"int deleteByExample(AdminUserCriteria example);",
"int deleteByExample(AdminUserCriteria example);",
"int deleteByExample(UserTExample example);",
"int deleteByExample(UUserExample example);",
"void delete(User user);",
"void delete(User user);",
"void deleteUser(String deleteUserId);",
"public User delete(User user);",
"int deleteByPrimaryKey(Integer typeiId);",
"int deleteByExample(RegsatUserExample example);",
"@Override\n\tpublic void delete(User entity) {\n\t\t\n\t}",
"@Override\n\tpublic void delete(ERS_USERS entity) {\n\t\t\n\t}",
"int deleteByExample(UserExample example);",
"int deleteByExample(UserExample example);",
"public boolean delete(User user);",
"int deleteByExample(SelectUserRecruitExample example);",
"boolean delete(User user);",
"public void delete(User user)throws Exception;",
"int deleteByExample(ROmUsersExample example);",
"public boolean deleteAllOfUser(Integer idu);",
"public void deleteUser(ExternalUser userMakingRequest, String userId);",
"int deleteByExample(TUserPermissionExample example);",
"int deleteByExample(UserGiftCriteria example);",
"int deleteByExample(OfUserWechatExample example);",
"@Override\n\tpublic void delete(List<User> entity) {\n\t\t\n\t}",
"@Delete({\n \"delete from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n int deleteByPrimaryKey(String username);",
"int deleteByPrimaryKey(Integer user);",
"@Override\n\tpublic void deleteUser(user theUser) {\n\t\t\n\t}",
"@Override\r\n public void userdelete(Integer[] u_id) {\n userMapper.userdelete(u_id);\r\n }",
"public void delete(User usuario);",
"int deleteByExample(UUserRoleExample example);",
"int deleteByExample(UserInfoUserinfoExample example);",
"@Override\n public long deleteJQLRaw(long id, ContactType type) {\n if (deleteJQLRawPreparedStatement3==null) {\n // generate static SQL for statement\n String _sql=\"DELETE FROM contact WHERE id=? and type=?\";\n deleteJQLRawPreparedStatement3 = KriptonDatabaseHelper.compile(_context, _sql);\n }\n KriptonContentValues _contentValues=contentValuesForUpdate(deleteJQLRawPreparedStatement3);\n _contentValues.addWhereArgs(String.valueOf(id));\n _contentValues.addWhereArgs(SQLTypeAdapterUtils.toString(EnumAdapterType.class, type));\n\n // generation CODE_001 -- BEGIN\n // generation CODE_001 -- END\n // log section BEGIN\n if (_context.isLogEnabled()) {\n\n // display log\n Logger.info(\"DELETE FROM contact WHERE id=? and type=?\");\n\n // log for where parameters -- BEGIN\n int _whereParamCounter=0;\n for (String _whereParamItem: _contentValues.whereArgs()) {\n Logger.info(\"==> param%s: '%s'\",(_whereParamCounter++), StringUtils.checkSize(_whereParamItem));\n }\n // log for where parameters -- END\n }\n // log section END\n int result = KriptonDatabaseHelper.updateDelete(deleteJQLRawPreparedStatement3, _contentValues);\n return result;\n }",
"int deleteByExample(LitemallUserFormidExample example);",
"void deleteUser(String userId);",
"public boolean delete(int userId);",
"@Override\n\tpublic void delete(String query) {\n\t\t\n\t}",
"int deleteByExample(UserRoleExample example);",
"int deleteByExample(UserRoleExample example);",
"@Override\r\n\tpublic void delete( UserFields fields ) {\n\t\t\r\n\t}",
"public void deleteUser(long userId);",
"void delete(String typeName, String id);",
"@Override\n\tpublic void delete(User entity) {\n\t\tuserlist.remove(String.valueOf(entity.getDni()));\n\t}",
"public boolean delete(@SuppressWarnings(\"rawtypes\") Class type, String key);",
"@Delete({\n \"delete from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int deleteByPrimaryKey(Integer id);",
"int deleteByExample(TipologiaExample example);",
"@Query(\"DELETE FROM USERS_TABLE\")\n void deleteAllUsers();",
"int deleteByExample(AliUserInfoDOExample example);",
"void deleteUser(int id);",
"int deleteByExample(AdminExample example);",
"public void deleteUser(User userToDelete) throws Exception;",
"public void delete(String username);",
"void deleteUserById(Integer id);",
"int deleteByExample(VisituserExample example);",
"int deleteByExample(WbUserExample example);",
"@Override\n\tpublic User delete(User t) {\n\t\treturn null;\n\t}",
"int deleteByPrimaryKey(String pkUserid);",
"int deleteByExample(HospitalTypeExample example);",
"@Override\r\n\tpublic void delete(Usuario t) {\n\t\t\r\n\t}",
"void deleteUserById(Long id);",
"int deleteByExample(CommentUserExample example);",
"int deleteByExample(Assist_tableExample example);",
"@Override\r\n\t@Transactional\r\n\tpublic Result deleteEntity(UacUser t) {\n\t\tResult result = new Result();\r\n\t\tt = userDao.getEntity(UacUser.class, t.getId());\r\n\t\tif(t!=null){\r\n\t\t\tuserDao.deleteEntity(t);\r\n\t\t\tresult.setRetCode(0);\r\n\t\t\tresult.setRetMsg(true);\r\n\t\t\tresult.setRetData(1);\r\n\t\t}else{\r\n\t\t\tresult.setRetCode(1001);\r\n\t\t\tresult.setRetMsg(false);\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public void deleteRecordByOptionAndType(String option, String type)\n\t{\n\t\tStringBuilder sqlBuilder = new StringBuilder(1024);\n\t\tJdbcTemplate updateTemplate;\n\n\t\tsqlBuilder.append(\"DELETE FROM \");\n\t\tsqlBuilder.append(getTableName());\n\t\tsqlBuilder.append(\" WHERE \");\n\t\tsqlBuilder.append(\"GAZOID ='\");\n\t\tsqlBuilder.append(option);\n\t\tsqlBuilder.append(\"' AND GAZTYP = '\");\n\t\tsqlBuilder.append(type);\n\t\tsqlBuilder.append(\"'\");\n\n\t\tupdateTemplate = getJdbcTemplate();\n\n\t\tif (LOG.isDebugEnabled())\n\t\t{\n\t\t\tLOG.debug(new StringBuilder(\"The executed sql is: \").append(sqlBuilder.toString()).toString());\n\t\t}\n\t\tupdateTemplate.update(sqlBuilder.toString());\n\n\t\tif (isAutocommitable())\n\t\t{\n\t\t\tcommit();\n\t\t}\n\t}",
"boolean delete(int id, int userId);",
"int deleteByPrimaryKey(String userId);",
"int deleteByPrimaryKey(String userId);",
"int deleteByPrimaryKey(String userId);",
"@Override\n\tpublic <T> long delete(Map<String, CustmerCriteria> query, Class<T> entityClass) throws Exception {\n\t\treturn 0;\n\t}",
"int deleteByExample(MyUserRoleRelationExample example);",
"int deleteByExample(FeedsUsersExample example);",
"@Query(\"DELETE FROM \" + Usuario.TABLE_NAME + \" WHERE nombre_usuario\" + \" = :nombre_u\")\n int deleteByNombre(String nombre_u);",
"void deleteUser(String username) throws UserDaoException;",
"@Override\r\n\tpublic int delete(User user) {\n\t\treturn 0;\r\n\t}",
"@Override\n public void deleteCompactRaw(String password, ContactType type) {\n if (deleteCompactRawPreparedStatement1==null) {\n // generate static SQL for statement\n String _sql=\"DELETE FROM contact WHERE password=? and type=?\";\n deleteCompactRawPreparedStatement1 = KriptonDatabaseHelper.compile(_context, _sql);\n }\n KriptonContentValues _contentValues=contentValuesForUpdate(deleteCompactRawPreparedStatement1);\n _contentValues.addWhereArgs(SQLTypeAdapterUtils.toString(PasswordAdapterType.class, password));\n _contentValues.addWhereArgs(SQLTypeAdapterUtils.toString(EnumAdapterType.class, type));\n\n // generation CODE_001 -- BEGIN\n // generation CODE_001 -- END\n // log section BEGIN\n if (_context.isLogEnabled()) {\n\n // display log\n Logger.info(\"DELETE FROM contact WHERE password=? and type=?\");\n\n // log for where parameters -- BEGIN\n int _whereParamCounter=0;\n for (String _whereParamItem: _contentValues.whereArgs()) {\n Logger.info(\"==> param%s: '%s'\",(_whereParamCounter++), StringUtils.checkSize(_whereParamItem));\n }\n // log for where parameters -- END\n }\n // log section END\n int result = KriptonDatabaseHelper.updateDelete(deleteCompactRawPreparedStatement1, _contentValues);\n }",
"@Override\n\tpublic void delUser(String[] id) {\n\n\t}",
"private String deleteQuery(String field) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"delete\");\n\t\tsb.append(\" from \");\n\t\tsb.append(type.getSimpleName());\n\t\tsb.append(\" WHERE \" + field + \" =?\");\n\t\treturn sb.toString();\n\t}",
"@Override\r\n\tpublic void delete(UserMain user) {\n\t\tusermaindao.delete(user);\r\n\t}",
"public void deleteUser(Integer uid);",
"int deleteByExample(LikeUserExample example);",
"void DeleteCompteUser(int id);",
"@Delete({\r\n \"delete from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n int deleteByPrimaryKey(Integer user_id);",
"public void deleteUserById(Long userId);",
"public int deleteList(String[] deleteRows, User user) throws Exception;",
"public void deleteUser(IndividualUser user) {\n try{\n PreparedStatement s = sql.prepareStatement(\"DELETE FROM Users WHERE userName=? AND id=? AND firstName=? AND lastName=?;\");\n s.setString(1, user.getId());\n s.setInt(2,user.getIdNum());\n s.setString(3, user.getFirstName());\n s.setString(4, user.getLastName());\n s.execute();\n s.close();\n } catch (SQLException e) {\n sqlException(e);\n }\n }",
"@Override\n\tpublic String deleteUser(Map<String, Object> reqs) {\n\t\tString result = \"success\";\n\t\tString sql = \"delete from tp_users where userId=:userId\";\n\t\n\t\ttry {\n\t\t\tjoaSimpleDao.executeUpdate(sql, reqs);\n\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\tresult = \"failed\";\n\t\t}\n\t\treturn result;\n\t}",
"int deleteByExample(T00RolePostExample example);",
"@Override\n\tpublic void deleteUser(User user)\n\t{\n\n\t}",
"int deleteByPrimaryKey(Integer userid);",
"int deleteByPrimaryKey(Integer userid);",
"int deleteByPrimaryKey(Integer userid);",
"int deleteByPrimaryKey(Integer userCode);",
"public void deleteUser(String name);",
"int deleteByExample(UserPonumberGoodsExample example);",
"public void delete(User obj) {\n\t\t\n\t}",
"@Override\n\tpublic void deleteUser(String userId) {\n\t\t\n\t}",
"int deleteByExample(ParUsuariosExample example);",
"public void deleteExercise(User user) {\n\n\t}"
]
| [
"0.69511837",
"0.6907024",
"0.6830087",
"0.6830087",
"0.67814887",
"0.67797863",
"0.66481906",
"0.66481906",
"0.6617276",
"0.6616934",
"0.6615947",
"0.6580266",
"0.6573825",
"0.6559128",
"0.6557279",
"0.6557279",
"0.6523952",
"0.6523844",
"0.6477505",
"0.6472481",
"0.646958",
"0.6463734",
"0.6438605",
"0.6436665",
"0.6433145",
"0.6418159",
"0.64154476",
"0.641071",
"0.6406988",
"0.6401777",
"0.6380639",
"0.63794625",
"0.6370408",
"0.63657016",
"0.63535416",
"0.63411874",
"0.63271403",
"0.63171893",
"0.6314772",
"0.63050026",
"0.63050026",
"0.6291778",
"0.6291565",
"0.6287477",
"0.6287131",
"0.6275503",
"0.626635",
"0.6261399",
"0.62470776",
"0.6245793",
"0.6244436",
"0.624218",
"0.6223815",
"0.6218923",
"0.6213845",
"0.6206121",
"0.62042606",
"0.6203178",
"0.61946064",
"0.61914",
"0.61795837",
"0.61729735",
"0.6172199",
"0.6161785",
"0.61575264",
"0.6152812",
"0.6150798",
"0.6140554",
"0.6140554",
"0.6140554",
"0.6137936",
"0.6115974",
"0.61142707",
"0.6102189",
"0.6100631",
"0.6097959",
"0.60960925",
"0.6093874",
"0.608618",
"0.607744",
"0.60681385",
"0.6068076",
"0.60676515",
"0.60672075",
"0.6065176",
"0.60607284",
"0.6051985",
"0.60478395",
"0.60410583",
"0.60338324",
"0.6033476",
"0.6033476",
"0.6033476",
"0.60313",
"0.6029052",
"0.60274386",
"0.6021038",
"0.60087126",
"0.60083467",
"0.6003114"
]
| 0.6070587 | 80 |
gets the id of a user for any user type | public static ArrayList<String> getUserByID(User user) {
ArrayList<String> currentUser = new ArrayList<>();
String sql = "SELECT * FROM $tablename WHERE $column = ?";
String query = sql.replace("$tablename", user.getTable()).replace("$column", user.getColumn());
ResultSet rs;
try(
Connection conn = DbUtil.getConn(DbType.MYSQL);
PreparedStatement stmt = conn.prepareStatement(query);
) {
stmt.setInt(1, user.getID());
rs = stmt.executeQuery();
if (rs.next()) {
currentUser.add(Integer.toString(rs.getInt("studentID")));
currentUser.add(Integer.toString(rs.getInt("diplomaID")));
currentUser.add(Integer.toString(rs.getInt("employeeID")));
currentUser.add(rs.getString("firstName"));
currentUser.add(rs.getString("lastName"));
currentUser.add(rs.getString("email"));
currentUser.add(rs.getString("password"));
currentUser.add(rs.getString("industryPreference"));
currentUser.add(rs.getString("visitCount"));
currentUser.add(rs.getString("averageGrade"));
currentUser.add(rs.getString("assessmentsPassed"));
return currentUser;
} else {
System.out.println("N");
return null;
}
} catch (Exception e) {
System.err.println(e);
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Integer getUserId();",
"public Integer getUserTypeId()\n {\n return userTypeId;\n }",
"public int getUserId(User user) throws Exception;",
"long getUserId();",
"long getUserId();",
"public Integer getUserTypeId() {\n return userTypeId;\n }",
"Long getUserId();",
"java.lang.String getUserId();",
"java.lang.String getUserId();",
"java.lang.String getUserId();",
"java.lang.String getUserIdOne();",
"String getUserId();",
"String getUserId();",
"public long getUserId();",
"public long getUserId();",
"public long getUserId();",
"public long getUserId();",
"java.lang.String getUserID();",
"java.lang.String getUserID();",
"java.lang.String getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"int getUserID();",
"public int getUser1_ID();",
"public int getUser1_ID();",
"@Override\n\tpublic BigInteger selectUserIdByAccount(String account,Long type) {\n\t\t\n\t\tLoginNo loginNo = accountManageDao.selectLoginNoDetail(account, type);\n\t\tBigInteger res = loginNo==null?null:loginNo.gettUserFId();\n\t\treturn res;\n\t}",
"@Override\n\tpublic long getUserId();",
"@Override\n\tpublic long getUserId();",
"public int getUser1X_ID();",
"public String getUserID();",
"String getUserID();",
"UUID getUserId(String userName) throws UserNotFoundException;",
"@Override\n public String userType(int userId) {\n logger.info(\"Retrieving user type\");\n return userDaoInterface.userType(userId);\n }",
"@Override\n\tpublic int getUserType(String userId) {\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tmap.put(\"userId\", userId);\n\t\tMap<String, Object> result = joaSimpleDao.retrieve(\"tp_users\", map);\n\t\tif(null != result) {\n\t\t\treturn Integer.parseInt( result.get(\"USERTYPE\").toString());\n\t\t}\n\t\telse {\n\t\t\treturn 0;\n\t\t}\n\t}",
"public int getUser1Y_ID();",
"public int getIduser() {\n return iduser;\n }",
"public Long getUserID() {\n Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n return getByUsername(authentication.getName()).getId();\n }",
"public int getIdUser() {\n return idUser;\n }",
"public int getIdUser() {\n return idUser;\n }",
"public static UserType getByUserTypeId(int userTypeId) throws Exception\n {\n UserType temp = (UserType) RedEntityManager.getEntityManager().createNamedQuery(\"UserType.findByUserTypeId\").setParameter(\"userTypeId\", userTypeId).getSingleResult();\n if (temp != null)\n {\n return temp;\n }\n else\n {\n throw new Exception(\"\");\n }\n }",
"public Integer getIdUser() {\r\n\t\treturn idUser;\r\n\t}",
"User getUserById(int id);",
"@Override\n public long getUserId() {\n return _usersCatastropheOrgs.getUserId();\n }",
"public Integer getUserid() {\n return userid;\n }",
"public Integer getUserid() {\n return userid;\n }",
"public Integer getUserid() {\n return userid;\n }",
"public Integer getUserid() {\n return userid;\n }",
"public Integer getUserid() {\n return userid;\n }",
"public Integer getUserid() {\n return userid;\n }",
"public Integer getUserid() {\n return userid;\n }",
"public Integer getUserid() {\n return userid;\n }",
"public Integer getUserid() {\n return userid;\n }",
"public Integer getUserid() {\n return userid;\n }",
"public Integer getUserid() {\n return userid;\n }",
"public Integer getUserid() {\n return userid;\n }",
"@Override\r\n\tpublic UserType get(int id) {\r\n\t\treturn sessionFactory.getCurrentSession().get(UserType.class, Integer.valueOf(id));\r\n\t}",
"public int getUserType() {\n\t\treturn userType;\n\t}",
"@Override\n\tpublic User getuserId(String name) {\n\t\treturn userdao.getuserId(name);\n\t}",
"User getUserById(Long id);",
"User getUserById(Long id);",
"public String getId() {\r\n\t\treturn userId.toString();\r\n\t}",
"public int getUser1W_ID();",
"UserInfo getUserById(Integer user_id);",
"public String findId(User user) throws Exception {\n\t\t\treturn sqlSession.selectOne(\"UserMapper.findId\", user);\n\t\t}",
"User getUser(Long id);",
"public User getUserById(Long id) throws Exception;",
"private String getUserId(AuthenticationContext context) throws AuthenticationFailedException {\n String userId = null;\n String username = getUsername(context);\n if (username != null) {\n UserRealm userRealm = getUserRealm(username);\n username = MultitenantUtils.getTenantAwareUsername(String.valueOf(username));\n if (userRealm != null) {\n try {\n Map<String, String> userClaimValues = userRealm.getUserStoreManager()\n .getUserClaimValues(username, new String[]{Token2Constants.USERID_CLAIM}, null);\n userId = userClaimValues.get(Token2Constants.USERID_CLAIM);\n } catch (UserStoreException e) {\n throw new AuthenticationFailedException(\"Cannot find the user claim for userId \" + e.getMessage(),\n e);\n }\n }\n }\n if (StringUtils.isEmpty(userId)) {\n throw new AuthenticationFailedException(\"Token2 UserId is null\");\n }\n return userId;\n }",
"@Override\n\tpublic String getUserIdById(HashMap<String, Object> map) {\n\t\treturn sqlSession.selectOne(PATH + \"getUserIdById\", map);\n\t}",
"public int getUserID()\n {\n return userID;\n }",
"public Long getUserid() {\r\n return userid;\r\n }",
"public int getId()\r\n\t{\r\n\t\treturn this.userId;\r\n\t}",
"public Integer getUserID() {\n return userID;\n }",
"IDType getID();",
"@Override\n\tpublic String getId() {\n\t\tString pName = ctx.getCallerPrincipal().getName();\n\t\tPerson p = userEJB.findPerson(pName);\n\t\tString id = p.getId()+\"\";\n\t\treturn id;\n\t\t\n\t}",
"public Integer getUserid() {\r\n\t\treturn userid;\r\n\t}",
"public int getUserID() {\n return userID;\n }",
"public int getUserID() {\n return userID;\n }",
"public int getUserID() {\n return userID;\n }",
"@Override\n public String getUserID() {\n return user_id;\n }",
"public User getUserById(Long userId);",
"public static int userType(int user_id) {\n\t\tString userType = \"SELECT user_user_type_id\" + \" FROM Users\"\r\n\t\t\t\t+ \" WHERE user_id = \" + user_id + \"\";\r\n\r\n\t\ttry {\r\n\t\t\tConnection conn = DBConnection.getConnection();\r\n\r\n\t\t\tStatement st = conn.createStatement();\r\n\t\t\tResultSet rs;\r\n\r\n\t\t\trs = st.executeQuery(userType);\r\n\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\treturn rs.getInt(\"user_user_type_id\");\r\n\t\t\t}\r\n\r\n\t\t\tconn.close();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.err.println(\"Got an exception! userTypeQuery\");\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t}\r\n\r\n\t\treturn 0;\r\n\t}",
"public Integer getUser_id() {\n\t\treturn user_id;\n\t}",
"protected long getUserID() {\n return userID;\n }",
"public String getUserId() {\n if (this.isTokenValide()) {\n JWT jwt = new JWT(getToken());\n Claim claim = jwt.getClaim(\"user_id\");\n return claim.asString();\n } else {\n return \"\";\n }\n }",
"public int getUser1Z_ID();",
"public UserType getUserType(long userTypeId) throws DataAccessException {\n if (userTypeId <= 0) {\n throw new IllegalArgumentException(\"userTypeId is not positive\");\n }\n try {\n UserType[] userTypes = userTypeDao.getUserTypes(new long[] {userTypeId});\n return userTypes[0];\n } catch (BatchOperationException e) {\n throw Util.convertBatchExceptionToSingleException(e, \"Failed to get the user type.\");\n }\n }",
"public static UserType getUserTypeById(Integer id) {\n UserType ut = UserType.finder.where().eq(\"id\", id).findUnique();\n return ut;\n }"
]
| [
"0.75528663",
"0.7373766",
"0.7320334",
"0.7282174",
"0.7282174",
"0.7279324",
"0.7254488",
"0.72458565",
"0.72458565",
"0.72458565",
"0.7224911",
"0.71901417",
"0.71901417",
"0.71329904",
"0.71329904",
"0.71329904",
"0.71329904",
"0.7095932",
"0.7095932",
"0.7095932",
"0.706732",
"0.706732",
"0.706732",
"0.706732",
"0.706732",
"0.706732",
"0.706732",
"0.706732",
"0.706732",
"0.706732",
"0.706732",
"0.706732",
"0.706732",
"0.706732",
"0.706732",
"0.706732",
"0.706732",
"0.70147985",
"0.70147985",
"0.6969786",
"0.6951455",
"0.6951455",
"0.69273674",
"0.6885012",
"0.6884447",
"0.68516636",
"0.6828731",
"0.67334485",
"0.6699331",
"0.665877",
"0.6605923",
"0.6593308",
"0.6593308",
"0.65812576",
"0.65431815",
"0.653714",
"0.65369856",
"0.6535665",
"0.6535665",
"0.6535665",
"0.6535665",
"0.6535665",
"0.6535665",
"0.6535665",
"0.6535665",
"0.6535665",
"0.6535665",
"0.6535665",
"0.6535665",
"0.65353155",
"0.64628655",
"0.64361864",
"0.64298046",
"0.64298046",
"0.64288956",
"0.6419939",
"0.64196336",
"0.64117",
"0.64081293",
"0.6405993",
"0.6400258",
"0.6386252",
"0.6382778",
"0.6373512",
"0.6368613",
"0.6364703",
"0.6355562",
"0.6353853",
"0.6347096",
"0.634032",
"0.634032",
"0.634032",
"0.6338132",
"0.6338103",
"0.63376594",
"0.63374966",
"0.6331031",
"0.62966824",
"0.6296177",
"0.6284602",
"0.62831235"
]
| 0.0 | -1 |
database query that confirms if a password has been updated or not | public static boolean updatePassword(User bean) {
String sql = "UPDATE $tablename SET password = ? WHERE $idType = ?";
String query = sql.replace("$tablename", bean.getTable()).replace("$idType", bean.getIDType());
try(
Connection conn = DbUtil.getConn(DbType.MYSQL);
PreparedStatement stmt = conn.prepareStatement(query);
) {
stmt.setString(1, SecurityMethods.getHash(bean.getPassword()));
stmt.setInt(2, bean.getID());
int affected = stmt.executeUpdate();
if (affected == 1) {
return true;
} else {
return false;
}
} catch (Exception e) {
System.out.println(e);
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Boolean changePassword() {\r\n //capture return value from SQL query to check if pass was updated\r\n int updatedRow = 0;\r\n \r\n try {\r\n // load and register JDBC driver for MySQL - \r\n // This tells the Java Class where to find the driver to connect to \r\n // The MySQL Database\r\n Class.forName(\"com.mysql.jdbc.Driver\"); \r\n Connection conn = DriverManager.getConnection(CONN_STRING,USERNAME,PASSWORD);\r\n \r\n //set password to newly generated string and reset failed attempts on account\r\n String updatePassword = \"UPDATE \" + TABLE_NAME + \" SET password = '\" + \r\n newPassword + \"', failed_attempts = 0 WHERE id = \" + user_id;\r\n System.out.println(updatePassword);\r\n PreparedStatement setNewPassword = conn.prepareStatement(updatePassword);\r\n updatedRow = setNewPassword.executeUpdate();\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n return (updatedRow > 0);\r\n }",
"@Override\n\tpublic boolean confirmPassword(Password password) {\n\t\tString sqlString = \"SELECT user.PASSWORD FROM user WHERE user.USER_ID=:userId\";\n\t\tMap<String, Object> params = new HashMap<>();\n\t\tparams.put(\"userId\", password.getUserId());\n// LogUtils.systemLogger.info(LogUtils.buildStringForSystemLog(sqlString, params));\n\t\tString hash = this.namedParameterJdbcTemplate.queryForObject(sqlString, params, String.class);\n\t\tPasswordEncoder encoder = new BCryptPasswordEncoder();\n\t\tif (encoder.matches(password.getOldPassword(), hash)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"private boolean checkPass(String enterPass) {\n JdbcConnection connection = JdbcConnection.getInstance();\n DaoFactory daoFactory = new RealDaoFactory(connection);\n List<User> users = daoFactory.createUserDao().findAll();\n for (User user : users) {\n if (user.getPasswordHash() == enterPass.hashCode()) {\n return true;\n }\n }\n return false;\n }",
"public boolean verifiyPassword(String password) {\n SQLiteDatabase db = this.getWritableDatabase();\n String[] projection = {LOGIN_PASSWORD};\n String[] selectionArgs = {\"1\"};\n Cursor cursor = db.query(LOGIN_TABLE, projection, LOGIN_ID, selectionArgs, null, null, null);\n cursor.moveToFirst();\n String pass = cursor.getString(cursor.getColumnIndexOrThrow(LOGIN_PASSWORD));\n db.close();\n cursor.close();\n return pass.equals(password);\n }",
"public boolean passwordCheck() {\n\t\tSystem.out.println(\"Password is: \"+LoggedUser.getPassword());\n\t\tMapSqlParameterSource params = new MapSqlParameterSource();\n\t\tparams.addValue(\"username\", LoggedUser.getUsername());\n\t\tparams.addValue(\"password\", LoggedUser.getPassword());\n\t\treturn jdbc.queryForObject(\"select count(*) from authors where username=:username and password=:password\", \n\t\t\t\tparams, Integer.class) > 0;\n\t}",
"private boolean inputDatabase(String password) {\r\n\r\n boolean checks = false;\r\n int wasUpdated = 0;\r\n\r\n String hashSalt = \"\";\r\n\r\n try {\r\n //Get the hash and salt for the given password\r\n hashSalt = encrypt.getHashString(password);\r\n } catch (NoSuchAlgorithmException | UnsupportedEncodingException ex) {\r\n System.out.println(\"A problem occurred while inserting the user. \"\r\n + \"Error Message: \" + ex.getMessage());\r\n }\r\n\r\n if (!hashSalt.isEmpty()) // Encryption was successful\r\n {\r\n String hash = hashSalt.substring(0, 44); //Substring for password hash\r\n String salt = hashSalt.substring(44, hashSalt.length()); //Substring for salt\r\n\r\n //Variables fo other fields to include in query\r\n String username = txtUserName.getText();\r\n String email = txtEmail.getText();\r\n String first_name = txtFirstName.getText();\r\n String last_name = txtLastName.getText();\r\n\r\n //Create the query string\r\n String query = \"INSERT INTO user (username,email,first_name,\"\r\n + \"last_name,created,last_update,password,salt) values ('\"\r\n + username + \"','\" + email + \"','\" + first_name + \"','\"\r\n + last_name + \"',?,?,'\" + hash + \"','\" + salt + \"')\";\r\n System.out.println(query);\r\n\r\n try {\r\n //Call insertUser in DBConnector to \r\n wasUpdated = Login.db.insertUser(query);\r\n\r\n } catch (SQLException ex) {\r\n System.out.println(\"A problem occurred while inserting the user. \"\r\n + \"Error Message: \" + ex.getMessage());\r\n }\r\n }\r\n \r\n //Update successful\r\n if (wasUpdated > 0) {\r\n checks = true;\r\n }\r\n \r\n return checks;\r\n }",
"public void FlagupdatePassword(String password) {\n\n SQLiteDatabase db = null;\n try {\n db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n\n values.put(KEY_PASSWORD, password); // Name\n\n // Inserting Row\n db.update(TABLE_USER, values, null, null);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (db != null) {\n db.close(); // Closing database connection\n }\n }\n }",
"boolean hasPassword2();",
"boolean hasPassword();",
"boolean hasPassword();",
"boolean hasPassword();",
"boolean hasPassword();",
"boolean hasPassword();",
"boolean hasPassword();",
"boolean hasPassword();",
"boolean hasPassword();",
"@Override\n\tpublic boolean updateUserPassword(User user) throws SQLException {\n\t\t \n String sql = \"UPDATE user SET password = ? WHERE username = ?\";\n \n connect();\n \n PreparedStatement statement = jdbcConnection.prepareStatement(sql);\n statement.setString(1, user.getPassword());\n statement.setString(2, user.getUsername());\n \n boolean rowUpdated = statement.executeUpdate() > 0;\n statement.close();\n disconnect();\n return rowUpdated; \t\t\n\t\t\n\t}",
"public Boolean updatePassword(String newPassword, String advisorId){\n\t\tlogger.info(\"Entered getAdvisorTimestamp method of ForgotPasswordDAO\");\n\t\tBoolean isInsertComplete = false;\n\t\ttry{\n\t\t\tif(!newPassword.isEmpty() && !(\"\").equals(newPassword)){\n\t\t\t\tconn =Util.connect();\n\t\t\t\tString query = \"UPDATE advisordetails SET PASSWORD = ? WHERE ADVISOR_ID = ?\";\n\t\t\t\tPreparedStatement pstmt = conn.prepareStatement(query);\n\t\t\t pstmt.setString(1, newPassword);\n\t\t\t pstmt.setString(2, advisorId);\n\t\t\t int result = pstmt.executeUpdate(); \n\t\t\t\tif(result >0) {\n\t\t\t\t\tisInsertComplete = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (SQLException e) {\n\t\t\tlogger.error(\"updatePassword method of ForgotPasswordDAO threw error:\"+e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}catch (Exception e) {\n\t\t\t\tlogger.error(\"updatePassword method of ForgotPasswordDAO threw error:\"+e.getMessage());\n\t\t\t\te.printStackTrace();\n\t\t}\n\t\tlogger.info(\"Exit checkLinkValid method of ForgotPasswordDAO\");\n\t\treturn isInsertComplete;\t\n\t}",
"boolean isMatchPassword(Password toCheck) throws NoUserSelectedException;",
"@Override\r\n\tpublic boolean updatepwd(User user) {\n\t\tString sql = \"update user set user_psw = ? where user_id = ?\";\r\n\t\tlist.clear();\r\n\t\tlist.add(user.getUser_psw());\r\n\t\tlist.add(user.getUser_id());\r\n\t\treturn BaseDaoImpl.updateInfo(sql, list);\r\n\t}",
"@Override\n\tpublic boolean verifyUser(String username,String password )\n\t{\n\t\tboolean b;\n\t\tString sql = \"select username,password from f_loginTable where username=? and password=?\";\n\t\tint noOfRows=template.update(sql, new Object[] {username,password});\n\t\tif(noOfRows==1)\n\t\t{b=true;}\n\t\telse \n\t\t{b=false;}\n\t\treturn b;\t\t\n\t}",
"int updateByPrimaryKeySelective(UserPasswordDO record);",
"public boolean reconcilePassword(){\r\n if((signup.getFirstPassword()).equals(signup.getSecondPassword())){\r\n \r\n return true;\r\n \r\n }\r\n else{\r\n \r\n return false;\r\n }\r\n }",
"int updateByPrimaryKey(UserPasswordDO record);",
"@Then(\"^Password should be updated$\")\n public void password_should_be_updated() throws Throwable {\n changepassword.verifyPasswordIsSuccessfull(\"Success\",\"Congratulations!\",\"You have successfully updated your password.\");\n changepassword.closeSuccessPwdUpdate();\n\n /* long numeric=Test.faker.number().randomNumber(2,true);\n PropertyReader.dynamicWriteTestDataOf(\"change_password\",PropertyReader.dynamicReadTestDataOf(\"new_Password\"));\n PropertyReader.dynamicWriteTestDataOf(email,PropertyReader.dynamicReadTestDataOf(\"new_Password\"));\n\n PropertyReader.dynamicWriteTestDataOf(\"new_Password\",\"update\"+numeric+\"@123\");\n PropertyReader.dynamicWriteTestDataOf(\"confirm_new_Password\",\"update\"+numeric+\"@123\");\n */\n }",
"public boolean mustChangePassword() {\n\t\t\t\t\n\t\t\t\t\tPasswordStatus.Value v = getPasswordStatus();\n\t\t\t\t\tif (v == DatabasePasswordComposite.INVALID || v == DatabasePasswordComposite.FIRST) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tHash algorithm = getAlgorithm();\n\t\t\t\t\tif( CHANGE_OLD_HASH.isEnabled(getContext()) && ( algorithm == null || algorithm.isDeprecated(getContext()))) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tif( periodicResetRequired()) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tif( passwordFailsExceeded()) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"@Override\r\n\tpublic boolean updateApwd(Admin admin) {\n\t\tint i = adminDao.updatePwd(admin);\r\n\t\treturn i > 0?true:false;\r\n\t}",
"public static boolean checkPassword()\n {\n String pw = SmartDashboard.getString(\"Password\");\n SmartDashboard.putString(\"Password\", \"\"); //Clear the password field so that it must be reentered\n\n if(pw.equals(ADMIN_PASSWORD))\n return true;\n else\n {\n log(\"Password invalid\"); //The user gave an incorrect password, inform them.\n return false;\n }\n }",
"@Override\n\tpublic boolean hasChangedPassword() {\n\t\treturn getInnerObject().hasChangedPassword();\n\t}",
"@And(\"^See if database has been updated$\")\n public void seeIfDatabaseHasBeenUpdated() throws SQLException, ClassNotFoundException {\n\n myResultSet = myConn.execute(\"select name, user_id from wishlist where id =\" + id);\n\n while(myResultSet.next()){\n String result = myResultSet.getString(1);\n String result2 = myResultSet.getString(2);\n System.out.println(result + \" and \" + result2);\n }\n\n myConn.closeConnection();\n\n }",
"boolean loginUser(String email,String password){\n boolean checkUserDetails = checkLoginDetails(email,password);\n boolean userExists = false;\n if(checkUserDetails){\n try{\n userExists =true;\n stmt = con.prepareStatement(\"UPDATE users SET userStatus = ? WHERE email = ?\");\n stmt.setBoolean(1,true);\n stmt.setString(2,email);\n stmt.executeUpdate();\n }\n catch(Exception e){\n e.printStackTrace();\n }\n finally{\n closeConnection();\n }\n }\n return userExists;\n }",
"public boolean updateAdminPassword(String telephone, String newPassword) {\n\t\tSession session = sessionFactory.openSession();\n\t\tTransaction tran = session.beginTransaction();\n\t\tAdmin admin = findLoginAdminByTelephone(telephone);\n\t\tQuery query = session.createQuery(\"update Admin set admin_pwd=? where admin_id=?\");\n\t\tquery.setParameter(0, newPassword);\n\t\tquery.setParameter(1, admin.getAdmin_id());\n\t\tint result = query.executeUpdate();\n\t\t// System.out.print(result);\n\t\ttran.commit();\n\t\tsession.close();\n\t\tif (result > 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n public void onClick(View v) {\n String newPass=et_newPassword.getText().toString().trim();\n String oldPass=et_oldPassword.getText().toString().trim();\n String prefpass=SharedPrefManager.getInstance(getApplicationContext()).getPass();\n if(newPass.equals(\"\")||oldPass.equals(\"\"))\n {\n Toast.makeText(AdminHomeActivity.this, \"Enter All Fields\", Toast.LENGTH_SHORT).show();\n }\n else if(!prefpass.equals(oldPass))\n {\n Toast.makeText(AdminHomeActivity.this, \"Incorrect Old Password\", Toast.LENGTH_SHORT).show();\n }\n else\n {\n repo.updatePass(oldPass,newPass,\"Admin\");\n Toast.makeText(AdminHomeActivity.this, \"Password Successfully Changed\", Toast.LENGTH_SHORT).show();\n logout();\n dialog.dismiss();\n }\n }",
"public int updatePassword(String uname,String pswd,String newpaswd){\n\t\tif(this.connHndlr == null)\n\t\t\tthis.connHndlr = new ConnectionHandler();\n\t\tConnection conn = this.connHndlr.getConnection();\n\t\tint returnvalue = 0;\n\t\t\n\t\tuname = uname.toLowerCase();\t\t\n\t\ttry{\n\t\t\tString vfnQuery = \"select * from LoginDetails l where l.username = '\" + uname + \"' AND l.password = '\" + pswd + \"'\";\n\t\t\tthis.stmt = conn.createStatement();\n\t\t\tthis.resultSet = this.stmt.executeQuery(vfnQuery);\n\t\t\tif(this.resultSet.next()){\n\t\t\t\tString updtQuery = \"update LoginDetails set password = ? where username = ?\";\n\t\t\t\tthis.preparedStatement = conn.prepareStatement(updtQuery);\n\t\t\t\tthis.preparedStatement.setString(1,pswd);\n\t\t\t\tthis.preparedStatement.setString(2,uname);\n\t\t\t\tthis.preparedStatement.executeUpdate();\n\t\t\t\treturnvalue = 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturnvalue = 0;\n\t\t\t}\t\t\t\n\t\t}\n\t\tcatch(SQLException se){\n\t\t\tSystem.out.println(\"SQL Exception \" + se.getMessage());\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Exception \" + e.getMessage());\n\t\t}\n\t\treturn returnvalue;\n\t}",
"public boolean chkMailPswd(String email , String passwd){\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(\"Select * from user where email=? and passwd =?\",new String[]{email,passwd});\n if (cursor.getCount()>0) {\n maill = email;\n passwood = passwd;\n return true;\n }\n else return false;\n\n }",
"public boolean comparePassword(String username, String password) {\n boolean matchedPass = false;\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS WHERE USERNAME=? AND PASSWORD=?\");\n ps.setString(1, username);\n ps.setString(2, password);\n\n ResultSet rs = ps.executeQuery();\n\n // rs.next() is not empty if both user and pass are in the same row\n matchedPass = rs.next();\n\n // close stuff\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return matchedPass;\n }",
"@Override\n public void onClick(View v) {\n String newPass=et_newPassword.getText().toString().trim();\n String oldPass=et_oldPassword.getText().toString().trim();\n String prefpass=SharedPrefManager.getInstance(getApplicationContext()).getPass();\n if(newPass.equals(\"\")||oldPass.equals(\"\"))\n {\n Toast.makeText(MainActivity.this, \"Enter All Fields\", Toast.LENGTH_SHORT).show();\n }\n else if(!prefpass.equals(oldPass))\n {\n Toast.makeText(MainActivity.this, \"Incorrect Old Password\", Toast.LENGTH_SHORT).show();\n }\n else\n {\n repo.updatePass(oldPass,newPass,\"User\");\n Toast.makeText(MainActivity.this, \"Password Successfully Changed\", Toast.LENGTH_SHORT).show();\n logout();\n dialog.dismiss();\n }\n }",
"private boolean valPassword(String pass){\n if (usuario.getPassword().equals(pass)){\n return true;\n }\n return false;\n }",
"int updateByPrimaryKeySelective(PasswdDo record);",
"public Boolean emailpass(String email, String password){\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(\"select * from login where email=? and password=?\", new String[]{email,password});\n if(cursor.getCount()>0) return true;\n else return false;\n }",
"public boolean emailpass(String email,String password)\n {\n SQLiteDatabase db=this.getReadableDatabase();\n Cursor cursor=db.rawQuery(\"select *from user where email=? and password=?\",new String[]{email,password});\n\n if (cursor.getCount()>0)\n return true;\n\n else\n return false;\n }",
"public static boolean verifyAccount(String password, String email, String token){\n Connection connect = null;\n String verifyAccountSQL = \"UPDATE users SET password = ?, verification_token = null, active = 1, verified = 1, verified_on = NOW() \"+\n \"WHERE email =? AND verification_token =?\";\n\n // Verify Account Try Block:\n try{\n // Set Connection:\n connect = DBConfig.getConnection();\n // Prepare Statement:\n PreparedStatement statement = connect.prepareStatement(verifyAccountSQL);\n // Set Attributes:\n statement.setString(1, password);\n statement.setString(2, email);\n statement.setString(3, token);\n\n // Execute Statement:\n int rowsAffected = statement.executeUpdate();\n\n // Check For Rows Affected:\n if(rowsAffected == 1){\n return true;\n }\n // Check For Rows Affected.\n\n }catch(SQLException e){\n e.printStackTrace();\n System.out.println(\"Failed to Verify / Update Account\");\n }\n // End Of Verify Account Try Block:\n\n return false;\n\n }",
"private boolean doCheckNewPassword() {\n\t\tif (!newPassword.equals(confirmPassword)) return false;\n\t\trecord(\"new password checked\");\n\t\treturn true;\n\t}",
"Boolean validateOldPassword(LoginInformationDTO loginInformationDTO) throws BusinessException;",
"boolean getPasswordValid();",
"public boolean updateAdminPassword(String username, String newPassword) {\n\t\tSession session = sessionFactory.openSession();\n\t\tTransaction tran = session.beginTransaction();\n\t\tAdmin admin = findLoginAdminByName(username);\n\t\tQuery query = session.createQuery(\"update Admin set admin_passwd=? where id=?\");\n\t\tquery.setParameter(0, newPassword);\n\t\tquery.setParameter(1, admin.getId());\n\t\tint result = query.executeUpdate();\n\t\t// System.out.print(result);\n\t\ttran.commit();\n\t\tsession.close();\n\t\tif (result > 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"boolean checkLoginDetails(String email,String password){\n boolean isValidUser = false;\n dbConnection();\n try{\n stmt = con.prepareStatement(\"SELECT * FROM users ORDER BY email\");\n rs = stmt.executeQuery();\n while(rs.next()){\n String checkEmail = rs.getString(\"email\");\n String checkpassword = rs.getString(\"password\");\n if(checkEmail.equals(email) && checkpassword.equals(password)){\n isValidUser = true;\n }\n }\n }\n catch(Exception e){\n e.printStackTrace();\n }\n return isValidUser;\n }",
"@Override\n\tpublic boolean updatePwd(int id, String pwd) {\n\t\tboolean flag = false;\n\t\tConnection connection = null;\n\t\ttry{\n\t\t\tconnection = BaseDao.getConnection();\n\t\t\tif(userMapper.updatePwd(connection,id,pwd) > 0)\n\t\t\t\tflag = true;\n\t\t}catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\tBaseDao.closeResource(connection, null, null);\n\t\t}\n\t\treturn flag;\n\t}",
"void onChangePasswordSuccess(ConformationRes data);",
"public boolean confirmPassword(long id, String password) {\r\n User user = userRepo.findById(id);\r\n if(user == null) return false;\r\n\r\n return hashPassword(password).equals(user.getPassword());\r\n }",
"@Override\n\tpublic CheckEmailResponse updatepassword(UpdatePasswordRequest uppwdreq) {\n\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// get reg emailid from db\n\t\tlogger.info(\"IN updatepassword Method==========\");\n\t\t// Response object\n\t\tCheckEmailResponse reset_pass_obj = new CheckEmailResponse();\n\t\tlogger.info(\"CALLING COUNT \");\n\t\tString sql = \"select count(1) from user where emailid = ? \";\n\t\tint result = jdbcTemplate.queryForObject(sql, new Object[] { uppwdreq.getEmailid() }, Integer.class);\n\t\tlogger.info(\"RESULT QUERY \" + result);\n\t\tif (result > 0) {\n\t\t\t// update generated pin to database using emailid\n\t\t\tString update_pin = \"UPDATE user SET password = ? WHERE emailid =? \";\n\t\t\t//Encrypted the Pwd\n\t\t\tint rowcount = jdbcTemplate.update(update_pin,PasswordEncryptionUtil.encryptPassword(uppwdreq.getPassword()), uppwdreq.getEmailid().trim());\n\t\t\tlogger.info(\" DB Updated =========== \" + rowcount);\n\t\t\tif (rowcount > 0) {\n\t\t\t\t// db updated, send email with generated PIN\n\t\t\t\treset_pass_obj.setStatus(true);\n\t\t\t\treset_pass_obj.setMessage(\" NEW PASSWORD UPDATED SUCCESSFULLY \");\n\n\t\t\t} else {\n\t\t\t\t// DB not updated\n\t\t\t\treset_pass_obj.setMessage(\" NEW PASSWORD NOT UPDATED SUCCESSFULLY PROVIDE VALID EMAIL ID\");\n\t\t\t\treset_pass_obj.setStatus(false);\n\t\t\t}\n\t\t} else {\n\t\t\t// provided email ID doesnt exist\n\t\t\treset_pass_obj.setMessage(\"NEW PASSWORD NOT UPDATED SUCCESSFULLY PROVIDE VALID EMAIL ID\");\n\t\t\treset_pass_obj.setStatus(false);\n\t\t}\n\t\treturn reset_pass_obj;\n\t}",
"public boolean isPasswordModified()\n\t{\n\t\treturn passwordModified;\n\t}",
"public void changingPassword(String un, String pw, String secureQ, String secureA) {\n MongoCollection<Document> collRU = db.getCollection(\"registeredUser\");\n\n // get SHA value of given password\n SHAEncryption sha = new SHAEncryption();\n String shaPW = sha.getSHA(pw);\n\n // updating user database\n collRU.findOneAndUpdate(\n and(\n eq(\"username\", un),\n eq(\"secureQ\", secureQ),\n eq(\"secureA\", secureA)\n ),\n Updates.set(\"password\", shaPW)\n );\n\n // test (print out user after update)\n //getUser(un);\n }",
"int updateByPrimaryKey(PasswdDo record);",
"public Boolean usernamepassword (String username,String password) {\n SQLiteDatabase sdb = this.getReadableDatabase();\n Cursor cursor = sdb.rawQuery(\"select * from user where username=? and password=?\",new String[]{username,password});\n if(cursor.getCount()>0) {\n return true;\n }\n else {\n return false;\n }\n }",
"void updateUserPassword(User user);",
"private void updateUserWithNewPassword() throws ClassNotFoundException, NoSuchAlgorithmException{\n\t\tint currentPositionInTableView = usersTable.getSelectionModel().getSelectedIndex(); // zapamiętaj bieżące podświetlenie w tabeli\n\t\tif ((isAllFieldsAreFull()) \n\t\t\t\t&& (isTheSamePassword())\n\t\t\t\t&& (isLoginUnique(usersTable.getSelectionModel().getSelectedItem().getId()))){\t\n\t\t\t\t\tcurrentPositionInTableView = usersTable.getSelectionModel().getSelectedIndex(); // zapamiętaj bieżące podświetlenie w tabeli\n\t\t\t\t\tMain.getMMUser().update(\t\t\t\t \n\t\t\t\t\t\t\tnew User(\n\t\t\t\t\t\t\t\t\tusersTable.getSelectionModel().getSelectedItem().getId(),\n\t\t\t\t\t\t\t\t\tuserLoginField.getText(), \n\t\t\t\t\t\t\t\t\tHelper.encryptPassword(userPasswordField.getText()), \n\t\t\t\t\t\t\t\t\tuserNameField.getText(), \n\t\t\t\t\t\t\t\t\tuserLastNameField.getText(), \n\t\t\t\t\t\t\t\t\tpermission,\n\t\t\t\t\t\t\t\t\teditingCheck.isSelected(),\n\t\t\t\t\t\t\t\t\treminderCheck.isSelected()));\n\t\t\t\t\t// pokaż aktualny stan bazy pracowników\n\t\t\t\t\treadUsers();\n\t\t\t\t\tshowUsers();\n\t\t\t\t\tusersTable.getSelectionModel().select(currentPositionInTableView); // ustaw podswietlenie na bieżący wiersz\n\t\t\t\t\tnew AlertDialog(\"Operacja zakończona\", \"Zaktualizowano dane\", AlertType.INFORMATION);\n\t\t\t\t\tchangePassword = false;\n\t\t}\n\t}",
"@Override\r\n\tpublic int updatePwd(HashMap<String, String> map) {\n\t\treturn mDAO.updatePwd(sqlSession, map);\r\n\t}",
"public static boolean validate(String un, String pw) {\r\n\t\tboolean status=false;\r\n\t\t\r\n\t\t//Establish connection to MySQL\r\n\t\ttry{ \r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\"); \r\n\t\t\tConnection con=DriverManager.getConnection( \r\n\t\t\t\t\t\"jdbc:mysql://localhost:3306/moviedb\",\"root\",\"\"); \r\n \r\n\t\t\tStatement stmt=con.createStatement();\r\n\t\t\t\r\n\t\t\t//execute query for password for given username\r\n\t\t\tResultSet rs=stmt.executeQuery(\"SELECT password FROM users WHERE username='\"+un+\"'\"); \r\n\t\t\t//After query pointer is set on record\r\n\t\t\t//moves pointer before record\r\n\t\t\trs.beforeFirst();\r\n\t\t\t\r\n\t\t\t//Checks that username exists based on if the pointer is before a record\r\n\t\t\tif(rs.isBeforeFirst()) {\r\n\t\t\t\t//Moves pointer back onto record so we can get string\r\n\t\t\t\trs.next();\r\n\t\t\t\t//if entered password matches password in database return true\r\n\t\t\t\tif(pw.equals(rs.getString(1))) {\r\n\t\t\t\t\tstatus = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse\r\n\t\t\t\tstatus=false;\r\n\t\t\t\r\n\t\t\t//close connection\r\n\t\t\tcon.close();\r\n\t\t} \r\n\r\n\t\tcatch(Exception e){ \r\n\t\t\tSystem.out.println(e);} \r\n\t\t\r\n\t\treturn status;\r\n\t}",
"public String changePass(Password pass) {\n\t \tString status=\"error\";\n\t \tString newpassword=pass.getNewpassword();\n\t\tValidate validation=new Validate();\n\t\tboolean validPassword=validation.passwordValidation(newpassword);\n\t\tSystem.out.println(validPassword);\n\t\tif(validPassword == true) {\n\t\t\ttry {\n\t \tentityManager.getTransaction().begin();\n\t \tUser_Auth u = entityManager.find(User_Auth.class,pass.getId());\n\t \tif(u.getId()==pass.getId()) \n\t \t{\n\t \t\tif (u.getPassword().equals(pass.getPassword())) {\n\t \t\t\tu.setPassword(pass.getNewpassword());\n\t \t\t entityManager.persist(u);\n\t \t entityManager.getTransaction().commit();\n\t \t status=\"success\";\n\t \t\t}\n\t \t else {\n\t \t \t status=\"fail\";\n\t}\n\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(status);\n\t \tentityManager.close();\n\t\tentityManagerFactory.close();\n\t \treturn status;\n}",
"private void changePassword() throws SQLException {\n printAllWebsites();\n\n System.out.println(\"Which website?\");\n String website = input.next();\n\n System.out.println(\"Did the username change as well? Y/N\");\n if (input.next().equalsIgnoreCase(\"y\")) {\n changeWebsite(website);\n return;\n }\n\n System.out.print(\"What is the username?\\nusername: \");\n String username = input.next();\n\n int websiteDataId = getWebsiteDataId(website, username);\n if (websiteDataId == 0) throw new RuntimeException(\"Error while updating website.\");\n\n System.out.println(\"What is the new password?\");\n String pass = input.next();\n\n try (PreparedStatement st = connection.prepareStatement(\"DELETE FROM website_data \" +\n \"WHERE website_data_id like (?)\")) {\n st.setInt(1, websiteDataId);\n st.executeUpdate();\n }\n\n SecretKey key = User.getKey(user.getDecryptedKey());\n String encryptedPass = \"\";\n try {\n Cipher cipher = Cipher.getInstance(\"AES/ECB/PKCS5Padding\");\n cipher.init(Cipher.ENCRYPT_MODE, key);\n encryptedPass = Base64.getEncoder().encodeToString(cipher.doFinal(pass.getBytes(StandardCharsets.UTF_8)));\n } catch (Exception e) {\n System.out.println(\"Error while encrypting: \" + e.toString());\n }\n\n try (PreparedStatement st = connection.prepareStatement(\"INSERT INTO \" +\n \"website_data(website, username, password, website_data_id) VALUES (?, ?, ?, ?)\")) {\n st.setString(1, website);\n st.setString(2, username);\n st.setString(3, encryptedPass);\n st.setInt(4, websiteDataId);\n st.executeUpdate();\n }\n\n System.out.println(\"Password updated.\");\n System.out.println();\n }",
"public static boolean checkPassword(String login, String password) throws SQLException {\n\t\tConnection connexion = DataBase.getMySQLConnection();\n\t\tPreparedStatement st = connexion.prepareStatement(getPassword);\n\t\tst.setString(1, login);\n\t\tResultSet rs = st.executeQuery();\n\t\trs.first();\n\t\tboolean res = rs.getString(\"PASSWORD\").equals(password);\n\t\trs.close();\n\t\tst.close();\n\t\tconnexion.close();\n\t\treturn res;\n\t}",
"public static synchronized int resetCred(int userID, String password){\n\t\t\tint status=0;\t\n\t\t\tConnection connection; \n\t\t\tString preparedSQL = \"Update credential Set Pass = ? Where User_ID = ?\";\n\t\t\tPreparedStatement statement=null;\t\n\t\t\ttry{\n\t\t\t\tconnection=DBConnector.getConnection();\n\t\t\t\tstatement = connection.prepareStatement(preparedSQL);\n\t\t\t\tstatement.setString(1, password);\n\t\t\t\tstatement.setInt(2, userID);\n\t\t\t\tstatus = statement.executeUpdate();\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t}catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\t\t\treturn status;\n\t}",
"@Override\n\tpublic boolean setNewPassword(BigInteger tUserFId,String password) {\n\t\tint res = accountManageDao.updateApplyPwdWithMainUser(tUserFId,password);\n\t\treturn res>0?true:false;\n\t}",
"public void updatePassword(String newPass, String tablename) {\n \t\ttry {\n\t\t\t\tmyCon.execute(\"UPDATE \" + tablename + \" SET Password= '\" + newPass + \"';\");\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n }",
"public ForgotPassword() {\n initComponents();\n SQLConnect sqlcon = new SQLConnect();\n con=sqlcon.sqlCon(con);\n }",
"public boolean changePassword(HttpServletRequest request, HttpServletResponse response);",
"public boolean verifyPassword(int input){\n return input==password;\n }",
"public boolean isPasswordCorrect() {\n return (CustomerModel.passwordTest(new String(newPasswordTextField.getPassword())));\n }",
"@Override\n public boolean updatePassword(int userId, String password, String oldPassword){\n return userDAO.updatePassword(userId,password, oldPassword);\n }",
"public static void updatePsw(String password, int id) {\r\n\t\tMap<String, Object> map = new HashMap<String, Object>();\r\n\t\tString condition=\"utente.id=\"+id;\r\n\t\ttry {\r\n\t\t\tDatabase.connect();\r\n\t\t\tmap.put(\"password\", crypt(password));\r\n \t\tDatabase.updateRecord(\"utente\", map, condition);\r\n \t\tDatabase.close(); \r\n\t\t}catch(NamingException e) {\r\n \t\tSystem.out.println(e);\r\n }catch (SQLException e) {\r\n \tSystem.out.println(e);\r\n }catch (Exception e) {\r\n \tSystem.out.println(e); \r\n }\r\n\t}",
"private boolean checkUser(String user_name, String passwordd) throws SQLException {\n boolean sucss = false;\n DBConnection db = new DBConnection();\n Connection connection = db.getConnection();\n String sql = \"SELECT * FROM USER WHERE NAME = ? AND PASSWORD = ?\";\n try (PreparedStatement preparedStatement = connection.prepareStatement(sql);) {\n preparedStatement.setString(1, user_name);\n preparedStatement.setString(2, passwordd);\n ResultSet rs = preparedStatement.executeQuery();\n if (rs.next()) {\n System.out.println(rs.getString(\"name\"));\n System.out.println(rs.getString(\"password\"));\n sucss = true;\n }\n } catch (SQLException e) {\n System.out.println(\"User Is Not Insert\" + e);\n } finally {\n connection.close();\n return sucss;\n }\n }",
"public boolean editPassword(Admin admin,String newPassword) {\n\t\tString sql = \"update s_admin set password = '\"+newPassword+\"' where admin_name = '\" + admin.getAdminName()+\"'\";\r\n\t\treturn update(sql);\r\n\t}",
"int updateByPrimaryKeySelective(PasswordCard record);",
"public String checkPassword(String password) {\n\t\t//TODO method should check the password from the DB with the corresponding email\n\t\treturn password;\n\t}",
"public boolean checkPasswordStatusAction(){\n mPasswordStatus = !mPasswordStatus;\n return mPasswordStatus;\n }",
"public void savePasswordChange(ActionEvent actionEvent) throws SQLException {\n if (validPasswordInput()) {\n DatabaseManager.passwordChange(user.getDatabaseConnection(), user.getUser(), firstPasswordField.getText());\n displayMessage(messagePane,\"Password is changed\", false);\n closeChangePasswordPane(actionEvent);\n }\n }",
"@Override\r\n\tpublic boolean loginCheck(String id, String pw) {\n\r\n\r\n\t\ttry {\r\n\t\t\tconn = DriverManager.getConnection(URL, USER, PASS);\r\n\t\t\tString sql = \"select * from member where id=? and pw=?\";\r\n\t\t\tps = conn.prepareStatement(sql);\r\n\t\t\tps.setString(1, id);\r\n\t\t\tps.setString(2, pw);\r\n\t\t\trs = ps.executeQuery();\r\n\r\n\t\t\twhile (!rs.next()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tps.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}",
"public int updatePw(UserInfo userInfo,String password) {\n\t\tuserInfo.setId(userInfo.getId());\n\t\tuserInfo.setLogonPwd(password);\n\t\ttry{\n\t\t\tuserInfoManager.saveUserInfo(userInfo);\n\t\t\treturn 1;\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn 0;\n\t\t}\n\t}",
"private void editPassword() {\n\t\t// Which password entry has been selected?\n\t\tint iRow = passwordsTable.getSelectedRow();\n\t\tif (iRow == -1) { // no row currently selected\n\t\t\treturn;\n\t\t}\n\n\t\t// Get current values for service URI, username and password\n\t\tURI serviceURI = URI.create((String) passwordsTable.getValueAt(iRow, 1)); // current entry's service URI\n\n\t\tString username = (String) passwordsTable.getValueAt(iRow, 2); // current entry's username\n\n\t\t/*\n\t\t * Because the password column is not visible we call the getValueAt\n\t\t * method on the table model rather than at the JTable\n\t\t */\n\t\tString password = (String) passwordsTable.getModel()\n\t\t\t\t.getValueAt(iRow, 4); // current entry's password value\n\n\t\twhile (true) { // loop until user cancels or enters everything correctly\n\t\t\t// Let the user edit service URI, username or password of a password entry\n\t\t\tNewEditPasswordEntryDialog editPasswordDialog = new NewEditPasswordEntryDialog(\n\t\t\t\t\tthis, \"Edit username and password for a service\", true,\n\t\t\t\t\tserviceURI, username, password, credManager);\n\n\t\t\teditPasswordDialog.setLocationRelativeTo(this);\n\t\t\teditPasswordDialog.setVisible(true);\n\n\t\t\t// New values\n\t\t\tURI newServiceURI = editPasswordDialog.getServiceURI(); // get new service URI\n\t\t\tString newUsername = editPasswordDialog.getUsername(); // get new username\n\t\t\tString newPassword = editPasswordDialog.getPassword(); // get new password\n\n\t\t\tif (newPassword == null) // user cancelled - any of the above three\n\t\t\t\t// fields is null\n\t\t\t\t// do nothing\n\t\t\t\treturn;\n\n\t\t\t// Is anything actually modified?\n\t\t\tboolean isModified = !serviceURI.equals(newServiceURI)\n\t\t\t\t\t|| !username.equals(newUsername)\n\t\t\t\t\t|| !password.equals(newPassword);\n\n\t\t\tif (isModified) {\n\t\t\t\t/*\n\t\t\t\t * Check if a different password entry with the new URI (i.e.\n\t\t\t\t * alias) already exists in the Keystore We ask this here as the\n\t\t\t\t * user may wish to overwrite that other password entry.\n\t\t\t\t */\n\n\t\t\t\t// Get list of URIs for all passwords in the Keystore\n\t\t\t\tList<URI> serviceURIs = null;\n\t\t\t\ttry {\n\t\t\t\t\tserviceURIs = credManager\n\t\t\t\t\t\t\t.getServiceURIsForAllUsernameAndPasswordPairs();\n\t\t\t\t} catch (CMException cme) {\n\t\t\t\t\tshowMessageDialog(this, \"Failed to get service URIs for all username and password pairs \"\n\t\t\t\t\t\t\t+ \"to check if the modified entry already exists\",\n\t\t\t\t\t\t\tERROR_TITLE,\n\t\t\t\t\t\t\tERROR_MESSAGE);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// If the modified service URI already exists and is not the\n\t\t\t\t// currently selected one\n\t\t\t\tif (!newServiceURI.equals(serviceURI)\n\t\t\t\t\t\t&& serviceURIs.contains(newServiceURI)) {\n\t\t\t\t\tint answer = showConfirmDialog(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\"The Keystore already contains username and password pair for the entered service URI.\\n\"\n\t\t\t\t\t\t\t\t\t+ \"Do you want to overwrite it?\",\n\t\t\t\t\t\t\tALERT_TITLE, YES_NO_OPTION);\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (answer == YES_OPTION) {\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Overwrite that other entry entry and save the new\n\t\t\t\t\t\t\t * one in its place. Also remove the current one\n\t\t\t\t\t\t\t * that we are editing - as it is replacing the\n\t\t\t\t\t\t\t * other entry.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tcredManager\n\t\t\t\t\t\t\t\t\t.deleteUsernameAndPasswordForService(serviceURI);\n\t\t\t\t\t\t\tcredManager.addUsernameAndPasswordForService(\n\t\t\t\t\t\t\t\t\tnew UsernamePassword(newUsername,\n\t\t\t\t\t\t\t\t\t\t\tnewPassword), newServiceURI);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (CMException cme) {\n\t\t\t\t\t\tshowMessageDialog(\n\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\"Failed to update the username and password pair in the Keystore\",\n\t\t\t\t\t\t\t\tERROR_TITLE, ERROR_MESSAGE);\n\t\t\t\t\t}\n\t\t\t\t\t// Otherwise show the same window with the entered\n\t\t\t\t\t// service URI, username and password values\n\t\t\t\t} else\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!newServiceURI.equals(serviceURI))\n\t\t\t\t\t\t\tcredManager\n\t\t\t\t\t\t\t\t\t.deleteUsernameAndPasswordForService(serviceURI);\n\t\t\t\t\t\tcredManager.addUsernameAndPasswordForService(\n\t\t\t\t\t\t\t\tnew UsernamePassword(newUsername, newPassword), newServiceURI);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} catch (CMException cme) {\n\t\t\t\t\t\tshowMessageDialog(\n\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\"Failed to update the username and password pair in the Keystore\",\n\t\t\t\t\t\t\t\tERROR_TITLE, ERROR_MESSAGE);\n\t\t\t\t\t}\n\t\t\t} else // nothing actually modified\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public void launchUpdate() {\n\n\t\tif (checkRegister() == true && psw.getText() != newpsw.getText()) {\n\t\t\tDatabase.getInstance().updateUser(newpsw.getText(), username.getText());\n\t\t\tstatus.setText(\"Account updated\");\n\t\t} else {\n\t\t\tstatus.setText(\"Password already exist or this account doesn't exist\");\n\t\t}\n\n\t}",
"public boolean cambiarClave(String pass) {\n\t\tConnection conexion;\n\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;\n\t\t\tString clave = getClave();\n\n\t\t\tif (clave.length() > 0) {\n\t\t\t\tresultado = sql.executeUpdate(\"UPDATE password SET Password='\" + pass + \"'\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tresultado = sql.executeUpdate(\"INSERT INTO password (Password) VALUES ('\" + pass + \"')\");\n\t\t\t}\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}",
"public String searchPassword(String username){\n\n db = this.getReadableDatabase();\n String query = \"select username, password from \"+ TABLE_NAME;\n Cursor cursor = db.rawQuery(query, null);\n\n String uname, pass;\n pass = \"not found\";\n if (cursor.moveToFirst()){\n\n do {\n uname = cursor.getString(0);\n if (uname.equals(username)) {\n pass = cursor.getString(1);\n break;\n }\n\n } while (cursor.moveToNext());\n }\n\n return pass;\n }",
"public boolean verifyUser(String username, String password) throws SQLException {\n\n // update sql\n String pwGot = getPassword(username);\n\n if (pwGot.equals(password)) {\n return true;\n }\n\n return false;\n }",
"private boolean doGetConfirmPassword() {\n\t\tcurrentStep = OPERATION_NAME+\": getting confirm password\";\n\t\tif (!_atmssHandler.doDisDisplayUpper(PROMPT_FOR_CONFIRM_PASSWORD)) {\n\t\t\trecord(\"Dis\");\n\t\t\treturn false;\n\t\t}\n\t\tconfirmPassword = _atmssHandler.doKPGetPasswd(TIME_LIMIT);\n\t\tif (confirmPassword == null) {\n\t\t\trecord(\"KP\");\n\t\t\tif (!_atmssHandler.doDisDisplayUpper(FAILED_FROM_KEYPAD)) {\n\t\t\t\trecord(\"Dis\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tpause(3);\n\t\t\treturn false;\n\t\t} else if (confirmPassword.equals(KP_CANCEL)) {\n\t\t\trecord(\"USER\");\n\t\t\tif (!_atmssHandler.doDisDisplayUpper(FAILED_FROM_USER_CANCELLING)) {\n\t\t\t\trecord(\"Dis\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tpause(3);\n\t\t\treturn false;\n\t\t}\n\t\trecord(\"confirm password typed\");\n\t\treturn true;\n\t}",
"public boolean checkUser(String username, String password) {\n String[] columns = {COL_1};\n SQLiteDatabase db = getReadableDatabase();\n String selection = COL_2 + \"=?\" + \" and \" + COL_3 + \"=?\";\n String[] selectionArgs = {username, password};\n Cursor cursor = db.query(USER_TABLE_NAME, columns, selection, selectionArgs, null, null, null);\n int count = cursor.getCount();\n cursor.close();\n db.close();\n\n if (count > 0)\n return true;\n else\n return false;\n }",
"@Test(priority=1)\n\tpublic void verifyPasswordsMatch() {\n\t\tsignup.clearAllFields();\n\t\tsignup.enterId(\"[email protected]\");\n\t\tsignup.enterPassword(\"abcd\");\n\t\tsignup.reenterPassword(\"1235\");\n\t\tsignup.clickSubmit();\n\t\tList<String> errors = signup.getErrors();\n\t\tAssert.assertTrue(TestHelper.isStringPresent(errors, \"Passwords do not match; please enter a password and reenter to confirm.\\nPasswords must contain at least 6 characters and no spaces.\"));\n\t}",
"private boolean cekPassword(String password){\n return password.equals(Preferences.getRegisteredPass(getBaseContext()));\n }",
"@Update({\n \"update tb_user\",\n \"set password = #{password,jdbcType=VARCHAR}\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n int updateByPrimaryKey(User record);",
"private boolean checkLogin(String username, String passwordMD5) {\n try {\n Statement stmt = GUITracker.conn.createStatement();\n ResultSet rs = stmt.executeQuery(\"SELECT * from account where username='\" + username + \"' and password='\" + passwordMD5 + \"'\");\n if (rs.next()) {\n //iduser = rs.getInt(\"Id\");\n return true;\n } else {\n return false;\n } \n \n// if ((username.equals(usernamePeer)) && (passwordMD5.equals(passwordPeer))) {\n// return true;\n// } else {\n// return false;\n// }\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }",
"public boolean checkLogin() {\r\n try {\r\n String select = \"SELECT * FROM LOGIN\";\r\n ResultSet rs = model.ConnectToSql.select(select);\r\n while (rs.next()) {\r\n if (this.username.equals(rs.getString(1)) && new MD5().md5(this.password).equals(rs.getString(2))) {\r\n this.fullname = rs.getString(4);\r\n this.codeID = rs.getString(3);\r\n model.ConnectToSql.con.close();\r\n return true;\r\n }\r\n }\r\n\r\n } catch (Exception e) {\r\n //e.printStackTrace();\r\n\r\n }\r\n return false;\r\n }",
"@Override\r\n\tpublic int updatepassword(Account account) {\n\t\taccountMapper.updatepassword(account);\r\n\t\treturn 0;\r\n\t}",
"int changePassword(String userName, String homeLocation, String newPassword) {\n try {\n //Get values from passed in User\n String qText = \"SELECT salt, homeLocation FROM users WHERE userName = ?\";\n PreparedStatement stmt = db.getStatement(qText);\n stmt.setString(1, userName);\n ResultSet results = db.query(stmt);\n results.next();\n String salt = results.getString(\"salt\");\n String homeLoc = results.getString(\"homeLocation\");\n results.close();\n //Here is where we \"Authenticate\" the user. If they correctly answer the homeLocation,\n //they can change the password\n if (homeLocation.equals(homeLoc)) {\n //Update the password\n String newPass = hasher.getSecurePassword(salt, newPassword);\n String qText2 = \"UPDATE users SET password = ? WHERE userName = ?\";\n PreparedStatement stmt2 = db.getStatement(qText2);\n stmt2.setString(1, newPass);\n stmt2.setString(2, userName);\n Log.d(\"Change Password\", \"Attempting...\");\n db.update(stmt2);\n Log.d(\"Change Password\", \"Success!\");\n return 0;\n } else {\n Log.d(\"Change Password\", \"Failed attempt\");\n return 1;\n }\n\n } catch (SQLException e) {\n Log.e(\"Change Password\", e.getMessage(), e);\n return 2;\n }\n }",
"int updateByPrimaryKey(PasswordCard record);",
"@Override\n\tpublic Object modifyPassqord(String password, String newpassword, String username, HttpSession session) {\n\t\tMap<String , Object> map =new HashMap<String, Object>();\n\t\tif (username!=null) {\n\t\t\tUser user=UserMapper.selectBypassword(password, username);\n\t\t\t//数据库密码\n\t\t\t String yspassword=user.getPassword();\n\t\t\t if(yspassword.equals(password)){\n\t \n\t //对新密码就行加密\n\t user.setPassword(newpassword);\n\t //修改数据库的旧密码\n\t return UserMapper.updateByPrimaryKeySelective(user);\n\t\t}\n\t\treturn 0;\n\t\t}\n\t\treturn map;\n\t}",
"void onPasswordSuccess();",
"@Override\r\n\tpublic UserAccount updatePassword(int id, String password) {\n\t\tConnection con = MysqlDatabase.getInstance().getConnection();\r\n\t\tUserAccount ua = null;\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(UpdatePassword);\r\n\t\t\tps.setString(1, password);\r\n\t\t\tps.setInt(2, id);\r\n\t\t\tint cnt = ps.executeUpdate();\r\n\t\t\tif (cnt > 0) {\r\n\t\t\t\tua = get(id);\r\n\t\t\t}\r\n\t\t\tcon.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn ua;\r\n\t}",
"public boolean validLogin(String username, String password) {\n\n String query = String.format(\"SELECT * FROM staff WHERE staff_password = '%s' and staff_id = '%s'\", password, username);\n try {\n preparedStatement = connection.prepareStatement(query);\n result = preparedStatement.executeQuery();\n if(result.next()){\n return true;\n }\n return false;\n }\n catch (SQLException e) {\n e.printStackTrace();\n }\n return false;\n }",
"@GET(\"/index_production.php\")\n void changePassword(@Query(\"action\") String action,\n @Query(\"tabella\") String tabella,\n @Query(\"existing_password\") String existing_password,\n @Query(\"new_password\") String new_password,\n @Query(\"confirm_password\") String confirm_password,\n @Query(\"user_id\") String user_id,\n Callback<JsonObject> response);",
"public String login(String name, String password){\n String message =\"\";\n boolean password_verified = false;\n try {\n statement = connection.createStatement();\n //execute SQL query and get the data from the database\n ResultSet myResult = statement.executeQuery(\"SELECT name,password FROM members WHERE name = '\" + name +\"'\");\n while (myResult.next()) {\n //compare password with hashed password\n String stored_hash = myResult.getString(\"password\");\n password_verified = BCrypt.checkpw(password, stored_hash);\n }\n if(password_verified)\n message =\"success\";\n else\n message=\"Account name or Password wrong!\";\n\n\n }catch (SQLException ex){\n ex.printStackTrace();}\n\n\n return message;\n }"
]
| [
"0.73549664",
"0.71959597",
"0.7007459",
"0.67896146",
"0.67813677",
"0.6707916",
"0.6584591",
"0.6562429",
"0.6556274",
"0.6556274",
"0.6556274",
"0.6556274",
"0.6556274",
"0.6556274",
"0.6556274",
"0.6556274",
"0.65330464",
"0.6480473",
"0.6469101",
"0.6450318",
"0.6393105",
"0.6376834",
"0.6332483",
"0.63323855",
"0.63133246",
"0.6304573",
"0.63026696",
"0.6296165",
"0.6277113",
"0.6259691",
"0.62596244",
"0.6254536",
"0.6246516",
"0.6224618",
"0.62233776",
"0.62215436",
"0.621673",
"0.6214545",
"0.62088263",
"0.61921203",
"0.61820436",
"0.61777914",
"0.61704034",
"0.61693877",
"0.61630046",
"0.61581874",
"0.6155554",
"0.61400306",
"0.6132274",
"0.613143",
"0.6124426",
"0.61167765",
"0.61127627",
"0.61076695",
"0.6101648",
"0.60799116",
"0.60618925",
"0.6061735",
"0.6055894",
"0.6055828",
"0.60540015",
"0.60424536",
"0.60339355",
"0.60297304",
"0.6027811",
"0.6011708",
"0.6010761",
"0.60074884",
"0.5999247",
"0.59884536",
"0.59862685",
"0.5974233",
"0.59739506",
"0.5950548",
"0.59448653",
"0.593723",
"0.5920399",
"0.5919688",
"0.5918021",
"0.591464",
"0.5906846",
"0.5905814",
"0.5904851",
"0.59028333",
"0.5901708",
"0.58989507",
"0.589466",
"0.5893746",
"0.58904564",
"0.58672774",
"0.5855329",
"0.5849777",
"0.5848514",
"0.5843082",
"0.58422893",
"0.5836424",
"0.58346826",
"0.5830752",
"0.58246523",
"0.5821495"
]
| 0.69387895 | 3 |
Allow this route to be run as an application | public static void main(String[] args) throws Exception {
new Main().run(args);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void appStart() {\n }",
"public void startOsgi();",
"Application getApplication();",
"public void startApp()\r\n\t{\n\t}",
"public BazaarApplicationImpl() {\r\n\t\tsuper();\r\n\r\n\t}",
"@Override\n public void run(ApplicationArguments args) {\n }",
"public DefaultApplication() {\n\t}",
"@Override public void run(ApplicationArguments args) {\n }",
"public AuctionApp() {\r\n runAuctionApp();\r\n }",
"private void startWebApp(Handler<AsyncResult<HttpServer>> next) {\n Router router = Router.router(vertx);\n\n router.route(\"/assets/*\").handler(StaticHandler.create(\"assets\"));\n router.route(\"/api/*\").handler(BodyHandler.create());\n\n router.route(\"/\").handler(this::handleRoot);\n router.get(\"/api/timer\").handler(this::timer);\n router.post(\"/api/c\").handler(this::_create);\n router.get(\"/api/r/:id\").handler(this::_read);\n router.put(\"/api/u/:id\").handler(this::_update);\n router.delete(\"/api/d/:id\").handler(this::_delete);\n\n // Create the HTTP server and pass the \"accept\" method to the request handler.\n vertx.createHttpServer().requestHandler(router).listen(8888, next);\n }",
"public void setApp(Main application) { this.application = application;}",
"public ParkingApp() {\n runApp();\n }",
"public static void main(String[] args) throws Exception {\n URL webRootLocation = MainView.class.getResource(\"/webapp/\"); //src/masin\n URI webRootUri = webRootLocation.toURI();\n\n WebAppContext context = new WebAppContext();\n context.setBaseResource(Resource.newResource(webRootUri));\n context.setContextPath(\"/\");\n context.setAttribute(\"org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern\", \".*\");\n context.setConfigurationDiscovered(true);\n context.setConfigurations(new Configuration[]{\n new AnnotationConfiguration(),\n new WebInfConfiguration(),\n new WebXmlConfiguration(),\n new MetaInfConfiguration()\n });\n context.getServletContext().setExtendedListenerTypes(true);\n context.addEventListener(new ServletContextListeners());\n\n Server server = new Server(8080);\n server.setHandler(context);\n server.start();\n server.join();\n }",
"public MTApplication(){\r\n\t\tsuper();\r\n\t}",
"public void run() {\n final Server server = new Server(8081);\n\n // Setup the basic RestApplication \"context\" at \"/\".\n // This is also known as the handler tree (in Jetty speak).\n final ServletContextHandler context = new ServletContextHandler(\n server, CONTEXT_ROOT);\n final ServletHolder restEasyServlet = new ServletHolder(\n new HttpServletDispatcher());\n restEasyServlet.setInitParameter(\"resteasy.servlet.mapping.prefix\",\n APPLICATION_PATH);\n restEasyServlet.setInitParameter(\"javax.ws.rs.Application\",\n \"de.kad.intech4.djservice.RestApplication\");\n context.addServlet(restEasyServlet, CONTEXT_ROOT);\n\n\n try {\n server.start();\n server.join();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"public static void main(String[] args){\n // app.run(args);\r\n new SpringApplicationBuilder(MainApplication.class).web(true).run(args);\r\n }",
"AdminApplication getApplication();",
"public void myapp() {\n\n\n }",
"public static void main(String[] args) {\n staticFiles.location(\"/public\");\n\n //This will listen to GET requests to /model and return a clean new model\n get(\"/model/:Version\", (req, res) -> newModel( req ));\n\n //This will listen to POST requests and expects to receive a game model, as well as location to fire to\n post(\"/fire/:Version/:row/:col/:hard\", (req, res) -> fireAt( req ));\n //This will handle the scan feature\n post(\"/scan/:Version/:row/:col/:hard\", (req, res) -> scan( req ));\n\n //This will listen to POST requests and expects to receive a game model, as well as location to place the ship\n post(\"/placeShip/:Version/:id/:row/:col/:orientation/:hard\", (req, res) -> placeShip( req ));\n }",
"public RestApplication() {\n\t\tsingletons.add(new UtilResource());\n\t\tsingletons.add(new StudentResource());\n\t}",
"public static void main(String[] args) {\n\t\tSpringApplication.run(ResturantAppApplication.class, args);\n\t}",
"public static void main(String[] args) {\n staticFiles.location(\"/public\"); // Static files\n get(\"/hello\", (req, res) -> \"Hello World\");\n System.out.println(\"http://localhost:4567/hello\");\n }",
"public Flask() {\r\n strat = new EmptyFlaskStrategy();\r\n }",
"public static void main(String[] args) { \n\t\t//we are calling a static method and passing it the name of the class where we have our Main method.\t\t\n\t\tSpringApplication.run(CourseApiApp.class, args);\n\t}",
"public void setApp(Main application){\n this.application = application;\n }",
"public static void main(String[] args) {\r\n SunSpotHostApplication app = new SunSpotHostApplication();\r\n app.run();\r\n }",
"public interface Application { \n /**\n * Applies all RequestFilters to the client's request prior to \n * routing to a Resource for handling. This is the first step \n * performed by a connector when processing a request.\n * @param request The client generated Request.\n * @return The filtered Request.\n */\n public Function<Request, Request> requestFilter();\n \n /**\n * Applies all ResponseFilters to a server's response. This is the \n * final step performed by a connector prior to sending a response\n * to a client.\n * @param response\n * @return The filtered Response.\n */\n public Function<Response, Response> responseFilter();\n \n /**\n * Retrieve the first resource which has a Route that matches the \n * Request's URI.\n * @param request A filtered client Request.\n * @return The Resource to be used to handle the Request.\n */\n public Resource getResource(Request request);\n}",
"public App() {\n\t\tLog.d(\"App\", \"App created\");\n\t\tinstance = this;\n\t}",
"protected Application getApplication() {\r\n\t\treturn application;\r\n\t}",
"public static void main(String[] args) {\n staticFiles.location(\"/public\");\n //This will listen to GET requests to /model and return a clean new model\n get(\"/model\", (req, res) -> newModel());\n //This will listen to POST requests and expects to receive a game model, as well as location to fire to\n post(\"/fire/:row/:col\", (req, res) -> fireAt(req));\n //This will listen to POST requests and expects to receive a game model, as well as location to place the ship\n post(\"/placeShip/:id/:row/:col/:orientation\", (req, res) -> placeShip(req));\n }",
"ExpProtocolApplication createSimpleRunExtraProtocolApplication(ExpRun expRun, String name);",
"public void setApplication(String application) {\r\n this.application = application;\r\n }",
"private static void setupOsgi() {\r\n FrameworkStarter.getInstance().start();\r\n }",
"@Override\n public void enterApplication(final ProgramParser.ApplicationContext ctx) {\n }",
"private SudokuSolverApplication() {\n\t}",
"public void startServer() {\n System.out.println(\"Inicie\");\n httpServer = new HttpServer();\n httpServer.registerProessor(\"/App\", this);\n try {\n httpServer.start();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public Application(ProtocolStack inParentStack, int listenPort, int appType, long UID){ \n super(UID);\n this.listenPort = listenPort;\n this.mParentStack = inParentStack;\n this.appType = appType; \n }",
"public static void main(String... args) throws IOException {\r\n\r\n checkDatabaseConnectivity();\r\n checkServerProperties();\r\n checkSchedulerProperties();\r\n server = new Server(port);\r\n\r\n try {\r\n ServletContextHandler context = new ServletContextHandler(\r\n ServletContextHandler.SESSIONS\r\n | ServletContextHandler.SECURITY);\r\n\r\n context.setInitParameter(\r\n \"org.eclipse.jetty.servlet.SessionIdPathParameterName\",\r\n \"none\");\r\n\r\n context.setContextPath(\"/\");\r\n context.setSecurityHandler(setUpSecurityHandler());\r\n AppServlet.getInstance().setLoginService(\r\n (HashLoginService) context.getSecurityHandler()\r\n .getLoginService());\r\n\r\n context.addServlet(new ServletHolder(AppServlet.getInstance()),\r\n \"/*\");\r\n context.addServlet(new ServletHolder(UserServlet.getInstance()),\r\n \"/users/*\");\r\n context.addServlet(new ServletHolder(ModuleServlet.getInstance()),\r\n \"/modules/*\");\r\n context.addServlet(new ServletHolder(RoomServlet.getInstance()),\r\n \"/rooms/*\");\r\n context.addServlet(\r\n new ServletHolder(EquipmentServlet.getInstance()),\r\n \"/equipment/*\");\r\n context.addServlet(\r\n new ServletHolder(TimeframeServlet.getInstance()),\r\n \"/timeframe/*\");\r\n context.addServlet(\r\n new ServletHolder(SchedulerServlet.getInstance()),\r\n \"/scheduler/*\");\r\n\r\n ContextHandler fileHandler = new ContextHandler();\r\n fileHandler.setContextPath(\"/resources\");\r\n ResourceHandler resourceHandler = new ResourceHandler();\r\n resourceHandler.setResourceBase(\"site/resources\");\r\n fileHandler.setHandler(resourceHandler);\r\n\r\n ContextHandlerCollection contexts = new ContextHandlerCollection();\r\n contexts.setHandlers(new Handler[] { context, fileHandler });\r\n server.setHandler(contexts);\r\n\r\n server.start();\r\n\r\n } catch (Exception e) {\r\n System.err.println(\"Server failed to start.\");\r\n e.printStackTrace();\r\n }\r\n }",
"@Override public void startUp(FloodlightModuleContext context) {\n restApi.addRestletRoutable(this);\n\n }",
"@Override\n public void startUp(FloodlightModuleContext context) {\n restApi.addRestletRoutable(this);\n }",
"public CustomApplication() \n {\n packages(\"com.SApp.Ticket.tools\");\n// register(LoggingFilter.class);\n \n //Register Auth Filter here\n register(AuthenticationFilter.class);\n }",
"@Override\n\t public void run(ApplicationArguments args) throws Exception {\n\n\t }",
"public static void main(String args[]) {\n BezirkMiddleware.initialize();\n Bezirk bezirk = BezirkMiddleware.registerZirk(\"Hello World Zirk\");\n\n //Create a new event and publish it\n\n\n\n }",
"java.util.concurrent.Future<StartApplicationResult> startApplicationAsync(StartApplicationRequest startApplicationRequest);",
"public static void main(String[] args) {\n startApplication();\n }",
"public static void main(String[] args) {\r\n \t\r\n // Creates new controller named the main controller\r\n GlobalResources.MainControl = new Control();\r\n // Starts main application\r\n GlobalResources.MainControl.StartApplication();\r\n }",
"public void initOsgi();",
"@Override\n protected void configure() {\n bind(ApplicationContext.class).toInstance(ctxt);\n }",
"public boolean accepts( Application application)\n\t{\n\t\treturn false;\n\t\t//TODO implement accepts\n\t}",
"public static void main(String[] args) {\n\t\tSpringApplication.run(ApiApplication.class, args);\n\t}",
"public static void main(String arg[]) {\n\n\t\tUtility.runApplication();\n\t}",
"public static void main(String[] args) {\n\t\trunApplication();\n\t}",
"public static void main(String[] args) {\r\n\r\n\t \tSystem.setProperty(\"spring.config.name\", \"sandun-personal-project\");\r\n\t\tSpringApplication.run(ApplicationServer.class, args);\r\n\t}",
"private static void startService() {\n //noinspection deprecation\n setPort(configuration.getPort());\n get(\":version/route/:user\", (request, response) -> {\n try {\n String apiVersion = request.params(\":version\");\n String user = request.params(\":user\");\n String version = request.headers(\"version\"); \n if (!isValidApiVersion(apiVersion)) {\n response.status(400);\n return new RouteResponse(\"Wrong API version\", \"400\", \"\");\n }\n return new RouteResponse(splitter.getGroupForUser(user)); // no overhead measured compared to using string concat or StringBuilder\n } catch (Exception e) {\n logger.error(\"Problem serving the request.\", e);\n response.status(500);\n return new RouteResponse(e.getMessage(), \"500\", \"\");\n }\n }, new JsonTransformer());\n }",
"public static void main(String[] args) {\n // Configure MongoDB and Morphia\n \n \n // Define route handlers\n get(\"/\", PersonController.sayHello);\n }",
"void launchApp();",
"public void setApplication(String application) {\r\n\t\tthis.application = application;\r\n\t}",
"public static void main(String[] args) {\n\t\tnew SpringApplicationBuilder(Application.class).web(true).run(args);\n\t}",
"public static boolean isSystemApplication(){\n return isSystemApplication(getContext().getPackageName());\n }",
"public static void main(String[] args) {\n\t\tSpringApplication.run(AcortadorUrlApplication.class, args);\n\t}",
"private void applicationHealthHandler(RoutingContext routingContext) {\n HttpServerResponse httpServerResponse = routingContext.response();\n httpServerResponse.setStatusCode(SUCCESS_CODE);\n httpServerResponse.end(\"myRetailApplication is up and running\");\n }",
"public String getApplication() {\r\n return application;\r\n }",
"protected WebApplication newApplication() {\n return new DummyWebApplication();\n }",
"@Override\n protected SpringApplicationBuilder configure(SpringApplicationBuilder application){\n return application.sources(StartUpApplication.class);\n }",
"@DISPID(3) //= 0x3. The runtime will prefer the VTID if present\r\n @VTID(7)\r\n visiotool.IVApplication application();",
"public static void main(String[] args) {\n AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();\n ctx.register(ApplicationConfig.class);\n ctx.register(ApplicationContext.class);\n ctx.register(PersistenceContext.class);\n ctx.register(ProductionContext.class);\n ctx.register(SwaggerConfig.class);\n\n SpringApplication.run(Application.class);\n }",
"@Override\n public void init(Router router) {\n\n // /////////////////////////////////////////////////////////////////////\n // some default functions\n // /////////////////////////////////////////////////////////////////////\n // simply render a page:\n router.GET().route(\"/\").with(ApplicationController.class, \"index\");\n router.GET().route(\"/examples\").with(ApplicationController.class, \"examples\");\n\n // render a page with variable route parts:\n router.GET().route(\"/user/{id}/{email}/userDashboard\").with(ApplicationController.class, \"userDashboard\");\n\n router.GET().route(\"/validation\").with(ApplicationController.class, \"validation\");\n\n // redirect back to /\n router.GET().route(\"/redirect\").with(ApplicationController.class, \"redirect\");\n\n router.GET().route(\"/session\").with(ApplicationController.class, \"session\");\n \n router.GET().route(\"/flash_success\").with(ApplicationController.class, \"flashSuccess\");\n router.GET().route(\"/flash_error\").with(ApplicationController.class, \"flashError\");\n router.GET().route(\"/flash_any\").with(ApplicationController.class, \"flashAny\");\n \n router.GET().route(\"/htmlEscaping\").with(ApplicationController.class, \"htmlEscaping\");\n\n // /////////////////////////////////////////////////////////////////////\n // Json support\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/api/person.json\").with(PersonController.class, \"getPersonJson\");\n router.POST().route(\"/api/person.json\").with(PersonController.class, \"postPersonJson\");\n \n router.GET().route(\"/api/person.xml\").with(PersonController.class, \"getPersonXml\");\n router.POST().route(\"/api/person.xml\").with(PersonController.class, \"postPersonXml\");\n\n // /////////////////////////////////////////////////////////////////////\n // Form parsing support\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/contactForm\").with(ApplicationController.class, \"contactForm\");\n router.POST().route(\"/contactForm\").with(ApplicationController.class, \"postContactForm\");\n\n // /////////////////////////////////////////////////////////////////////\n // Cache support test\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/test_caching\").with(ApplicationController.class, \"testCaching\");\n \n // /////////////////////////////////////////////////////////////////////\n // Lifecycle support\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/udpcount\").with(UdpPingController.class, \"getCount\");\n \n // /////////////////////////////////////////////////////////////////////\n // Route filtering example:\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/filter\").with(FilterController.class, \"filter\");\n router.GET().route(\"/teapot\").with(FilterController.class, \"teapot\");\n\n // /////////////////////////////////////////////////////////////////////\n // Route filtering example:\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/injection\").with(InjectionExampleController.class, \"injection\");\n\n // /////////////////////////////////////////////////////////////////////\n // Async example:\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/async\").with(AsyncController.class, \"asyncEcho\");\n\n // /////////////////////////////////////////////////////////////////////\n // I18n:\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/i18n\").with(I18nController.class, \"index\");\n router.GET().route(\"/i18n/{language}\").with(I18nController.class, \"indexWithLanguage\");\n\n // /////////////////////////////////////////////////////////////////////\n // Upload showcase\n // /////////////////////////////////////////////////////////////////////\n router.GET().route(\"/upload\").with(UploadController.class, \"upload\");\n router.POST().route(\"/uploadFinish\").with(UploadController.class, \"uploadFinish\");\n \n \n //this is a route that should only be accessible when NOT in production\n // this is tested in RoutesTest\n if (!ninjaProperties.isProd()) {\n router.GET().route(\"/_test/testPage\").with(ApplicationController.class, \"testPage\");\n }\n\n router.GET().route(\"/assets/.*\").with(AssetsController.class, \"serve\");\n }",
"public void startup(){}",
"private AppServlet() {\r\n\r\n }",
"protected boolean exportApplication() throws IOException, RunnerException {\n return false;\n }",
"public static Application getInstance(){\n\t\treturn getInstance (null);\n\t}",
"public static void runFromServlet() {\n isRunningFromServlet.set(true);\n }",
"public static void main(String[] args){\n// ApplicationContext ctx = new SpringApplicationBuilder()\n// .sources(SpringBootApplication.class)\n// .web(false) // 没错,把项目设置成web环境\n// .run(args);\n SpringApplication.run(SpringBootApplication.class, args);\n }",
"@Path(\"/index\")\n public void index(){\n }",
"Rack.DefinitionStages.Blank define(String name);",
"public void run() {\n\t\tport(8080);\n\n\t\t// Main Page, welcome\n\t\tget(\"/\", (request, response) -> \"Welcome!\");\n\n\t\t// Date\n\t\tget(\"/date\", (request, response) -> {\n\t\t\tDate d = new Date(\"frida.org\", Calendar.getInstance().get(Calendar.YEAR),\n\t\t\t\t\tCalendar.getInstance().get(Calendar.MONTH), Calendar.getInstance().get(Calendar.DAY_OF_MONTH));\n\t\t\treturn om.writeValueAsString(d);\n\t\t});\n\n\t\t// Time\n\t\tget(\"/time\", (request, response) -> {\n\t\t\tTime t = new Time(\"frida.org\", Calendar.getInstance().get(Calendar.HOUR),\n\t\t\t\t\tCalendar.getInstance().get(Calendar.MINUTE), Calendar.getInstance().get(Calendar.SECOND));\n\t\t\treturn om.writeValueAsString(t);\n\t\t});\n\t}",
"public boolean registerApplication(Application application);",
"@GetMapping(\"\")\r\n @ResponseStatus(code = HttpStatus.OK)\r\n public void main() {\r\n LOGGER.info(\"GET /\");\r\n }",
"public String getApplication() {\r\n\t\treturn application;\r\n\t}",
"WebAppMiddleware(Context c) {\n this.c = c; //Aggancio il Context dell'app\n\n }",
"public ApplicationCreator() {\n }",
"public static Kernel start(int port)\n {\n Kernel app = Kernel.newInstance();\n Container container = app.getContainer();\n\n // Forms\n container.add(new ServiceDefinition<>(AnnualReviewType.class));\n container.add(new ServiceDefinition<>(UserType.class));\n\n // Managers\n container.add(new ServiceDefinition<>(AccessDecisionManager.class, YuconzAccessDecisionManager.class));\n container.add(new ServiceDefinition<>(YuconzAuthenticationManager.class));\n container.add(new ServiceDefinition<>(Hibernate.class));\n container.add(new ServiceDefinition<>(LogManager.class))\n .addMethodCallDefinitions(new MethodCallDefinition(\n \"setAuthenticationManager\",\n new ServiceReference<>(YuconzAuthenticationManager.class)\n ));\n container.add(new ServiceDefinition<>(RecordManager.class));\n container.add(new ServiceDefinition<>(AnnualReviewManager.class));\n container.add(new ServiceDefinition<>(FormManager.class));\n\n container.add(new ServiceDefinition<>(AuthorisationManager.class))\n .addMethodCallDefinitions(new MethodCallDefinition(\n \"setAuthenticationManager\",\n new ServiceReference<>(YuconzAuthenticationManager.class)\n ));\n\n // Resolvers\n container.add(new ServiceDefinition<>(UserResolver.class));\n container.add(new ServiceDefinition<>(RecordResolver.class));\n\n // JTwig Functions\n container.add(new ServiceDefinition<>(CurrentUserFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(CurrentRoleFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(FormRenderFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(FormStartRenderFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(FormEndRenderFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(ActivePageFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(IsGrantedFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(RangeFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(ServiceFunction.class)).addTag(\"jtwig.function\");\n container.add(new ServiceDefinition<>(LocalDateFunction.class)).addTag(\"jtwig.function\");\n\n // Voters\n container.add(new ServiceDefinition<>(PersonalDetailsVoter.class)).addTag(\"authentication.voter\");\n container.add(new ServiceDefinition<>(RecordVoter.class)).addTag(\"authentication.voter\");\n container.add(new ServiceDefinition<>(AnnualReviewVoter.class)).addTag(\"authentication.voter\");\n container.add(new ServiceDefinition<>(AuthorisationVoter.class)).addTag(\"authentication.voter\");\n\n container.getServiceDefinition(FrameworkServer.class).setConfigurationReference(new PlainReference<>(new Configuration()\n {\n @Override\n public int getPort()\n {\n return port;\n }\n }));\n\n app.boot();\n\n Router router = container.get(Router.class);\n\n // Records\n router.registerController(AppController.class);\n router.registerController(StaticController.class);\n router.registerController(AuthenticationController.class);\n router.registerController(DashboardController.class);\n router.registerController(EmployeesController.class);\n router.registerController(RecordController.class);\n router.registerController(AnnualReviewController.class);\n\n FormManager formManager = container.get(FormManager.class);\n\n formManager.getRenderers().removeIf(r -> r.getClass().equals(ChoiceRenderer.class));\n formManager.addRenderer(CustomChoiceRenderer.class);\n formManager.addRenderer(DateRenderer.class);\n\n app.start();\n\n return app;\n }",
"public interface Application {\n /**\n * Initializes resources used by the Application.\n *\n * @param config the application's configuration object\n */\n public void init(ApplicationConfig config) throws ServletException;\n \n /**\n * Called by the TeaServlet when the application is no longer needed.\n */\n public void destroy();\n\n /**\n * Creates a context, which defines functions that are callable by\n * templates. Any public method in the context is a callable function,\n * except methods defined in Object. A context may receive a request and\n * response, but it doesn't need to use any of them. They are provided only\n * in the event that a function needs access to these objects.\n * <p>\n * Unless the getContextType method returns null, the createContext method\n * is called once for every request to the TeaServlet, so context creation\n * should have a fairly quick initialization. One way of accomplishing this\n * is to return the same context instance each time. The drawback to this\n * technique is that functions will not be able to access the current\n * request and response.\n * <p>\n * The recommended technique is to construct a new context that simply\n * references this Application and any of the passed in parameters. This\n * way, the Application contains all the resources and \"business logic\",\n * and the context just provides templates access to it.\n *\n * @param request the client's HTTP request\n * @param response the client's HTTP response\n * @return an object context for the templates\n */\n public Object createContext(ApplicationRequest request,\n ApplicationResponse response);\n\n /**\n * The class of the object that the createContext method will return, which\n * does not need to implement any special interface or extend any special\n * class. Returning null indicates that this Application defines no\n * context, and createContext will never be called.\n *\n * @return the class that the createContext method will return\n */\n public Class getContextType();\n}",
"public static void main ( String[] args ) {\n PhoneBook myApp = new PhoneBook(); \r\n }",
"public static void main(String[] args) {\n\t\ttry {\n\t\t\tServerSocket serverSocket = new ServerSocket(8989);\n\t\t\tApplication app = new Application();\n\t\t\tapp.startServer(serverSocket);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"服务器端口已经被占用!!!\");\n\t\t}\n\t}",
"public static void main(String[] args) {\n new MyApp();\n }",
"protected void onPreCreateApplication() {\n\n\t}",
"public static void main(String[] args) throws IOException {\n ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);\n context.setContextPath(\"/\");\n\n // Establish DB connection first\n\n // now start the server\n System.out.println(\"=== Initializing server on port \" + PORT);\n\n Server jettyServer = new Server(PORT);\n jettyServer.setHandler(context);\n\n if (LOG_REQUESTS) {\n RequestLog requestLog = new RipLogger();\n jettyServer.setRequestLog(requestLog);\n }\n\n ServletHolder jerseyServlet = context.addServlet(ServletContainer.class, \"/sudoku/*\");\n jerseyServlet.setInitOrder(0);\n jerseyServlet.setInitParameter(\"jersey.config.server.provider.packages\", \"com.shadedreality.rest\");\n\n try {\n jettyServer.start();\n jettyServer.dumpStdErr();\n jettyServer.join();\n } catch (Exception e) {\n System.err.println(\"Uncaught Exception in server: \"+e);\n }\n finally {\n jettyServer.destroy();\n }\n }",
"@Override\n public void run(final ApplicationArguments args) throws Exception {\n }",
"public static void main(String[] args){\n System.setProperty(\"spring.jackson.serialization.INDENT_OUTPUT\", \"true\");\n\n SpringApplication application = new SpringApplication(Application.class);\n application.addListeners(new ApplicationPidFileWriter(\"ms-recommendation.pid\"));\n application.run(args);\n }",
"public static void main(String[] args) {\n CustomSystemPropertiesConfiguration.INSTANCE\n .configApplicationShortName(APP_SHORT_NAME);\n checkConfigPathPrefix();\n checkClusterName();\n SpringBootApplicationRunner.run(EurekaServerApplication.class, BannerPrinter.create(), args);\n }",
"public interface AppFooEndpoint {\n}",
"public static void main(String... args) {\n\t\tApplication.launch(View.class, args);\n\t}",
"public void setMainApp(MainApp mainApp);",
"public static void main(String[] args) throws UnknownHostException {\r\n\t SpringApplication app = new SpringApplication(Main.class);\r\n\t DefaultProfileUtil.addDefaultProfile(app);\r\n\t Environment env = app.run(args).getEnvironment();\r\n\t log.info(\"\\n----------------------------------------------------------\\n\\t\" +\r\n\t \"Application '{}' is running! Access URLs:\\n\\t\" +\r\n\t \"Local: \\t\\thttp://localhost:{}\\n\\t\" +\r\n\t \"External: \\thttp://{}:{}\\n----------------------------------------------------------\",\r\n\t env.getProperty(\"spring.application.name\"),\r\n\t env.getProperty(\"server.port\"),\r\n\t InetAddress.getLocalHost().getHostAddress(),\r\n\t env.getProperty(\"server.port\"));\r\n\t \r\n\t \r\n\t \r\n\r\n\t }",
"public static void main(String[] args) {\n\t\tSpringApplication.run(HimalayanKitchenBackendStarter.class, args);\t\t\n\t}",
"public static void main(String[] args) {\n\t\tSpringApplication.run(PhtemperApplication.class, args);\n\t}",
"public static void main(String[] args) {\n\n\t\tJavalin app = Javalin.create(config -> config.addStaticFiles(\n\t\t\t\tstaticFiles ->\n\t\t\t\t{\n\t\t\t\t\tstaticFiles.directory = \"/public\";\n\t\t\t\t}\n\t\t\t\t)\n\t\t\t\t).start(6001);\n\t\t\n\t\t\n\t\tapp.get(\"/\", ctx -> ctx.html(\"hello!\"));\n\t\t\n\t\tapp.post(\"/authenticate\", ctx -> {login(ctx);} ); //Someone has to ping my authenticate, \n\t\t\t\t\t\t\t\t\t\t//before they can access my \"/secret\"\n\t\t\n\t\tapp.get(\"/secret\", ctx -> {\n\t\t\t\n\t\t\tUser sessionUser = ctx.sessionAttribute(\"user\");\n\t\t\t\n\t\t\tif(sessionUser == null) {\n\t\t\t\tctx.res.setStatus(400);\n\t\t\t\tSystem.out.println(\"Login in first!\");\n\t\t\t}else if(sessionUser.isAdmin()) {\n\t\t\t\tctx.res.setStatus(200); //success!\n\t\t\t\tctx.req.getRequestDispatcher(\"/SuperSecretPage.html\").forward(ctx.req, ctx.res);\n\t\t\t}else if(sessionUser.isAdmin() == false) {\n\t\t\t\tctx.res.setStatus(401);\n\t\t\t\tctx.req.getRequestDispatcher(\"/failed.html\").forward(ctx.req, ctx.res);\n\t\t\t}\n\t\t}); //That I only want access once they login!\n\t\t\n\t\tapp.get(\"logout\", ctx -> {\n\t\t\t\n\t\t\tctx.sessionAttribute(\"user\", new User(\"fake\",false)); //instead of removing altogther!\n//\t\t\tctx.consumeSessionAttribute(\"user\"); //logout!\n\t\t\t\n\t\t});\n\t\t\t\n\t\t\n\t\t//creating cookies\n\t\tapp.get(\"/cookie\", ctx -> {\n\t\t\t\n\t\t\t//cookies stored in the client machine! \n\t\t\t\n\t\t\tctx.cookie(\"user\", \"McBobby\");\n\t\t\tctx.cookie(\"favoriteColor\",\"Blue\");\n\t\t\tctx.cookie(\"member\",\"true\"); \n\t\t\tctx.cookie(\"admin\", \"false\");\n\t\t\tctx.cookie(\"access\", \"true\");\n\t\t});\n\t\t\n\t\tapp.get(\"/checkCookies\", ctx -> ctx.html(ctx.cookieMap().toString()));\n\t\t//checking if the cookies exist\n//\t\tapp.get(\"/checkCookies\", ctx -> {\n//\t\t\t\n//\t\t\tctx.res.setStatus(404);\n//\t\t\t\n//\t\t\t//checking if the cookieMap exists\n//\t\t\tif(ctx.cookieMap() != null) {\n//\t\t\t\tif(ctx.cookieMap().get(\"member\")!= null //checking if the \"member\" cookie exists\n//\t\t\t\t\t\t&& ctx.cookieMap().get(\"member\").equals(\"true\")) { //checkif the member cookie has the right value\n//\t\t\t\t\tctx.res.setStatus(200);\n//\t\t\t\t\t\n//\t\t\t\t}}\n//\t\t\t\n//\t\t\t\n//\t\t\t\t\n//\t\t\t\t\n//\t\t});\n\n\t\t//removing or overwriting the value of the cookie\n\t\tapp.get(\"/removeCookies\", ctx ->{\n\t\t\t\n\t\t\tctx.removeCookie(\"member\");\n\t\t\tctx.cookie(\"access\", \"false\");\n\t\t});\n\t\t\n\t\t\n\t\t\n\t\tapp.get(\"/setSession\", ctx -> {\n\t\t\n\t\t\tctx.sessionAttribute(\"user\", new User(\"Mcbobby\",false));\n\t\t\t\n\t\t});\n\t\t\n\t\tapp.get(\"/checkSession\", ctx -> {\n\n\t\t\tUser sessionUser = ctx.sessionAttribute(\"user\");\n\t\t\tSystem.out.println(sessionUser);\n\t\t});\n\t\t\n\t\tapp.get(\"/invalidateSession\", ctx -> {\n\t\t\t\n\t\t\tctx.consumeSessionAttribute(\"user\"); //this invalidates the session!\n\t\t});\n\t\t\n\t}",
"public ToDoListApp() {\n runToDoList();\n }",
"public static void main(String[] args) { //type “psvm + tab” to autocreate this\n // directing the server to immediate files it should access. Just like index\n staticFileLocation(\"/public\");\n\n\n // routes as per their handlebars templates. Make sure to read and understand what they do\n get(\"/\", (req, res) -> {\n Map<String, Object> model = new HashMap<>();\n return new ModelAndView(model, \"index.hbs\");\n }, new HandlebarsTemplateEngine());\n\n get(\"/animalnew\", (request, response) -> {\n Map<String, Object> model = new HashMap<>();\n return new ModelAndView(model, \"animalForm.hbs\");\n }, new HandlebarsTemplateEngine());\n\n get(\"/endangerednew\", (request, response) -> {\n Map<String, Object> model = new HashMap<>();\n return modelAndView(model,\"endangeredForm.hbs\");\n }, new HandlebarsTemplateEngine());\n\n get(\"/sightingsnew\", (request, response) -> {\n Map<String, Object> model = new HashMap<>();\n return modelAndView(model,\"sightingsForm.hbs\");\n }, new HandlebarsTemplateEngine());\n\n get(\"/animals\", (request, response) -> {\n Map<String, Object> model = new HashMap<>();\n List peter = Endangered.relative_All();\n System.out.println(peter.get(0));\n model.put(\"endangered\", peter);\n return modelAndView(model, \"endangered.hbs\");\n }, new HandlebarsTemplateEngine());\n\n\n get(\"/sightings\", (request, response) -> {\n Map<String, Object> model = new HashMap<>();\n return modelAndView(model, \"sightings.hbs\");\n }, new HandlebarsTemplateEngine());\n\n get(\"/saved\", (request, response) -> {\n Map<String, Object> model = new HashMap<>();\n List sightings = Sightings.retrieveFromSightings();\n model.put(\"sightings\", sightings);\n return new ModelAndView(model,\"sight.hbs\");\n }, new HandlebarsTemplateEngine());\n\n\n get(\"/newanimal\", (request, response) -> {\n Map<String, Object> model = new HashMap<>();\n List animal = Animal.relative_All();\n model.put(\"animals\", animal);\n return new ModelAndView(model, \"wildlife.hbs\");\n }, new HandlebarsTemplateEngine());\n\n get(\"/animals/:id/edit\", (request, response) -> {\n Map<String, Object> model = new HashMap<String, Object>();\n model.put(\"animal\", Animal.find(Integer.parseInt(request.params(\":id\"))));\n return new ModelAndView(model, \"editForm.hbs\");\n }, new HandlebarsTemplateEngine());\n\n\n get(\"/animals/:id/delete\", (request, response) -> {\n Map<String, Object> model = new HashMap<String, Object>();\n Animal.find(Integer.parseInt(request.params(\":id\"))).delete();\n response.redirect(\"/animals\");\n return null;\n }, new HandlebarsTemplateEngine());\n\n\n post(\"/animals/:id/edit\", (request, response) -> {\n Map<String, Object> model = new HashMap<String, Object>();\n int id = Integer.parseInt(request.params(\":id\"));\n String name = request.queryParams(\"name\");\n Animal animal = Animal.find(id);\n animal.setName(name);\n animal.update();\n return new ModelAndView(model, \"ess.hbs\");\n }, new HandlebarsTemplateEngine());\n\n\n post(\"/succ\", (req, res) -> { //new\n Map<String, Object> model = new HashMap<>();\n String animalname = req.queryParams(\"animalname\");\n String rangername = req.queryParams(\"ranger\");\n String location = req.queryParams(\"location\");\n Sightings sightings = new Sightings(animalname,rangername,location);\n sightings.save();\n model.put(\"sightings\", sightings);\n return modelAndView(model, \"succ.hbs\");\n }, new HandlebarsTemplateEngine());\n\n\n\n //post methods\n post(\"/success\", (req, res) -> {\n Map<String, Object> model = new HashMap<>();\n String name = req.queryParams(\"name\");\n String health = req.queryParams(\"health\");\n String age = req.queryParams(\"age\");\n Endangered endangered = new Endangered(name, health, age);\n endangered.save();\n System.out.println(\"Please enter all input fields.\");\n return new ModelAndView(model,\"success.hbs\");\n }, new HandlebarsTemplateEngine());\n\n post(\"/wildlife\", (req, res) -> {\n Map<String, Object> model = new HashMap<>();\n String name = req.queryParams(\"name\");\n Animal animal = new Animal(name);\n animal.save();\n return new ModelAndView(model,\"ess.hbs\");\n }, new HandlebarsTemplateEngine());\n }",
"public static void main(String[] args) {\n SpringApplication.run(MyLotoApplication.class, args);\n }"
]
| [
"0.6004261",
"0.5628706",
"0.5625286",
"0.5622139",
"0.5614296",
"0.559085",
"0.5584702",
"0.55533594",
"0.55303353",
"0.552611",
"0.5484807",
"0.5388922",
"0.53704184",
"0.53525406",
"0.5338041",
"0.53187126",
"0.52893",
"0.5259612",
"0.5239195",
"0.52330214",
"0.5220908",
"0.52127635",
"0.518851",
"0.5180129",
"0.5174707",
"0.5162058",
"0.5139244",
"0.5131869",
"0.51304424",
"0.51025987",
"0.50728494",
"0.5060915",
"0.50603116",
"0.5043299",
"0.5000642",
"0.4997732",
"0.49918634",
"0.4991415",
"0.49889854",
"0.49846435",
"0.49773574",
"0.49567363",
"0.49564698",
"0.49513644",
"0.49406534",
"0.4932255",
"0.4929696",
"0.49130538",
"0.4904166",
"0.49022382",
"0.48995572",
"0.48993862",
"0.48975602",
"0.4891121",
"0.48817214",
"0.48732883",
"0.48728102",
"0.48691112",
"0.48660597",
"0.48639083",
"0.4855925",
"0.4853247",
"0.48527396",
"0.4852605",
"0.4841526",
"0.48377496",
"0.4832728",
"0.48326498",
"0.48271662",
"0.48149985",
"0.48125875",
"0.48109293",
"0.48090565",
"0.4808238",
"0.48077175",
"0.4801353",
"0.48004493",
"0.47953525",
"0.47922996",
"0.47883955",
"0.4788258",
"0.47852343",
"0.47801995",
"0.4780149",
"0.4771814",
"0.47569683",
"0.4756301",
"0.47550598",
"0.47534654",
"0.4752928",
"0.4752072",
"0.47513533",
"0.47492385",
"0.4736657",
"0.47337234",
"0.47303674",
"0.47287393",
"0.47237235",
"0.47226173",
"0.47213778",
"0.47208053"
]
| 0.0 | -1 |
Also sets name to last part of qualified name if name is null. | public void setQualifiedName(String newQualifiedName) {
String oldQualifiedName = qualifiedName;
qualifiedName = newQualifiedName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, B3backendPackage.B3_JAVA_IMPORT__QUALIFIED_NAME, oldQualifiedName, qualifiedName));
// set the name if not set (unless the qualified name is also null)
if(name == null && qualifiedName != null) {
int lastDot = qualifiedName.lastIndexOf('.');
if(lastDot < 0)
setName(qualifiedName);
else
setName(qualifiedName.substring(lastDot+1));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setName(String name)\n/* */ {\n/* 368 */ this.name = name;\n/* 369 */ this.fullName = name;\n/* 370 */ this.namespace = null;\n/* */ }",
"public void setName(String fullName, String namespace)\n/* */ {\n/* 381 */ int index = fullName.indexOf(':');\n/* 382 */ if ((namespace == null) || (index < 0)) {\n/* 383 */ this.name = fullName;\n/* */ } else {\n/* 385 */ this.name = fullName.substring(index + 1);\n/* */ }\n/* 387 */ this.fullName = fullName;\n/* 388 */ this.namespace = namespace;\n/* */ }",
"public void setNameInNamespace(String fullName) {\n this.fullName = fullName;\n }",
"public void setName(QName name)\n {\n this.name = name;\n }",
"public void setName(java.lang.String param) {\r\n localNameTracker = param != null;\r\n\r\n this.localName = param;\r\n }",
"public void setName(QName aName)\r\n {\r\n mName = aName;\r\n }",
"protected void setBaseNameFromName(String name) {\n int lastDot = name.lastIndexOf(\".\");\n this.baseName = (lastDot == -1) ? name : name.substring(0, lastDot);\n }",
"public void setName(java.lang.String name)\n {\n name_.setLength(0);\n name_.append(name);\n }",
"public void setName(String name0){\n\t\tname = name0;\n\t}",
"public void setName(java.lang.String param){\r\n localNameTracker = true;\r\n \r\n this.localName=param;\r\n \r\n\r\n }",
"public void setName(java.lang.String param){\r\n localNameTracker = true;\r\n \r\n this.localName=param;\r\n \r\n\r\n }",
"public void setName(java.lang.String param){\r\n localNameTracker = true;\r\n \r\n this.localName=param;\r\n \r\n\r\n }",
"public void setName(String name)\r\n\t{\r\n\t\tthis.name = name.trim();\r\n\t\tif(name.length() > 0)\r\n\t\t{\r\n\t\t this.sponsorFirstChar = Character.toLowerCase(name.charAt(0));\r\n\t\t}\r\n\t\t\r\n\t}",
"public void setName(String name)\n {\n if (name == null) {\n throw new IllegalArgumentException();\n }\n\n _name = truncateDefault(name);\n }",
"public static String mungeNamespace (String name) {\r\n\t\treturn name.replaceFirst(\"^([^:]*):\", \"_$1_\");\r\n\t}",
"public void setName(String name) {\n\t\tthis.name = name == null ? null : name.trim();\n\t}",
"public void setName(String name) {\n\t\tthis.name = name == null ? null : name.trim();\n\t}",
"public void setName(String name) {\n\t\tthis.name = name == null ? null : name.trim();\n\t}",
"public void setName(String name) {\r\n this.name = name == null ? null : name.trim();\r\n }",
"public void setName(String name) {\r\n this.name = name == null ? null : name.trim();\r\n }",
"public void setName(String name) {\r\n this.name = name == null ? null : name.trim();\r\n }",
"public void setName(String name) {\r\n this.name = name == null ? null : name.trim();\r\n }",
"public void setName(String name) {\r\n this.name = name == null ? null : name.trim();\r\n }",
"public void setName(String name) {\r\n this.name = name == null ? null : name.trim();\r\n }",
"public void setName(String name) {\r\n this.name = name == null ? null : name.trim();\r\n }",
"public void setName(String name) {\r\n this.name = name == null ? null : name.trim();\r\n }",
"public void setName(String name) {\r\n this.name = name == null ? null : name.trim();\r\n }",
"public void setName(String name) {\r\n this.name = name == null ? null : name.trim();\r\n }",
"String qualifiedName();",
"public void setName(java.lang.String param) {\r\n localNameTracker = true;\r\n\r\n this.localName = param;\r\n\r\n\r\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public void setName(String name) {\n this.name = name == null ? null : name.trim();\n }",
"public QualifiedName(final String namespace, final String name) {\n\t\tthis(namespace + name);\n\t}",
"public void setName(String name) {\n\t\tm_name = (name != null) ? name : \"\";\n\t}",
"public void setName(java.lang.String param) {\n localNameTracker = true;\n\n this.localName = param;\n }",
"public void setName(java.lang.String param) {\n localNameTracker = true;\n\n this.localName = param;\n }",
"public void setName(java.lang.String param) {\n localNameTracker = true;\n\n this.localName = param;\n }",
"private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }",
"public void setName(String name) {\n//\t\tif((name==null) || (name.length()<2)){\n//\t\t\tthrow new RuntimeException(\"Name muss mindestens 2 Zeichen enthalten!\");\n//\t\t}\n\t\tthis.name = name;\n\t}",
"public void setInternalName(String name);",
"public void setName(SimpleName name) {\n if (name == null) {\n throw new IllegalArgumentException();\n }\n ASTNode oldChild = this.methodName;\n preReplaceChild(oldChild, name, NAME_PROPERTY);\n this.methodName = name;\n postReplaceChild(oldChild, name, NAME_PROPERTY);\n }",
"public void setName (String name) \n\t{ \n\t\tif (name == null) WNet.ex(\"Names cannot be null\");\n\t\tif (name.contains(WNetConstants.LISTSEPARATORANDINVALIDNAMECHARACTER)) throw new Net2PlanException(\"Names cannot contain the character: \" + WNetConstants.LISTSEPARATORANDINVALIDNAMECHARACTER); \n\t\tif (getNet().getNodes().stream().anyMatch(n->n.getName().equals(name))) WNet.ex(\"Names cannot be repeated\");\n\t\tif (name.contains(\" \")) throw new Net2PlanException(\"Names cannot contain spaces\"); \n\t\tn.setName(name); \n\t}",
"private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }",
"private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }",
"private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }",
"public static String mangleQualifiedName(String name) {\n if (USE_SYMBOLIC)\n return mangleSymbolic(name, 'Q', false);\n else {\n StringBuilder sbuf = new StringBuilder();\n int prev = 0;\n for (;;) {\n int dot = name.indexOf('.', prev);\n String part =\n name.substring(prev, dot >= 0 ? dot : name.length());\n sbuf.append(mangleNameIfNeeded(part));\n if (dot < 0)\n break;\n prev = dot + 1;\n sbuf.append('.');\n }\n return sbuf.toString();\n }\n }",
"public final void setName(final GenericName name) {\n this.value = name.toString();\n final NameSpace scope = name.scope();\n if (scope != null && !scope.isGlobal()) {\n codeSpace = scope.name().toString();\n }\n }",
"public String setName(String name) {\r\n String oldName = myName;\r\n myName = (name == null ? \"\" : name);\r\n return oldName;\r\n }",
"private void setName(){\r\n\t\tString tagString = new String();\r\n\t\tfor (String k : tags.keySet()){\r\n\t\t\ttagString += \"@\" + k;\r\n\t\t}\r\n\t\tString newName = originalName + tagString +\".\"+ extension;\r\n\t\tif (!newName.equals(name)){\r\n\t\t\tremovePrevNames(newName); //if the new name is a previous name\r\n\t\t\taddPrevNames(name);\r\n\t\t\tupdateLog(newName);\r\n\t\t\tname = newName;\r\n\t\t\t//notify the tag observer\r\n\t\t\tsetChanged();\r\n\t\t\tnotifyObservers();\r\n\t\t\tclearChanged();\r\n\t\t}\r\n\t}",
"public void setName(final String name);",
"public void setName(String arg0) {\n\t\t\n\t}",
"public void setName(String first, String last) {\r\n // Bouml preserved body begin 00040F02\r\n\t firstName = first;\r\n\t lastName = last;\r\n // Bouml preserved body end 00040F02\r\n }",
"void setName(String name_);"
]
| [
"0.6959542",
"0.6821887",
"0.6278999",
"0.616833",
"0.60962445",
"0.6063088",
"0.60622466",
"0.6007692",
"0.59690446",
"0.59173733",
"0.59173733",
"0.59173733",
"0.5884539",
"0.5882195",
"0.5876858",
"0.5875542",
"0.5875542",
"0.5875542",
"0.58626056",
"0.58626056",
"0.58626056",
"0.58626056",
"0.58626056",
"0.58626056",
"0.58626056",
"0.58626056",
"0.58626056",
"0.58626056",
"0.58585143",
"0.5844717",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.58433986",
"0.5790648",
"0.5789643",
"0.5787067",
"0.5787067",
"0.5787067",
"0.5775588",
"0.5771727",
"0.57661945",
"0.57427424",
"0.5728228",
"0.5705198",
"0.5705198",
"0.5705198",
"0.56886107",
"0.56589764",
"0.56361896",
"0.56149346",
"0.5579844",
"0.557942",
"0.5569056",
"0.5567313"
]
| 0.0 | -1 |
Resolves the type (by asking the bundle to load the class having qualifiedName) if not already done. | public Type getType() {
if(type == null) {
try {
setType(B3BackendActivator.instance.getBundle().loadClass(getQualifiedName()));
} catch (ClassNotFoundException e) {
// TODO: ?? Need to handle this, so the "not found" surfaces to the user...
// Handled via model validation - type can not be null
}
}
return type;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"<T> T resolve(String name, Class<T> type);",
"public abstract Class resolveClass(GenerationContext context);",
"<T> T resolve(Class<T> type);",
"private @Nullable Type resolveType(@NotNull String typeName) {\n QnTypeRef typeRef = new QnTypeRef(Qn.fromDotSeparated(typeName));\n return (Type) typesResolver.resolve(typeRef);\n }",
"@Override\n protected Class<?> loadClass(String name, boolean resolve)\n throws ClassNotFoundException {\n Class<?> loadedClass = findLoadedClass(name);\n if (loadedClass == null) {\n try {\n if (_classLoader != null) {\n loadedClass = _classLoader.loadClass(name);\n }\n } catch (ClassNotFoundException ex) {\n // class not found in system class loader... silently skipping\n }\n\n try {\n // find the class from given jar urls as in first constructor parameter.\n if (loadedClass == null) {\n loadedClass = findClass(name);\n }\n } catch (ClassNotFoundException e) {\n // class is not found in the given urls.\n // Let's try it in parent classloader.\n // If class is still not found, then this method will throw class not found ex.\n loadedClass = super.loadClass(name, resolve);\n }\n }\n\n if (resolve) { // marked to resolve\n resolveClass(loadedClass);\n }\n return loadedClass;\n }",
"public PrimClass resolveClass(String name) {\n return findPrimClass(importFor(name));\n }",
"@Override\n public Class<?> loadLocalClass(String name, boolean resolve)\n throws ClassNotFoundException {\n synchronized(getParent()) {\n Class<?> clazz = findLoadedClass(name);\n\n if (clazz == null) {\n clazz = findClass(name);\n }\n\n if (resolve) {\n resolveClass(clazz);\n }\n\n return clazz;\n }\n }",
"@Override\n protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {\n // First, check if the class has already been loaded\n Class<?> c = findLoadedClass(name);\n if (c == null) {\n try {\n\n // Next, try to resolve it from the mutated path. \n c = super.findClass(name);\n } catch (ClassNotFoundException e) {\n // And if all else fails delegate to the parent.\n c = super.loadClass(name, resolve);\n }\n }\n if (resolve) {\n resolveClass(c);\n }\n return c;\n }",
"public Class<?> lookupClass(String name) throws ClassNotFoundException {\n return getClass().getClassLoader().loadClass(name);\n }",
"@Override\n public void resolveObjectIdentifier() {\n // if there is only one superclass, we could get the type\n if (!isObjectIDResolved()) {\n String classID = resolveTypeBinding(((SuperMethodInvocation) getASTNode()).getQualifier());\n if ((classID != null) && !classID.equals(\"\")) {\n setResolvedID(classID);\n }\n }\n }",
"boolean isResolvable(String name, Class<?> type);",
"@Nullable\n public static Class<?> tryGetCanonicalClass(String canonicalName, ClassLoader... loaders)\n {\n try\n {\n return Class.forName(canonicalName);\n }\n catch (ClassNotFoundException e)\n {\n try\n {\n ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();\n if (contextClassLoader == null)\n {\n return null;\n }\n return contextClassLoader.loadClass(canonicalName);\n }\n catch (ClassNotFoundException e2)\n {\n for (ClassLoader loader : loaders)\n {\n try\n {\n return loader.loadClass(canonicalName);\n }\n catch (ClassNotFoundException ignored)\n {\n }\n }\n return null;\n }\n }\n }",
"public synchronized Class<?> loadJPPFClass(String name) throws ClassNotFoundException\n\t{\n\t\ttry\n\t\t{\n\t\t\tif (debugEnabled) log.debug(\"looking up resource [\" + name + \"]\");\n\t\t\tClass<?> c = findLoadedClass(name);\n\t\t\tif (c != null)\n\t\t\t{\n\t\t\t\tClassLoader cl = c.getClassLoader();\n\t\t\t\tif (debugEnabled) log.debug(\"classloader = \" + cl);\n\t\t\t}\n\t\t\t/*\n\t\t\tif (c == null)\n\t\t\t{\n\t\t\t\tClassLoader parent = getParent();\n\t\t\t\tif (parent instanceof AbstractJPPFClassLoader) c = ((AbstractJPPFClassLoader) parent).findLoadedClass(name);\n\t\t\t}\n\t\t\t*/\n\t\t\tif (c == null)\n\t\t\t{\n\t\t\t\tif (debugEnabled) log.debug(\"resource [\" + name + \"] not already loaded\");\n\t\t\t\tc = findClass(name);\n\t\t\t}\n\t\t\tif (debugEnabled) log.debug(\"definition for resource [\" + name + \"] : \" + c);\n\t\t\treturn c;\n\t\t}\n\t\tcatch(NoClassDefFoundError e)\n\t\t{\n\t\t\tthrow e;\n\t\t}\n\t}",
"public TypeBinding resolveType(ClassScope scope) {\n\tthis.constant = Constant.NotAConstant;\n\tif (this.resolvedType != null) // is a shared type reference which was already resolved\n\t\treturn this.resolvedType.isValidBinding() ? this.resolvedType : null; // already reported error\n\n\tTypeBinding type = this.resolvedType = getTypeBinding(scope);\n\tif (this.resolvedType == null)\n\t\treturn null; // detected cycle while resolving hierarchy\t\n\tif (!this.resolvedType.isValidBinding()) {\n\t\treportInvalidType(scope);\n\t\treturn null;\n\t}\n\tif (isTypeUseDeprecated(this.resolvedType, scope))\n\t\treportDeprecatedType(scope);\n\ttype = scope.environment().convertToRawType(type);\n\tif (type.isRawType() \n\t\t\t&& (this.bits & IgnoreRawTypeCheck) == 0 \n\t\t\t&& scope.compilerOptions().getSeverity(CompilerOptions.RawTypeReference) != ProblemSeverities.Ignore) {\n\t\tscope.problemReporter().rawTypeReference((/*@OwnPar*/ /*@NoRep*/ TypeReference)this, type);\n\t}\t\t\t\n\treturn this.resolvedType = type;\t\n}",
"public synchronized Class<?> loadClass(String name, boolean resolve)\n throws ClassNotFoundException {\n Class c = findLoadedClass(name);\n if (c == null) {\n try {\n //Second, find my classes next\n if (name.startsWith(\"com.cyc.cycjava.cycl\")) {\n c = classNameToClassMap.get(name);\n if (c != null) {\n if (resolve) {\n resolveClass(c);\n }\n return c;\n }\n c = findClass(name);\n } else {\n throw new ClassNotFoundException(name);\n }\n } catch (ClassNotFoundException e) {\n //Finaly, only if not already loaded and not my class then load from default\n c = super.loadClass(name, false);\n }\n }\n if (c == null) {\n throw new ClassNotFoundException(name);\n }\n if (resolve) {\n resolveClass(c);\n }\n return c;\n }",
"default Object resolve(String name) {\n return resolve(name, Object.class);\n }",
"protected Class loadClass(String type) {\n try {\n return getClass().getClassLoader().loadClass(type);\n }\n catch (ClassNotFoundException e) {\n try {\n return Thread.currentThread().getContextClassLoader().loadClass(type);\n }\n catch (ClassNotFoundException e2) {\n try {\n return Class.forName(type);\n }\n catch (ClassNotFoundException e3) {\n }\n }\n throw new GroovyRuntimeException(\"Could not load type: \" + type, e);\n }\n }",
"@Override\n public Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {\n synchronized (getClassLoadingLock(name)){\n //First, check if the class has already been loaded\n Class<?> c = findLoadedClass(name);\n if(c == null){\n long t0 = System.nanoTime();\n try {\n //invoke findClass in this class\n c = findClass(name);\n }catch(ClassNotFoundException e){\n // ClassNotFoundException thrown if class not found\n }\n if(c == null){\n return super.loadClass(name, resolve);\n }\n //For compatibility with higher versions > java 1.8.0_141\n// sun.misc.PerfCounter.getFindClasses().addElapsedTimeFrom(t0);\n// sun.misc.PerfCounter.getFindClasses().increment();\n }\n if(resolve){\n resolveClass(c);\n }\n return c;\n }\n }",
"@Override\n public void onDiscovery(String typeName, ClassLoader classLoader, JavaModule module, boolean loaded) {\n }",
"Type buildType( ClassLoader classloader ) \r\n throws IntrospectionException, IOException;",
"public static void loadClass(String name) {\n\n }",
"public Class<?> loadClass(String fullClassName) {\n\ttry {\n\t return classLoader.loadClass(fullClassName);\n\t} catch (ClassNotFoundException e) {\n\t e.printStackTrace();\n\t return null;\n\t}\n }",
"@Override\n public String resolve(String path)\n {\n\n // strip classname\n path = path.substring(path.lastIndexOf(\"/\") + 1);\n\n return path;\n }",
"public org.omg.CORBA.Object resolve(String name)\n {\n NameComponent nc = new NameComponent(name, \"Object\");\n NameComponent path[] = {nc};\n org.omg.CORBA.Object objRef = null;\n try\n {\n objRef = namingContext.resolve(path);\n }\n catch (Exception e)\n {\n fatalError(\"Cound not get object with name \\\"\" + name +\n \"\\\" from NameService\", e);\n }\n return objRef;\n }",
"public static IInterfaceDefinition searchType(String unresolvedTypeName,\n\t\t\tEnvironment env)\n\t{\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Token\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))// c.rawName.equals(unresolvedTypeName))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all root productions\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Production\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all sub productions\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.SubProduction\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all alternatives\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Alternative\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup for all raw names no matter the type\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all with not raw name\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.classToType.get(cd) == ClassType.Custom)\n\t\t\t{\n\t\t\t\tif (checkName(cd, unresolvedTypeName, false, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (IClassDefinition c : env.getClasses())\n\t\t{\n\t\t\tif (c.getName().equals(unresolvedTypeName))\n\t\t\t{\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\n\t\tfor (IClassDefinition c : env.getClasses())\n\t\t{\n\t\t\tif (c.getName().getTag().equals(unresolvedTypeName))\n\t\t\t{\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\n\t\tfor (IInterfaceDefinition i : env.getInterfaces())\n\t\t{\n\t\t\tif (i.getName().getName().equals(unresolvedTypeName))\n\t\t\t\treturn i;\n\t\t}\n\n\t\treturn null;// \"%\" + type;\n\n\t}",
"@Override\n public JavaClass findClass(final String className) {\n final SoftReference<JavaClass> ref = loadedClasses.get(className);\n if (ref == null) {\n return null;\n}\n return ref.get();\n }",
"@Override synchronized public void resolve()\n{\n if (isResolved()) return;\n\n RebaseMain.logD(\"START RESOLVE\");\n for (RebaseJavaFile jf : file_nodes) {\n RebaseMain.logD(\"FILE: \" + jf.getFile().getFileName());\n }\n\n clearResolve();\n\n RebaseJavaTyper jt = new RebaseJavaTyper(base_context);\n RebaseJavaResolver jr = new RebaseJavaResolver(jt);\n jt.assignTypes(this);\n jr.resolveNames(this);\n\n all_types = new HashSet<RebaseJavaType>(jt.getAllTypes());\n\n setResolved(true);\n}",
"public PrimObject resolveObject(String name) {\n return findObject(importFor(name));\n }",
"private Class<?> loadClass(String className) {\n try {\n return Class.forName(className);\n } catch (ClassNotFoundException ignore) {\n return null;\n }\n }",
"public static Class<?> getCanonicalClass(String canonicalName, ClassLoader... loaders) throws IllegalArgumentException\n {\n try\n {\n return Class.forName(canonicalName);\n }\n catch (ClassNotFoundException e)\n {\n try\n {\n ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();\n if (contextClassLoader == null)\n {\n throw new IllegalArgumentException(\"Cannot find \" + canonicalName, e);\n }\n return contextClassLoader.loadClass(canonicalName);\n }\n catch (ClassNotFoundException e2)\n {\n e2.addSuppressed(e);\n for (ClassLoader loader : loaders)\n {\n try\n {\n return loader.loadClass(canonicalName);\n }\n catch (ClassNotFoundException ignored)\n {\n e2.addSuppressed(ignored);\n }\n }\n throw new IllegalArgumentException(\"Cannot find \" + canonicalName, e2);\n }\n }\n }",
"public abstract JavaType resolveType(java.lang.reflect.Type jdkType);",
"BundleType getType();",
"private static Class<?> tryName(String name) throws ClassNotFoundException {\n return Class.forName(name);\r\n }",
"@Override\n\tpublic BasicType resolveCastTargetType(String name) {\n\t\torg.hibernate.type.BasicType ormBasicType = (org.hibernate.type.BasicType) sessionFactory.getTypeHelper().heuristicType( name );\n\t\tif ( ormBasicType == null ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn resolveBasicType( ormBasicType.getReturnedClass() );\n\t}",
"static Identifier makeTypeClass(final QualifiedName name) {\r\n if (name == null) {\r\n return null;\r\n } else {\r\n return new Identifier(Category.TYPE_CLASS, name);\r\n }\r\n }",
"public Class<?> getClazz(ClassLoader loader);",
"public Class getReferenceClass(GenerationContext genContext) {\r\n return resolveClass(genContext);\r\n }",
"Class<?> readConcreteType();",
"public TypeBinding resolveType(BlockScope scope, boolean checkBounds) {\n\tthis.constant = Constant.NotAConstant;\n\tif (this.resolvedType != null) // is a shared type reference which was already resolved\n\t\treturn this.resolvedType.isValidBinding() ? this.resolvedType : null; // already reported error\n\n\tTypeBinding type = this.resolvedType = getTypeBinding(scope);\n\tif (this.resolvedType == null)\n\t\treturn null; // detected cycle while resolving hierarchy\t\n\tif (!this.resolvedType.isValidBinding()) {\n\t\treportInvalidType(scope);\n\t\treturn null;\n\t}\n\tif (isTypeUseDeprecated(this.resolvedType, scope))\n\t\treportDeprecatedType(scope);\n\ttype = scope.environment().convertToRawType(type);\n\tif (type.isRawType() \n\t\t\t&& (this.bits & IgnoreRawTypeCheck) == 0 \n\t\t\t&& scope.compilerOptions().getSeverity(CompilerOptions.RawTypeReference) != ProblemSeverities.Ignore) {\t\n\t\tscope.problemReporter().rawTypeReference((/*@OwnPar*/ /*@NoRep*/ TypeReference)this, type);\n\t}\t\t\t\n\treturn this.resolvedType = type;\n}",
"Type<?> get(String name);",
"@Override\n public void onComplete(String typeName, ClassLoader classLoader, JavaModule module, boolean loaded) {\n }",
"String getClazz();",
"public Class<?> getTargetType()\n/* */ {\n/* 266 */ if (this.resolvedTargetType != null) {\n/* 267 */ return this.resolvedTargetType;\n/* */ }\n/* 269 */ return this.targetType != null ? this.targetType.resolve() : null;\n/* */ }",
"static Object resolveGeneric (FXLocal.Context context, Type typ) {\n if (typ instanceof ParameterizedType) {\n ParameterizedType ptyp = (ParameterizedType) typ;\n Type raw = ptyp.getRawType();\n Type[] targs = ptyp.getActualTypeArguments();\n if (raw instanceof Class) {\n String rawName = ((Class) raw).getName();\n if (FXClassType.SEQUENCE_CLASSNAME.equals(rawName) &&\n targs.length == 1) {\n return new FXSequenceType(context.makeTypeRef(targs[0]));\n }\n if (FXClassType.OBJECT_VARIABLE_CLASSNAME.equals(rawName) &&\n targs.length == 1) {\n return context.makeTypeRef(targs[0]);\n }\n if (FXClassType.SEQUENCE_VARIABLE_CLASSNAME.equals(rawName) &&\n targs.length == 1) {\n return new FXSequenceType(context.makeTypeRef(targs[0]));\n }\n if (rawName.startsWith(FXClassType.FUNCTION_CLASSNAME_PREFIX)) {\n FXType[] prtypes = new FXType[targs.length-1];\n for (int i = prtypes.length; --i >= 0; )\n prtypes[i] = context.makeTypeRef(targs[i+1]);\n FXType rettype;\n if (targs[0] == java.lang.Void.class)\n rettype = FXPrimitiveType.voidType;\n else\n rettype = context.makeTypeRef(targs[0]);\n return new FXFunctionType(prtypes, rettype);\n }\n }\n \n typ = raw;\n }\n if (typ instanceof WildcardType) {\n WildcardType wtyp = (WildcardType) typ;\n Type[] upper = wtyp.getUpperBounds();\n Type[] lower = wtyp.getLowerBounds();\n typ = lower.length > 0 ? lower[0] : wtyp.getUpperBounds()[0];\n if (typ instanceof Class) {\n String rawName = ((Class) typ).getName();\n // Kludge, because generics don't handle primitive types.\n FXType ptype = context.getPrimitiveType(rawName);\n if (ptype != null)\n return ptype;\n }\n return context.makeTypeRef(typ);\n }\n if (typ instanceof GenericArrayType) {\n FXType elType = context.makeTypeRef(((GenericArrayType) typ).getGenericComponentType());\n return new FXJavaArrayType(elType);\n }\n if (typ instanceof TypeVariable) {\n // KLUDGE\n typ = Object.class;\n }\n return typ;\n }",
"@Override\n public Class<?> findClass(String className) throws ClassNotFoundException {\n try {\n return super.findClass(className);\n } catch (ClassNotFoundException e) {\n if (fallbackClassLoader != null) {\n Throwable prob = null;\n try {\n return classForName(className, true, fallbackClassLoader);\n } catch (Exception e1) {\n prob = ClassUtil.getRootCause(e1);\n throw new ClassNotFoundException(prob.getMessage(), prob);\n }\n }\n throw e;\n }\n }",
"public Type type(String name);",
"protected synchronized Class<?> loadClass(String paramString, boolean paramBoolean) throws ClassNotFoundException {\n/* 321 */ ReflectUtil.checkPackageAccess(paramString);\n/* 322 */ Class<?> clazz = findLoadedClass(paramString);\n/* 323 */ if (clazz == null) {\n/* */ try {\n/* 325 */ clazz = findClass(paramString);\n/* 326 */ } catch (ClassNotFoundException classNotFoundException) {}\n/* */ \n/* */ \n/* 329 */ if (clazz == null) {\n/* 330 */ clazz = getParent().loadClass(paramString);\n/* */ }\n/* */ } \n/* 333 */ if (paramBoolean) {\n/* 334 */ resolveClass(clazz);\n/* */ }\n/* 336 */ return clazz;\n/* */ }",
"@Override\n public abstract boolean needsResolving();",
"@Override\n public SymbolReference<ResolvedReferenceTypeDeclaration> tryToSolveType(String name) {\n try {\n return foundTypes.get(name, () -> {\n SymbolReference<ResolvedReferenceTypeDeclaration> result = tryToSolveTypeUncached(name);\n if (result.isSolved()) {\n return SymbolReference.solved(result.getCorrespondingDeclaration());\n }\n return result;\n });\n } catch (ExecutionException e) {\n throw new RuntimeException(e);\n }\n }",
"public String TypeOf(String name) {\n\t\tValues tmp = currScope.get(name);\n\t\t\n\t\tif(tmp != null)\n\t\t\treturn tmp.getType();\n\t\t\n\t\tif(currScope != classScope) {\n\t\t\ttmp = classScope.get(name);\n\t\t\tif(tmp != null)\n\t\t\t\treturn tmp.getType();\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"<T> T getPluginInstance(Class<T> type, String className, ClassLoader classLoader) throws PluginLoadingException;",
"boolean isResolvable(Class<?> type);",
"Class<? extends Resource> getResourceType();",
"public String getClazz();",
"@Override\n public TypeImpl getType(String typeName) {\n return typeName2TypeImpl.get(typeName);\n }",
"public Type handleTypeName(SourceLocation loc, Identifier name) {\n return lookupType(name, loc).getAliasType();\n }",
"@Override\n public SymbolReference<ReferenceTypeDeclaration>\n tryToSolveType(String name)\n {\n if (foundTypes.containsKey(name)) {\n return SymbolReference.solved(foundTypes.get(name));\n }\n \n SymbolReference<ReferenceTypeDeclaration> result\n = tryToSolveTypeUncached(name);\n \n if (result.isSolved()) {\n foundTypes.put(name, result.getCorrespondingDeclaration());\n }\n return result;\n }",
"ClassMapping_1_0 getClassMapping(\n String qualifiedClassName\n ) throws ServiceException;",
"protected Class< ? extends Object > findClass( String name ) throws ClassNotFoundException {\n\t\tfinal Class< ? extends Object > c = load_classes.get( name );\n\t\tif ( c == null ) throw new ClassNotFoundException();\n\t\treturn c;\n\t}",
"@Override\n public ClassInfo findClass(String fqcn) {\n if (classLookup == null) {\n buildClassLookupMap();\n }\n return classLookup.get(fqcn);\n }",
"public void loadClass(String name) throws InstantiationException, IllegalAccessException, ClassNotFoundException{\n\t\tSystem.out.println(\"Class object address \" + InspectClassLoader.class.hashCode());\n\t\tObject obj = getClass().getClassLoader().loadClass(\"InsideJVM.InspectClassLoader\").newInstance();\n\t\tSystem.out.println(\"Same class object: \" + (obj.getClass() == InspectClassLoader.class));\n\t\t\n\t\t// Class<?> object's class is ???\n\t\tClass<?> s = getClass().getClassLoader().loadClass(\"InsideJVM.InspectClassLoader\");\n\t\tSystem.out.println(s.getClass()); // output: java.land.Class\n\t\t\n\t\tSystem.out.println(\"class loader hashcode \" + getClass().getClassLoader().hashCode());\n\t}",
"public TypeBinding resolveSuperType(ClassScope scope) {\n\tif (resolveType(scope) == null) return null;\n\n\tif (this.resolvedType.isTypeVariable()) {\n\t\tthis.resolvedType = new ProblemReferenceBinding(getTypeName(), (ReferenceBinding) this.resolvedType, ProblemReasons.IllegalSuperTypeVariable);\n\t\treportInvalidType(scope);\n\t\treturn null;\n\t}\n\treturn this.resolvedType;\n}",
"Class<? extends JavaTypeMapping> getMappingType(String javaTypeName);",
"public String getClazzName();",
"private static String resolveQualifierFromTypeName(IType sigInterfaceType, String typeName) {\n\n\t\ttry {\n\n\t\t\tString[][] types = sigInterfaceType.resolveType(typeName);\n\t\t\tif (types != null) {\n\t\t\t\t// Returns the first candidate\n\t\t\t\tString qualifier = types[0][0];\n\t\t\t\t//\t\t\t\tString name = types[0][1];\n\t\t\t\treturn qualifier;\n\t\t\t}\n\t\t}\n\t\tcatch (JavaModelException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn null;\n\t}",
"protected Object resolve(String roleName) throws ComponentException \n\t{\n\t\treturn lookup(roleName);\n\t}",
"@Override\n\tpublic BasicType resolveBasicType(Class javaType) {\n\t\tBasicType basicType = basicTypeMap.get( javaType );\n\t\tif ( basicType == null ) {\n\t\t\tbasicType = new BasicTypeNonOrmImpl( javaType );\n\t\t\tbasicTypeMap.put( javaType, basicType );\n\t\t}\n\t\treturn basicType;\n\t}",
"String qualifiedName();",
"IArenaClass getClass(final String name);",
"public ClassEntity getTypeImport(String name)\n {\n // See if there is a normal import for the given name\n ClassEntity r = (ClassEntity) normalImports.get(name);\n if (r != null)\n return r;\n \n // There might be a suitable static import\n List l = (List) staticImports.get(name);\n if (l != null) {\n Iterator i = l.iterator();\n while (i.hasNext()) {\n r = (ClassEntity) i.next();\n try {\n r = (ClassEntity) r.getPackageOrClassMember(name);\n return r;\n }\n catch (SemanticException se) { }\n }\n }\n \n return null;\n }",
"private CatalogResolver getCatalogResolver() {\n\n if (catalogResolver == null) {\n\n AntClassLoader loader;\n // Memory-Leak in line below\n loader = getProject().createClassLoader(Path.systemClasspath);\n\n try {\n Class<?> clazz = Class.forName(APACHE_RESOLVER, true, loader);\n\n // The Apache resolver is present - Need to check if it can\n // be seen by the catalog resolver class. Start by getting\n // the actual loader\n ClassLoader apacheResolverLoader = clazz.getClassLoader();\n\n // load the base class through this loader.\n Class<?> baseResolverClass\n = Class.forName(CATALOG_RESOLVER, true, apacheResolverLoader);\n\n // and find its actual loader\n ClassLoader baseResolverLoader\n = baseResolverClass.getClassLoader();\n\n // We have the loader which is being used to load the\n // CatalogResolver. Can it see the ApacheResolver? The\n // base resolver will only be able to create the ApacheResolver\n // if it can see it - doesn't use the context loader.\n clazz = Class.forName(APACHE_RESOLVER, true, baseResolverLoader);\n\n Object obj = clazz.newInstance();\n //\n // Success! The xml-commons resolver library is\n // available, so use it.\n //\n catalogResolver = new ExternalResolver(clazz, obj);\n } catch (Throwable ex) {\n //\n // The xml-commons resolver library is not\n // available, so we can't use it.\n //\n catalogResolver = new InternalResolver();\n if (getCatalogPath() != null\n && getCatalogPath().list().length != 0) {\n log(\"Warning: XML resolver not found; external catalogs\"\n + \" will be ignored\", Project.MSG_WARN);\n }\n log(\"Failed to load Apache resolver: \" + ex, Project.MSG_DEBUG);\n }\n }\n return catalogResolver;\n }",
"Symbol resolve(String name);",
"public AssetClass findAssetClassByName(String name_);",
"ClassLoaderConfigType createClassLoaderConfigType();",
"public abstract jq_Type getDeclaredType();",
"public ClassEntity getTypeImportWC(String name)\n {\n // Try non-static wildcard imports first\n Iterator i = wildcardImports.iterator();\n \n while (i.hasNext()) {\n PackageOrClass importEntity = (PackageOrClass) i.next();\n try {\n PackageOrClass member = importEntity.getPackageOrClassMember(name);\n if (member.isClass()) {\n return (ClassEntity) member;\n }\n }\n catch (SemanticException se) { }\n }\n \n // Now try static wildcard imports\n i = staticWildcardImports.iterator();\n while (i.hasNext()) {\n ClassEntity importEntity = (ClassEntity) i.next();\n try {\n ClassEntity member = importEntity.getStaticMemberClass(name);\n return member;\n }\n catch (SemanticException se) { }\n }\n \n return null;\n }",
"protected Class findClass(final String name)\n\t\tthrows ClassNotFoundException\n\t{\n\t\t/* Protect the namespace */\n\t\tif (name.startsWith(\"java.\") ||\n\t\t\tname.startsWith(\"org.postgresql.pljava\"))\n\t\t{\n\t\t\tthrow new ClassNotFoundException(name); \n\t\t}\n\n\t\t/* Look to see if we have already loaded the class */\n\t\tClass c = findLoadedClass(name);\n\t\tif (c != null)\n\t\t\treturn c;\n\n\t\t/* Check for the class within our jar */\n\t\tString path = name.replace('.', '/').concat(\".class\");\n\t\tbyte[] entryImg = (byte[]) m_entries.get(path);\n\t\t\n\t\t/* If not found, raise an exception */\n\t\tif (entryImg == null)\n\t\t\tthrow new ClassNotFoundException(name);\n\n\t\t/* create a package for the class */\n\t\tdefinePackage(name);\n\n\t\t/* otherwise convert the image to a class and return it */\n\t\treturn defineClass(name, entryImg, 0, entryImg.length);\n\t}",
"public static Class<?> lenientClassForName(String className) throws ClassNotFoundException {\n try {\n return loadClass(className);\n } catch (ClassNotFoundException ignored) {\n // try replacing the last dot with a $, in case that helps\n // example: tutorial.Tutorial.Benchmark1 becomes tutorial.Tutorial$Benchmark1\n // amusingly, the $ character means three different things in this one line alone\n String newName = className.replaceFirst(\"\\\\.([^.]+)$\", \"\\\\$$1\");\n return loadClass(newName);\n }\n }",
"@Test\n public void fromMethodResolverAndType() {\n\n MethodResolver methodResolver = MethodResolver.fromType(Person.class);\n\n assertThat(methodResolver).isNotNull();\n assertThat(methodResolver.getReferenceType()).isEqualTo(Person.class);\n }",
"public abstract String resolve();",
"private Class loadClass(ClassInfo classInfo) {\n Class type = null;\n try {\n URLClassLoader classLoader = new URLClassLoader(new URL[]{\n new File(classInfo.getPath()).toURI().toURL()\n });\n type = classLoader.loadClass(classInfo.getName());\n } catch (MalformedURLException ex) {\n Logger.getLogger(CDIC.class.getName()).log(Level.SEVERE, \"Class url stimmt nicht. Ggf. hat der ClassIndexer einen falschen Pfad!\", ex);\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(CDIC.class.getName()).log(Level.SEVERE, \"Klasse konnte nicht gefunden werden!\", ex);\n }\n return type;\n }",
"public static Class<?> classForName(String className) throws ClassNotFoundException {\r\n Class<?> loaded = null;\r\n try {\r\n loaded = Thread.currentThread().getContextClassLoader().loadClass(className);\r\n } catch (ClassNotFoundException ex) {\r\n // retry using standard classloader\r\n loaded = DiagnoseUtil.class.getClassLoader().loadClass(className);\r\n }\r\n return loaded;\r\n }",
"private static <T> Class<T> m31778a(String str) {\n try {\n return Class.forName(str);\n } catch (Throwable th) {\n return null;\n }\n }",
"public interface LocalLoader {\n \n /**\n * Load a class which is locally defined by this loader.\n *\n * @param name the class name\n * @param resolve {@code true} to resolve the class\n * @return the class, or {@code null} if there is no local class with this name\n */\n Class<?> loadClassLocal(String name, boolean resolve);\n \n /**\n * Load a resource which is locally defined by this loader. The given name is a path separated\n * by \"{@code /}\" characters.\n *\n * @param name the resource path\n * @return the resource or resources, or an empty list if there is no local resource with this name\n */\n List<Resource> loadResourceLocal(String name);\n }",
"public Class<?> getAdaptedClazz() {\n if (adaptedClass == null) {\n return null;\n }\n\n try {\n return Class.forName(adaptedClass);\n } catch (final ClassNotFoundException e) {\n LOGGER.warn(\"class \\\"\" + adaptedClass + \"\\\" not found: \", e);\n return null;\n }\n }",
"public abstract Type getSpecializedType(Type type);",
"public abstract void resolve();",
"@Override\r\n\tprotected void doResolve() {\n\r\n\t}",
"public Object Resolve(Class typeToInject, String id)\r\n\t{\r\n\t\tif (typeToInject == null)\r\n\t\t{\r\n\t\t\t\t//raise exception\r\n\t\t}\r\n\t\tDependencyResolutionLocatorKey key = new DependencyResolutionLocatorKey(typeToInject, id);\r\n\r\n\t\tif (context.getLocator().contains(key))\r\n\t\t{\r\n\t\t\t//For InjectProxy to work the component should always exist whose proxy is requested\r\n\t\t\treturn context.getLocator().Get(key);\r\n\t\t}\r\n\t\telse\r\n\t\t{\t\r\n\t\t\tcontext.getPolicies().set(new ProxyPatternPolicy(false),typeToInject, id);\r\n\t\t\tcontext.getPolicies().set(new SingletonPolicy(true),typeToInject, id);\r\n\t\t\treturn context.getHeadOfChain().BuildUp(context, typeToInject, null, key.getID());\r\n\t\t}\r\n\t}",
"@Override\n public Object getValue(@NotNull final Object adaptable, final String name, @NotNull final Type type,\n @NotNull final AnnotatedElement element, @NotNull final DisposalCallbackRegistry callbackRegistry) {\n if (!modelsImplConfiguration.isRequestThreadLocal()) {\n return null;\n }\n\n // only class types are supported\n if (!(type instanceof Class<?>)) {\n return null;\n }\n Class<?> requestedClass = (Class<?>)type;\n\n // validate input\n if (adaptable instanceof ResourceResolver) {\n ResourceResolver resourceResolver = (ResourceResolver)adaptable;\n if (requestedClass.equals(ResourceResolver.class)) {\n return resourceResolver;\n }\n }\n else if (adaptable instanceof Resource) {\n Resource resource = (Resource)adaptable;\n if (requestedClass.equals(ResourceResolver.class)) {\n return resource.getResourceResolver();\n }\n if (requestedClass.equals(Resource.class) && element.isAnnotationPresent(SlingObject.class)) {\n return resource;\n }\n }\n SlingHttpServletRequest request = getRequest(adaptable);\n if (request != null) {\n if (requestedClass.equals(ResourceResolver.class)) {\n return request.getResourceResolver();\n }\n if (requestedClass.equals(Resource.class) && element.isAnnotationPresent(SlingObject.class)) {\n return request.getResource();\n }\n if (requestedClass.equals(SlingHttpServletRequest.class) || requestedClass.equals(HttpServletRequest.class)) {\n return request;\n }\n if (requestedClass.equals(SlingHttpServletResponse.class) || requestedClass.equals(HttpServletResponse.class)) {\n return getSlingHttpServletResponse(request);\n }\n if (requestedClass.equals(SlingScriptHelper.class)) {\n return getSlingScriptHelper(request);\n }\n }\n\n return null;\n }",
"public JavaType _findRemappedType(DeserializationConfig config, Class<?> rawType) throws JsonMappingException {\n JavaType type = mapAbstractType(config, config.constructType(rawType));\n if (type == null || type.hasRawClass(rawType)) {\n return null;\n }\n return type;\n }",
"private Class<?> loadClass(final ClassLoader lastLoader, final String className) {\n Class<?> clazz;\n if (lastLoader != null) {\n try {\n clazz = lastLoader.loadClass(className);\n if (clazz != null) {\n return clazz;\n }\n } catch (final Exception ex) {\n // Ignore exception.\n }\n }\n try {\n clazz = Thread.currentThread().getContextClassLoader().loadClass(className);\n } catch (final ClassNotFoundException e) {\n try {\n clazz = Class.forName(className);\n } catch (final ClassNotFoundException e1) {\n try {\n clazz = getClass().getClassLoader().loadClass(className);\n } catch (final ClassNotFoundException e2) {\n return null;\n }\n }\n }\n return clazz;\n }",
"HxType createReference(final HxType resolvedType);",
"String resolveClassPath(String classPath);",
"static Class loadClass(String name,\n Object fallbackClass) throws ClassNotFoundException {\n ClassLoader loader = getCurrentLoader(fallbackClass);\n return loader.loadClass(name);\n }",
"public Class<?> findClass(String name) throws ClassNotFoundException\n\t{\n\t\ttry\n\t\t{\n\t\t\tLOCK.lock();\n\t\t\tint i = name.lastIndexOf('.');\n\t\t\tif (i >= 0)\n\t\t\t{\n\t\t\t\tString pkgName = name.substring(0, i);\n\t\t\t\tPackage pkg = getPackage(pkgName);\n\t\t\t\tif (pkg == null)\n\t\t\t\t{\n\t\t\t\t\tdefinePackage(pkgName, null, null, null, null, null, null, null);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (debugEnabled) log.debug(\"looking up definition for resource [\" + name + \"]\");\n\t\t\tbyte[] b = null;\n\t\t\tString resName = name.replace('.', '/') + \".class\";\n\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\tmap.put(\"name\", resName);\n\t\t\tJPPFResourceWrapper resource = loadResourceData(map, false);\n\t\t\tif (resource == null) throw new ClassNotFoundException(\"could not find reosurce \" + name);\n\t\t\tb = resource.getDefinition();\n\t\t\tif ((b == null) || (b.length == 0))\n\t\t\t{\n\t\t\t\tif (debugEnabled) log.debug(\"definition for resource [\" + name + \"] not found\");\n\t\t\t\tthrow new ClassNotFoundException(\"Could not load class '\" + name + \"'\");\n\t\t\t}\n\t\t\tif (debugEnabled) log.debug(\"found definition for resource [\" + name + \", definitionLength=\" + b.length + \"]\");\n\t\t\treturn defineClass(name, b, 0, b.length);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tLOCK.unlock();\n\t\t}\n\t}",
"public static Class classForName(String nameClass)\n\t\t{\n\t\t\tClass classObject=null;\n\t\t\ttry {\n\t\t\tclassObject = Class.forName(\"com.spring.entity.\"+nameClass);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t\treturn classObject;\n\t\t}",
"public interface LoadClass {\n\n /**\n * Returns the {@link ObjectType} of the referenced class or interface that may be loaded and resolved.\n *\n * @param cpg A ConstantPoolGen\n * @return object type that may be loaded or null if a primitive is referenced\n */\n ObjectType getLoadClassType(ConstantPoolGen cpg);\n\n /**\n * Returns the type associated with this instruction. LoadClass instances are always typed, but this type does not always refer to the type of the class or\n * interface that it possibly forces to load. For example, {@link GETFIELD} would return the type of the field and not the type of the class where the field\n * is defined. If no class is forced to be loaded, {@code null} is returned. An example for this is an {@link NEWARRAY} instruction that creates an\n * {@code int[][]}.\n *\n * @param cpg A ConstantPoolGen\n * @return the type associated with this instruction.\n * @see #getLoadClassType(ConstantPoolGen)\n */\n Type getType(ConstantPoolGen cpg);\n}",
"protected static synchronized Class<?> reverseOrDefault(String value) throws ClassNotFoundException{\n\t\tif (ClassRegistry.xmlprimitives.containsKey(value))\n\t\t\treturn ClassRegistry.xmlprimitives.get(value);\n\t\telse if (ClassRegistry.dictionary.containsValue(value))\n\t\t\treturn ClassRegistry.dictionary.reverse(value);\n\t\telse\n\t\t\treturn Class.forName(value);\n\t}",
"private Class m16122a(String str) {\n try {\n return Class.forName(str);\n } catch (ClassNotFoundException unused) {\n return null;\n }\n }"
]
| [
"0.68828636",
"0.6656609",
"0.6543494",
"0.65356964",
"0.6206672",
"0.619688",
"0.6040788",
"0.5954442",
"0.5934863",
"0.5872204",
"0.58321095",
"0.57799846",
"0.56711805",
"0.5663258",
"0.56263995",
"0.5581157",
"0.5563363",
"0.5553264",
"0.5515824",
"0.55119675",
"0.5509461",
"0.55056095",
"0.5480623",
"0.5465528",
"0.5459135",
"0.5448745",
"0.5371711",
"0.5363798",
"0.5357008",
"0.53568244",
"0.5356418",
"0.52792156",
"0.52683026",
"0.52590775",
"0.5249725",
"0.52350605",
"0.5213029",
"0.5205214",
"0.51846313",
"0.5149102",
"0.5146868",
"0.5142596",
"0.5140555",
"0.5134529",
"0.51330435",
"0.51319325",
"0.512815",
"0.5107132",
"0.5104196",
"0.50993603",
"0.5080016",
"0.5074771",
"0.50681925",
"0.50592303",
"0.50514513",
"0.5046087",
"0.5041703",
"0.50396365",
"0.5032778",
"0.5022066",
"0.501671",
"0.5001021",
"0.499193",
"0.4988095",
"0.49798524",
"0.49344033",
"0.49297464",
"0.49049693",
"0.4894961",
"0.48838243",
"0.4871599",
"0.48706532",
"0.48694658",
"0.4860835",
"0.4859263",
"0.4856494",
"0.48511368",
"0.48457947",
"0.48407432",
"0.48396167",
"0.48378414",
"0.48365435",
"0.48342752",
"0.48324025",
"0.48263174",
"0.4823411",
"0.48211765",
"0.48134494",
"0.4812205",
"0.4803997",
"0.48030257",
"0.48005503",
"0.48005143",
"0.47912437",
"0.47912145",
"0.4789858",
"0.47891468",
"0.47769976",
"0.4775614",
"0.47704953"
]
| 0.60881275 | 6 |
Date object for time measurements / Constructor | Message(String clientID, String message, int msgResendTime) {
this.clientID = clientID;
this.message = message;
this.msgResendTime = msgResendTime;
nextMessage = null;
messageID = ++messageIDCounter;
date = new Date();
clientsRequestsList = new HashMap<String, Date>();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DateTime(Date date,Time12 time)\n {\n\t\tthis.date=date;\n\t\tthis.time=time;\n }",
"public MyDate(long inElapsedTime)\n {\n //put in logic here\n elapsedTime = inElapsedTime;\n this.setDate(elapsedTime);\n }",
"public Date() {\r\n }",
"public MyDate(){\n this.day = 0;\n this.month = 0;\n this.year = 0;\n }",
"public Date(){\n\t\tyear=0;\n\t\tmonth=0;\n\t\tday=0;\n\t}",
"public Sad(){\n\t\tthis.date = new Date(System.currentTimeMillis());\n\t}",
"public DateTime(Date date) {\r\n\t\tthis.timeString = YYYY_MMT_DD_T_HH_MM_SS_FORMATTER.format(date);\r\n\t}",
"public ClockTime(Date d) {\n super(Property.CLOCKTIME_PROPERTY);\n calValue = Calendar.getInstance();\n calValue.setTimeInMillis(d.getTime());\n normalize();\n }",
"public CinemaDate() {\n }",
"public Date() {\r\n\t\tGregorianCalendar c = new GregorianCalendar();\r\n\t\tmonth = c.get(Calendar.MONTH) + 1; // our month starts from 1\r\n\t\tday = c.get(Calendar.DAY_OF_MONTH);\r\n\t\tyear = c.get(Calendar.YEAR);\r\n\t}",
"public ShortDate(final long time) {\n super(time);\n }",
"public DateTime() {\n setCharacteristic(null);\n setYear(1582);\n setMonth(0);\n setDay(1);\n setHours(0);\n setMinutes(0);\n setSeconds(0);\n }",
"public DERUTCTime(java.util.Date time) {\n\t}",
"public Time() {\n this(System.currentTimeMillis());\n }",
"public Time() {\r\n\t\tsecond = (System.currentTimeMillis() / 1000) % 60;\r\n\t\tminute = (System.currentTimeMillis() / 1000) / 60 % 60;\r\n\t\thour = ((System.currentTimeMillis() / 1000) / 3600) % 24;\r\n\t}",
"protected Time() {\n\t}",
"public Timestamp() {\n makeNow();\n }",
"public Timestamp() {\n crtime = System.currentTimeMillis() ;\n }",
"public Date(String dateType, int year, int month, int day, int hour,\r\n\t\t\tint min, int sec) throws BogusDataException\r\n\t{\r\n\t\tsuper(dateType, \"\");\r\n\t\t// code below by Jeremy//\r\n\t\tthis.dateType = dateType;\r\n\t\t// code above by Jeremy//\r\n\t\tthis.year = year;\r\n\t\tthis.month = month;\r\n\t\tthis.day = day;\r\n\t\tthis.hour = hour;\r\n\t\tthis.minute = min;\r\n\t\tthis.second = sec;\r\n\t\tthis.dateOnly = false;\r\n\r\n\t\tString yearStr, monthStr, dayStr, hourStr, minStr, secStr;\r\n\r\n\t\tyearStr = \"\" + year;\r\n\t\tmonthStr = \"\" + month;\r\n\t\tdayStr = \"\" + day;\r\n\t\thourStr = \"\" + hour;\r\n\t\tminStr = \"\" + min;\r\n\t\tsecStr = \"\" + sec;\r\n\r\n\t\twhile (yearStr.length() < 4)\r\n\t\t\tyearStr = '0' + yearStr;\r\n\t\tif (monthStr.length() < 2)\r\n\t\t\tmonthStr = '0' + monthStr;\r\n\t\tif (dayStr.length() < 2)\r\n\t\t\tdayStr = '0' + dayStr;\r\n\t\tif (hourStr.length() < 2)\r\n\t\t\thourStr = '0' + hourStr;\r\n\t\tif (minStr.length() < 2)\r\n\t\t\tminStr = '0' + minStr;\r\n\t\tif (secStr.length() < 2)\r\n\t\t\tsecStr = '0' + secStr;\r\n\r\n\t\t// TODO: use StringBuffer to speed this up\r\n\t\t// TODO: validate values\r\n\t\tvalue = yearStr + monthStr + dayStr + 'T' + hourStr + minStr + secStr;\r\n\r\n\t\t// Add attribute that says date has a time\r\n\t\taddAttribute(\"VALUE\", \"DATE-TIME\");\r\n\t}",
"public MyDate(int inYear, int inDay, int inMonth)\n {\n year = inYear;\n day = inDay;\n month = inMonth;\n }",
"public Coursetime() {\n\t}",
"public Date(String dateType, int year, int month, int day, int hour,\r\n\t\t\tint min, int sec, int ehour, int emin, int esec)\r\n\t\t\tthrows BogusDataException\r\n\t{\r\n\t\tsuper(dateType, \"\");\r\n\r\n\t\tthis.dateType = dateType;\r\n\t\tthis.year = year;\r\n\t\tthis.month = month;\r\n\t\tthis.day = day;\r\n\t\tthis.hour = hour;\r\n\t\tthis.minute = min;\r\n\t\tthis.second = sec;\r\n\t\tthis.ehour = ehour;\r\n\t\tthis.eminute = emin;\r\n\t\tthis.esecond = esec;\r\n\t\tthis.dateOnly = false;\r\n\r\n\t\tString yearStr, monthStr, dayStr, hourStr, minStr, secStr, ehourStr, eminStr, esecStr;\r\n\r\n\t\tyearStr = \"\" + year;\r\n\t\tmonthStr = \"\" + month;\r\n\t\tdayStr = \"\" + day;\r\n\t\thourStr = \"\" + hour;\r\n\t\tminStr = \"\" + min;\r\n\t\tsecStr = \"\" + sec;\r\n\t\tehourStr = \"\" + ehour;\r\n\t\teminStr = \"\" + emin;\r\n\t\tesecStr = \"\" + esec;\r\n\r\n\t\twhile (yearStr.length() < 4)\r\n\t\t\tyearStr = '0' + yearStr;\r\n\t\tif (monthStr.length() < 2)\r\n\t\t\tmonthStr = '0' + monthStr;\r\n\t\tif (dayStr.length() < 2)\r\n\t\t\tdayStr = '0' + dayStr;\r\n\t\tif (hourStr.length() < 2)\r\n\t\t\thourStr = '0' + hourStr;\r\n\t\tif (minStr.length() < 2)\r\n\t\t\tminStr = '0' + minStr;\r\n\t\tif (secStr.length() < 2)\r\n\t\t\tsecStr = '0' + secStr;\r\n\t\tif (ehourStr.length() < 2)\r\n\t\t\tehourStr = '0' + ehourStr;\r\n\t\tif (eminStr.length() < 2)\r\n\t\t\teminStr = '0' + eminStr;\r\n\t\tif (esecStr.length() < 2)\r\n\t\t\tesecStr = '0' + esecStr;\r\n\r\n\t\t// TODO: use StringBuffer to speed this up\r\n\t\t// TODO: validate values\r\n\t\tvalue = yearStr + monthStr + dayStr + 'T' + hourStr + minStr + secStr\r\n\t\t\t\t+ ehourStr + eminStr + esecStr;\r\n\r\n\t\t// Add attribute that says date has a time\r\n\t\taddAttribute(\"VALUE\", \"DATE-TIME\");\r\n\t}",
"public ShortDate(final Date date) {\n super(date.getTime());\n }",
"public Date date() {\n return new Date(this.msec);\n }",
"public ClockTime(Timestamp d) {\n super(Property.CLOCKTIME_PROPERTY);\n calValue = Calendar.getInstance();\n calValue.setTimeInMillis(d.getTime());\n normalize();\n }",
"public DateTime() {\n this((BusinessObject) null);\n }",
"protected Time(Date dateTime) throws ArgumentException {\n\t\tthis.setHours(dateTime.getHours());\n\t\tthis.setMinutes(dateTime.getMinutes());\n\t\tthis.setSeconds(dateTime.getSeconds());\n\t}",
"public MyDate(){\t\n\t\tthis(\"00/00/0000\");\n\t}",
"public CinemaDate(String m, String d, String t) {\n this.month = m;\n this.day = d;\n this.time = t;\n }",
"public Clock()\n {\n hour = 11;\n min = 28;\n sec = 12;\n }",
"private TimeUtil() {}",
"public HiResDate getTime();",
"public abstract Date getStartTime();",
"public DateTime(final BusinessObject parent) {\n super(parent);\n if (clock == null) {\n throw new ApplicationException(\"Clock not set up\");\n }\n setValue(new java.util.Date(clock.getTime()));\n isNull = false;\n }",
"Data() {\n\t\t// dia = 01;\n\t\t// mes = 01;\n\t\t// ano = 1970;\n\t\tthis(1, 1, 1970); // usar um construtor dentro de outro\n\t}",
"public Date(int d, int m, int a) {\n\t\tthis.dia = d;\n\t\tthis.mes = m;\n\t\tthis.ano = a;\n\t}",
"public Timestamp() {}",
"public DateUtil ()\n {\n\n }",
"public FillDate() {\n }",
"public void init( Object date,\n Object time)\n {\n leftOperand = (ValueNode) date;\n rightOperand = (ValueNode) time;\n operator = \"timestamp\";\n methodName = \"getTimestamp\";\n }",
"public TimedEvent(String label, Date date, Time time) {\n super(label, date); // using the constructor of its superclass\n this.setTime(time); // assigns the time argument value to the attribute\n }",
"public Date (final Integer d, final Integer m, final Integer y) throws CGException {\n\n try {\n setSentinel();\n }\n catch (Exception e){\n\n e.printStackTrace(System.out);\n System.out.println(e.getMessage());\n }\n if (!this.pre_Date(d, m, y).booleanValue()) \n UTIL.RunTime(\"Run-Time Error:Precondition failure in Date\");\n {\n\n day = UTIL.NumberToInt(UTIL.clone(d));\n month = UTIL.NumberToInt(UTIL.clone(m));\n year = UTIL.NumberToInt(UTIL.clone(y));\n }\n }",
"@Override\n public Timepoint getTime() {\n return new StandardTimepoint(getTimeInternal(), NANO);\n }",
"public abstract Timestamp getDate();",
"public Watch(){ //Watch Constuctor\r\n super(); //Values passed in from the super class\r\n month = 1; //Initialize month to 1\r\n day = 1; //Initialize day to 1\r\n year = 1980; //Initialize year to 1980\r\n}",
"public TimeStamp(){\n\t\tdateTime = LocalDateTime.now();\n\t}",
"public Mood(Date date) {\n this.date = date;\n }",
"private ARXDate() {\r\n this(\"Default\");\r\n }",
"DateTime getTime();",
"public Time4() \r\n { \r\n this.setTime( 0, 0, 0 ); \r\n }",
"public Date(int month, int day) {\r\n this.month = month;\r\n this.day = day;\r\n }",
"public static AbsTime factory(Date date)\n {\n return new AbsTime(date);\n }",
"public Geotemporal() {\n }",
"public DateTime(int year, int month, int date) {\r\n\t\tCalendar calendar = createCalendar(year, month, date);\r\n\t\tthis.timeString = YYYY_MM_DD_FORMATTER.format(calendar.getTime());\r\n\t}",
"public DateTime(\n int year,\n int month,\n int day,\n int hours,\n int minutes,\n int seconds) {\n setCharacteristic(null);\n setYear(year);\n setMonth(month);\n setDay(day);\n setHours(hours);\n setMinutes(minutes);\n setSeconds(seconds);\n }",
"public TimeSeriesTally() {\n\tsuper();\n\tfPrevTime = 0.0;\n }",
"public DateAndTime(int hour, int minute, int second, int month, int day, int year) \n { \n if (hour < 0 || hour >= 24)\n throw new IllegalArgumentException(\"hour must be 0-23\");\n\n if (minute < 0 || minute >= 60)\n throw new IllegalArgumentException(\"minute must be 0-59\");\n\n if (second < 0 || second >= 60)\n throw new IllegalArgumentException(\"second must be 0-59\");\n\n this.hour = hour;\n this.minute = minute; \n this.second = second; \n \n // check if month in range\n if (month <= 0 || month > 12)\n throw new IllegalArgumentException(\n \"month (\" + month + \") must be 1-12\");\n\n // check if day in range for month\n if (day <= 0 || \n (day > daysPerMonth[month] && !(month == 2 && day == 29)))\n throw new IllegalArgumentException(\"day (\" + day + \n \") out-of-range for the specified month and year\");\n\n // check for leap year if month is 2 and day is 29\n if (month == 2 && day == 29 && !(year % 400 == 0 || \n (year % 4 == 0 && year % 100 != 0)))\n throw new IllegalArgumentException(\"day (\" + day +\n \") out-of-range for the specified month and year\");\n\n // check for nonnegative years\n if (year < 0)\n {\n \t throw new IllegalArgumentException(\"year (\" + year + \n \t\t\") must be greater than 0\");\n }\n this.month = month;\n this.day = day;\n this.year = year;\n\n System.out.printf(\n \"DateAndTime object constructor for DateAndTime %s%n\", this);\n }",
"public TimeDataItem(Date time, double value) {\n this(time, new Double(value));\n }",
"public ClockTime(Calendar d) {\n super(Property.CLOCKTIME_PROPERTY);\n calValue = Calendar.getInstance();\n calValue.setTimeInMillis(d.getTimeInMillis());\n normalize();\n }",
"public SampleSummary(Date date) {\n this.date = date;\n }",
"public SleepObject() {\n date = new Date();\n }",
"protected GeometricObject() \n\t{\n\t\tdateCreated = new java.util.Date();\n\t}",
"public abstract double calculateStartTime();",
"public Game() {\n this.date = LocalDateTime.now();\n }",
"public TimeDataItem(Date time, Number value) {\n if (time == null) {\n throw new NullPointerException();\n }\n this.time = time;\n this.value = value;\n }",
"abstract public int getTime();",
"public void setDateAndTime(int d,int m,int y,int h,int n,int s);",
"public RestaurantTime (){\r\n\t\topenTime = new int[] {0000};\r\n\t\tcloseTime = new int[] {2359};\r\n\t}",
"public Date(int m, int d, int y) {\n\t\t\n\t\tmonth = m;\n\t\tday = d;\n\t\tyear = y;\n\t\t\n\t}",
"public double getTime();",
"public Date(int day, int month, int year) {\r\n this.day = day;\r\n this.month = month;\r\n this.year = year;\r\n\r\n }",
"public GeometricObject() {\n dateCreated = new java.util.Date();\n }",
"public ExceptionDate(){\n\t\tsuper();\n\t}",
"public SweDate() {\n\t\tCalendar cal = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n\t\tsetFields(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.DAY_OF_MONTH),\n\t\t\t\tcal.get(Calendar.HOUR_OF_DAY) + cal.get(Calendar.MINUTE) / 60. + cal.get(Calendar.SECOND) / 3600.\n\t\t\t\t\t\t+ cal.get(Calendar.MILLISECOND) / 3600000.,\n\t\t\t\tSE_GREG_CAL);\n\t}",
"private DateUtil(){\n\n }",
"public EatTime() {\n }",
"public Time(){\r\n Seconds = 0; \r\n }",
"public HISDate(Date date) {\r\n DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, Locale.GERMAN);\r\n Calendar cal = df.getCalendar();\r\n cal.setTime(date);\r\n this.year = cal.get(Calendar.YEAR);\r\n //logger.debug(\"year = \" + year);\r\n this.month = cal.get(Calendar.MONTH) + 1;\r\n //logger.debug(\"month = \" + month);\r\n this.day = cal.get(Calendar.DAY_OF_MONTH);\r\n //logger.debug(\"day = \" + day);\r\n this.weekday = cal.get(Calendar.DAY_OF_WEEK);\r\n this.weekOfYear = cal.get(Calendar.WEEK_OF_YEAR);\r\n this.weekOfMonth = cal.get(Calendar.WEEK_OF_MONTH);\r\n }",
"public TimeDataItem(Date time, byte value) {\n this(time, new Byte(value));\n }",
"public DateHourFeatureFact(long timeInMillis) {\n super(timeInMillis, constraint);\n }",
"public DateTime(final BusinessObject parent, final int year, final int month, final int day, final int hour, final int minute, final int second) {\n super(parent);\n setValue(year, month, day, hour, minute, second);\n isNull = false;\n }",
"public TimeDataItem(Date time, long value) {\n this(time, new Long(value));\n }",
"Date getDate();",
"Date getDate();",
"Date getDate();",
"public CtRecord() {\n fill(0, MODES.CHRONO, false, false, false, false, null, null, TIME_DEFAULT_VALUE, TIME_DEFAULT_VALUE, TIME_DEFAULT_VALUE, TIME_DEFAULT_VALUE, TIME_DEFAULT_VALUE, getMidnightTimeMillis());\n }",
"public Timestamp getDateStart();",
"final public synchronized Date getDate() {\n return new Date(crtime) ;\n }",
"protected abstract T create(final double idealStartTime);",
"public Rates() {\n }",
"public MetalNode(int date1){\n date = date1;\n }",
"public DateTime(String showName, String date, String startTime, String endTime) throws ParseException //Constructor.\n\t{//Start Constructor.\n\t\tthis.showName = showName;//Initializes the show name variable.\n\t\tthis.date = convertDate(date);//Initializes the date variable.\n\t\tthis.startTime = convertTime(startTime);//Initializes the start time variable.\n\t\tthis.endTime = convertTime(endTime);//Initializes the end time variable.\n\t}",
"public Date getDateObject(){\n \n Date date = new Date(this.getAnio(), this.getMes(), this.getDia());\n return date;\n }",
"public Sad(Date date) {\n super(date);\n }",
"private DateUtil() {\n\t}",
"private DateUtil() {\n\t}",
"public CTime() {\n\t\n}",
"public double getStartTime();",
"@Override\n\tpublic void initDate() {\n\n\t}",
"private Date getTestListingDateTimeStamp() {\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/London\"));\n\n GregorianCalendar calendar = new GregorianCalendar(2010, 0, 1, 17, 0);\n return new Date(calendar.getTimeInMillis());\n }",
"public Date(int day, Month month, int year){\n\tif (day > 0 && day <= month.nbJours(year)){\n\t this.day = day;\n\t}\t\n\tthis.month = month;\n\tif (year > 0){\n\t this.year = year;\n\t}\n }"
]
| [
"0.71027565",
"0.7034192",
"0.6979561",
"0.69565606",
"0.6917742",
"0.67542374",
"0.67336977",
"0.67228967",
"0.66114885",
"0.65608025",
"0.65501624",
"0.64996374",
"0.6488088",
"0.64825976",
"0.6438478",
"0.64347446",
"0.63856184",
"0.63820386",
"0.6360521",
"0.6353015",
"0.63431",
"0.6328175",
"0.63276154",
"0.6323577",
"0.6320342",
"0.63108706",
"0.63087505",
"0.63031286",
"0.6278276",
"0.62732464",
"0.6272972",
"0.6265547",
"0.6227294",
"0.618979",
"0.61708593",
"0.61704564",
"0.6149814",
"0.6142238",
"0.61367977",
"0.6130845",
"0.612797",
"0.61251676",
"0.6099634",
"0.6091744",
"0.60804105",
"0.6074886",
"0.60696083",
"0.60578007",
"0.60552245",
"0.6023453",
"0.60205287",
"0.60047853",
"0.5991433",
"0.5987255",
"0.5978832",
"0.59775823",
"0.59719324",
"0.5940882",
"0.5937678",
"0.59346324",
"0.5934253",
"0.59250706",
"0.5920235",
"0.59161824",
"0.5904483",
"0.5901101",
"0.5901039",
"0.589967",
"0.5893985",
"0.58867264",
"0.58863914",
"0.58753115",
"0.587151",
"0.5854499",
"0.5845113",
"0.5840601",
"0.58318",
"0.5828596",
"0.58276457",
"0.57993865",
"0.5798127",
"0.57947713",
"0.5794735",
"0.5794735",
"0.5794735",
"0.5790965",
"0.57853204",
"0.5783934",
"0.5783885",
"0.5780851",
"0.57778823",
"0.57762504",
"0.57736486",
"0.57728654",
"0.5772039",
"0.5772039",
"0.5767916",
"0.5767429",
"0.57648456",
"0.576292",
"0.57603484"
]
| 0.0 | -1 |
/ This method returns a message object only if the specified client doesn't request it already or the request is past the messageresendtime | public Message getValidMessage(String clientID) {
Date tempDate = new Date();
Message tempMessage = null;
if (!clientsRequestsList.containsKey(clientID)) {
clientsRequestsList.put(clientID, tempDate); // Request from unknown client-ID: Put new client-ID and current request timestamp into HashMap
tempMessage = this;
} else {
if (((tempDate.getTime() - clientsRequestsList.get(clientID).getTime()) / 1000) >= msgResendTime) {
clientsRequestsList.remove(clientID); // Request of client-ID is past the message-resend-time, so delete old entry and
clientsRequestsList.put(clientID, tempDate); // refresh HashMap with a new entry: Put same client-ID but new request timestamp into HashMap
tempMessage = this;
}
}
return tempMessage;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized ClientMessage readClientMessage(){\n while ( !currClient.isUpdatingClientMessage() ) {\n try {\n wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n currClient.setUpdateClientMessage(false);\n return currClient.getClientMessage();\n }",
"public static ClientResponse sendAndReceive(KafkaClient client, ClientRequest request, Time time) throws IOException {\n try {\n client.send(request, time.milliseconds());\n while (client.active()) {\n List<ClientResponse> responses = client.poll(Long.MAX_VALUE, time.milliseconds());\n for (ClientResponse response : responses) {\n if (response.requestHeader().correlationId() == request.correlationId()) {\n if (response.wasDisconnected()) {\n throw new IOException(\"Connection to \" + response.destination() + \" was disconnected before the response was read\");\n }\n if (response.versionMismatch() != null) {\n throw response.versionMismatch();\n }\n return response;\n }\n }\n }\n throw new IOException(\"Client was shutdown before response was read\");\n } catch (DisconnectException e) {\n if (client.active())\n throw e;\n else\n throw new IOException(\"Client was shutdown before response was read\");\n\n }\n }",
"public boolean hasMessage(){\r\n return this.receivedMessages.size()>0;\r\n }",
"Message(String clientID, String message, int msgResendTime) {\n this.clientID = clientID;\n this.message = message;\n this.msgResendTime = msgResendTime;\n nextMessage = null;\n messageID = ++messageIDCounter;\n date = new Date();\n clientsRequestsList = new HashMap<String, Date>();\n }",
"Boolean isChatMessageExpiredDelivery(String msgId);",
"boolean isServerMessage();",
"ChatWithServer.Req getChatWithServerReq();",
"@Override\n\tpublic boolean isReceiving() {\n\t\t// set remotely, so we need to call botinfo()\n\t\tif (botinfo().getLastReceivedMessage() < clock.currentTimeMillis() - 10000) {\n\t\t\tthrow new NotFoundException();\n\t\t}\n\t\treturn true;\n\t}",
"boolean hasReceiveTime();",
"Message getCurrentMessage();",
"private ArrayList<Message> getMyMessages(String requestId, String msg){\n\n ArrayList<Message> myMessages = new ArrayList<Message>();\n long elapsedTime = 0;\n int i = 1;\n long startTime = System.currentTimeMillis();\n do{\n try{\n Thread.sleep(100);\n elapsedTime = System.currentTimeMillis() - startTime;\n if(elapsedTime >= 5000*i){ \n //resend message from client at 5 seconds interval, ensuring that client receives an answer if server is down \n multicast.sendMessage(msg);\n i++;\n }\n } catch(Exception e){\n System.out.print(e);\n }\n myMessages.addAll(getMessagesByRequestId(requestId));\n } while (myMessages.size() < 2 && (elapsedTime < 1000 || myMessages.size() <= 0) && elapsedTime < 30000);\n return myMessages;\n }",
"public ch.iec.tc57._2011.schema.message.RequestMessageType getRequestMessage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n ch.iec.tc57._2011.schema.message.RequestMessageType target = null;\n target = (ch.iec.tc57._2011.schema.message.RequestMessageType)get_store().find_element_user(REQUESTMESSAGE$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"@Override\n\tpublic void onClientMessage(ClientThread client, String msg) {\n\t\ttry {\n\t\t\tlockClients.readLock().lock();\n\t\t\tLocalDateTime now = LocalDateTime.now();\n\t\t\tString toSend = \"[\"+dtf.format(now)+\"] \"+client.getClientName()+\" : \"+msg;\n\t\t\tfor (ClientThread ct : this.clients) {\n\t\t\t\tct.sendMessage(toSend);\n\t\t\t}\n\t\t\taddToHistory(toSend);\n\t\t} finally {\n\t\t\tlockClients.readLock().unlock();\n\t\t}\n\t}",
"public void onRecieve(RoundTimeMessage message) {\n\n\n }",
"public static ReqIsntCertainSender get(Object senderObject) { return new ReqIsntCertainSender(senderObject); }",
"Message getPreviousMessage();",
"private boolean deliverLocally(ClientMessage cm) {\n ClientConnection c = connections.getClient(cm.getTarget());\n\n if (c == null) {\n if (meslogger.isDebugEnabled()) {\n meslogger.debug(\"Cannot find client address locally: \"\n + cm.getTarget());\n }\n return false;\n }\n\n if (meslogger.isDebugEnabled()) {\n\n if (cm.returnToSender) {\n meslogger\n .debug(\"Attempting to directly return message to sender \"\n + cm.sourceAsString());\n } else {\n meslogger\n .debug(\"Attempting to directly forward message to client \"\n + cm.targetAsString());\n }\n }\n\n // We found the target, so lets forward the message\n boolean result = c.forwardClientMessage(cm);\n\n if (result) {\n stats.infoMessagesDelivered++;\n } else {\n stats.infoMessagesFailed++;\n }\n\n if (meslogger.isDebugEnabled()) {\n if (cm.returnToSender) {\n meslogger.debug(\"Directly return message to sender \"\n + cm.sourceAsString()\n + (result ? \" succeeded!\" : \"failed!\"));\n } else {\n meslogger.debug(\"Directly forwarding message to client \"\n + cm.targetAsString()\n + (result ? \" succeeded!\" : \"failed!\"));\n }\n }\n\n return result;\n }",
"public RequestMessage getMessage() {\r\n return message;\r\n }",
"private static boolean isQueuingExpired(TransportMessage message) {\n long now = new Date().getTime();\n long deadline = message.getQueuingDeadline();\n return (deadline > now);\n }",
"private void receiveClientMessage() throws IOException {\n mRemoteClientMessage = lengthValueRead(in, ClientMessage.class);\n \n if (mRemoteClientMessage == null) {\n setExchangeStatus(Status.ERROR);\n setErrorMessage(\"Remote client message was not received.\");\n throw new IOException(\"Remote client message not received.\");\n }\n\n if (mRemoteClientMessage.messages == null) {\n setExchangeStatus(Status.ERROR);\n setErrorMessage(\"Remote client messages field was null\");\n throw new IOException(\"Remote client messages field was null\");\n }\n\n mMessagesReceived = mRemoteClientMessage.messages;\n }",
"@Override\n public void react(@NotNull ClientConnection client) throws IOException {\n String[] params = message.getHeader().split(\" \");\n if( params.length != getMessagesSize || client.getClientID() == null )\n return ;\n int roomID = Integer.parseInt(params[1]);\n List<String> messages = UserRequests.getMessagesFromRoom(roomID, nMessage);\n if (messages == null) return;\n assert client.getStreamMessage() != null;\n client.getStreamMessage().write(\n new Message(getMessagesType + \" \" + roomID, messages));\n }",
"private static PluginMessageRecipient getThroughWhomSendMessage() {\n\t\treturn Remain.getOnlinePlayers().isEmpty() ? Bukkit.getServer() : Remain.getOnlinePlayers().iterator().next();\n\t}",
"private boolean isReqTimeFresh(Date reqTime, String username) {\r\n\t\tDate oldReqTime = oldRequestTimes.get(username); \r\n\t\tif(oldReqTime!= null && oldReqTime.equals(reqTime))\r\n\t\t\tthrow new RuntimeException(\"This request has been sent before.\");\r\n\t\t\r\n\t\tDate current = new Date();\r\n\t\treturn current.getTime() - 750 < reqTime.getTime() && reqTime.getTime() < current.getTime() + 750;\r\n\t}",
"public String getClientMessage() {\n return message;\n }",
"public ChatWithServer.Req getChatWithServerReq() {\n return instance.getChatWithServerReq();\n }",
"public boolean hasReqMessage() {\n return fieldSetFlags()[1];\n }",
"boolean hasSendTime();",
"public boolean hasNewMessage() throws RemoteException {\r\n return !messages.isEmpty();\r\n }",
"public boolean getIsMessage()\n {\n return isMessage;\n }",
"Single<WebClientServiceRequest> whenSent();",
"Single<WebClientServiceRequest> whenSent();",
"protected boolean isRepeateMessage(IMessage message, String queueId) {\n boolean isOrigOffsetLong = message.getMessageBody().getBoolean(WindowCache.ORIGIN_QUEUE_IS_LONG);\n String oriQueueId = message.getMessageBody().getString(WindowCache.ORIGIN_QUEUE_ID);\n String oriOffset = message.getMessageBody().getString(WindowCache.ORIGIN_OFFSET);\n String key = MapKeyUtil.createKey(window.getConfigureName(), queueId, oriQueueId);\n String offset = this.split2MaxOffsets.get(key);\n if (offset != null) {\n MessageOffset messageOffset = new MessageOffset(oriOffset, isOrigOffsetLong);\n if (!messageOffset.greateThan(offset)) {\n System.out.println(\"the message offset is old, the message is discard \");\n return true;\n }\n }\n return false;\n }",
"private void returnResponse(Message message) {\n boolean needToRespond = false;\n synchronized (lock) {\n if (!answered) {\n answered = true;\n needToRespond = true;\n }\n }\n if (needToRespond) {\n // Stop the timer!\n cancelTimer();\n returnResponse(listener, responseQueue, message, id);\n }\n }",
"public boolean isSelfMessage(BeginSendEntry beginSendEntry);",
"boolean hasMessage();",
"boolean hasMessage();",
"boolean hasMessage();",
"boolean hasMessage();",
"boolean hasMessage();",
"boolean hasMessage();",
"boolean hasMessage();",
"boolean hasMessage();",
"private static Player getThroughWhomSendMessage() {\n\t\treturn Remain.getOnlinePlayers().isEmpty() ? null : Remain.getOnlinePlayers().iterator().next();\n\t}",
"@RequestMapping(\"/message/{id}\")\n public Message messageById(@PathVariable String id, HttpServletRequest request)\n throws UserNotInMessageAudienceException, PrematureMessageException, ExpiredMessageException, MessageNotFoundException {\n\n String isMemberOfHeader = request.getHeader(\"isMemberOf\");\n Set<String> groups =\n isMemberOfHeaderParser.groupsFromHeaderValue(isMemberOfHeader);\n User user = new User();\n user.setGroups(groups);\n\n Message message = messagesService.messageByIdForUser(id, user);\n\n if (null == message) {\n throw new MessageNotFoundException();\n }\n\n return message;\n }",
"private final Message m43299g(ApiMessage apiMessage) {\n String id = apiMessage.getId();\n if (id == null) {\n throw new IllegalStateException(\"Required value was null.\".toString());\n }\n String matchId = apiMessage.getMatchId();\n if (matchId == null) {\n throw new IllegalStateException(\"Required value was null.\".toString());\n }\n String to = apiMessage.getTo();\n if (to == null) {\n throw new IllegalStateException(\"Required value was null.\".toString());\n }\n String from = apiMessage.getFrom();\n if (from == null) {\n throw new IllegalStateException(\"Required value was null.\".toString());\n }\n String message = apiMessage.getMessage();\n if (message == null) {\n throw new IllegalStateException(\"Required value was null.\".toString());\n }\n DateTime a = m43292a(apiMessage.getSentDate());\n DeliveryStatus deliveryStatus = DeliveryStatus.SUCCESS;\n ApiActivityFeedItem activityFeed = apiMessage.getActivityFeed();\n ActivityFeedItem a2 = activityFeed != null ? this.f35455e.m43066a(activityFeed) : null;\n StringBuilder stringBuilder;\n if (a2 == null) {\n stringBuilder = new StringBuilder();\n stringBuilder.append(\"Invalid activity feed item: \");\n stringBuilder.append(apiMessage.getActivityFeed());\n C0001a.b(new IllegalStateException(stringBuilder.toString()));\n return (Message) new TextMessage(null, id, matchId, to, from, message, a, false, false, deliveryStatus, 1, null);\n } else if (!C8696o.m37148b(a2)) {\n return (Message) new ActivityMessage(null, id, matchId, to, from, message, a, false, false, deliveryStatus, a2, 1, null);\n } else {\n stringBuilder = new StringBuilder();\n stringBuilder.append(\"Activity feed item with unknown activity event: \");\n stringBuilder.append(apiMessage.getActivityFeed());\n C0001a.b(new IllegalStateException(stringBuilder.toString()));\n return (Message) new TextMessage(null, id, matchId, to, from, message, a, false, false, deliveryStatus, 1, null);\n }\n }",
"protected ParseObject createMessage() {\n //format single variables appropriatly. most cases the field is an array\n ArrayList<ParseUser> nextDrinker = new ArrayList<ParseUser>();\n nextDrinker.add(mNextDrinker);\n ArrayList<String> groupName = new ArrayList<String>();\n groupName.add(mGroupName);\n\n ParseObject message = new ParseObject(ParseConstants.CLASS_MESSAGES);\n message.put(ParseConstants.KEY_SENDER_ID, ParseUser.getCurrentUser().getObjectId());\n message.put(ParseConstants.KEY_SENDER, ParseUser.getCurrentUser());\n message.put(ParseConstants.KEY_GROUP_ID, mGroupId);\n message.put(ParseConstants.KEY_GROUP_NAME, groupName);\n message.put(ParseConstants.KEY_SENDER_NAME, ParseUser.getCurrentUser().getUsername());\n message.put(ParseConstants.KEY_RECIPIENT_IDS, nextDrinker);\n message.put(ParseConstants.KEY_MESSAGE_TYPE, ParseConstants.TYPE_DRINK_REQUEST);\n\n return message;\n }",
"ChatRecord.Req getChatRecordReq();",
"Message getNextMessage();",
"private List<TOMMessage> getRequestsToRelay() {\n\n List<TOMMessage> messages = lcManager.getCurrentRequestTimedOut();\n\n if (messages == null) {\n\n messages = new LinkedList<>();\n }\n\n // Include requests from STOP messages in my own STOP message\n List<TOMMessage> messagesFromSTOP = lcManager.getRequestsFromSTOP();\n if (messagesFromSTOP != null) {\n\n for (TOMMessage m : messagesFromSTOP) {\n\n if (!messages.contains(m)) {\n\n messages.add(m);\n }\n }\n }\n\n logger.debug(\"I need to relay \" + messages.size() + \" requests\");\n\n return messages;\n }",
"public static void doClientMessageSend() {\n\t\tfinal String correlationId = \"ABC123\";\n\t\tMessage toSend = new Message(\"query message to server\", correlationId);\n\n\t\tMessagingSystemInfo messagingSystemInfo = oneAgentSDK.createMessagingSystemInfo(\"myCreativeMessagingSystem\",\n\t\t\t\t\"theOnlyQueue\", MessageDestinationType.QUEUE, ChannelType.TCP_IP, \"localhost:4711\");\n\n\t\t// sending the request:\n\t\t{\n\t\t\tOutgoingMessageTracer outgoingMessageTracer = oneAgentSDK.traceOutgoingMessage(messagingSystemInfo);\n\t\t\toutgoingMessageTracer.start();\n\t\t\ttry {\n\t\t\t\t// transport the Dynatrace tag along with the message to allow the outgoing message tracer to be linked\n\t\t\t\t// with the message processing tracer on the receiving side\n\t\t\t\ttoSend.setHeaderField(OneAgentSDK.DYNATRACE_MESSAGE_PROPERTYNAME, outgoingMessageTracer.getDynatraceStringTag());\n\t\t\t\ttheQueue.send(toSend);\n\t\t\t\toutgoingMessageTracer.setVendorMessageId(toSend.getMessageId()); // optional payload\n\t\t\t\toutgoingMessageTracer.setCorrelationId(toSend.correlationId);\n\t\t\t} catch (Exception e) {\n\t\t\t\toutgoingMessageTracer.error(e.getMessage());\n\t\t\t} finally {\n\t\t\t\toutgoingMessageTracer.end();\n\t\t\t}\n\t\t}\n\n\t\t// waiting for server response message:\n\t\t{\n\t\t\tIncomingMessageReceiveTracer receivingMessageTracer = oneAgentSDK.traceIncomingMessageReceive(messagingSystemInfo);\n\t\t\treceivingMessageTracer.start();\n\t\t\ttry {\n\t\t\t\tMessage answer = theQueue.receive(correlationId);\n\t\t\t\t\n\t\t\t\tIncomingMessageProcessTracer processMessageTracer = oneAgentSDK.traceIncomingMessageProcess(messagingSystemInfo);\n\t\t\t\t// retrieve Dynatrace tag created using the outgoing message tracer to link both sides together\n\t\t\t\tprocessMessageTracer.setDynatraceStringTag(answer.getHeaderField(OneAgentSDK.DYNATRACE_MESSAGE_PROPERTYNAME));\n\t\t\t\tprocessMessageTracer.setVendorMessageId(answer.msgId);\n\t\t\t\tprocessMessageTracer.setCorrelationId(answer.correlationId);\n\t\t\t\tprocessMessageTracer.start();\n\t\t\t\ttry {\n\t\t\t\t\t// handle answer message in sync way ...\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tprocessMessageTracer.error(e.getMessage());\n\t\t\t\t} finally {\n\t\t\t\t\tprocessMessageTracer.end();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\treceivingMessageTracer.error(e.getMessage());\n\t\t\t} finally {\n\t\t\t\treceivingMessageTracer.end();\n\t\t\t}\n\t\t}\n\t}",
"private MessageType processMessage(MessageType message) {\n\t\tJSONObject messageJSON = (JSONObject) message;\n\t\tJSONObject timestamp = messageJSON.getJSONObject(\"timestamp\");\n\t\t\n\t\t//complete timestamp\n\t\tint globalState = messagequeue.size();\n\t\tDate nowDate = new Date();\n\t\tString globalClock = String.valueOf(nowDate.getTime());\n\t\ttimestamp.element(\"srn\", globalState);\n\t\ttimestamp.element(\"globalClock\", globalClock);\n\t\t\n\t\tmessageJSON.element(\"timestamp\", timestamp);\n\t\treturn (MessageType) messageJSON;\n\t}",
"void requestRebuildNextTime(String message);",
"@objid (\"d089f797-963a-472b-9102-e08e9087b6cd\")\n EList<CommunicationMessage> getStartToEndMessage();",
"@Override\n public boolean messagePending() {\n return commReceiver.messagePending();\n }",
"public boolean message( Who sender, Message msg ) throws Exception;",
"public Message getLastMessage(Context ctx) {\n return DBHandler.getInstance(ctx).getLastMessageFromMatch(getId());\n }",
"public boolean isWaitingFor( int clientId )\n {\n return clientId != myId && waitList.contains( clientId );\n }",
"public String getRequestMessage()\r\n/* 34: */ {\r\n/* 35:26 */ return this.requestMessage;\r\n/* 36: */ }",
"private static boolean isTimeCancelable(ClientReservedTime clientReservedTime) {\n\t\t//Reserved time can be canceled until 1 hour before time is reached\n\t\ttry {\n\t\t\treturn clientReservedTime\n .getGregorianDateTime()\n .minusHours(ConfigurationParameter.couldBeCanceledPeriod)\n .isAfter(LocalDateTime.now());\n\t\t}catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean request() {\n if (connection == null) {\n return false;\n }\n String json = new JsonBuilder(getRequestMessage()).getJson();\n if (UtilHelper.isEmptyStr(json)) {\n return false;\n }\n return connection.sendMessage(json);\n }",
"boolean hasClientRequest();",
"public double getClientTime() {\n return clientTime_;\n }",
"boolean hasReceived();",
"protected Message obtainMessage(int responseMessage, Object response) {\n\t\tMessage message = null;\n\t\tif(mHandler != null) {\n\t\t\tmessage = mHandler.obtainMessage(responseMessage, response);\n\t\t} else {\n\t\t\tmessage = Message.obtain();\n\t\t\tmessage.what = responseMessage;\n\t\t\tmessage.obj = response;\n\t\t}\n\t\treturn message;\n\t}",
"public double getClientTime() {\n return clientTime_;\n }",
"public Message receive() {\n\t\t\n\t\tsynchronized(recvQueue) {\n\t\t\tif(!recvQueue.isEmpty()) {\n\t\t\t\tMessage popMsg = recvQueue.remove();\n\t\t\t\t/* add ClockService */\n\t\t\t\tTimeStampedMessage msg = (TimeStampedMessage)popMsg;\n//System.out.println(\"new Debug sentence\");\n//msg.dumpMsg();\n\t\t\t\tthis.clockSer.updateTS(msg.getMsgTS());\n\t\t\t\tthis.clockSer.addTS(this.localName);\n\t\t\t\t/* */\n\n\t\t\t\treturn popMsg;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"private boolean messageIsNew( byte[] messageID ){\n \tsynchronized( this.messageIDs ){\n \t\tfor (int i = 0; i < messageIDs.size(); i++) {\n if (Arrays.equals(messageIDs.get(i), messageID)) {\n Log.d(TAG, \"Message already recieved, ID: \" + messageID[0]);\n return false;\n }\n }\n \t}\n \treturn true;\n }",
"@Override\n\tpublic boolean isOwnMessage() {\n\t\ttry {\n\t\t\treturn (this.user.id == AccountManager.current_account.getUser().id);\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"public static SmsMmsMessage getRecentMessage(Context context, SmsMmsMessage ignoreMessage) {\r\n \t\tlong ignoreThreadId = 0;\r\n \r\n \t\tif (ignoreMessage != null) {\r\n \t\t\tignoreThreadId = ignoreMessage.getThreadId();\r\n \t\t}\r\n \r\n \t\tSmsMmsMessage smsMessage = getSmsDetails(context, ignoreThreadId);\r\n \t\tSmsMmsMessage mmsMessage = getMmsDetails(context, ignoreThreadId);\r\n \r\n \t\tif (mmsMessage == null && smsMessage != null) {\r\n \t\t\treturn smsMessage;\r\n \t\t}\r\n \r\n \t\tif (mmsMessage != null && smsMessage == null) {\r\n \t\t\treturn mmsMessage;\r\n \t\t}\r\n \r\n \t\tif (mmsMessage != null && smsMessage != null) {\r\n \t\t\tif (mmsMessage.getTimestamp() < smsMessage.getTimestamp()) {\r\n \t\t\t\treturn mmsMessage;\r\n \t\t\t}\r\n \t\t\treturn smsMessage;\r\n \t\t}\r\n \r\n \t\treturn null;\r\n \t}",
"org.spin.grpc.util.ClientRequest getClientRequest();",
"private Message onMessageReceived(String message, DecentSocket origin) {\n\t\tGson gson = new Gson();\n\t\tJsonObject messageObj = JsonParser.parseString(message).getAsJsonObject();\n\t\t//Timestamp member required for all messages\n\t\tif(messageObj.has(\"timestamp\")) {\n\t\t\tString type = messageObj.get(\"type\").getAsString();\n\t\t\tswitch(type) {\n\t\t\t\tcase \"chat\":\n\t\t\t\t\tchatMessageCallback.apply(gson.fromJson(message, ChatMessage.class), origin);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"peerAsk\":\n\t\t\t\t\treturn onPeerAskMessageReceived(gson.fromJson(message, PeerAskMessage.class), origin);\n\t\t\t\tcase \"peers\":\n\t\t\t\t\treturn onPeersMessageReceived(gson.fromJson(message, PeersMessage.class), origin);\n\t\t\t\tcase \"ping\":\n\t\t\t\t\treturn onPingMessageReceived(gson.fromJson(message, PingMessage.class), origin);\n\t\t\t\tcase \"pong\":\n\t\t\t\t\treturn onPongMessageReceived(gson.fromJson(message, PongMessage.class), origin);\n\t\t\t\tcase \"historyAsk\":\n\t\t\t\t\treturn onHistoryAskMessageReceived(gson.fromJson(message, HistoryAskMessage.class), origin);\n\t\t\t\tcase \"history\":\n\t\t\t\t\treturn onHistoryMessageReceived(gson.fromJson(message, HistoryMessage.class), origin);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n public MessageWrapper[] onMsgReceive(MSGInviteRequest recMessage, Player sender) {\n if (playerLobbyMap.get(sender) == null)\n return null;\n\n Set<Player> playersToSend = new HashSet<>();\n\n for (String s : recMessage.getPlayers()) {\n Player playerToSend = new Player(s);\n\n // ensure player isn't in a lobby\n if (playerLobbyMap.get(playerToSend) == null) {\n playersToSend.add(playerToSend);\n }\n }\n\n Message msg = new MSGInviteNotify(\n lobbyMap.inverse().get(playerLobbyMap.get(sender)));\n\n return MessageWrapper.prepWraps(new MessageWrapper(\n msg, playersToSend));\n }",
"public ch.iec.tc57._2011.schema.message.RequestMessageType addNewRequestMessage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n ch.iec.tc57._2011.schema.message.RequestMessageType target = null;\n target = (ch.iec.tc57._2011.schema.message.RequestMessageType)get_store().add_element_user(REQUESTMESSAGE$0);\n return target;\n }\n }",
"protected byte[] getNextMessage(){\n if (messages.size() > 0) {\n byte message[] = messages.get(0).clone();\n messages.remove(0);\n return message;\n } else {\n return null;\n }\n \n }",
"boolean hasUserMessage();",
"public Date getLastSendRequestTime()\r\n {\r\n return lastSendRequestTime;\r\n }",
"boolean hasSender();",
"boolean hasSender();",
"boolean hasSender();",
"boolean hasSender();",
"boolean hasSender();",
"boolean hasSender();",
"public void broadcastExceptMe(Client client, String msg) {\n for (Client c : sockets) {\n if (c == client) {\n continue;\n }\n c.sendMessage(msg);\n }\n }",
"double getClientTime();",
"@Nullable\n public OnlineMeeting get() throws ClientException {\n return send(HttpMethod.GET, null);\n }",
"abstract public SentinelHttpMessageAtk getLastAttackMessage();",
"@Override\n\tpublic void consume(Message message) {\n\t\tif (!AMQ_CONTENT_TYPE_JSON_GET.equals(message.getStringProperty(AMQ_CONTENT_TYPE)))\n\t\t\treturn;\n\n\t\tJson node = Util.readBodyBuffer(message.toCore());\n\t\tString correlation = message.getStringProperty(Config.AMQ_CORR_ID);\n\t\tString destination = message.getStringProperty(Config.AMQ_REPLY_Q);\n\n\t\t// deal with diff format\n\t\tif (node.has(CONTEXT) && (node.has(GET))) {\n\t\t\tif (logger.isDebugEnabled())\n\t\t\t\tlogger.debug(\"GET msg: {}\", node.toString());\n\t\t\tString ctx = node.at(CONTEXT).asString();\n\t\t\tString jwtToken = null;\n\t\t\tif (node.has(SignalKConstants.TOKEN) && !node.at(SignalKConstants.TOKEN).isNull()) {\n\t\t\t\tjwtToken = node.at(SignalKConstants.TOKEN).asString();\n\t\t\t}\n\t\t\tString root = StringUtils.substringBefore(ctx, dot);\n\t\t\troot = Util.sanitizeRoot(root);\n\n\t\t\t// limit to explicit series\n\t\t\tif (!vessels.equals(root) && !CONFIG.equals(root) && !sources.equals(root) && !resources.equals(root)\n\t\t\t\t\t&& !aircraft.equals(root) && !sar.equals(root) && !aton.equals(root) && !ALL.equals(root)) {\n\t\t\t\ttry {\n\t\t\t\t\tsendReply(destination, FORMAT_FULL, correlation, Json.object(), jwtToken);\n\t\t\t\t\treturn;\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlogger.error(e, e);\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tString qUuid = StringUtils.substringAfter(ctx, dot);\n\t\t\tif (StringUtils.isBlank(qUuid))\n\t\t\t\tqUuid = \"*\";\n\t\t\tArrayList<String> fullPaths = new ArrayList<>();\n\n\t\t\ttry {\n\t\t\t\tNavigableMap<String, Json> map = new ConcurrentSkipListMap<>();\n\t\t\t\tfor (Json p : node.at(GET).asJsonList()) {\n\n\t\t\t\t\tString path = p.at(PATH).asString();\n\t\t\t\t\tString time = p.has(\"time\") ? p.at(\"time\").asString() : null;\n\t\t\t\t\tif (logger.isDebugEnabled())\n\t\t\t\t\t\tlogger.debug(\"GET time : {}={}\", time,\n\t\t\t\t\t\t\t\tStringUtils.isNotBlank(time) ? Util.getMillisFromIsoTime(time) : null);\n\t\t\t\t\tpath = Util.sanitizePath(path);\n\t\t\t\t\tfullPaths.add(Util.sanitizeRoot(ctx + dot + path));\n\n\t\t\t\t\tMap<String, String> queryMap = new HashMap<>();\n\t\t\t\t\tif (StringUtils.isNotBlank(path))\n\t\t\t\t\t\tqueryMap.put(skey, Util.regexPath(path).toString());\n\t\t\t\t\tif (StringUtils.isNotBlank(qUuid))\n\t\t\t\t\t\tqueryMap.put(\"uuid\", Util.regexPath(qUuid).toString());\n\t\t\t\t\tswitch (root) {\n\t\t\t\t\tcase CONFIG:\n\t\t\t\t\t\tinflux.loadConfig(map, queryMap);\n\t\t\t\t\t\tif (map.size() == 0 && queryMap.size() == 0) {\n\t\t\t\t\t\t\t// send defaults\n\t\t\t\t\t\t\tConfig.setDefaults(map);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase resources:\n\t\t\t\t\t\tinflux.loadResources(map, queryMap);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase sources:\n\t\t\t\t\t\tinflux.loadSources(map, queryMap);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase vessels:\n\t\t\t\t\t\tif (StringUtils.isNotBlank(time)) {\n\t\t\t\t\t\t\tinflux.loadDataSnapshot(map, vessels, queryMap, time);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tinflux.loadData(map, vessels, queryMap);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase aircraft:\n\t\t\t\t\t\tif (StringUtils.isNotBlank(time)) {\n\t\t\t\t\t\t\tinflux.loadDataSnapshot(map, aircraft, queryMap, time);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tinflux.loadData(map, aircraft, queryMap);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase sar:\n\t\t\t\t\t\tif (StringUtils.isNotBlank(time)) {\n\t\t\t\t\t\t\tinflux.loadDataSnapshot(map, sar, queryMap, time);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tinflux.loadData(map, sar, queryMap);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase aton:\n\t\t\t\t\t\tif (StringUtils.isNotBlank(time)) {\n\t\t\t\t\t\t\tinflux.loadDataSnapshot(map, aton, queryMap, time);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tinflux.loadData(map, aton, queryMap);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase ALL:\n\t\t\t\t\t\tif (StringUtils.isNotBlank(time)) {\n\t\t\t\t\t\t\tinflux.loadDataSnapshot(map, vessels, null, time);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tinflux.loadData(map, vessels, null);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// loadAllDataFromInflux(map,aircraft);\n\t\t\t\t\t\t// loadAllDataFromInflux(map,sar);\n\t\t\t\t\t\t// loadAllDataFromInflux(map,aton);\n\t\t\t\t\tdefault:\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif (logger.isDebugEnabled())\n\t\t\t\t\tlogger.debug(\"GET token: {}, map : {}\", jwtToken, map);\n\n\t\t\t\t// security filter here\n\t\t\t\tSecurityUtils.trimMap(map, message.getStringProperty(Config.AMQ_USER_ROLES));\n\n\t\t\t\tJson json = SignalkMapConvertor.mapToFull(map);\n\n\t\t\t\tif (logger.isDebugEnabled())\n\t\t\t\t\tlogger.debug(\"GET json : {}\", json);\n\n\t\t\t\tString fullPath = StringUtils.getCommonPrefix(fullPaths.toArray(new String[] {}));\n\t\t\t\t// fullPath=StringUtils.remove(fullPath,\".*\");\n\t\t\t\t// fullPath=StringUtils.removeEnd(fullPath,\".\");\n\n\t\t\t\t// for REST we only send back the sub-node, so find it\n\t\t\t\tif (logger.isDebugEnabled())\n\t\t\t\t\tlogger.debug(\"GET node : {}\", fullPath);\n\n\t\t\t\tif (StringUtils.isNotBlank(fullPath) && !root.startsWith(CONFIG) && !root.startsWith(ALL))\n\t\t\t\t\tjson = Util.findNodeMatch(json, fullPath);\n\n\t\t\t\tsendReply(destination, FORMAT_FULL, correlation, json, jwtToken);\n\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.error(e, e);\n\n\t\t\t}\n\n\t\t}\n\t\treturn;\n\t}",
"public ChatWithServer.Req getChatWithServerReq() {\n if (reqCase_ == 3) {\n return (ChatWithServer.Req) req_;\n }\n return ChatWithServer.Req.getDefaultInstance();\n }",
"public void updateSendingMessage(String message, boolean isMe) {\n\n\n Log.v(\"adsl\", \"came here\");\n\n final MessageModel sendingMessage = new MessageModel();\n sendingMessage.setMessage(message);\n sendingMessage.setTime(\"8:57Pm\"); //set current time in form of database format\n sendingMessage.setMe(isMe);\n\n if (isMe == true) {\n\n\n if (!messageBox.getText().toString().trim().matches(\"\"))\n\n {\n doScreenUpdate(sendingMessage);\n }\n\n\n } else\n\n {\n\n doScreenUpdate(sendingMessage);\n\n\n }\n\n\n }",
"public FermatMessage readNextMessage() {\n if(!pendingIncomingMessages.isEmpty()) {\n\n /*\n * Return the next message\n */\n return pendingIncomingMessages.iterator().next();\n\n }else {\n\n //TODO: CREATE A APPROPRIATE EXCEPTION\n throw new RuntimeException();\n }\n\n }",
"private String receiveMsgFromClient() {\n try {\n return inputStream.readUTF();\n } catch (IOException e) {\n System.err.println(\"Client is gone.\");\n System.err.println(e.getMessage());\n running = false;\n return \"\";\n }\n }",
"@Override\n\tprotected void beforeSendingMessage(Message message) {\n\t\tmessage.receiver = getNextRandomClient();\n\t}",
"Boolean isMessageRead(String msgId);",
"ReadResponseMessage fetchMessagesFromUser(String user);",
"private Message readMessage() throws IOException, ClassNotFoundException {\n Message message = (Message) objectInputStream.readObject();\n Message.Command temp = message.getCommand();\n if (temp != Message.Command.GET_RESERVED && temp !=\n Message.Command.GET_AVAILABLE) {\n if (connectionType == Message.Command.REGISTER_CLIENT) {\n connectionLoggerService.add(\"Client - \"\n + socket.getInetAddress().getHostAddress()\n + \" : \"\n + message.toString());\n\n } else if (connectionType == Message.Command.REGISTER_AH) {\n connectionLoggerService.add(\"Auction House - \"\n + socket.getInetAddress().getHostAddress()\n + \" : \"\n + message.toString());\n } else {\n connectionLoggerService.add(\"Unknown - \"\n + socket.getInetAddress().getHostAddress()\n + \" : \"\n + message.toString());\n }\n }\n return message;\n }",
"private Message getNextMessageCriterion(DoorPulseCriterion dpc) throws InterruptedException {\n\t\tMessagePacket msgPacket = (MessagePacket) this.getProc().getNextMessagePacketNoWait(dpc);\n\n\t\tif (msgPacket != null) {\n\t\t\tdpc.setDoor(msgPacket.receiverDoor());\n\t\t\tdpc.setPulse(msgPacket.message().getMsgClock());\n\t\t\treturn msgPacket.message();\n\t\t}\n\n\t\treturn null;\n\t}",
"protected XMessage aditionalCheck(OpProjectSession session, OpBroker broker, OpUser user) {\r\n return new XMessage();\r\n }",
"private boolean checkIsValid(BankClient client, Message message) {\n int lastDigit = message.getMessageContent() % BASE_TEN;\n int amount = message.getMessageContent() / BASE_TEN;\n if (lastDigit <= DEPOSIT_WITHDRAWAL_FLAG) {\n return amount <= client.getDepositLimit();\n } else {\n return amount <= client.getWithdrawalLimit();\n }\n }",
"synchronized public boolean add(ClientMessage req) {\n //System.out.println(\"****adding to rc queue\");\n if (!initialized) {\n init();\n }\n int i = (int) req.getSendingClient();\n if (i > order.length) {\n BFT.Debug.kill(new RuntimeException(\"invalid client id\"));\n }\n boolean present = reqs[i] != null;\n if (present) {\n if (reqs[i].getRequestId() <= req.getRequestId()) {\n bSize -= reqs[i].getTotalSize();\n reqs[i] = req;\n bSize += req.getTotalSize();\n }\n //System.out.println(\"adding to rc queue with false\");\n return false;\n }\n reqs[i] = req;\n bSize += req.getTotalSize();\n // update the entry for the sending client, but if he's\n // already got a place in line, dont put him in line again\n\n order[size] = i;\n size++;\n if (size == order.length) {\n size = 0;\n }\n if (size == head) {\n BFT.Debug.kill(\"\");\n }\n //System.out.println(\"adding to RC queue with true\");\n entries++;\n return true;\n }",
"public SyncMessage recoit ( Door d ) {\n\nSyncMessage sm = (SyncMessage)receive( d );\nreturn sm;\n}"
]
| [
"0.62265486",
"0.5734157",
"0.55629444",
"0.5552099",
"0.53872514",
"0.536731",
"0.529679",
"0.5281724",
"0.5264843",
"0.5261078",
"0.52444696",
"0.5229606",
"0.52076703",
"0.515522",
"0.51516664",
"0.51460385",
"0.5132966",
"0.5124219",
"0.51201457",
"0.5084109",
"0.5062233",
"0.50525177",
"0.50377136",
"0.5034849",
"0.5023355",
"0.5021894",
"0.50156486",
"0.49984545",
"0.49724877",
"0.4968866",
"0.4968866",
"0.49652463",
"0.49615386",
"0.49592584",
"0.49584824",
"0.49584824",
"0.49584824",
"0.49584824",
"0.49584824",
"0.49584824",
"0.49584824",
"0.49584824",
"0.4948158",
"0.49254802",
"0.49229634",
"0.4919293",
"0.4918387",
"0.49127936",
"0.49108928",
"0.49097097",
"0.4903896",
"0.48957673",
"0.48873135",
"0.48774436",
"0.48763186",
"0.48673123",
"0.4865887",
"0.48644063",
"0.48604023",
"0.48599762",
"0.48520365",
"0.4849458",
"0.484388",
"0.4838565",
"0.48382962",
"0.48355654",
"0.4826252",
"0.4824045",
"0.48202032",
"0.48137775",
"0.48096418",
"0.48075876",
"0.48063114",
"0.4805845",
"0.4805385",
"0.48049626",
"0.4801257",
"0.4801257",
"0.4801257",
"0.4801257",
"0.4801257",
"0.4801257",
"0.47996068",
"0.47967675",
"0.4789571",
"0.4784311",
"0.4781778",
"0.47814462",
"0.47812453",
"0.4779592",
"0.47732708",
"0.47663558",
"0.47619793",
"0.47619352",
"0.475905",
"0.47531697",
"0.4745805",
"0.47443146",
"0.47441736",
"0.4736569"
]
| 0.74350715 | 0 |
/ Getter and setter | public Message getNextMessage() {
return nextMessage;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract Set method_1559();",
"@Override\r\n\tpublic void get() {\n\t\t\r\n\t}",
"@Override\n public void get() {}",
"String setValue();",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"public void setdat()\n {\n }",
"@Override\n String get();",
"public void get() {\n }",
"public String get();",
"public Object get()\n {\n return m_internalValue;\n }",
"public abstract String get();",
"public T get() {\n return value;\n }",
"@Override\n\tpublic void getData() {\n\t\t\n\t}",
"public T get() {\n return value;\n }",
"public T get() {\n return value;\n }",
"public String getValue() {\n/* 99 */ return this.value;\n/* */ }",
"public byte[] get(){\n return this.value;\n }",
"private void assignment() {\n\n\t\t\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public int\t\tget() { return value; }",
"public Object getValue() { return _value; }",
"public void setAge(int age) { this.age = age; }",
"public Object getValue(){\n \treturn this.value;\n }",
"private void setData() {\n\n }",
"public String get()\n {\n return this.string;\n }",
"public V get() {\n return value;\n }",
"public int getValue() {\n/* 450 */ return this.value;\n/* */ }",
"public Object getNewValue()\n {\n return newValue;\n }",
"@Override\n public Object getValue()\n {\n return value;\n }",
"public int value() { \n return this.value; \n }",
"@Override\n\tpublic void setData() {\n\n\t}",
"public int getAge() {return age;}",
"@Override\n\tpublic void setValue(Object value) {\n\t\t\n\t}",
"@Override\r\n public Object getValue() {\r\n return value;\r\n }",
"public Object getValue() { return this.value; }",
"public Object getValue()\n {\n\treturn value;\n }",
"public int getSet() {\n return set;\n }",
"@Override\npublic void setAttributes() {\n\t\n}",
"public String get() {\n return value;\n\t}",
"@Override\r\n\tpublic String get() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic void initValue() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic Object getValue() {\n\t\t\t\treturn null;\r\n\t\t\t}",
"public void setPrice(double price){this.price=price;}",
"@Override\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" UML Marker \"> \n // #[regen=yes,id=DCE.E1700BD9-298C-DA86-4BFF-194B41A6CF5E]\n // </editor-fold> \n protected String getProperties() {\n\n return \"Size = \" + size + \", Index = \" + value;\n\n }",
"private ReadProperty()\r\n {\r\n\r\n }",
"@Override\n\t\tpublic void set(E arg0) {\n\t\t\t\n\t\t}",
"public int getAge(){\n return age;\n }",
"@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}",
"@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}",
"@Override\n\tpublic String get() {\n\t\treturn null;\n\t}",
"public int getlife(){\r\n return life;\r\n}",
"public String getValor()\n/* 17: */ {\n/* 18:27 */ return this.valor;\n/* 19: */ }",
"@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}",
"@Override\n\tpublic Object getValue() {\n\t\treturn this ;\n\t}",
"@Override\n\tpublic void set() {\n\t\tSystem.out.println(\"A==========set\");\n\t}",
"public int get () { return rating; }",
"public Value getValue(){\n return this.value;\n }",
"public Address getAddress() { return address; }",
"public void setValue(Object value) { this.value = value; }",
"boolean get();",
"public void setName(String name){this.name=name;}",
"public S getValue() { return value; }",
"public void setM_Locator_ID (int M_Locator_ID)\n{\nset_Value (\"M_Locator_ID\", new Integer(M_Locator_ID));\n}",
"@Override\n\tprotected void getDataFromUCF() {\n\n\t}",
"public void setValor(String valor)\n/* 22: */ {\n/* 23:34 */ this.valor = valor;\n/* 24: */ }",
"@Override\n \tpublic IValue getValue() {\n \t\treturn this;\n \t}",
"public String get() {\n return this.value;\n }",
"protected void setValue(T value) {\r\n this.value = value;\r\n }",
"public void setValue(T value) {\n/* 89 */ this.value = value;\n/* */ }",
"void setValue(T value)\n\t\t{\n\t\t\tthis.value = value;\n\t\t}",
"private PropertyAccess() {\n\t\tsuper();\n\t}",
"String getName(){return this.name;}",
"@Override\n\tpublic void set(T e) {\n\t\t\n\t}",
"String getValue() {\n return mValue;\n }",
"@Override\n\tpublic void setValue(Object object) {\n\t\t\n\t}",
"V getValue() {\n return value;\n }",
"public String setter() {\n\t\treturn prefix(\"set\");\n\t}",
"public int getAge()\r\n {\r\n return age;\r\n }",
"public void setNombre(String nombre) {\r\n\tthis.nombre = nombre;\r\n}",
"public String getName () { return this.name; }",
"@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}",
"@Test\n\tpublic void testSet() {\n\t}",
"public void setNombre(String nombre) {this.nombre = nombre;}",
"@Override\n public int get()\n { \n return this.pr;\n }",
"@Override\n public void saveValues() {\n \n }",
"public int getNumber(){return number;}",
"@Override\n\tpublic void setValue(Object object) {\n\n\t}",
"String get();",
"String get();",
"public Student getStudent() { return student; }",
"public Book getBook() \t\t{ return this.myBook; }",
"public void setValue(T value) {\n/* 134 */ this.value = value;\n/* */ }",
"public int getArmadura(){return armadura;}",
"public void setX(int x) { this.x=x; }",
"boolean getSet();",
"public abstract Object getValue();",
"public abstract Object getValue();",
"public abstract Object getValue();",
"protected Object doGetValue() {\n\t\treturn value;\n\t}",
"public Empleado getEmpleado()\r\n/* 183: */ {\r\n/* 184:337 */ return this.empleado;\r\n/* 185: */ }",
"public Empresa getEmpresa()\r\n/* 84: */ {\r\n/* 85:131 */ return this.empresa;\r\n/* 86: */ }"
]
| [
"0.68192494",
"0.6817775",
"0.67835",
"0.6585124",
"0.64563286",
"0.638617",
"0.6336849",
"0.63291496",
"0.624491",
"0.6215031",
"0.6211013",
"0.6199911",
"0.6190106",
"0.6177176",
"0.6177176",
"0.61404675",
"0.61377734",
"0.6132862",
"0.61150074",
"0.61045533",
"0.6093138",
"0.6084377",
"0.6084188",
"0.60823053",
"0.60544217",
"0.6048896",
"0.60416937",
"0.60236454",
"0.6019898",
"0.60085547",
"0.60050035",
"0.59761906",
"0.5974103",
"0.59702575",
"0.5967281",
"0.5954394",
"0.5929967",
"0.59233844",
"0.5920667",
"0.5915657",
"0.5899842",
"0.58858687",
"0.5881848",
"0.58748734",
"0.5872183",
"0.5860609",
"0.58515185",
"0.58387965",
"0.58387965",
"0.5832486",
"0.58273613",
"0.5820488",
"0.5820391",
"0.5820391",
"0.5816467",
"0.581407",
"0.58125544",
"0.58078367",
"0.5807716",
"0.5800382",
"0.57970226",
"0.5796534",
"0.57945013",
"0.57936513",
"0.5784543",
"0.5780708",
"0.57794297",
"0.57781583",
"0.57755315",
"0.57727396",
"0.5767066",
"0.5765928",
"0.5765706",
"0.5765143",
"0.57612777",
"0.57589537",
"0.5754918",
"0.57519054",
"0.5750098",
"0.5749608",
"0.5747505",
"0.5742849",
"0.5742516",
"0.573754",
"0.57362497",
"0.57357246",
"0.5731794",
"0.5731595",
"0.5731595",
"0.57309",
"0.5730445",
"0.5727067",
"0.5724658",
"0.5721786",
"0.5721154",
"0.57176507",
"0.57176507",
"0.57176507",
"0.57159585",
"0.5714336",
"0.5713903"
]
| 0.0 | -1 |
This method should be called after OK button pressed. | public int getSelectedIndex() {
return selectedIndex;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void okPressed() {\n\t\tconfig.setExportThreadCount(txtThreadCount.getSelection());\n\t\tconfig.setImportThreadCount(txtMaxImportThreadCountPerTable.getSelection());\n\t\tconfig.setCommitCount(txtCommitCount.getSelection());\n\t\tif (txtPageCount != null) {\n\t\t\tconfig.setPageFetchCount(txtPageCount.getSelection());\n\t\t}\n\t\tif (txtFileMaxSize != null) {\n\t\t\tconfig.setMaxCountPerFile(txtFileMaxSize.getSelection());\n\t\t}\n\t\tconfig.setImplicitEstimate(btnImplicitEstimate.getSelection());\n\t\tsuper.okPressed();\n\t}",
"private void okButtonActionPerformed() {\n\n saveConsoleText(consoleTextArea);\n\n setVisible(false);\n\n if (mainFrame == null && !isBasicUI) {\n System.exit(0);\n }\n }",
"void okButtonClicked();",
"@FXML\n private void handleOk() {\n if (isInputValid()) {\n gem.setGemName(gemNameField.getText());\n gem.setGemValue(Integer.parseInt(gemValueField.getText()));\n gem.setDescription(gemDescripField.getText());\n\n okClicked = true;\n dialogStage.close();\n }\n }",
"private void onOK() {\n isOkClicked = true;\n dispose();\n }",
"@Override\r\n\tprotected void onOkSelection(SelectionEvent e) {\n\t\tSystem.out.println(\"Ok button implementation\");\r\n\t}",
"@Override\n\tpublic void okPressed() {\n\t\t_text = _noteTextField.getText();\n\t\tsetReturnCode(OK);\n\t\tclose();\n\t}",
"@FXML\r\n private void handleOk() {\r\n if (isInputValid()) {\r\n actualizarEntidad(this.entidad);\r\n\r\n okClicked = true;\r\n dialogStage.close();\r\n }\r\n }",
"@FXML\n\tprivate void handleOk() {\n\t\tif (isValidInput()) {\n\t\t\tsaveCurrentAcknowledgment();\n\t\t\t\n\t\t\tif (isNew) {\n\t\t\t\tmain.getDbHelper().insertAcknowledgment(acknowledgment);\n\t\t\t\tmain.getAcknowledgmentData().clear();\n\t\t\t\tmain.getAcknowledgmentData().addAll(main.getDbHelper().retrieveAcknowledgmentList());\n\t\t\t} else {\n\t\t\t\tmain.getDbHelper().updateAcknowledgment(acknowledgment);\n\t\t\t\tmain.getAcknowledgmentData().clear();\n\t\t\t\tmain.getAcknowledgmentData().addAll(main.getDbHelper().retrieveAcknowledgmentList());\t\n\t\t\t}\n\t\t\t\n\t\t\tokClicked = true;\n\t\t\tdialogStage.close();\n\t\t}\n\t}",
"private void onOK() {\n this.applySettings();\n dispose();\n }",
"private void okEvent() {\n\t\tYAETMMainView.PRIVILEGE = (String)loginBox.getSelectedItem();\n\t\tshowMain();\n\t\tcloseDialog();\n\t}",
"@FXML public void handleOk() {\n\t\tSystem.out.println(\"OK clicked!\");\n\t\t\n\t\tif (checkParameters().equals(ErrorCode.BatchSize)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Batch Size]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.ConfidenceFactor)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Confidence Factor]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.MinNumObj)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Min Num Obj]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.NumDecimalPlaces)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Num Decimal Places]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.NumFolds)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Num Folds]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.Seed)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Seed]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.Fine)) {\n\t\t\tsaveParameters();\n\t\t\tClassifiersWindowsManager.stage.close();\n\t\t}\n\t}",
"@FXML\n\tprivate void handleOk() {\n\t\tif (isInputValid()) {\n\t\t\titem.setDate(DateUtil.parse(dateField.getText()));\n\t\t\titem.setCategory(categoryField.getSelectionModel().getSelectedItem());\n\t\t\titem.setUse(useField.getText());\n\t\t\t\n\t\t\tString textBefore = amountField.getText();\n\t\t\tString textAfter = null;\n\t\t\tif(textBefore.contains(\",\")) {\n\t\t\t\ttextAfter = textBefore.replace(\",\", \".\");\n\t\t\t} else {\n\t\t\t\ttextAfter = textBefore;\n\t\t\t}\n\t\t\titem.setAmount(Double.parseDouble(textAfter));\n\t\t\titem.setDistributionKind(distributionKindField.getText());\n\n\t\t\tokClicked = true;\n\t\t\tdialogStage.close();\n\t\t}\n\t}",
"void okButton_actionPerformed(ActionEvent e) {\n setItskey(keyTextField.getText());\n setItsvalue(valueTextField.getText());\n setUserAction(OK);\n setVisible(false);\n }",
"@FXML\r\n private void handleOk() {\r\n if (isInputValid()) {\r\n \temployee.setId(Integer.parseInt(idLabel.getText()));\r\n \temployee.setFirstName(firstNameField.getText());\r\n \temployee.setLastName(lastNameField.getText());\r\n \temployee.setIndustry(industryField.getText());\r\n \temployee.setWorkType(workTypeField.getText());\r\n \temployee.setAddress(addressField.getText());\r\n \t\r\n\r\n okClicked = true;\r\n dialogStage.close();\r\n }\r\n }",
"void okButton_actionPerformed(ActionEvent e)\n\t{\n\t\tpropertiesEditPanel.saveChanges();\n\t\tcloseDlg();\n\t\tokPressed = true;\n }",
"@Action\n public void acOk() {\n if (checkFormattedTextFieldNullNoSupposed(jftfCoord1, -1e5, 1e5)) {\n return;\n }\n if (checkFormattedTextFieldNullNoSupposed(jftfCoord2, -1e5, 1e5)) {\n return;\n }\n if (checkTextField(jtfName)) {\n return;\n }\n getTempObj().setType(jcbType.getSelectedIndex());\n getTempObj().setCoord1(getDoubleFromFormattedTextField(jftfCoord1));\n getTempObj().setCoord2(getDoubleFromFormattedTextField(jftfCoord2));\n getTempObj().setName(jtfName.getText());\n setChangeObj(true);\n }",
"private void onOkButtonPressed() {\n\t\tconfirm = true;\n\t\tif (template.getAskDimension()) {\n\t\t\ttry {\n\t\t\t\twidth = Integer.parseInt(widthInputField.getFieldString());\n\t\t\t\twidthInputField.setFieldColor(GameFrame.getStandardFieldColor());\n\t\t\t} catch (Exception except) {\n\t\t\t\twidthInputField.setFieldColor(GameFrame.getWrongFieldColor());\n\t\t\t\tconfirm = false;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\theight = Integer.parseInt(heightInputField.getFieldString());\n\t\t\t\theightInputField.setFieldColor(GameFrame.getStandardFieldColor());\n\t\t\t} catch (Exception except) {\n\t\t\t\theightInputField.setFieldColor(GameFrame.getWrongFieldColor());\n\t\t\t\tconfirm = false;\n\t\t\t}\n\t\t\tif(!confirm)\n\t\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (template.getAskLoading()) {\n\t\t\tint result = savefileChooser.showOpenDialog(this);\n\t\t\tif (result != JFileChooser.APPROVE_OPTION) {\n\t\t\t\tconfirm = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tdispatchEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));\n\t}",
"void onOkButtonPressed();",
"protected void okPressed()\n\t{\n\t\t((NewProjectComposite) this.getDialogArea()).updateProject(project);\n\t\tsuper.okPressed();\n\t}",
"@FXML\n private void handleOk() {\n System.out.println(\"handleOk AdresEditController\");\n if (isInputValid()) {\n //aby udalo sie select\n adres.setPrev_adres_id(adres.getAdres_id());\n\n adres.setAdres_id(Integer.parseInt(adres_id_textField.getText()));\n adres.setWojewodztwo(wojewodztwo_textField.getText());\n adres.setMiejscowosc(miejscowosc_textField.getText());\n adres.setUlica(ulica_textField.getText());\n adres.setKraj(kraj_textField.getText());\n adres.setKod_pocztowy(kod_pocztowy_textField.getText());\n\n adres.update();\n\n okClicked = true;\n dialogStage.close();\n }\n }",
"public void okPressed() {\r\n\t\t\r\n\t\tif (albumname.getText().trim().toString().equals(\"\")) {\r\n\t\t\t\r\n\t\t\tAlert alert = new Alert(AlertType.WARNING);\r\n\t\t\talert.setTitle(\"ALERT\");\r\n\t\t\talert.setHeaderText(\"Error\");\r\n\t\t\talert.setContentText(\"Must enter an album name.\");\r\n\t\t\talert.showAndWait();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\r\n\t\tString albumName = albumname.getText().trim().toString();\r\n\t\t\r\n\t\tif (checkForDuplicateAlbumNames(albumName)==true) {\r\n\t\t\tAlert alert = new Alert(AlertType.WARNING);\r\n\t\t\talert.setTitle(\"ALERT\");\r\n\t\t\talert.setHeaderText(\"Duplicate Names\");\r\n\t\t\talert.setContentText(\"An album already has that name. \\n Enter a new name.\");\r\n\t\t\talert.showAndWait();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\r\n\t\tAlbum newalbum = new Album(albumName);\r\n\t\tAlbumsController.getCurrentUser().addAlbumToUser(newalbum);\r\n\t\tLoginController.saveData(LoginController.users);\r\n\t\t\r\n\t\t\r\n\t\t//go to albums controller and load corresponding fxml\r\n\t\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"Albums.fxml\"));\r\n\t\t\t\ttry{\r\n\t\t\t\t\tParent parent = (Parent) loader.load();\r\n\t\t\t\t\tAlbumsController controller = loader.<AlbumsController>getController();\r\n\t\t\t\t\tScene scene = new Scene(parent);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// ok is the button pressed action event\r\n\t\t\t\t\tStage stage = (Stage) ((Node) ok).getScene().getWindow();\r\n\t\t\t\t\tcontroller.start(stage,AlbumsController.getCurrentUser());\r\n\t\t\t\t\tstage.setScene(scene);\r\n\t\t\t\t\tstage.centerOnScreen();\r\n\t\t\t\t\tstage.show();\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception exception) {\r\n\t\t\t\t\texception.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}",
"protected void okPressed() {\r\n \t\tArrayList resources= new ArrayList(10);\r\n \t\tfindCheckedResources(resources, (IContainer)fTree.getInput());\r\n \t\tif (fWorkingSet == null)\r\n \t\t\tfWorkingSet= new WorkingSet(getText().getText(), resources.toArray());\r\n \t\telse if (fWorkingSet instanceof WorkingSet) {\r\n \t\t\t// Add not accessible resources\r\n \t\t\tIResource[] oldResources= fWorkingSet.getResources();\r\n \t\t\tfor (int i= 0; i < oldResources.length; i++)\r\n \t\t\t\tif (!oldResources[i].isAccessible())\r\n \t\t\t\t\tresources.add(oldResources[i]);\r\n \r\n \t\t\t((WorkingSet)fWorkingSet).setName(getText().getText());\r\n \t\t\t((WorkingSet)fWorkingSet).setResources(resources.toArray());\r\n \t\t}\r\n \t\tsuper.okPressed();\r\n \t}",
"protected abstract void pressedOKButton( );",
"public void handleActionOk() {\n\t\tsuper.handleActionOk();\n\t\tnewModeOkApply();\n\t\tthis.getDocumentView().close();\n\t}",
"@Override\n\tpublic boolean performOk() {\n\t\t// Get the preference store\n\t\tfinal IPreferenceStore preferenceStore = getPreferenceStore();\n\n\t\t// Set the values from the fields\n\t\tpreferenceStore.setValue(DEFAULT_PASSWORD_LENGTH, spiLength.getSelection());\n\t\tpreferenceStore.setValue(USE_LOWERCASE_LETTERS, btnUseLowercase.getSelection());\n\t\tpreferenceStore.setValue(USE_UPPERCASE_LETTERS, btnUserUppercase.getSelection());\n\t\tpreferenceStore.setValue(USE_DIGITS, btnUseDigits.getSelection());\n\t\tpreferenceStore.setValue(USE_SYMBOLS, btnUseSymbols.getSelection());\n\t\tpreferenceStore.setValue(USE_EASY_TO_READ, btnUseEaseToRead.getSelection());\n\t\tpreferenceStore.setValue(USE_HEX_ONLY, btnUseHexOnly.getSelection());\n\n\t\t// Return true to allow dialog to close\n\t\treturn true;\n\t}",
"public void submitText() {\r\n \t\tthis.dialog.clickOK();\r\n \t}",
"@FXML\r\n private void handleOk() {\r\n if (isInputValid()) {\r\n video.setName(nameField.getText());\r\n video.setUrl(urlField.getText());\r\n\r\n okClicked = true;\r\n dialogStage.close();\r\n }\r\n }",
"@FXML\r\n\tprivate void handleOk() {\r\n\tif (isDateInputValid()) {\r\n\t\t\tLocalDate date = startdate.getValue();\r\n\t\t\tLocalDate findate = enddate.getValue();\r\n\t\t\tleavedata.setStartdate(date);\r\n\t\t\tleavedata.setEnddate(findate);\r\n\r\n\t\t\tEmployee employee = namefield.getSelectionModel().getSelectedItem();\r\n\t\t\tleavedata.setEmployee(employee);\r\n\t\t\t\r\n\t\t\tokClicked = true;\r\n\t\t\trosterService.addLeaveData(leavedata);\r\n\t\t\tAlert alert = new Alert(AlertType.INFORMATION);\r\n\t\t\talert.setTitle(\"Information Dialog\");\r\n\t\t\talert.setHeaderText(null);\r\n\t\t\talert.setContentText(\"Update Succesfull\");\r\n\t\t\talert.showAndWait();\r\n\t\t\tdialogStage.close();\r\n\t\t}\r\n\t}",
"@FXML\n\tprivate void handleOk(){\n\t\tif(isInputValid()){\n\t\t\tproduct.setName(nameField.getText());\n\t\t\tproduct.setAmountAvailable(Integer.parseInt(amountAvailableField.getText()));\n\t\t\tproduct.setAmountSold(Integer.parseInt(amountSoldField.getText()));\n\t\t\tproduct.setPriceEach(Integer.parseInt(priceEachField.getText()));\n\t\t\tproduct.setPriceMake(Integer.parseInt(priceMakeField.getText()));\n\t\t\t// Converts the values to ints and then subtracts\n\t\t\tproduct.setProfit(Integer.parseInt(priceEachField.getText())-Integer.parseInt(priceMakeField.getText()));\n\t\t\t// Converts the values to ints, subtracts, and then multiplies\n\t\t\tproduct.setMoney((Integer.parseInt(priceEachField.getText())-Integer.parseInt(priceMakeField.getText()))*Integer.parseInt(amountSoldField.getText()));\n\t\t\tokClicked = true;\n\t\t\tdialogStage.close();\t\n\t\t}\n\t}",
"@FXML\r\n private void handleOk() {\r\n if (isInputValid()) {\r\n environment.setName(nameField.getText());\r\n environment.setIP(hostField.getText());\r\n environment.setPort(Integer.parseInt(portField.getText()));\r\n environment.setLogin(loginField.getText());\r\n environment.setPassword(passwordField.getText());\r\n environment.setPathMOM(MOMPathField.getText());\r\n environment.setServer(serverField.getValue());\r\n environment.setService(serviceField.getValue());\r\n okClicked = true;\r\n dialogStage.close();\r\n }\r\n }",
"void setOk();",
"private void okAction()\r\n\t{\r\n\t\tString navn = txfInput[0].getText().trim();\r\n\r\n\t\tint telefonNr = -1;\r\n\t\ttry\r\n\t\t{\r\n\t\t\ttelefonNr = Integer.parseInt(txfInput[1].getText().trim());\r\n\t\t} catch (NumberFormatException ex)\r\n\t\t{\r\n\t\t\t// do nothing\r\n\t\t}\r\n\r\n\t\tString vej = txfInput[2].getText().trim();\r\n\r\n\t\tint nr = -1;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tnr = Integer.parseInt(txfInput[3].getText().trim());\r\n\t\t} catch (NumberFormatException ex)\r\n\t\t{\r\n\t\t\t// do nothing\r\n\t\t}\r\n\r\n\t\tString etage = txfInput[4].getText().trim();\r\n\r\n\t\tint postNr = -1;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tpostNr = Integer.parseInt(txfInput[5].getText().trim());\r\n\t\t} catch (NumberFormatException ex)\r\n\t\t{\r\n\t\t\t// do nothing\r\n\t\t}\r\n\r\n\t\tString by = txfInput[6].getText().trim();\r\n\t\tString land = txfInput[7].getText().trim();\r\n\r\n\t\tif (navn.length() == 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Navn er tom\");\r\n\t\t\treturn;\r\n\t\t} else if (telefonNr <= 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Telefon nr er ugyldigt\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\telse if (vej.length() == 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Vej er tom\");\r\n\t\t\treturn;\r\n\t\t} else if (nr <= 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Nr er ugyldigt\");\r\n\t\t\treturn;\r\n\t\t} else if (postNr <= 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Post Nr er ugyldigt\");\r\n\t\t\treturn;\r\n\t\t} else if (by.length() == 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"By er ugyldigt\");\r\n\t\t\treturn;\r\n\t\t} else if (land.length() == 0)\r\n\t\t{\r\n\t\t\tlblError.setText(\"Land er tom\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tFirma firma = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tfirma = lvwFirmaer.getSelectionModel().getSelectedItem();\r\n\t\t} catch (NullPointerException ex)\r\n\t\t{\r\n\t\t\t// do nothing\r\n\t\t}\r\n\r\n\r\n\t\tLedsager ledsager = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tledsager = lvwLedsagere.getSelectionModel().getSelectedItem();\r\n\t\t} catch (NullPointerException ex)\r\n\t\t{\r\n\t\t\t// do nothing\r\n\t\t}\r\n\t\t\r\n\r\n\t\tif (deltager != null)\r\n\t\t{\r\n\t\t\tService.updateDeltager(deltager, firma, ledsager, navn, telefonNr, null, vej, nr, etage, postNr, by, land);\r\n\t\t} else\r\n\t\t{\r\n\t\t\tService.createDeltager(navn, telefonNr, null, vej, nr, etage, postNr, by, land);\r\n\t\t}\r\n\r\n\t\tthis.hide();\r\n\t}",
"public void OnOkClick()\r\n {\r\n\r\n }",
"@FXML\n\tprivate void handleOk() {\n\n\t\tokClicked = true;\n\t\tdialogStage.close();\n\n\t}",
"public void cmdOk() {\n\n\t\tif (!m_actionscombo.isValueInModel()) {\n\t\t\tString msg = I18N.getLocalizedMessage(\"Invalid Action Name\");\n\t\t\tString title = I18N.getLocalizedMessage(\"Error\");\n\t\t\tJOptionPane.showMessageDialog(null, msg, title, JOptionPane.ERROR_MESSAGE);\n\t\t} else\n\t\t\tsuper.cmdOk();\n\t}",
"@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tupdateOkState();\r\n\t\t\t}",
"protected abstract boolean onOkClicked();",
"public void actionPerformed (ActionEvent e)\n\t\t\t\t{\n\t\t\t\talertOK();\n\t\t\t\t}",
"private void jButtonOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOkActionPerformed\n \n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttext.setText(ok.getText());\n\t\t\t}",
"@FXML\n private void handleOKPressed() {\n\n if (Authenticator.validatePassword(accountId.getText(), password.getText())) {\n application.accountLogging(accountId.getText());\n confirmLogin = true;\n dialogStage.close();\n } else {\n errorMessage.setVisible(true);\n }\n }",
"@FXML\n\tprivate void handleOk() {\n\t\ttry {\n\t\t\ttypeDAO.supprimerType(new Type(listIdType.get(comboboxtype.getSelectionModel().getSelectedIndex()),\"\",\"\"));\n\t\t\tnew Popup(\"Type \"+comboboxtype.getValue()+\" supprimer !\");\n\t\t} catch (ConnexionBDException e) {\n\t\t\tnew Popup(e.getMessage());\n\t\t}\n\t\tokClicked = true;\n\t\tdialogStage.close();\n\t}",
"private void okPressed() {\n String destPath = pathField.getText();\n \n // Resolves destination folder\n // TODO: move those I/O bound calls to job as they can lock the main thread\n Object ret[] = FileToolkit.resolvePath(destPath, mainFrame.getActiveTable().getCurrentFolder());\n // The path entered doesn't correspond to any existing folder\n if (ret==null || (files.size()>1 && ret[1]!=null)) {\n showErrorDialog(Translator.get(\"this_folder_does_not_exist\", destPath));\n return;\n }\n \n AbstractFile destFolder = (AbstractFile)ret[0];\n String newName = (String)ret[1];\n \t\t\n // Retrieve default action when a file exists in destination, default choice\n // (if not specified by the user) is 'Ask'\n int defaultFileExistsAction = fileExistsActionComboBox.getSelectedIndex();\n if(defaultFileExistsAction==0)\n defaultFileExistsAction = FileCollisionDialog.ASK_ACTION;\n else\n defaultFileExistsAction = DEFAULT_ACTIONS[defaultFileExistsAction-1];\n // We don't remember default action on purpose: we want the user to specify it each time,\n // it would be too dangerous otherwise.\n \t\t\n startJob(destFolder, newName, defaultFileExistsAction);\n }",
"@Override\r\n\tprotected void okPressed() {\r\n\t\tcomputeResult();\r\n\t\tObject obj[] = getResult();\r\n\t\t\r\n\t\tif (obj != null && obj.length > 0) {\r\n\t\t\tif (ensureXSDTypeNamespaceMappings ( obj[0] ) == false) {\r\n\t\t\t\treturn ;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\thandleAddImport ( obj[0] );\r\n\t\t\t\r\n\t\t\t// only if we have a mapping do we dismiss the dialog\r\n\t\t\tsuper.okPressed();\r\n\t\t}\r\n\t\t\r\n\t}",
"@FXML\n private void handleOk() throws SQLException {\n if (isInputValid()) {\n log.setComment(commentField.getText());\n isInteger(timeField.getText());\n log.setTime(Integer.parseInt(timeField.getText()));\n\n okClicked = true;\n dialogStage.close();\n }\n }",
"public void onYesButtonClicked() {\n changeAfterClientPick();\n }",
"public void saveAction() {\n\t\tresult.setValue(convertPairsToText());\n\t\tcloseDialog();\n\t}",
"private void onOK() {\n OKDisposalProcess();\n }",
"private void onOK() {\n show.setText(null);\n String s = (new ArithmeticExpressions(text.getText()).checkExpression());\n System.out.println(s);\n show.setText(s);\n }",
"private void onOK() {\n if (TextUtil.isEmpty(nick.getText())) {\n showMessage(\"插件名称\");\n return;\n }\n if (TextUtil.isEmpty(name.getText())) {\n showMessage(\"插件代号\");\n return;\n }\n if (TextUtil.isEmpty(version.getText())) {\n showMessage(\"插件版本\");\n return;\n }\n if (TextUtil.isEmpty(path.getText())) {\n showMessage(\"插件路径\");\n return;\n }\n String nickV = nick.getText();\n String nameV = name.getText();\n String versionV = version.getText();\n UploadPluginDto dto = RequestManagement.uploadPlugin(selectFile, nameV, versionV, nickV);\n if (dto != null && dto.getResult() != null) {\n if (pluginPanel != null) {\n pluginPanel.addItem(dto.getResult());\n }\n }\n dispose();\n }",
"@FXML\r\n private void handleOk() {\r\n if (isInputValid()) {\r\n customer.setCustFirstName(custFirstNameTextField.getText());\r\n customer.setCustLastName(custLastNameTextField.getText());\r\n customer.setCustAddress(custAddressTextField.getText());\r\n customer.setCustCity(custCityTextField.getText());\r\n customer.setCustProv(custProvinceTextField.getText());\r\n customer.setCustPostal(custPostalCodeTextField.getText());\r\n customer.setCustCountry(custCountryTextField.getText());\r\n customer.setCustHomePhone(custHomePhoneTextField.getText());\r\n customer.setCustBusPhone(custBusinessPhoneTextField.getText());\r\n customer.setCustEmail(custEmailTextField.getText());\r\n customer.setAgentId((int)cboAgentId.getValue());\r\n \r\n try {\r\n if (oldCustomer == null) {\r\n CustomerDB.addNewCustomer(customer);\r\n } else {\r\n CustomerDB.editCustomer(customer, oldCustomer);\r\n }\r\n } catch (Exception e) {\r\n System.out.println(\"Adding customer to DB in handleOk failed\");\r\n e.printStackTrace();\r\n }\r\n try {\r\n main.showCustomerScene();\r\n } catch (Exception e) {\r\n System.out.println(\"Show customer scene failed\");\r\n e.printStackTrace();\r\n }\r\n }\r\n }",
"public void actionPerformed(ActionEvent e) {\n\t\toptionPane.setValue(okString);\n\t}",
"public void actionPerformed(ActionEvent oEvent) {\n if (oEvent.getActionCommand().equals(\"OK\")) {\n try {\n addFinishedData();\n } catch (ModelException e) {\n ErrorGUI oHandler = new ErrorGUI(this);\n oHandler.writeErrorMessage(e);\n return;\n }\n\n //Close this window\n this.setVisible(false);\n this.dispose();\n }\n else if (oEvent.getActionCommand().equals(\"Cancel\")) {\n //Close this window\n this.setVisible(false);\n this.dispose();\n } \n }",
"public void ok() {\n btOK().push();\n }",
"private void onOK() {\n rowNumber = (Integer) spinner1.getValue();\n sheetName = sheetsName[comboBox1.getSelectedIndex()];\n dispose();\n }",
"void CloseOkDialog();",
"private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed\n \n if(checkRange()) {\n //save changes to channel object before disposing GUI\n updateChannelObject();\n this.dispose();\n }\n }",
"public void clickedOk(View view) {\n \t\n \t// validate the data set\n \tif (!getData()) return;\n \t\n \t// confirm values that are in range, but possibly wrong\n \tif (!confirmData(0)) return;\n \t\n \t// success\n \t\treturnResult(Activity.RESULT_OK);\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n Object source = e.getSource();\n if (source == confirmButton) {\n var newResult = new Result(result, name.getText());\n try {\n newResult.saveResult();\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n }\n }",
"private void onOK() {\n dispose();\n }",
"private void onOK() {\n dispose();\n }",
"private void onOK() {\n dispose();\n }",
"private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed\n\n dispose();\n \n }",
"private void savedDialog() {\n\t\tTextView tv = new TextView(this);\n\t\ttv.setText(\"Changes to the current recipe have been saved.\");\n\t\tAlertDialog.Builder alert = new AlertDialog.Builder(this);\n\t\talert.setTitle(\"Success\");\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\tfinish();\n\t\t\t}\n\t\t});\n\t\talert.show();\n\t}",
"protected boolean okData() {\n \t\tString name2 = name.getText().trim();\n \t\tString phone2 = phone.getText().trim();\n \t\tString adress2 = adress.getText().trim();\n \t\tboolean enterpriseButton = enterpriseCustomer.isSelected();\n \t\tboolean privateButton = privateCustomer.isSelected();\n \t if (name2.equals(\"\") || phone2.equals(\"\") || adress2.equals(\"\") || (!enterpriseButton && !privateButton)) {\n \t \tif (name2.equals(\"\")) {\n \t \t\tshowMessageDialog(CustomerRegistration.this, \"You have to input a customer name!\");\n \t \t\tname.requestFocusInWindow();\n \t \t} else if(phone2.equals(\"\")) {\n \t \t\tshowMessageDialog(CustomerRegistration.this, \"You have to input a phone number!\");\n \t \t\tphone.requestFocusInWindow();\n \t \t} else if(adress2.equals(\"\")) {\n \t \t\tshowMessageDialog(CustomerRegistration.this, \"You have to input an adress!\");\n \t \t\tadress.requestFocusInWindow();\n \t \t} else if(!enterpriseButton && !privateButton) {\n \t \t\tshowMessageDialog(CustomerRegistration.this, \"You have to choose a customer type!\");\n \t \t\tprivateCustomer.requestFocusInWindow();\n \t \t}\n \t \treturn false;\n \t } else {\n \t \treturn true;\n \t }\n \t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tLibrarianSuccess.main(new String[]{});\r\n\t\t\t\tframe.dispose();\r\n\t\t\t\t\r\n\t\t\t}",
"private void onOK ()\n {\n dispose();\n }",
"protected void okPressed() {\n //\n // Get the selected severity level.\n //\n Severity severity = mRule.getSeverity();\n try {\n severity = (Severity) ((IStructuredSelection) mSeverityCombo.getSelection())\n .getFirstElement();\n }\n catch (IllegalArgumentException e) {\n CheckstyleLog.log(e);\n }\n\n // Get the comment.\n String comment = StringUtils.trimToNull(mCommentText.getText());\n\n // Get the id\n String id = StringUtils.trimToNull(mIdText.getText());\n\n // Get the custom message\n for (Map.Entry<String, Text> entry : mCustomMessages.entrySet()) {\n \n String msgKey = entry.getKey();\n \n String standardMessage = MetadataFactory.getStandardMessage(msgKey, mRule.getMetaData()\n .getInternalName());\n if (standardMessage == null) {\n standardMessage = \"\"; //$NON-NLS-1$\n }\n\n String message = StringUtils.trimToNull(entry.getValue().getText());\n if (message != null && !message.equals(standardMessage)) {\n mRule.getCustomMessages().put(msgKey, message);\n }\n else {\n \tmRule.getCustomMessages().remove(msgKey);\n }\n }\n\n //\n // Build a new collection of configuration properties.\n //\n // Note: if the rule does not have any configuration properties then\n // skip over the populating of the config property hash map.\n //\n if (mConfigPropertyWidgets != null) {\n for (int i = 0; i < mConfigPropertyWidgets.length; i++) {\n IConfigPropertyWidget widget = mConfigPropertyWidgets[i];\n ConfigProperty property = widget.getConfigProperty();\n\n try {\n widget.validate();\n }\n catch (CheckstylePluginException e) {\n String message = NLS.bind(\n Messages.RuleConfigurationEditDialog_msgInvalidPropertyValue, property\n .getMetaData().getName());\n this.setErrorMessage(message);\n return;\n }\n property.setValue(widget.getValue());\n }\n }\n\n //\n // If we made it this far then all of the user input validated and we\n // can\n // update the final rule with the values the user entered.\n //\n mRule.setSeverity(severity);\n mRule.setComment(comment);\n mRule.setId(id);\n\n super.okPressed();\n\n }",
"protected void closeDialogOk() {\n dispose();\n }",
"@FXML private void okButtonAction() throws SQLException, IOException {\n String comment = commentTextField.getText();\n int score = Integer.parseInt(scoreBox.getValue());\n DatabaseConnection.createOpinion(activeUser.getUsername(), recipe.getId(),score, comment ,opinionLabel, opinionView);\n }",
"public static void okButtonAction(ActionContext actionContext){\n World world = World.getInstance();\n Thing form = actionContext.getObject(\"form\");\n Shell shell = actionContext.getObject(\"shell\");\n \n Thing dataObject = world.getThing(\"xworker.app.test.dataObject.thing.Sex\");\n form.doAction(\"setDataObject\", actionContext, \"dataObject\", dataObject);\n shell.pack();\n }",
"public void proceedOnPopUp() {\n Controllers.button.click(proceedToCheckOutPopUp);\n }",
"private void buttonOkJDialogActionPerformed(ActionEvent e) {\n IdFail.dispose();\n }",
"private void helperAcceptButtonListener() {\n refresh();\n editDialog.dispose();\n }",
"protected Button getOkButton()\r\n\t{\r\n\t\treturn okButton;\r\n\t}",
"private void onOK() {\n addLibros();\n dispose();\n }",
"public void submitButtonPushed() throws IOException {\n\n if (vehicleRegistration.getText().isEmpty() || driverLicense.getText().isEmpty()\n || insuranceProvider.getText().isEmpty() || insuranceNumber.getText().isEmpty()) {\n\n Validator.errorBox(\"Incorrect Info\",\n \"Please Enter Valid Information\");\n\n } else {\n\n Stage stage = main.MainLogin.getPrimaryStage();\n\n Parent signInParent = FXMLLoader.load(getClass()\n .getResource(\"/backgroundcheck/BackGroundCheck.fxml\"));\n\n stage.setScene(new Scene(signInParent));\n\n stage.show();\n }\n }",
"@FXML\n public void actionOk() {\n //we need to be able to handle the edit case so if it isn't null just update\n if (contact != null) {\n contact.setFirstName(firstNameField.getText());\n contact.setMiddleName(middleNameField.getText());\n contact.setLastName(lastNameField.getText());\n\n contact.setHomePhone(homePhoneField.getText());\n contact.setWorkPhone(workPhoneField.getText());\n contact.setHomeAddress(homeAddressField.getText());\n contact.setWorkAddress(workAddressField.getText());\n contact.setPersonalEmail(personalEmailField.getText());\n contact.setWorkEmail(workEmailField.getText());\n okClicked = true;\n } else {\n //otherwise just create a new contact (not editing)\n Contact theContact = new Contact(firstNameField.getText(), middleNameField.getText(), lastNameField.getText(), homePhoneField.getText(), workPhoneField.getText(), homeAddressField.getText(), workAddressField.getText(), personalEmailField.getText(), workEmailField.getText());\n main.getContactData().add(theContact);\n }\n //close the new contact window\n stage.close();\n }",
"public void handleNewItemConfirmAction(ActionEvent event) {\n try{\n String title = newItemTitle.getText();\n String author = newItemAuthor.getText();\n GregorianCalendar publishDate = parseDate(newItemPublishDate.getText());\n String description = newItemDescription.getText();\n if (bookType.isSelected()){\n String ISBN = newBookISBN.getText();\n String genre = newBookGenre.getText();\n if (title.length()>0 && author.length()>0 && description.length()>0 && ISBN.length()>0 && genre.length()>0){\n updateMgr.addNewBook(title, author, publishDate, description, ISBN, genre);\n this.displaySuccess(\"New Item Added\", \"New item \" + title + \" has been successfully added\");\n this.clearNewItemFields();\n }\n else{ \n displayWarning(\"Item Information incomplete\", \"Please fill in the necessary fields\");\n }\n }\n }\n catch(ArrayIndexOutOfBoundsException | NumberFormatException e){\n displayWarning(\"Sorry\",\"Date format is wrong\\n\" + e.getMessage());\n }\n catch(Exception e){\n displayWarning(\"Sorry\",\"One of the fields is wrong:\\n\" + e.getMessage());\n }\n \n }",
"private void onOK(accountDB _new) {\n _new.setUsername(usernamePane.getText());\n _new.setPassword(passwordPane.getText());\n _new.setBirth(Date.valueOf(BirthdayPane.getText()));\n _new.setBirthPlace(birthPlacePane.getText());\n _new.setFullName(fullnamePane.getText());\n _new.setLivePlace(livePlacePane.getText());\n dispose();\n changed = true;\n\n }",
"public void itemOkay() \r\n\t{\n\t\t\r\n\t}",
"JButton saveButton() {\r\n JButton button = new JButton(\"Save\");\r\n Font buttonsFront = new Font(\"Serif\", Font.PLAIN, 17);\r\n button.setFont(buttonsFront);\r\n button.setPreferredSize(new Dimension(80,30));\r\n\r\n button.addActionListener(new ActionListener() {\r\n\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n int flag = 0;\r\n for(int i =0;i<CHACK.length;i++){\r\n if(CHACK[i] == 0)\r\n flag = 1;\r\n }\r\n if(flag == 0){\r\n // TODO Auto-generated method stub\r\n Object[] options ={ \"Yes\", \"No\" };\r\n //yes = 0 no = 1\r\n int m = JOptionPane.showOptionDialog(null, \"Save?\", \"tips\",JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);\r\n System.out.println(m);\r\n if (m==0) {\r\n getCompanyInfoFromText(); //write in\r\n //go back to Init Page\r\n frame.dispose();\r\n new init();\r\n\r\n }\r\n }\r\n else {\r\n JOptionPane.showMessageDialog(null, \"Place make sure every input is already checked! \", \"Warning\",JOptionPane.WARNING_MESSAGE);\r\n }\r\n\r\n }\r\n });\r\n return button;\r\n }",
"protected void dialog() {\n TextInputDialog textInput = new TextInputDialog(\"\");\n textInput.setTitle(\"Text Input Dialog\");\n textInput.getDialogPane().setContentText(\"Nyt bord nr: \");\n textInput.showAndWait()\n .ifPresent(response -> {\n if (!response.isEmpty()) {\n newOrderbutton(response.toUpperCase());\n }\n });\n }",
"@Override\n\t\tpublic void done() {\n\t\t\tToolkit.getDefaultToolkit().beep();\n\t\t\t//JOptionPane.showMessageDialog(panel,\n\t\t\t//\t\t\"Rotina concluída com sucesso\",\n\t\t\t//\t\t\"Atualização de Grupos de Documentos\", JOptionPane.OK_OPTION);\n\t\t\tjButtonConsulta.setEnabled(true);\n\t\t\tjButtonFechar.setEnabled(true);\n\t\t\tsetCursor(null); //turn off the wait cursor\n\n\t\t}",
"private void onConfirmButtonPressed() {\r\n disposeDialogAndCreateNewGame();\r\n }",
"public boolean onOkClicked() {\n try {\n if (form.isValid()) {\n String userName = form.getFieldValue(SysUser.USER_NAME_PROPERTY);\n String userAccount = form.getFieldValue(SysUser.USER_ACCOUNT_PROPERTY);\n String passWord = form.getFieldValue(SysUser.USER_PASSWORD_PROPERTY);\n String cPassWord = form.getFieldValue(\"cPassWord\");\n if (!passWord.equals(cPassWord)) {\n form.getField(SysUser.USER_PASSWORD_PROPERTY).setValue(\"\");\n form.getField(\"cPassWord\").setValue(\"\");\n form.getField(SysUser.USER_PASSWORD_PROPERTY).setFocus(true);\n addModel(\"msg\", \"密码不一致\");\n } else if (SysUserDao.getInstance().canCreate(getSysUser().getObjectContext(), userAccount)) {\n if (SysUserDao.getInstance().createSysUser(getSysUser().getObjectContext(), userName, userAccount, passWord)) {\n setRedirect(UserListPage.class);\n } else {\n addModel(\"msg\", \"失败\");\n }\n } else {\n form.getField(SysUser.USER_ACCOUNT_PROPERTY).setFocus(true);\n addModel(\"msg\", \"账号已存在\");\n }\n }\n } catch (Exception e) {\n logger.error(e.getLocalizedMessage(), e);\n }\n return true;\n }",
"public void onOK() {\n\t\t\t\t\t\t\tlogout();\n\t\t\t\t\t\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n setOnVacationOk(atc, guiD, sm);\n }",
"public void setAsDoneDialog() {\n okButton.setText(\"Done\");\n cancelButton.setVisible(false);\n }",
"private void saveAsButton(){\n SaveAsLabNameTextField.setText(\"\");\n SaveAsErrorLabel.setVisible(false);\n SaveAsDialog.setVisible(true);\n }",
"private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed\n this.dispose();\n }",
"public void actionPerformed(ActionEvent e) {\n if(e.getSource() == confirmButton) {\n setVisible(false); // causes all the add text \n }\n else if(e.getSource() == exitButton) {\n System.exit(0);\n }\n }",
"private void confirmationAlert() {\n\t\tAlert confirm = new Alert( AlertType.CONFIRMATION, \"You Will Not Be Able To Change Your Name\\nAfter You Press 'OK'.\");\n\t\tconfirm.setHeaderText(\"Are You Sure?\");\n confirm.setTitle(\"Confirm Name\");\n confirm.showAndWait().ifPresent(response -> {\n if (response == ButtonType.OK) {\n \tbackground.remove( pointer );\n \tkeyStrokes = keyStrokes.replace(\" \", \"-\");\n\t\t\t\tinsertNewHiScore();\n\t\t\t\tnewHighScore = false;\n }\n });\n\t}",
"@Override\n public void done() {\n Toolkit.getDefaultToolkit().beep();\n //close_plan_btn.setEnabled(true);\n setCursor(null); //turn off the wait cursor\n JOptionPane.showMessageDialog(null, \"Plan released !\\n\");\n\n }",
"private void submitBtnClicked() {\n\n clearIncomplete(locationComboBox);\n clearIncomplete(avTypeComboBox);\n clearIncomplete(avDate);\n clearIncomplete(avDesc);\n clearIncomplete(avEmployeeComboBox);\n\n if (locationComboBox.getValue() == null\n || !locationComboBox.getItems().contains(locationComboBox.getValue())\n || avTypeComboBox.getValue() == null\n || avDesc.getText().equals(\"\")\n || avDate.getValue() == null\n || (Settings.getSettings().getCurrentPermissions() == 3\n && ((avEmployeeComboBox.getValue() == null)\n || !avEmployeeComboBox.getItems().contains(avEmployeeComboBox.getValue())))) {\n if (locationComboBox.getValue() == null\n || !locationComboBox.getItems().contains(locationComboBox.getValue())) {\n incomplete(locationComboBox);\n }\n if (avTypeComboBox.getValue() == null) {\n incomplete(avTypeComboBox);\n }\n if (avDesc.getText().equals(\"\")) {\n incomplete(avDesc);\n }\n if (avDate.getValue() == null) {\n incomplete(avDate);\n incomplete(avDate);\n }\n if (avEmployeeComboBox.getValue() == null\n || !avEmployeeComboBox.getItems().contains(avEmployeeComboBox.getValue())) {\n incomplete(avEmployeeComboBox);\n }\n nonCompleteForm(stackPane);\n } else {\n Service service = new Service(DataOperations.generateUniqueID(\"AV\"), \"Audio Visual\");\n\n service.setCategory((String) avTypeComboBox.getValue());\n service.setLocation(locationComboBox.getValue().toString());\n service.setDate(avDate.getValue().toString());\n service.setDescription(avDesc.getText());\n service.setRequester(settings.getCurrentUsername());\n if (settings.getCurrentPermissions() == 3) {\n service.setEmployee((String) avEmployeeComboBox.getValue());\n } else {\n service.setEmployee(\"admin\");\n }\n\n try {\n DataOperations.saveService(service);\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n\n submittedPopUp(stackPane);\n parent.loadCenterSubPage(\"ServiceRequestNavigator.fxml\");\n clearButton();\n }\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(mainscreen, \"Created by Saadia Aman and Ammar Israr\");\n\t\t\t}",
"@FXML\n void OnActionCancel(ActionEvent event) throws IOException {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"This will clear text field values. Would you like to proceed?\");\n Optional<ButtonType> result = alert.showAndWait();\n if (result.isPresent() && result.get() == ButtonType.OK){\n stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(getClass().getResource(\"/view/MainScreen.fxml\"));\n stage.setTitle(\"Inventory Management System\");\n stage.setScene(new Scene(scene));\n stage.show();\n }\n }",
"@FXML\n\tpublic void handleConfirm(){\n\t\tif(chooseYear.getValue()!=null && chooseMonth.getValue()!=null && chooseDay.getValue()!=null){\n\t\t\tPlainDialog alert = new PlainDialog(AlertType.CONFIRMATION,\n\t\t\t\t\t\"请进行确认\",\"填写的生日将不可更改,确认不再修改吗\");\n\t\t\tOptional<ButtonType> result = alert.showDialog();\n\t\t\t\n\t\t\t//这里还要修改\n\t\t\tresult.ifPresent( ok -> {\n\t\t\t\taccessor.setBirthday(LocalDate.of(chooseYear.getValue(), chooseMonth.getValue(), chooseDay.getValue()));\n\t\t\t\tMemberAccountCourier.getInstance().register();\n\t\t\t\tcontroller.addSignInPane();\n\t\t\t});\n\t\t}else{\n\t\t\tPlainDialog alert = new PlainDialog(AlertType.INFORMATION,\n\t\t\t\t\t\"注册失败\",\"请输入你的完整的生日信息\");\n\t\t\talert.showDialog();\n\t\t}\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showConfirmDialog(OverCounterForm.this, \"Check this out\");\n }",
"public void finish(){\n \t\tString congrats=\"Congratulations, you won in \" + model.getNumberOfSteps()+\" steps! \";\n \t\tJFrame frame = new JFrame();\n\t\tString[] options = new String[2];\n\t\toptions[0] = new String(\"Play again\");\n\t\toptions[1] = new String(\"Quit\");\n\t\tint result= JOptionPane.showOptionDialog(frame.getContentPane(),congrats,\"Won! \", 0,JOptionPane.INFORMATION_MESSAGE,null,options,null);\n\t\tif (result == JOptionPane.NO_OPTION) {\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t\tif (result == JOptionPane.YES_OPTION) {\n\t\t\t\t\tcontroller.reset(); }\n \t}"
]
| [
"0.77827936",
"0.7460697",
"0.7447988",
"0.73515844",
"0.7282368",
"0.726897",
"0.72673315",
"0.7207393",
"0.71905965",
"0.71485776",
"0.714034",
"0.7135202",
"0.71340066",
"0.711057",
"0.71059436",
"0.7079975",
"0.7060162",
"0.7057529",
"0.70233774",
"0.699483",
"0.6973053",
"0.6972003",
"0.6965073",
"0.69566303",
"0.6862753",
"0.6861204",
"0.68600446",
"0.68475395",
"0.6845187",
"0.68236107",
"0.68170494",
"0.6811657",
"0.6772285",
"0.6757735",
"0.67561615",
"0.6754799",
"0.6736308",
"0.6732124",
"0.66927266",
"0.6686276",
"0.6679954",
"0.66632336",
"0.66496813",
"0.66463554",
"0.66461045",
"0.6639086",
"0.6582434",
"0.65636677",
"0.65438986",
"0.65343016",
"0.6533911",
"0.64943826",
"0.6485834",
"0.64609724",
"0.6446978",
"0.64452416",
"0.64426124",
"0.6441579",
"0.6431968",
"0.63900536",
"0.63831615",
"0.63831615",
"0.63831615",
"0.63790095",
"0.6369355",
"0.6369089",
"0.63515896",
"0.6344871",
"0.6331586",
"0.633092",
"0.6312651",
"0.6293168",
"0.62899",
"0.6287753",
"0.62835425",
"0.62800795",
"0.6278",
"0.62763953",
"0.6272692",
"0.626902",
"0.626349",
"0.6260802",
"0.62537616",
"0.6248061",
"0.62350225",
"0.62327325",
"0.6231534",
"0.6230393",
"0.6209648",
"0.6204187",
"0.6199647",
"0.61930513",
"0.6191487",
"0.6183854",
"0.61815715",
"0.61685485",
"0.6166119",
"0.6160712",
"0.615782",
"0.61411095",
"0.613903"
]
| 0.0 | -1 |
your code goes here | public static void main (String[] args) throws java.lang.Exception
{
Scanner s = new Scanner(System.in);
long t = s.nextLong();
while(t-->0){
long n = s.nextLong();
long a = s.nextLong();
long b = s.nextLong();
System.out.println( (2*(180+n)) - (a+b));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void crawl_data() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}",
"public void themesa()\n {\n \n \n \n \n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@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}",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"public void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n public void process() {\n getTelemetry().addData(\" start move\", \"BaseColor %s relic side %s\", baseColor.name(), (relicSide)?\"true\" :\"false\" );\n getTelemetry().update();\n if (JewelSensorAutoArmProcessor.JewelColor.RED.equals(baseColor)){\n if (relicSide) {\n RedRelicCorner();\n } else{\n RedNonRelicCorner();\n }\n }else{\n if (relicSide) {\n BlueRelicCorner();\n } else{\n BlueNonRelicCorner();\n }\n }\n releaseGlyph();\n }",
"@Override\n\tprotected void postRun() {\n\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n public void run() {\n ax.browserPane.setTitleAt(0,ax.browser.getTitle());\r\n String stringToken1 = null; \r\n try {\r\n stringToken1 = (\"<Navigate Home>::\" + getHome());\r\n } catch (IOException ex) {\r\n Logger.getLogger(AxBrowser.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n ax.consoleTextArea.setText(stringToken1);\r\n //Put the current html address in the addressbar\r\n ax.addressBar.setText(ax.browser.getCurrentLocation());\r\n \r\n }",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\n\t\tprotected void onPreExecute() {\n\t\t\t \n\t\t\t super.onPreExecute();\n\t\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public void act() \n {\n setImage(new GreenfootImage(\"== Total Pembayaran ==\",50,Color.yellow,Color.black));\n }",
"protected void additionalProcessing() {\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n protected void processLogic() {\n mBitmap = Bitmap.createBitmap(SystemUtils.getScreenWidth(), SystemUtils.getScreenHeight(), Config.ARGB_8888);\n mCanvas = new Canvas(mBitmap);\n mCanvas.drawColor(Color.WHITE);\n ivGraffit.setImageBitmap(mBitmap);\n mPaint = new Paint();\n mPaint.setColor(Color.GREEN);\n // 设置线宽\n mPaint.setStrokeWidth(15);\n mPaint.setAntiAlias(true);\n\n }",
"public void logic(){\r\n\r\n\t}",
"@Override\r\n\tpublic void howToColor() {\n\t\t\r\n\t}",
"@Override\n\tpublic void view() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tpublic void processing() {\n\n\t}",
"@Override\r\n public void run() {\n basicEditor.createEdge(); // replaced Bibianas method with Moritz Roidl, Orthodoxos Kipouridis\r\n }",
"public void foundationGrab(){\n\n }",
"protected void run() {\r\n\t\t//\r\n\t}",
"@Override\r\n\tpublic void render() {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}",
"public void run() {\n\t\t\r\n\t}",
"public void run() {\n\t\t\r\n\t}",
"protected void execute() {\n\n\n \n }",
"@Override\n\t\t\tpublic void run() {\n\n\t\t\t}",
"public void perder() {\n // TODO implement here\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tif(isRecognition) {\n\t\t\t\t\t\t\talpha *= 0.95f;\n//\t\t\t\t\t\t\tsetBackgroundColor((int) (255 * (1 - label) * alpha));\n\t\t\t\t\t\t\ttxtHandParts.setTextColor(Color.argb((int) (alpha * 255), 255,\n\t\t\t\t\t\t\t\t\t255, 255));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(alpha > 0.1f) {\n\t\t\t\t\t\t\t\tLog.d(LOGTAG, (int) (255 * (1 - label) * alpha)+\"\");\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});\n\t\t\t}",
"@Override\n public void execute() {\n \n \n }",
"private void performOCR(){\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tsuper.run();\r\n\t\t\t}",
"@Override\n\tvoid output() {\n\t\t\n\t}",
"public void run() {\n\n }",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"protected void display() {\n\r\n\t}",
"public void run() {\n barcodeInfo.setText( // Update the TextView\n barcodes.valueAt(0).displayValue\n );\n }",
"@Override\r\n\tpublic void render() {\n\r\n\t}",
"@Override\n \tprotected void controlRender(RenderManager rm, ViewPort vp) {\n \n \t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void processExecute() {\n\r\n\t}",
"@Override\n\t\tprotected void onPreExecute() \n\t\t{\n\t\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\n\t\t\tpublic void onPreExecute() {\n\t\t\t\t\n\t\t\t}",
"@TargetApi(Build.VERSION_CODES.LOLLIPOP)\n private void prepare(){\n mPaint = new Paint();\n mMatrix = new Matrix();\n //Only Android.LOLLIPOP and upper level device can use this builder\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n mAnchorInfoBuilder = new CursorAnchorInfo.Builder();\n }\n mPaint.setAntiAlias(true);\n setTextSize(DEFAULT_TEXT_SIZE);\n mColors = new ColorScheme(this);\n mEventHandler = new EventHandler(this);\n mBasicDetector = new GestureDetector(getContext(), mEventHandler);\n mBasicDetector.setOnDoubleTapListener(mEventHandler);\n mScaleDetector = new ScaleGestureDetector(getContext(), mEventHandler);\n mViewRect = new Rect(0, 0, 0, 0);\n mRect = new RectF();\n mInsertHandle = new RectF();\n mLeftHandle = new RectF();\n mRightHandle = new RectF();\n mVerticalScrollBar = new RectF();\n mHorizontalScrollBar = new RectF();\n mDividerMargin = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 2, Resources.getSystem().getDisplayMetrics());\n mDividerWidth = mDividerMargin;\n mUnderlineWidth = mDividerMargin;\n mInsertSelWidth = mDividerWidth / 2;\n mDpUnit = mInsertSelWidth;\n mLineNumberAlign = Paint.Align.RIGHT;\n mTypefaceLineNumber = Typeface.MONOSPACE;\n mTypefaceText = Typeface.DEFAULT;\n mChars = new char[256];\n mEditable = true;\n mScale = true;\n mDrag = false;\n mWait = false;\n mPaintLabel = true;\n mDisplayLnPanel = true;\n mBlockLineWidth = 2;\n mInputMethodManager = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n mClipboardManager = Clipboard.getClipboard(getContext());\n setUndoEnabled(true);\n mTabWidth = 4;\n mAutoIndent = true;\n mCursorPosition = -1;\n mHighlightCurrentBlock = true;\n setFocusable(true);\n setFocusableInTouchMode(true);\n mConnection = new RoseEditorInputConnection(this);\n mACPanel = new AutoCompletePanel(this);\n mTextActionPanel = new TextComposePanel(this);\n mTextActionPanel.setHeight((int)(mDpUnit * 60));\n mTextActionPanel.setWidth((int)(mDpUnit * 230));\n setEditorLanguage(null);\n setText(null);\n }",
"public void run() {\n\t\t\t\t\t\t}",
"@Override\n public void run(){\n }",
"public void working()\n {\n \n \n }",
"@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}",
"@Override\n\tpublic void render() {\n\t\t\n\t}",
"@Override\n public void update() {\n \n }",
"@Override\n\tpublic void render () {\n\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void run() {\n\t\t\r\n\t}",
"@Override\n\tpublic void postRun() {\n\t}",
"void dynamicRendering();",
"@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n String dataDir = Utils.getDataDir(ParticularDWGToImage.class) + \"DWGDrawings/\";\n String sourceFilePath = dataDir + \"visualization_-_conference_room.dwg\";\n\n CadImage cadImage = ((CadImage)(Image.load(sourceFilePath)));\n\n CadBaseEntity[] entities = cadImage.getEntities();\n \n List<CadBaseEntity> filteredEntities = new ArrayList<CadBaseEntity>();\n for (CadBaseEntity baseEntity : entities) {\n // selection or filtration of entities\n if ((baseEntity.getTypeName() == CadEntityTypeName.TEXT)) {\n filteredEntities.add(baseEntity);\n }\n\n }\n \n CadBaseEntity[] arr = new CadBaseEntity[filteredEntities.size()];\n cadImage.setEntities(filteredEntities.toArray(arr));\n // Create an instance of CadRasterizationOptions and set its various properties\n CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions();\n rasterizationOptions.setPageWidth(1600);\n rasterizationOptions.setPageHeight(1600);\n // Set Auto Layout Scaling\n rasterizationOptions.setAutomaticLayoutsScaling(true);\n // Create an instance of PdfOptions\n PdfOptions pdfOptions = new PdfOptions();\n // Set the VectorRasterizationOptions property\n pdfOptions.setVectorRasterizationOptions(rasterizationOptions);\n String outFile = dataDir + \"result_out_generated.pdf\";\n // Export the CAD to PDF\n cadImage.save(outFile, pdfOptions);\n //ExEnd:ParticularDWGToImage\n }",
"public void run() {\n scroolViewScanner.setBackgroundColor(Color.TRANSPARENT);\n scroolViewDefect.setBackgroundColor(Color.TRANSPARENT);\n linLayOverView.setBackgroundColor(Color.TRANSPARENT);\n }",
"@Override\r\n\tpublic void carDashboar() {\n\t\t\r\n\t}",
"Lab refresh();",
"@Override\r\n\t\t\t\tpublic void run() {\n\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void run() {\n\r\n\t\t\t\t}",
"@Override\n\tpublic void renderSource() {\n\t\t\n\t}",
"public void run() {\n \t\t\t\t\tCaesarJContentOutlinePage.updateAll(projectProperties);\n \t\t\t\t\tCaesarHierarchyView.updateAll(projectProperties);\n \t\t\t\t}",
"public void applyHorn() {\n\t\t\r\n\t}",
"@Override\n protected void execute() {\n \n }",
"@Override\n\tprotected void getExras() {\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 run() {\n\t\t\n\t\t\t\t\t\t\n\t}"
]
| [
"0.57286084",
"0.5721873",
"0.5685595",
"0.5611692",
"0.5611692",
"0.5596448",
"0.5573983",
"0.555654",
"0.55509007",
"0.5543824",
"0.551758",
"0.55170584",
"0.54959154",
"0.5489394",
"0.54819673",
"0.54768246",
"0.5474171",
"0.5460018",
"0.5460018",
"0.5429363",
"0.5428646",
"0.54283154",
"0.54283154",
"0.541461",
"0.5411783",
"0.5410482",
"0.53918415",
"0.5379273",
"0.5363022",
"0.53501576",
"0.53462136",
"0.53427184",
"0.53330284",
"0.532736",
"0.5319406",
"0.5315432",
"0.5315216",
"0.53146106",
"0.5302243",
"0.52791643",
"0.5279044",
"0.5279044",
"0.52767205",
"0.52767205",
"0.527336",
"0.52679497",
"0.52531403",
"0.52529657",
"0.52431345",
"0.52414435",
"0.5220158",
"0.5218579",
"0.52170736",
"0.52160937",
"0.5210547",
"0.5204687",
"0.52023476",
"0.5198065",
"0.5194577",
"0.5189807",
"0.5187555",
"0.51874787",
"0.5185333",
"0.51851445",
"0.5184791",
"0.51797056",
"0.51786095",
"0.5177583",
"0.51767206",
"0.51735455",
"0.5169091",
"0.5153236",
"0.51520395",
"0.51506615",
"0.515015",
"0.515015",
"0.515015",
"0.515015",
"0.515015",
"0.515015",
"0.515015",
"0.515015",
"0.515015",
"0.5147369",
"0.51396936",
"0.5135886",
"0.5135886",
"0.5135491",
"0.5135359",
"0.5130127",
"0.51216716",
"0.5116662",
"0.5116662",
"0.5115811",
"0.5113488",
"0.51078635",
"0.51032346",
"0.51016355",
"0.5100951",
"0.5100951",
"0.50996083"
]
| 0.0 | -1 |
Create a new LocalLockMergingSegmentReadLocker for specified cache and index name. | public LocalLockMergingSegmentReadLocker(Cache<?, ?> cache, String indexName) {
this.delegate = new DistributedSegmentReadLocker((Cache<Object, Integer>) cache, cache, cache, indexName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public LocalLockMergingSegmentReadLocker(Cache<?, ?> locksCache, Cache<?, ?> chunksCache, Cache<?, ?> metadataCache, String indexName) {\n this.delegate = new DistributedSegmentReadLocker((Cache<Object, Integer>) locksCache, chunksCache, metadataCache, indexName);\n }",
"Lock getLock(String lockName);",
"Lock getLockByKey(String key);",
"void acquireDatasetCreateIndexLock(LockList locks, DataverseName dataverseName, String datasetName)\n throws AlgebricksException;",
"ManagementLockObject create(Context context);",
"public CacheKey acquireLock(Vector primaryKey, boolean forMerge) {\n //check if the key is already in the hashtable\n CacheKey key = null;\n\n //cache key should not be changed in other threads during the lock acquire operation\n synchronized (this) {\n // bug 3094912 get must be synchronized as well\n key = getCacheKey(primaryKey);\n if (key == null) {\n //create a chachKey and lock the object\n CacheKey cacheKey = createCacheKey(primaryKey, null, null);\n cacheKey.acquire(forMerge);\n put(cacheKey);\n return cacheKey;\n }\n }\n\n // code removed as key will never be null here, either one will be found or one created\n key.acquire();\n\n return key;\n }",
"static Lock createLock() {\n return new /*Prio*/Lock();\n }",
"ManagementLockObject create();",
"public synchronized ClusterReader newClusterReader(int clusterId, boolean cachePage) {\n long clusterLength;\n if (clusterId == numClusters - 1) {\n clusterLength = segmentPMSOffset - clusterOffsets[clusterId];\n } else {\n clusterLength = clusterOffsets[clusterId + 1] - clusterOffsets[clusterId];\n }\n ScanMode[] modes = null;\n if (scanMap != null) {\n modes = scanMap.get(clusterId);\n }\n return new ClusterReader(this, clusterId, clusterOffsets[clusterId],\n clusterLength, pms.getPageMetaLists()[clusterId], modes, cachePage);\n }",
"private synchronized ReadOnlyDirectoryReader createReadDirectoryReader(\n\t\t\tfinal Directory directory,\n\t\t\tfinal SegmentInfos infos, \n\t\t\tfinal IndexDeletionPolicy deletionPolicy,\n\t\t\tfinal int termInfosIndexDivisor, \n\t\t\tString segmentFileName) throws CorruptIndexException, IOException {\n\t\tReadOnlyDirectoryReader reader = new ReadOnlyDirectoryReader(\n\t\t\t\tdirectory, infos, deletionPolicy, termInfosIndexDivisor, null);\n\t\t\n\t\t// Faire quelque chose...\n\t\t// Raaah c'est les SolrIndexSearchers qu'ils faut mettre a jour !! :'(\n\t\t\n\t\t// creation d'un objet de sauvegarde\n\t\tReadDirectoryReader r = new ReadDirectoryReader(directory, infos, deletionPolicy, termInfosIndexDivisor);\n\t\t// Mise a jour des anciens readers\n\t\tif (!readDirectoryReaders.isEmpty()) {\n\t\t\tupdateReadOnlyReaders(reader);\n\t\t}\n\t\treadDirectoryReaders.put(segmentFileName,r);\n\t\t\n\t\treturn reader;\n\t}",
"private Lock getLock(int tid, int varIndex) {\n if (_lockTable.containsKey(varIndex)) {\n List<Lock> lockList = _lockTable.get(varIndex);\n for (Lock lc : lockList) {\n if (lc.getTranId() == tid) {\n return lc;\n }\n }\n }\n return null;\n }",
"void acquireMergePolicyReadLock(LockList locks, String mergePolicyName) throws AlgebricksException;",
"public CacheKey acquireReadLockOnCacheKey(Vector primaryKey) {\n //check if the key is already in the hashtable\n CacheKey key = null;\n\n //cache key should not be changed in other threads during the lock acquire operation\n synchronized (this) {\n key = getCacheKey(primaryKey);\n if (key == null) {\n //create a chachKey and lock the object\n CacheKey cacheKey = createCacheKey(primaryKey, null, null);\n\n //lets create one but not put it in the cache, as we are only reading\n // should not be writing to the identitymap\n cacheKey.acquireReadLock();\n return cacheKey;\n }\n }\n\n key.acquireReadLock();\n\n return key;\n }",
"void acquireDataverseReadLock(LockList locks, DataverseName dataverseName) throws AlgebricksException;",
"void acquireFullTextFilterReadLock(LockList locks, DataverseName dataverseName, String fullTextFilterName)\n throws AlgebricksException;",
"public Engine.LocalLock getLocalInterface(Engine.LocalLock pLocalInterface);",
"public abstract RecordReader<K , V> createRecordReader(InputSplit inputSplit) throws IOException, SfsFileDoesNotExistException;",
"public void setLocalLock(java.lang.String localLock) {\r\n this.localLock = localLock;\r\n }",
"void acquireLibraryReadLock(LockList locks, DataverseName dataverseName, String libraryName)\n throws AlgebricksException;",
"public MLNKVMemoryCache(String name) {\n this.name = name;\n LRUCountLimit = 10000;\n FIFOCountLimit = 1000;\n memorySizeLimit = 100 << 20;\n releaseOnMainThread = false;\n\n useFIFO = true;\n useLRU = true;\n\n weakMap = new HashMap<>();\n LRUCache = new MLNKVCache();\n FIFOCache = new MLNKVCache();\n\n LRUCache.releaseOnMainThread = releaseOnMainThread;\n FIFOCache.releaseOnMainThread = releaseOnMainThread;\n }",
"public AsyncLock getLockFor(long timestamp) {\n return new ImmutableTimestampLock(timestamp, this);\n }",
"LockStorage getLockStorage();",
"void acquireAdapterReadLock(LockList locks, DataverseName dataverseName, String adapterName)\n throws AlgebricksException;",
"private void setLock(int tid, int varIndex, Lock.Type type) {\n List<Lock> lockList = null;\n if (_lockTable.containsKey(varIndex)) {\n lockList = _lockTable.get(varIndex);\n lockList.add(new Lock(tid, type));\n } else {\n lockList = new ArrayList<Lock>();\n lockList.add(new Lock(tid, type));\n _lockTable.put(varIndex, lockList);\n }\n }",
"public static Locks create() {\n\t\tString uuid = ObjectId.get().toHexString();\n\t\treturn owner( uuid );\n\t}",
"protected CacheKey getCacheKeyWithReadLock(Vector primaryKey) {\n CacheKey key = getCacheKey(primaryKey);\n\n if (key != null) {\n key.acquireReadLock();\n key.releaseReadLock();\n }\n\n return key;\n }",
"void acquireDatasetReadLock(LockList locks, DataverseName dataverseName, String datasetName)\n throws AlgebricksException;",
"void acquireFunctionReadLock(LockList locks, DataverseName dataverseName, String functionName)\n throws AlgebricksException;",
"void acquireFullTextConfigReadLock(LockList locks, DataverseName dataverseName, String fullTextConfigName)\n throws AlgebricksException;",
"public CacheKey acquireReadLockOnCacheKeyNoWait(Vector primaryKey) {\n //check if the key is already in the hashtable\n CacheKey key = null;\n\n //cache key should not be changed in other threads during the lock acquire operation\n synchronized (this) {\n key = getCacheKey(primaryKey);\n if (key == null) {\n //create a chachKey and lock the object\n CacheKey cacheKey = createCacheKey(primaryKey, null, null);\n cacheKey.acquireReadLock();\n\n //lets create one but not put it in the cache, as we are only reading\n // should not be writing to the identitymap\n return cacheKey;\n }\n }\n\n //find the key in the hashtable, lock the object\n if (key != null) {\n //couldn't acquire the key so do not return it\n if (!key.acquireReadLockNoWait()) {\n key = null;\n }\n }\n\n return key;\n }",
"public CacheKey acquireLockNoWait(Vector primaryKey, boolean forMerge) {\n //check if the key is already in the hashtable\n CacheKey key = null;\n\n //cache key should not be changed in other threads during the lock acquire operation\n synchronized (this) {\n key = getCacheKey(primaryKey);\n if (key == null) {\n //create a chachKey and lock the object\n CacheKey cacheKey = createCacheKey(primaryKey, null, null);\n cacheKey.acquire(forMerge);\n put(cacheKey);\n return cacheKey;\n }\n }\n\n //find the key in the hashtable, lock the object\n if (key != null) {\n //couldn't acquire the key so do not return it\n if (!key.acquireNoWait(forMerge)) {\n key = null;\n }\n }\n\n return key;\n }",
"WithCreate withLevel(LockLevel level);",
"void createCache(String cacheName, Set<CloudCacheStrategy> strategies);",
"void acquireReadLock(E key);",
"public LockToken createAndLock(String name, LockTimeout timeout,\n\t\t\tLockInfo lockInfo) throws NotAuthorizedException {\n\t\tLOGGER.debug(\"Create And Lock {} {} \", timeout, lockInfo);\n\n\t\ttry {\n\t\t\tString newPath = StorageClientUtils.newPath(path, name);\n\t\t\tLockHolder lockHolder = new LockHolder(lockInfo, timeout);\n\t\t\tString token = session.getLockManager().lock(newPath,\n\t\t\t\t\tlockHolder.getTimeoutInSeconds(), lockHolder.toString());\n\t\t\treturn new LockToken(token, lockInfo, timeout);\n\t\t} catch (StorageClientException e) {\n\t\t\tLOGGER.error(e.getMessage(), e);\n\t\t\tthrow new NotAuthorizedException(this);\n\t\t} catch (AlreadyLockedException e) {\n\t\t\tLOGGER.error(e.getMessage(), e);\n\t\t\tthrow new NotAuthorizedException(this);\n\t\t}\n\t}",
"public GcpLock createLock(String blob, long timeout, TimeUnit unit) throws InterruptedException {\n return new GcpLock(storage, bucketName, blob, timeout, unit);\n }",
"public static void createCacheServer1() throws Exception {\n ds = (new ClearGlobalDUnitTest()).getSystem(props);\n cache = CacheFactory.create(ds);\n AttributesFactory factory = new AttributesFactory();\n factory.setScope(Scope.GLOBAL);\n RegionAttributes attr = factory.create();\n region = cache.createRegion(REGION_NAME, attr);\n\n }",
"public interface LockFactory {\n\n /**\n * Obtain a lock for a resource identified by given {@code identifier}. Depending on the strategy, this\n * method may return immediately or block until a lock is held.\n *\n * @param identifier the identifier of the resource to obtain a lock for.\n * @return a handle to release the lock.\n */\n Lock obtainLock(String identifier);\n}",
"public void lock_read() {\n boolean update = false;\n logger.log(Level.INFO,\"lock_read()\"+this.lockState);\n lock.lock();\n logger.log(Level.INFO,\"lock_read : taking mutex : \"+this.lockState);\n \t\tswitch(this.lockState){\n \t\t\tcase RLC :\n \t\t\t\tthis.lockState=State.RLT;\n logger.log(Level.INFO,\"reading in cache\");\n \t\t\tbreak;\n \t\t\tcase WLC:\n \t\t\t\tthis.lockState=State.RLT_WLC;\n \t\t\t\tlogger.log(Level.INFO,\"reading in cache as previous writer\");\n \t\t\tbreak;\n \t\t\tdefault:\n update = true;\n \t\t\tbreak;\t\t\t\t\t\n \t\t}\n lock.unlock();\n logger.log(Level.FINE,\"lock_read : release the lock with :\"+lockState+\".\");\n if(update){\n logger.log(Level.INFO,\"Updating lockState to RLT\");\n \tthis.lockState=State.RLT;\n logger.log(Level.INFO,\"Lockstate was updated to \"+lockState);\n if(this.lockState!=State.RLT){\n logger.log(Level.SEVERE,\"Lock = \"+lockState+\" instead of RLT\");\n }\n this.obj = client.lock_read(this.id);\n if(this.lockState!=State.RLT){\n logger.log(Level.SEVERE,\"Lock = \"+lockState+\" instead of RLT\");\n }\n logger.log(Level.INFO,\"lock_read(): end with \"+lockState);\n }\n \t}",
"public InfinispanDirectory(Cache<?, ?> metadataCache, Cache<?, ?> chunksCache, Cache<?, ?> distLocksCache, String indexName, int chunkSize) {\n this(metadataCache, chunksCache, indexName, makeDefaultLockFactory(distLocksCache, indexName),\n chunkSize, makeDefaultSegmentReadLocker(metadataCache, chunksCache, distLocksCache, indexName));\n }",
"public static LRUResourceCache getCache(String contextName) {\n LRUResourceCache lruCache = null;\n ConcurrentHashMap<String, LRUResourceCache> cacheMap = RuntimeData.getCacheMap();\n KernelProps conf = KernelProps.getInstance();\n \n if (cacheMap.containsKey(contextName)) {\n lruCache = (LRUResourceCache) cacheMap.get(contextName);\n } else {\n lruCache = new LRUResourceCache(conf.getInitialCacheSize(), conf.getCacheLoadFactor(), conf.getCacheCapacity());\n cacheMap.put(contextName, lruCache);\n }\n return lruCache;\n }",
"public InputStream newInputStream(int index) throws IOException {\n\t\t\tsynchronized (DiskLruCache.this) {\n\t\t\t\tif (entry.currentEditor != this) {\n\t\t\t\t\tthrow new IllegalStateException();\n\t\t\t\t}\n\t\t\t\tif (!entry.readable) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn new FileInputStream(entry.getCleanFile(index));\n\t\t\t}\n\t\t}",
"LockManager() {\n }",
"public Cache getCache(String name)\r\n/* 39: */ {\r\n/* 40:64 */ return (Cache)this.cacheMap.get(name);\r\n/* 41: */ }",
"@NonNull\n private static CacheStorage newInstance(Context context, int type, String name) {\n switch (type) {\n case ORM_LITE:\n return OrmLiteCacheStorage.newInstance(context, name);\n case ROOM:\n return RoomCacheStorage.newInstance(context, name);\n default:\n throw new IllegalArgumentException(String.format(\"Unknown persistent \" +\n \"cache storage with name = %s, type = %d\", name, type));\n }\n }",
"void getLock(QName lockQName, String lockToken, long timeToLive);",
"public DistributedDbLock(@Nonnull String namespace,\n @Nonnull String name,\n @Nonnull AbstractLockAllocator allocator) {\n super(namespace, name, allocator);\n setupMetrics(Metrics.METRIC_LATENCY_LOCK,\n Metrics.METRIC_LATENCY_UNLOCK,\n Metrics.METRIC_COUNTER_CALLS,\n Metrics.METRIC_COUNTER_ERROR);\n }",
"void acquireNodeGroupReadLock(LockList locks, String nodeGroupName) throws AlgebricksException;",
"CloudCache getCache(String cacheName);",
"@Override\r\n\tpublic void addLockToken(String lt) {\n\t\t\r\n\t}",
"private void RecordStoreLockFactory() {\n }",
"protected synchronized Lock acquireLock() {\n\t\tacquireReadLock();\n\t\treturn new Lock();\n\t}",
"public ReentrantLock lock(String accountId) throws ImapThrottledException {\n ReentrantLock lock = null;\n synchronized (commandLock) {\n lock = commandLock.get(accountId);\n if (lock == null) {\n lock = new ReentrantLock();\n commandLock.put(accountId, lock);\n }\n }\n boolean locked = false;\n try {\n locked = lock.tryLock(LOCK_TIMEOUT, TimeUnit.MILLISECONDS);\n } catch (InterruptedException e) {\n }\n if (!locked) {\n throw new ImapThrottledException(\"Unable to obtain command lock \" + lock.toString() + \" aborting operation\");\n } else {\n return lock;\n }\n }",
"public static void createCacheServer2() throws Exception {\n ds = (new ClearGlobalDUnitTest()).getSystem(props);\n CacheObserverImpl observer = new CacheObserverImpl();\n origObserver = CacheObserverHolder.setInstance(observer);\n LocalRegion.ISSUE_CALLBACKS_TO_CACHE_OBSERVER = true;\n\n cache = CacheFactory.create(ds);\n AttributesFactory factory = new AttributesFactory();\n factory.setScope(Scope.GLOBAL);\n RegionAttributes attr = factory.create();\n region = cache.createRegion(REGION_NAME, attr);\n cache.setLockTimeout(3);\n\n }",
"private CacheWrapper<AccessPointIdentifier, Integer> createCache() {\n return new CacheWrapper<AccessPointIdentifier, Integer>() {\n \n @Override\n public void put(AccessPointIdentifier key, Integer value) {\n cache.put(key, value);\n }\n \n @Override\n public Integer get(AccessPointIdentifier key) {\n if (cache.containsKey(key)) {\n hitRate++;\n }\n return cache.get(key);\n }\n \n \n };\n }",
"static final synchronized AbstractRecordStoreLock getLockInstance(\n SecurityToken token, int suiteId, String storeName) {\n\n token.checkIfPermissionAllowed(Permissions.MIDP);\n String base = RmsEnvironment.getSecureFilenameBase(suiteId);\n String lockName = base + \"#\" + storeName;\n\n return new RecordStoreLock(token, lockName);\n }",
"public CacheObject(String pn, Runner runner) throws IOException, BadPathnameException {\n pathname = pn;\n // also sets server_checkin_time\n last_known_edit_time = get_server_edit_time(runner);\n content = new HashMap<>();\n final_block = -1;\n }",
"public java.lang.String getLocalLock() {\r\n return localLock;\r\n }",
"public Cache(final Element cacheInfo, final Byte version,\n\t\t\tfinal String indexdir) {\n\t\tif (version == 0) {\n\t\t\treadInfo0(cacheInfo, indexdir);\n\t\t} else if (version == 3) {\n\t\t\treadInfo3(cacheInfo, indexdir);\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"unsupported version \" + version);\n\t\t}\n\t}",
"public Lock() {\r\n }",
"@NonNull\n public static CacheStorage instance(Context context, String name) {\n return instance(context, Config.CACHE_MODELS_TYPE, name);\n }",
"public static Constant construct(String name){\n Constant retVal = cache.get(name);\n if (retVal == null) {\n retVal = new Constant(name);\n cache.put(name, retVal);\n }\n return retVal;\n }",
"public VersionLockingPolicy(String fieldName) {\r\n this(new DatabaseField(fieldName));\r\n }",
"public VersionLockingPolicy() {\r\n super();\r\n storeInCache();\r\n }",
"@NonNull\n public static CacheStorage instance(Context context, int type, String name) {\n // find storage in the map and create it if not found\n CacheStorage cache = map.get(name);\n if (cache == null) {\n synchronized (CacheStorageManager.class) {\n cache = map.get(name);\n if (cache == null) {\n cache = newInstance(context, type, name);\n map.put(name, cache);\n return cache;\n }\n }\n }\n\n // check the type of the found storage\n if (cache.getType() != type) {\n throw new IllegalArgumentException(String.format(\"Persistent cache storage with \" +\n \"name = %s has been already created with the different type = %d\", name, type));\n }\n\n return cache;\n }",
"@Override\n public void acquireShared( Locks.ResourceType resourceType, long resourceId ) throws AcquireLockTimeoutException\n {\n ConcurrentMap<Long, ForsetiLockManager.Lock> lockMap = lockMaps[resourceType.typeId()];\n\n // And grab our local lock maps\n PrimitiveLongIntMap heldShareLocks = sharedLockCounts[resourceType.typeId()];\n PrimitiveLongIntMap heldExclusiveLocks = exclusiveLockCounts[resourceType.typeId()];\n\n // First, check if we already hold this as a shared lock\n int heldCount = heldShareLocks.get( resourceId );\n if(heldCount != -1)\n {\n // We already have a lock on this, just increment our local reference counter.\n heldShareLocks.put( resourceId, heldCount + 1 );\n return;\n }\n\n // Second, check if we hold it as an exclusive lock\n if( heldExclusiveLocks.containsKey( resourceId ) )\n {\n // We already have an exclusive lock, so just leave that in place. When the exclusive lock is released,\n // it will be automatically downgraded to a shared lock, since we bumped the share lock reference count.\n heldShareLocks.put( resourceId, 1 );\n return;\n }\n\n // We don't hold the lock, so we need to grab it via the global lock map\n int tries = 0;\n SharedLock mySharedLock = null;\n\n // Retry loop\n while(true)\n {\n // Check if there is a lock for this entity in the map\n ForsetiLockManager.Lock existingLock = lockMap.get( resourceId );\n\n // No lock\n if(existingLock == null)\n {\n // Try to create a new shared lock\n if(mySharedLock == null)\n {\n mySharedLock = new SharedLock( this );\n }\n\n if(lockMap.putIfAbsent( resourceId, mySharedLock ) == null)\n {\n // Success, we now hold the shared lock.\n break;\n }\n else\n {\n continue;\n }\n }\n\n // Someone holds shared lock on this entity, try and get in on that action\n else if(existingLock instanceof SharedLock)\n {\n if(((SharedLock)existingLock).acquire(this))\n {\n // Success!\n break;\n }\n }\n\n // Someone holds an exclusive lock on this entity\n else if(existingLock instanceof ExclusiveLock)\n {\n // We need to wait, just let the loop run.\n }\n else\n {\n throw new UnsupportedOperationException( \"Unknown lock type: \" + existingLock );\n }\n\n // Apply the designated wait strategy\n waitStrategies[resourceType.typeId()].apply( tries++ );\n\n // And take note of who we are waiting for. This is used for deadlock detection.\n markAsWaitingFor( existingLock, resourceType, resourceId );\n }\n\n // Got the lock, no longer waiting for anyone.\n clearWaitList();\n\n // Make a local note about the fact that we now hold this lock\n heldShareLocks.put( resourceId, 1 );\n }",
"public abstract ReentrantLock getLock();",
"public static void alloc_cache_r(int request, int index_set,Memory[] memory_r, Cache[] cache_r, MCT[] mct_r){\n\t\tint replace_index=index_set*4+random_in_set_alloc_producer();\n\t\tmct_r[index_set].tag=cache_r[replace_index].address;\n\t\t\n\t\tcache_r[replace_index].address=memory_r[request].address;\n\t\tcache_r[replace_index].content=memory_r[request].content;\n\t\tcache_r[replace_index].priority=memory_r[request].priority;\n\t}",
"void acquireActiveEntityReadLock(LockList locks, DataverseName dataverseName, String entityName)\n throws AlgebricksException;",
"public static IndexReader open(Directory directory) throws IOException {\n synchronized (directory) {\n SegmentInfos infos = new SegmentInfos();\n infos.read(directory);\n if (infos.size() == 1)\t\t\t // index is optimized\n\treturn new SegmentReader(infos.info(0), true);\n \n SegmentReader[] readers = new SegmentReader[infos.size()];\n for (int i = 0; i < infos.size(); i++)\n\treaders[i] = new SegmentReader(infos.info(i), i == infos.size() - 1);\n return new SegmentsReader(readers);\n }\n }",
"void acquireFeedPolicyReadLock(LockList locks, DataverseName dataverseName, String feedPolicyName)\n throws AlgebricksException;",
"public IndexedDiskCache(final IndexedDiskCacheAttributes cattr, final IElementSerializer elementSerializer)\r\n {\r\n super(cattr);\r\n\r\n setElementSerializer(elementSerializer);\r\n\r\n this.cattr = cattr;\r\n this.maxKeySize = cattr.getMaxKeySize();\r\n this.isRealTimeOptimizationEnabled = cattr.getOptimizeAtRemoveCount() > 0;\r\n this.isShutdownOptimizationEnabled = cattr.isOptimizeOnShutdown();\r\n this.logCacheName = \"Region [\" + getCacheName() + \"] \";\r\n this.diskLimitType = cattr.getDiskLimitType();\r\n // Make a clean file name\r\n this.fileName = getCacheName().replaceAll(\"[^a-zA-Z0-9-_\\\\.]\", \"_\");\r\n this.keyHash = createInitialKeyMap();\r\n this.queuedPutList = new ConcurrentSkipListSet<>(Comparator.comparing(ded1 -> ded1.pos));\r\n this.recycle = new ConcurrentSkipListSet<>();\r\n\r\n try\r\n {\r\n initializeFileSystem(cattr);\r\n initializeKeysAndData(cattr);\r\n\r\n // Initialization finished successfully, so set alive to true.\r\n setAlive(true);\r\n log.info(\"{0}: Indexed Disk Cache is alive.\", logCacheName);\r\n\r\n // TODO: Should we improve detection of whether or not the file should be optimized.\r\n if (isRealTimeOptimizationEnabled && !keyHash.isEmpty())\r\n {\r\n // Kick off a real time optimization, in case we didn't do a final optimization.\r\n doOptimizeRealTime();\r\n }\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(\"{0}: Failure initializing for fileName: {1} and directory: {2}\",\r\n logCacheName, fileName, this.rafDir.getAbsolutePath(), e);\r\n }\r\n }",
"synchronized ExerciseBuffer pinNew(String filename, PageFormatter fmtr) {\n\t ExerciseBuffer buff = chooseUnpinnedBuffer();\n if (buff == null)\n return null;\n Block blk=buff.assignToNew(filename, fmtr); // return the newly created block\n numAvailable--;\n buff.pin();\n \n if(bufferHashTable.containsValue(buff)){ //if value (buffer) is already exist then remove that key (blk) \n bufferHashTable.remove(blk); \n \n }\n bufferHashTable.put(blk, buff); // adding new key (blk) to HashTable\n \n return buff;\n }",
"private Integer getLockFromId(long lockId)\n throws IOException {\n if(lockId == -1L) {\n return null;\n }\n String lockName = String.valueOf(lockId);\n Integer rl = null;\n synchronized(rowlocks) {\n rl = rowlocks.get(lockName);\n }\n if(rl == null) {\n throw new IOException(\"Invalid row lock\");\n }\n this.leases.renewLease(lockName);\n return rl;\n }",
"void acquireSynonymReadLock(LockList locks, DataverseName dataverseName, String synonymName)\n throws AlgebricksException;",
"@Override\n public void addCache(String cacheName) {\n scanList.add(cacheName);\n }",
"public BlackLabIndex wrapIndexReader(String indexName, IndexReader reader, boolean indexMode) throws ErrorOpeningIndex {\n return new BlackLabIndexIntegrated(indexName, this, reader, null, indexMode, false,\n null);\n }",
"private synchronized Loader getNextLoader(int[] cache, int index) {\n if (this.closed) {\n return null;\n }\n if (cache == null) {\n return getLoader(index);\n } else if (index >= cache.length) {\n return null;\n } else {\n Loader loader = (Loader) this.loaders.get(cache[index]);\n if (DEBUG_LOOKUP_CACHE) {\n System.out.println(\"HASCACHE: Loading from : \" + cache[index] + \" = \" + loader.getBaseURL());\n }\n }\n }",
"public NamedCache getCache(String sCacheName, ClassLoader loader)\n {\n Map mapByLoader = (Map) m_mapByName.get(sCacheName);\n\n if (mapByLoader != null)\n {\n synchronized (mapByLoader)\n {\n Object oHolder = mapByLoader.get(loader);\n\n if (oHolder == null || oHolder instanceof NamedCache)\n {\n return (NamedCache) oHolder;\n }\n else if (oHolder instanceof SubjectScopedReference)\n {\n return (NamedCache) ((SubjectScopedReference) oHolder).get();\n }\n else\n {\n throw new UnsupportedOperationException();\n }\n }\n }\n\n return null;\n }",
"private BufferedReader inFromFile(String indexFullName) \n {\n try \n { return new BufferedReader( new FileReader( new File( indexFullName ) ) ); } \n catch (FileNotFoundException e) \n {\n log.warn( \"could not find index file \" + indexFullName + \": no bindings created\" );\n return new BufferedReader( new EmptyReader() );\n }\n }",
"public static Object installLock(Object lock, int index) {\n return installLock(lock, index, /*doWtf=*/ false);\n }",
"public synchronized BlackLabIndex getIndexFromReader(String indexName, IndexReader reader, boolean wrapIfNotFound, boolean writeMode) {\n BlackLabIndex blackLabIndex = indexReader2BlackLabIndex.get(reader);\n if (blackLabIndex == null && wrapIfNotFound) {\n // We don't have a BlackLabIndex instance for this IndexReader yet. This can occur if e.g.\n // Solr is in charge of opening IndexReaders. Create a new instance now and register it.\n try {\n blackLabIndex = wrapIndexReader(indexName, reader, false);\n registerIndex(reader, blackLabIndex);\n } catch (ErrorOpeningIndex e) {\n throw new RuntimeException(e);\n }\n }\n return blackLabIndex;\n }",
"void acquireDataTypeReadLock(LockList locks, DataverseName dataverseName, String datatypeName)\n throws AlgebricksException;",
"void lock(String resourceName) throws InterruptedException;",
"public synchronized void setNewReader(File indexDir) throws IOException{\r\n \tsynchronized (mReaders) {\r\n \t\ttry{\r\n \tList<ReaderContainer> lReader;\r\n \tif (!mReaders.containsKey(indexDir)){\r\n \t\tlReader = new ArrayList<ReaderContainer>();\r\n \t\tlReader.add(new ReaderContainer(IndexReader.open(FSDirectory.open(indexDir))));\r\n \t\tmReaders.put(indexDir, lReader);\r\n \t} else {\r\n \t\tlReader = mReaders.get(indexDir);\r\n \t\t\r\n \t\tif (lReader.size() > 0){\r\n \t\t\tlog.debug(\"setNewReader-STEP1 :: lReader.size() = \" + lReader.size());\r\n// \t\t\tfor (int i = lReader.size() - 1; i >= 0 ; i--) {\r\n// \t\t\t\tReaderContainer readerContainer = lReader.get(i);\r\n \t\t\tReaderContainer readerContainer = lReader.get(lReader.size() - 1);\r\n \t\t\t\r\n \tif (readerContainer.isClosable()){\r\n \t\treaderContainer.close();\r\n \t\tlReader.remove(readerContainer);\r\n \t}\r\n// \t\t\t}\r\n \t}\r\n \t\tlReader.add(new ReaderContainer(IndexReader.open(FSDirectory.open(indexDir))));\r\n \t\tlog.debug(\"setNewReader :: lReader.size() = \" + lReader.size());\r\n \t}\r\n \t\r\n \t\t} catch(Exception ex){\r\n \t\tlog.fatal(\"setNewReader :: mReaders.containsKey(indexDir)\" +mReaders.containsKey(indexDir)+\" indexDir \"+indexDir.getCanonicalPath()+\" ERR:\"+ex);\r\n \t}\r\n\t\t}\r\n }",
"protected void createLookupCache()\n/* */ {\n/* 1260 */ this.lookup = new SimpleCache(1, Math.max(getSize() * 2, 64));\n/* */ }",
"SoftLockID createSoftLockID(TransactionID transactionID, Object key, Element newElement, Element oldElement, boolean pinned);",
"public StatDataFileReader createReaderInstance() throws IOException{\n return createReaderInstance(null);\n }",
"@Override\n\tpublic RecordReader<NullWritable, Text> createRecordReader(InputSplit split, TaskAttemptContext context)\n\t\t\tthrows IOException {\n\t\tCustomRecordReader reader = new CustomRecordReader();\n\t\t\n\t\ttry {\n\t\t\treader.initialize(split, context);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn reader;\n\t}",
"private static File getLockFileForNID(String nid) {\r\n\t\tString filename = normalizeID(nid) + \".lock\";\r\n\t\treturn new File(LOCK_FILES_DIR, filename);\r\n\t}",
"static ZkLockNode lockNodeFromId(String lockId, String lockIdSelf) {\n\t\t\n\t\tILock.LockType type;\n\t\t\n\t\tif (lockId.startsWith(ILock.LockType.Read.toString()))\n\t\t\ttype = ILock.LockType.Read;\n\t\telse if (lockId.startsWith(ILock.LockType.Write.toString()))\n\t\t\ttype = ILock.LockType.Write;\n\t\telse\n\t\t\treturn null; // not lock node\n\t\t\n\t\tint seqNo;\n\t\tint sepIdx = lockId.lastIndexOf(\"-\");\n\t\tif (sepIdx == -1)\n\t\t\treturn null; // not lock node\n\t\t\n\t\ttry {\n\t\t\tseqNo = Integer.parseInt(lockId.substring(sepIdx + 1));\n\t\t} catch (Exception ex) {\n\t\t\treturn null; // not lock node\n\t\t}\n\t\t\n\t\treturn new ZkLockNode(lockId, type, seqNo, lockId.equals(lockIdSelf));\n\t}",
"public static CacheStorage instance(String name) {\n return instance(App_.getInstance(), name);\n }",
"public Lock getLock();",
"public ResidueLocator(String _chain, String _name, int _idx)\n\t{\n\t\tchain = _chain;\n\t\tname = _name;\n\t\tidx = _idx;\n\t}",
"public CacheEntry searchWithCache(String name) {\n CacheEntry entry = cacheHit(name);\n \n if (entry != null) return entry;\n \n // we grab serial number first; the worst that will happen is we cache a later\n // update with an earlier serial number, which would just flush anyway\n Object token = getCacheToken();\n DynamicMethod method = searchMethodInner(name);\n \n return method != null ? addToCache(name, method, token) : addToCache(name, UndefinedMethod.getInstance(), token);\n }",
"private static Trajectory readFile(String name) {\n\t\ttry {\n\t\t\tFile file = new File(cacheDirectory + name);\n\t\t\tFileInputStream fis = new FileInputStream(file);\n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\t\t\tTrajectory t = (Trajectory) ois.readObject();\n\t\t\tois.close();\n\t\t\tfis.close();\n\t\t\treturn t;\n\t\t}\n\t\tcatch (Exception e) { return null; }\n\t}",
"@Test\n public void readLockShareTest() throws InterruptedException {\n final TestUse testUse = new TestUse();\n int threadNum = 10;\n final CountDownLatch countDownLatch = new CountDownLatch(threadNum);\n final ConcurrentHashMap concurrentHashMap = new ConcurrentHashMap();\n for (int i = 0; i < threadNum; i++) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n boolean result = testUse.ifGetReadLockIn2Milliseconds();\n Assert.assertTrue(result);\n if (result) {\n concurrentHashMap.put(Thread.currentThread().getName(), \"value\");\n }\n countDownLatch.countDown();\n }\n }).start();\n }\n countDownLatch.await();\n Assert.assertEquals(threadNum, concurrentHashMap.size());\n }",
"public IndexedDiskCache(final IndexedDiskCacheAttributes cacheAttributes)\r\n {\r\n this(cacheAttributes, null);\r\n }",
"FileLoader createJob(Reader reader);",
"public abstract List<String> getCachedLogs(String readerName);"
]
| [
"0.7690231",
"0.5587361",
"0.5227554",
"0.50263023",
"0.49995685",
"0.49094",
"0.49066085",
"0.48678216",
"0.48462892",
"0.47891486",
"0.47794625",
"0.47125503",
"0.47033414",
"0.46937096",
"0.46784788",
"0.46405992",
"0.4621899",
"0.4613479",
"0.45738262",
"0.45593455",
"0.45412698",
"0.45409882",
"0.45292154",
"0.45248324",
"0.45077378",
"0.45047972",
"0.4492499",
"0.44879818",
"0.4479324",
"0.44398832",
"0.4432836",
"0.44286016",
"0.44166905",
"0.4415539",
"0.44014347",
"0.43955463",
"0.43863612",
"0.43748876",
"0.4370502",
"0.43563506",
"0.43540964",
"0.43491107",
"0.43465394",
"0.43413842",
"0.43352228",
"0.43314815",
"0.4323297",
"0.43194008",
"0.4316256",
"0.43109939",
"0.43056825",
"0.4282497",
"0.4277839",
"0.42756337",
"0.4274919",
"0.4267348",
"0.4255777",
"0.42430493",
"0.4198997",
"0.41948467",
"0.4192975",
"0.41857997",
"0.4184823",
"0.4180864",
"0.41750583",
"0.41716844",
"0.4158628",
"0.41459897",
"0.4140891",
"0.41390607",
"0.41315332",
"0.41290703",
"0.41204816",
"0.41144776",
"0.41100624",
"0.41052607",
"0.4105154",
"0.40960085",
"0.40895924",
"0.40895155",
"0.40881127",
"0.40829575",
"0.40783468",
"0.4077826",
"0.4075884",
"0.4063561",
"0.40613994",
"0.40452284",
"0.4043867",
"0.40226185",
"0.4019684",
"0.40043357",
"0.40007535",
"0.39886963",
"0.39851964",
"0.39843878",
"0.39818147",
"0.3978315",
"0.39773774",
"0.39742833"
]
| 0.7855449 | 0 |
Create a new LocalLockMergingSegmentReadLocker with special purpose caches | public LocalLockMergingSegmentReadLocker(Cache<?, ?> locksCache, Cache<?, ?> chunksCache, Cache<?, ?> metadataCache, String indexName) {
this.delegate = new DistributedSegmentReadLocker((Cache<Object, Integer>) locksCache, chunksCache, metadataCache, indexName);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public LocalLockMergingSegmentReadLocker(Cache<?, ?> cache, String indexName) {\n this.delegate = new DistributedSegmentReadLocker((Cache<Object, Integer>) cache, cache, cache, indexName);\n }",
"ManagementLockObject create();",
"ManagementLockObject create(Context context);",
"static Lock createLock() {\n return new /*Prio*/Lock();\n }",
"private void RecordStoreLockFactory() {\n }",
"LockStorage getLockStorage();",
"LockManager() {\n }",
"public CacheKey acquireLock(Vector primaryKey, boolean forMerge) {\n //check if the key is already in the hashtable\n CacheKey key = null;\n\n //cache key should not be changed in other threads during the lock acquire operation\n synchronized (this) {\n // bug 3094912 get must be synchronized as well\n key = getCacheKey(primaryKey);\n if (key == null) {\n //create a chachKey and lock the object\n CacheKey cacheKey = createCacheKey(primaryKey, null, null);\n cacheKey.acquire(forMerge);\n put(cacheKey);\n return cacheKey;\n }\n }\n\n // code removed as key will never be null here, either one will be found or one created\n key.acquire();\n\n return key;\n }",
"Lock getLockByKey(String key);",
"WithCreate withLevel(LockLevel level);",
"void acquireMergePolicyReadLock(LockList locks, String mergePolicyName) throws AlgebricksException;",
"public VersionLockingPolicy() {\r\n super();\r\n storeInCache();\r\n }",
"Lock getLock(String lockName);",
"public CacheKey acquireReadLockOnCacheKey(Vector primaryKey) {\n //check if the key is already in the hashtable\n CacheKey key = null;\n\n //cache key should not be changed in other threads during the lock acquire operation\n synchronized (this) {\n key = getCacheKey(primaryKey);\n if (key == null) {\n //create a chachKey and lock the object\n CacheKey cacheKey = createCacheKey(primaryKey, null, null);\n\n //lets create one but not put it in the cache, as we are only reading\n // should not be writing to the identitymap\n cacheKey.acquireReadLock();\n return cacheKey;\n }\n }\n\n key.acquireReadLock();\n\n return key;\n }",
"@Override\r\n\tpublic void addLockToken(String lt) {\n\t\t\r\n\t}",
"private synchronized ReadOnlyDirectoryReader createReadDirectoryReader(\n\t\t\tfinal Directory directory,\n\t\t\tfinal SegmentInfos infos, \n\t\t\tfinal IndexDeletionPolicy deletionPolicy,\n\t\t\tfinal int termInfosIndexDivisor, \n\t\t\tString segmentFileName) throws CorruptIndexException, IOException {\n\t\tReadOnlyDirectoryReader reader = new ReadOnlyDirectoryReader(\n\t\t\t\tdirectory, infos, deletionPolicy, termInfosIndexDivisor, null);\n\t\t\n\t\t// Faire quelque chose...\n\t\t// Raaah c'est les SolrIndexSearchers qu'ils faut mettre a jour !! :'(\n\t\t\n\t\t// creation d'un objet de sauvegarde\n\t\tReadDirectoryReader r = new ReadDirectoryReader(directory, infos, deletionPolicy, termInfosIndexDivisor);\n\t\t// Mise a jour des anciens readers\n\t\tif (!readDirectoryReaders.isEmpty()) {\n\t\t\tupdateReadOnlyReaders(reader);\n\t\t}\n\t\treadDirectoryReaders.put(segmentFileName,r);\n\t\t\n\t\treturn reader;\n\t}",
"void acquireDataverseReadLock(LockList locks, DataverseName dataverseName) throws AlgebricksException;",
"@Override\n public void acquireShared( Locks.ResourceType resourceType, long resourceId ) throws AcquireLockTimeoutException\n {\n ConcurrentMap<Long, ForsetiLockManager.Lock> lockMap = lockMaps[resourceType.typeId()];\n\n // And grab our local lock maps\n PrimitiveLongIntMap heldShareLocks = sharedLockCounts[resourceType.typeId()];\n PrimitiveLongIntMap heldExclusiveLocks = exclusiveLockCounts[resourceType.typeId()];\n\n // First, check if we already hold this as a shared lock\n int heldCount = heldShareLocks.get( resourceId );\n if(heldCount != -1)\n {\n // We already have a lock on this, just increment our local reference counter.\n heldShareLocks.put( resourceId, heldCount + 1 );\n return;\n }\n\n // Second, check if we hold it as an exclusive lock\n if( heldExclusiveLocks.containsKey( resourceId ) )\n {\n // We already have an exclusive lock, so just leave that in place. When the exclusive lock is released,\n // it will be automatically downgraded to a shared lock, since we bumped the share lock reference count.\n heldShareLocks.put( resourceId, 1 );\n return;\n }\n\n // We don't hold the lock, so we need to grab it via the global lock map\n int tries = 0;\n SharedLock mySharedLock = null;\n\n // Retry loop\n while(true)\n {\n // Check if there is a lock for this entity in the map\n ForsetiLockManager.Lock existingLock = lockMap.get( resourceId );\n\n // No lock\n if(existingLock == null)\n {\n // Try to create a new shared lock\n if(mySharedLock == null)\n {\n mySharedLock = new SharedLock( this );\n }\n\n if(lockMap.putIfAbsent( resourceId, mySharedLock ) == null)\n {\n // Success, we now hold the shared lock.\n break;\n }\n else\n {\n continue;\n }\n }\n\n // Someone holds shared lock on this entity, try and get in on that action\n else if(existingLock instanceof SharedLock)\n {\n if(((SharedLock)existingLock).acquire(this))\n {\n // Success!\n break;\n }\n }\n\n // Someone holds an exclusive lock on this entity\n else if(existingLock instanceof ExclusiveLock)\n {\n // We need to wait, just let the loop run.\n }\n else\n {\n throw new UnsupportedOperationException( \"Unknown lock type: \" + existingLock );\n }\n\n // Apply the designated wait strategy\n waitStrategies[resourceType.typeId()].apply( tries++ );\n\n // And take note of who we are waiting for. This is used for deadlock detection.\n markAsWaitingFor( existingLock, resourceType, resourceId );\n }\n\n // Got the lock, no longer waiting for anyone.\n clearWaitList();\n\n // Make a local note about the fact that we now hold this lock\n heldShareLocks.put( resourceId, 1 );\n }",
"public Engine.LocalLock getLocalInterface(Engine.LocalLock pLocalInterface);",
"void acquireReadLock(E key);",
"protected CacheKey getCacheKeyWithReadLock(Vector primaryKey) {\n CacheKey key = getCacheKey(primaryKey);\n\n if (key != null) {\n key.acquireReadLock();\n key.releaseReadLock();\n }\n\n return key;\n }",
"public void lock_read() {\n boolean update = false;\n logger.log(Level.INFO,\"lock_read()\"+this.lockState);\n lock.lock();\n logger.log(Level.INFO,\"lock_read : taking mutex : \"+this.lockState);\n \t\tswitch(this.lockState){\n \t\t\tcase RLC :\n \t\t\t\tthis.lockState=State.RLT;\n logger.log(Level.INFO,\"reading in cache\");\n \t\t\tbreak;\n \t\t\tcase WLC:\n \t\t\t\tthis.lockState=State.RLT_WLC;\n \t\t\t\tlogger.log(Level.INFO,\"reading in cache as previous writer\");\n \t\t\tbreak;\n \t\t\tdefault:\n update = true;\n \t\t\tbreak;\t\t\t\t\t\n \t\t}\n lock.unlock();\n logger.log(Level.FINE,\"lock_read : release the lock with :\"+lockState+\".\");\n if(update){\n logger.log(Level.INFO,\"Updating lockState to RLT\");\n \tthis.lockState=State.RLT;\n logger.log(Level.INFO,\"Lockstate was updated to \"+lockState);\n if(this.lockState!=State.RLT){\n logger.log(Level.SEVERE,\"Lock = \"+lockState+\" instead of RLT\");\n }\n this.obj = client.lock_read(this.id);\n if(this.lockState!=State.RLT){\n logger.log(Level.SEVERE,\"Lock = \"+lockState+\" instead of RLT\");\n }\n logger.log(Level.INFO,\"lock_read(): end with \"+lockState);\n }\n \t}",
"protected synchronized Lock acquireLock() {\n\t\tacquireReadLock();\n\t\treturn new Lock();\n\t}",
"public CacheKey acquireLockNoWait(Vector primaryKey, boolean forMerge) {\n //check if the key is already in the hashtable\n CacheKey key = null;\n\n //cache key should not be changed in other threads during the lock acquire operation\n synchronized (this) {\n key = getCacheKey(primaryKey);\n if (key == null) {\n //create a chachKey and lock the object\n CacheKey cacheKey = createCacheKey(primaryKey, null, null);\n cacheKey.acquire(forMerge);\n put(cacheKey);\n return cacheKey;\n }\n }\n\n //find the key in the hashtable, lock the object\n if (key != null) {\n //couldn't acquire the key so do not return it\n if (!key.acquireNoWait(forMerge)) {\n key = null;\n }\n }\n\n return key;\n }",
"public interface LockFactory {\n\n /**\n * Obtain a lock for a resource identified by given {@code identifier}. Depending on the strategy, this\n * method may return immediately or block until a lock is held.\n *\n * @param identifier the identifier of the resource to obtain a lock for.\n * @return a handle to release the lock.\n */\n Lock obtainLock(String identifier);\n}",
"protected void createLookupCache()\n/* */ {\n/* 1260 */ this.lookup = new SimpleCache(1, Math.max(getSize() * 2, 64));\n/* */ }",
"public static void createCacheServer2() throws Exception {\n ds = (new ClearGlobalDUnitTest()).getSystem(props);\n CacheObserverImpl observer = new CacheObserverImpl();\n origObserver = CacheObserverHolder.setInstance(observer);\n LocalRegion.ISSUE_CALLBACKS_TO_CACHE_OBSERVER = true;\n\n cache = CacheFactory.create(ds);\n AttributesFactory factory = new AttributesFactory();\n factory.setScope(Scope.GLOBAL);\n RegionAttributes attr = factory.create();\n region = cache.createRegion(REGION_NAME, attr);\n cache.setLockTimeout(3);\n\n }",
"public Lock() {\r\n }",
"public abstract RecordReader<K , V> createRecordReader(InputSplit inputSplit) throws IOException, SfsFileDoesNotExistException;",
"public abstract ReentrantLock getLock();",
"public CacheKey acquireReadLockOnCacheKeyNoWait(Vector primaryKey) {\n //check if the key is already in the hashtable\n CacheKey key = null;\n\n //cache key should not be changed in other threads during the lock acquire operation\n synchronized (this) {\n key = getCacheKey(primaryKey);\n if (key == null) {\n //create a chachKey and lock the object\n CacheKey cacheKey = createCacheKey(primaryKey, null, null);\n cacheKey.acquireReadLock();\n\n //lets create one but not put it in the cache, as we are only reading\n // should not be writing to the identitymap\n return cacheKey;\n }\n }\n\n //find the key in the hashtable, lock the object\n if (key != null) {\n //couldn't acquire the key so do not return it\n if (!key.acquireReadLockNoWait()) {\n key = null;\n }\n }\n\n return key;\n }",
"private ReadBlockingTask newReadBlockingTask(boolean initialize){\n \n ReadBlockingTask task = new ReadBlockingTask();\n task.setSelectorThread(this);\n task.setPipeline(getProcessorPipeline());\n \n task.setRecycle(isRecycleTasks());\n task.attachProcessor(newProcessorTask(initialize));\n task.setPipelineStatistic(getPipelineStat());\n task.setSecure(secure);\n \n return task;\n }",
"public static Locks create() {\n\t\tString uuid = ObjectId.get().toHexString();\n\t\treturn owner( uuid );\n\t}",
"private CacheWrapper<AccessPointIdentifier, Integer> createCache() {\n return new CacheWrapper<AccessPointIdentifier, Integer>() {\n \n @Override\n public void put(AccessPointIdentifier key, Integer value) {\n cache.put(key, value);\n }\n \n @Override\n public Integer get(AccessPointIdentifier key) {\n if (cache.containsKey(key)) {\n hitRate++;\n }\n return cache.get(key);\n }\n \n \n };\n }",
"@Test\n public void testLockBatchParticipantsUpdate() throws Exception {\n final String rgnName = getUniqueName();\n Region rgn = getCache().createRegion(rgnName, getRegionAttributes());\n rgn.create(\"key\", null);\n\n Host host = Host.getHost(0);\n VM vm0 = host.getVM(0);\n VM vm1 = host.getVM(1);\n VM vm2 = host.getVM(2);\n SerializableRunnable initRegions =\n new SerializableRunnable(\"testLockBatchParticipantsUpdate: initial configuration\") {\n @Override\n public void run() {\n try {\n Region rgn1 = getCache().createRegion(rgnName, getRegionAttributes());\n rgn1.create(\"key\", null);\n } catch (CacheException e) {\n Assert.fail(\"While creating region\", e);\n }\n }\n };\n vm0.invoke(initRegions);\n vm1.invoke(initRegions);\n rgn.put(\"key\", \"val1\");\n\n // Connect vm2 also since it may have been shutdown when logPerTest\n // is turned on\n vm2.invoke(new SerializableRunnable(\"connect vm2 if not connected\") {\n @Override\n public void run() {\n getCache();\n }\n });\n\n // Make VM0 the Grantor\n vm0.invoke(new SerializableRunnable(\"testLockBatchParticipantsUpdate: remote grantor init\") {\n @Override\n public void run() {\n try {\n Region rgn1 = getCache().getRegion(rgnName);\n final CacheTransactionManager txMgr2 = getCache().getCacheTransactionManager();\n assertEquals(\"val1\", rgn1.getEntry(\"key\").getValue());\n txMgr2.begin();\n rgn1.put(\"key\", \"val2\");\n txMgr2.commit();\n assertNotNull(TXLockService.getDTLS());\n assertTrue(TXLockService.getDTLS().isLockGrantor());\n } catch (CacheException e) {\n fail(\"While performing first transaction\");\n }\n }\n });\n\n // fix for bug 38843 causes the DTLS to be created in every TX participant\n assertNotNull(TXLockService.getDTLS());\n assertFalse(TXLockService.getDTLS().isLockGrantor());\n assertEquals(\"val2\", rgn.getEntry(\"key\").getValue());\n\n // Build sets of System Ids and set them up on VM0 for future batch member checks\n HashSet txMembers = new HashSet(4);\n txMembers.add(getSystemId());\n txMembers.add(vm0.invoke(TXDistributedDUnitTest::getSystemId));\n vm0.invoke(() -> TXDistributedDUnitTest.setPreTXSystemIds(txMembers));\n txMembers.add(vm2.invoke(TXDistributedDUnitTest::getSystemId));\n vm0.invoke(() -> TXDistributedDUnitTest.setPostTXSystemIds(txMembers));\n\n // Don't include the tx host in the batch member set(s)\n Serializable vm1HostId = vm1.invoke(TXDistributedDUnitTest::getSystemId);\n vm0.invoke(() -> TXDistributedDUnitTest.setTXHostSystemId(vm1HostId));\n\n // Create a TX on VM1 (such that it will ask for locks on VM0) that uses the callbacks\n // to pause and give us time to start a GII process on another VM\n vm1.invoke(new SerializableRunnable(\n \"testLockBatchParticipantsUpdate: slow tx (one that detects new member)\") {\n @Override\n public void run() {\n // fix for bug 38843 causes the DTLS to be created in every TX participant\n assertNotNull(TXLockService.getDTLS());\n assertFalse(TXLockService.getDTLS().isLockGrantor());\n\n PausibleTX pauseTXRunnable = new PausibleTX();\n pauseTXRunnable.rgnName = rgnName;\n pauseTXRunnable.myCache = getCache();\n pauseTXRunnable.key = \"key\";\n pauseTXRunnable.value = \"val3\";\n new Thread(pauseTXRunnable, \"PausibleTX Thread\").start();\n synchronized (PausibleTX.class) {\n while (!pauseTXRunnable.getIsRunning()) {\n try {\n PausibleTX.class.wait();\n } catch (InterruptedException ie) {\n fail(\"Did not expect \" + ie);\n }\n }\n }\n }\n });\n\n // Verify that the lock batch exists VM0 and has the size we expect\n vm0.invoke(new SerializableRunnable(\n \"testLockBatchParticipantsUpdate: Verify lock batch exists on VM0 with expected size\") {\n @Override\n public void run() {\n getCache().getRegion(rgnName);\n TXLockServiceImpl dtls = (TXLockServiceImpl) TXLockService.getDTLS();\n assertNotNull(dtls);\n assertTrue(dtls.isLockGrantor());\n DLockService dLockSvc = dtls.getInternalDistributedLockService();\n assertNotNull(TXDistributedDUnitTest.txHostId);\n DLockBatch[] batches = dLockSvc.getGrantor()\n .getLockBatches((InternalDistributedMember) TXDistributedDUnitTest.txHostId);\n assertEquals(batches.length, 1);\n TXLockBatch txLockBatch = (TXLockBatch) batches[0];\n assertNotNull(txLockBatch);\n assertNotNull(TXDistributedDUnitTest.preTXSystemIds);\n assertTrue(\n \"Members in lock batch \" + txLockBatch.getParticipants() + \" not the same as \"\n + TXDistributedDUnitTest.preTXSystemIds,\n txLockBatch.getParticipants().equals(TXDistributedDUnitTest.preTXSystemIds));\n }\n });\n\n // Start a GII process on VM2\n vm2.invoke(new SerializableRunnable(\"testLockBatchParticipantsUpdate: start GII\") {\n @Override\n public void run() {\n try {\n AttributesFactory factory = new AttributesFactory();\n factory.setScope(Scope.DISTRIBUTED_ACK);\n factory.setEarlyAck(false);\n factory.setDataPolicy(DataPolicy.REPLICATE);\n getCache().createRegion(rgnName, factory.create());\n } catch (CacheException e) {\n Assert.fail(\"While creating region\", e);\n }\n }\n });\n\n // Notify TX on VM1 so that it can continue\n vm1.invoke(\n new SerializableRunnable(\"testLockBatchParticipantsUpdate: Notfiy VM1 TX to continue\") {\n @Override\n public void run() {\n synchronized (PausibleTX.class) {\n // Notify VM1 that it should proceed to the TX send\n PausibleTX.class.notifyAll();\n // Wait until VM1 has sent the TX\n try {\n PausibleTX.class.wait();\n } catch (InterruptedException ie) {\n fail(\"Did not expect \" + ie);\n }\n }\n }\n });\n\n // Verify that the batch on VM0 has added VM2 into the set\n vm0.invoke(new SerializableRunnable(\n \"testLockBatchParticipantsUpdate: Verify lock batch contains VM2\") {\n @Override\n public void run() {\n getCache().getRegion(rgnName);\n TXLockServiceImpl dtls = (TXLockServiceImpl) TXLockService.getDTLS();\n assertNotNull(dtls);\n assertTrue(dtls.isLockGrantor());\n DLockService dLockSvc = dtls.getInternalDistributedLockService();\n assertNotNull(TXDistributedDUnitTest.txHostId);\n DLockBatch[] batches = dLockSvc.getGrantor()\n .getLockBatches((InternalDistributedMember) TXDistributedDUnitTest.txHostId);\n assertEquals(batches.length, 1);\n TXLockBatch txLockBatch = (TXLockBatch) batches[0];\n assertNotNull(txLockBatch);\n assertNotNull(TXDistributedDUnitTest.preTXSystemIds);\n assertTrue(\n \"Members in lock batch \" + txLockBatch.getParticipants() + \" not the same as \"\n + TXDistributedDUnitTest.postTXSystemIds,\n txLockBatch.getParticipants().equals(TXDistributedDUnitTest.postTXSystemIds));\n }\n });\n // fix for bug 38843 causes the DTLS to be created in every TX participant\n assertNotNull(TXLockService.getDTLS());\n assertFalse(TXLockService.getDTLS().isLockGrantor());\n assertEquals(\"val3\", rgn.getEntry(\"key\").getValue());\n\n\n // Notify TX on VM1 that it can go ahead and complete the TX\n vm1.invoke(\n new SerializableRunnable(\"testLockBatchParticipantsUpdate: Notfiy VM1 TX to finish\") {\n @Override\n public void run() {\n synchronized (PausibleTX.class) {\n // Notify VM1 that it should finish the TX\n PausibleTX.class.notifyAll();\n }\n }\n });\n\n\n rgn.destroyRegion();\n }",
"void acquireAdapterReadLock(LockList locks, DataverseName dataverseName, String adapterName)\n throws AlgebricksException;",
"public void setLocalLock(java.lang.String localLock) {\r\n this.localLock = localLock;\r\n }",
"void acquireLibraryReadLock(LockList locks, DataverseName dataverseName, String libraryName)\n throws AlgebricksException;",
"public ReadWriteLockObjectHolder() {\n\t\tthis(new ReentrantReadWriteLock());\n\t}",
"private static void initializeVM() throws Exception {\n Properties props = new Properties();\n props.setProperty(MCAST_PORT, \"0\");\n props.setProperty(LOCATORS, \"\");\n props.setProperty(LOG_LEVEL, \"info\"); // to keep diskPerf logs smaller\n distributedSystem = DistributedSystem.connect(props);\n cache = CacheFactory.create(distributedSystem);\n assertNotNull(cache);\n DiskStoreFactory dsf = cache.createDiskStoreFactory();\n AttributesFactory factory = new AttributesFactory();\n factory.setScope(Scope.LOCAL);\n\n File dir = new File(\"testingDirectoryDefault\");\n dir.mkdir();\n dir.deleteOnExit();\n File[] dirs = {dir};\n dsf.setDiskDirsAndSizes(dirs, new int[] {Integer.MAX_VALUE});\n\n dsf.setAutoCompact(false);\n DiskStore ds = dsf.create(regionName);\n factory.setDiskStoreName(ds.getName());\n factory.setDiskSynchronous(true);\n factory.setDataPolicy(DataPolicy.NORMAL);\n\n /* setting LIFO related eviction attributes */\n\n factory.setEvictionAttributes(EvictionAttributesImpl.createLIFOEntryAttributes(capacity,\n EvictionAction.OVERFLOW_TO_DISK));\n RegionAttributes attr = factory.create();\n\n ((GemFireCacheImpl) cache).createRegion(regionName, attr);\n lifoClockHand =\n ((VMLRURegionMap) ((LocalRegion) cache.getRegion(SEPARATOR + regionName)).entries)\n .getEvictionList();\n\n /* storing stats reference */\n lifoStats = lifoClockHand.getStatistics();\n\n }",
"private final void setupLocal0() {\n assert _profile==null;\n _fs = new Futures();\n _profile = new MRProfile(this);\n _profile._localstart = System.currentTimeMillis();\n _topLocal = true;\n // Check for global vs local work\n int selfidx = H2O.SELF.index();\n int nlo = subShift(selfidx);\n assert nlo < _nhi;\n final int nmid = (nlo+_nhi)>>>1; // Mid-point\n if( !_run_local && nlo+1 < _nhi ) { // Have global work?\n _profile._rpcLstart = System.currentTimeMillis();\n _nleft = remote_compute(nlo+1,nmid);\n _profile._rpcRstart = System.currentTimeMillis();\n _nrite = remote_compute( nmid,_nhi);\n _profile._rpcRdone = System.currentTimeMillis();\n }\n _lo = 0; _hi = _fr.anyVec().nChunks(); // Do All Chunks\n // If we have any output vectors, make a blockable Futures for them to\n // block on.\n // get the Vecs from the K/V store, to avoid racing fetches from the map calls\n _fr.vecs();\n setupLocal(); // Setup any user's shared local structures\n _profile._localdone = System.currentTimeMillis();\n }",
"void acquireFunctionReadLock(LockList locks, DataverseName dataverseName, String functionName)\n throws AlgebricksException;",
"public SimpleReadWriteLock() {\n\n\t\treaderLock = new ReadLock();\n\t\twriterLock = new WriteLock();\n\t\treaders = 0;\n\t\twriters = 0;\n\t\tthis.lock = this;\n\t}",
"public synchronized ISegmentReader getReadOnlyClone() throws IOException {\n\t\tif (mReader == null) {\n\t\t\tgetReader().decreaseRef();\n\t\t\tassert mReader != null;\n\t\t}\n\t\tmShared = true;\n\t\tif (mLiveDocs != null) {\n\t\t\treturn mWriter.getContext().newSegmentReader(mReader, mLiveDocs, \n\t\t\t\t\tmInfo.getSegmentInfo().getDocCount() - mInfo.getDelCount() - mPendingDeleteCount);\n\t\t} else {\n\t\t\tassert mReader.getLiveDocs() == mLiveDocs;\n\t\t\tmReader.increaseRef();\n\t\t\treturn mReader;\n\t\t}\n\t}",
"private SerializerConfigModel getCacheSerializer(SerializerConfigModel clstSrlzMdl) {\n\t\tSerializerConfigModel caheMgmrSrlzMdl = cacheManagerModel.getSerializerConfigModel();\n\n\t\t// cache item serializer model has high priority than global model\n\t\tSerializerConfigModel targetMdl = integrateCacheClusterSerializerWithGlobal(clstSrlzMdl, caheMgmrSrlzMdl);\n\t\t\n\t\t// string is default serializer for key. hash key align to key\n\t\t// jdk is default serializer for value. hash value align to value\n\t\tinjectDefaultSerializerType(targetMdl);\n\t\t\n\t\t// convert serializer type to class qualified name.\n\t\tconvertSerializerType2Clazz(targetMdl);\n\t\t\n\t\treturn targetMdl;\n\t}",
"public AsyncLock getLockFor(long timestamp) {\n return new ImmutableTimestampLock(timestamp, this);\n }",
"void acquireDatasetReadLock(LockList locks, DataverseName dataverseName, String datasetName)\n throws AlgebricksException;",
"public LockSync() {\n lock = new ReentrantLock();\n }",
"public java.lang.String getLocalLock() {\r\n return localLock;\r\n }",
"protected void createLookupCache() {\n }",
"interface WithLevel {\n /**\n * Specifies the level property: The level of the lock. Possible values are: NotSpecified, CanNotDelete,\n * ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete.\n * ReadOnly means authorized users can only read from a resource, but they can't modify or delete it..\n *\n * @param level The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly.\n * CanNotDelete means authorized users are able to read and modify the resources, but not delete.\n * ReadOnly means authorized users can only read from a resource, but they can't modify or delete it.\n * @return the next definition stage.\n */\n WithCreate withLevel(LockLevel level);\n }",
"public synchronized ClusterReader newClusterReader(int clusterId, boolean cachePage) {\n long clusterLength;\n if (clusterId == numClusters - 1) {\n clusterLength = segmentPMSOffset - clusterOffsets[clusterId];\n } else {\n clusterLength = clusterOffsets[clusterId + 1] - clusterOffsets[clusterId];\n }\n ScanMode[] modes = null;\n if (scanMap != null) {\n modes = scanMap.get(clusterId);\n }\n return new ClusterReader(this, clusterId, clusterOffsets[clusterId],\n clusterLength, pms.getPageMetaLists()[clusterId], modes, cachePage);\n }",
"private Lock getLock(int tid, int varIndex) {\n if (_lockTable.containsKey(varIndex)) {\n List<Lock> lockList = _lockTable.get(varIndex);\n for (Lock lc : lockList) {\n if (lc.getTranId() == tid) {\n return lc;\n }\n }\n }\n return null;\n }",
"void acquireFullTextFilterReadLock(LockList locks, DataverseName dataverseName, String fullTextFilterName)\n throws AlgebricksException;",
"@Override\n\tpublic RecordReader<NullWritable, Text> createRecordReader(InputSplit split, TaskAttemptContext context)\n\t\t\tthrows IOException {\n\t\tCustomRecordReader reader = new CustomRecordReader();\n\t\t\n\t\ttry {\n\t\t\treader.initialize(split, context);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn reader;\n\t}",
"void getLock(QName lockQName, String lockToken, long timeToLive);",
"public MLNKVMemoryCache(String name) {\n this.name = name;\n LRUCountLimit = 10000;\n FIFOCountLimit = 1000;\n memorySizeLimit = 100 << 20;\n releaseOnMainThread = false;\n\n useFIFO = true;\n useLRU = true;\n\n weakMap = new HashMap<>();\n LRUCache = new MLNKVCache();\n FIFOCache = new MLNKVCache();\n\n LRUCache.releaseOnMainThread = releaseOnMainThread;\n FIFOCache.releaseOnMainThread = releaseOnMainThread;\n }",
"ObjectPool() {\n deadTime = DEFAULT_DEADTIME;\n lock = new Hashtable<T, Long>();\n unlock = new Hashtable<T, Long>();\n }",
"void acquireDatasetCreateIndexLock(LockList locks, DataverseName dataverseName, String datasetName)\n throws AlgebricksException;",
"public Lock getLock();",
"synchronized ExerciseBuffer pinNew(String filename, PageFormatter fmtr) {\n\t ExerciseBuffer buff = chooseUnpinnedBuffer();\n if (buff == null)\n return null;\n Block blk=buff.assignToNew(filename, fmtr); // return the newly created block\n numAvailable--;\n buff.pin();\n \n if(bufferHashTable.containsValue(buff)){ //if value (buffer) is already exist then remove that key (blk) \n bufferHashTable.remove(blk); \n \n }\n bufferHashTable.put(blk, buff); // adding new key (blk) to HashTable\n \n return buff;\n }",
"public static void createCacheServer1() throws Exception {\n ds = (new ClearGlobalDUnitTest()).getSystem(props);\n cache = CacheFactory.create(ds);\n AttributesFactory factory = new AttributesFactory();\n factory.setScope(Scope.GLOBAL);\n RegionAttributes attr = factory.create();\n region = cache.createRegion(REGION_NAME, attr);\n\n }",
"public HitCounterReadWriteLock() {\r\n hits = new int[300];\r\n times = new int[300];\r\n }",
"public interface ManagementLockObject {\n /**\n * Gets the id property: Fully qualified resource Id for the resource.\n *\n * @return the id value.\n */\n String id();\n\n /**\n * Gets the name property: The name of the resource.\n *\n * @return the name value.\n */\n String name();\n\n /**\n * Gets the type property: The type of the resource.\n *\n * @return the type value.\n */\n String type();\n\n /**\n * Gets the level property: The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly.\n * CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means\n * authorized users can only read from a resource, but they can't modify or delete it.\n *\n * @return the level value.\n */\n LockLevel level();\n\n /**\n * Gets the notes property: Notes about the lock. Maximum of 512 characters.\n *\n * @return the notes value.\n */\n String notes();\n\n /**\n * Gets the owners property: The owners of the lock.\n *\n * @return the owners value.\n */\n List<ManagementLockOwner> owners();\n\n /**\n * Gets the inner com.azure.resourcemanager.locks.fluent.models.ManagementLockObjectInner object.\n *\n * @return the inner object.\n */\n ManagementLockObjectInner innerModel();\n\n /** The entirety of the ManagementLockObject definition. */\n interface Definition\n extends DefinitionStages.Blank,\n DefinitionStages.WithResourceGroup,\n DefinitionStages.WithLevel,\n DefinitionStages.WithCreate {\n }\n /** The ManagementLockObject definition stages. */\n interface DefinitionStages {\n /** The first stage of the ManagementLockObject definition. */\n interface Blank extends WithResourceGroup {\n }\n /** The stage of the ManagementLockObject definition allowing to specify parent resource. */\n interface WithResourceGroup {\n /**\n * Specifies resourceGroupName.\n *\n * @param resourceGroupName The name of the resource group to lock.\n * @return the next definition stage.\n */\n WithLevel withExistingResourceGroup(String resourceGroupName);\n }\n /** The stage of the ManagementLockObject definition allowing to specify level. */\n interface WithLevel {\n /**\n * Specifies the level property: The level of the lock. Possible values are: NotSpecified, CanNotDelete,\n * ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete.\n * ReadOnly means authorized users can only read from a resource, but they can't modify or delete it..\n *\n * @param level The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly.\n * CanNotDelete means authorized users are able to read and modify the resources, but not delete.\n * ReadOnly means authorized users can only read from a resource, but they can't modify or delete it.\n * @return the next definition stage.\n */\n WithCreate withLevel(LockLevel level);\n }\n /**\n * The stage of the ManagementLockObject definition which contains all the minimum required properties for the\n * resource to be created, but also allows for any other optional properties to be specified.\n */\n interface WithCreate extends DefinitionStages.WithNotes, DefinitionStages.WithOwners {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n ManagementLockObject create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n ManagementLockObject create(Context context);\n }\n /** The stage of the ManagementLockObject definition allowing to specify notes. */\n interface WithNotes {\n /**\n * Specifies the notes property: Notes about the lock. Maximum of 512 characters..\n *\n * @param notes Notes about the lock. Maximum of 512 characters.\n * @return the next definition stage.\n */\n WithCreate withNotes(String notes);\n }\n /** The stage of the ManagementLockObject definition allowing to specify owners. */\n interface WithOwners {\n /**\n * Specifies the owners property: The owners of the lock..\n *\n * @param owners The owners of the lock.\n * @return the next definition stage.\n */\n WithCreate withOwners(List<ManagementLockOwner> owners);\n }\n }\n /**\n * Begins update for the ManagementLockObject resource.\n *\n * @return the stage of resource update.\n */\n ManagementLockObject.Update update();\n\n /** The template for ManagementLockObject update. */\n interface Update extends UpdateStages.WithLevel, UpdateStages.WithNotes, UpdateStages.WithOwners {\n /**\n * Executes the update request.\n *\n * @return the updated resource.\n */\n ManagementLockObject apply();\n\n /**\n * Executes the update request.\n *\n * @param context The context to associate with this operation.\n * @return the updated resource.\n */\n ManagementLockObject apply(Context context);\n }\n /** The ManagementLockObject update stages. */\n interface UpdateStages {\n /** The stage of the ManagementLockObject update allowing to specify level. */\n interface WithLevel {\n /**\n * Specifies the level property: The level of the lock. Possible values are: NotSpecified, CanNotDelete,\n * ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete.\n * ReadOnly means authorized users can only read from a resource, but they can't modify or delete it..\n *\n * @param level The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly.\n * CanNotDelete means authorized users are able to read and modify the resources, but not delete.\n * ReadOnly means authorized users can only read from a resource, but they can't modify or delete it.\n * @return the next definition stage.\n */\n Update withLevel(LockLevel level);\n }\n /** The stage of the ManagementLockObject update allowing to specify notes. */\n interface WithNotes {\n /**\n * Specifies the notes property: Notes about the lock. Maximum of 512 characters..\n *\n * @param notes Notes about the lock. Maximum of 512 characters.\n * @return the next definition stage.\n */\n Update withNotes(String notes);\n }\n /** The stage of the ManagementLockObject update allowing to specify owners. */\n interface WithOwners {\n /**\n * Specifies the owners property: The owners of the lock..\n *\n * @param owners The owners of the lock.\n * @return the next definition stage.\n */\n Update withOwners(List<ManagementLockOwner> owners);\n }\n }\n /**\n * Refreshes the resource to sync with Azure.\n *\n * @return the refreshed resource.\n */\n ManagementLockObject refresh();\n\n /**\n * Refreshes the resource to sync with Azure.\n *\n * @param context The context to associate with this operation.\n * @return the refreshed resource.\n */\n ManagementLockObject refresh(Context context);\n}",
"private static TransactionStatistics initLocalTransaction() {\n TransactionStatistics lts = thread.get();\n if (lts == null && configuration != null) {\n if (log.isTraceEnabled()) {\n log.tracef(\"Init a new local transaction statistics\");\n }\n lts = new LocalTransactionStatistics(configuration);\n thread.set(lts);\n //Here only when transaction starts\n TransactionTS lastTS = lastTransactionTS.get();\n if (lastTS == null) {\n if (log.isTraceEnabled())\n log.tracef(\"Init a new local transaction statistics for Timestamp\");\n lastTransactionTS.set(new TransactionTS());\n } else {\n lts.addValue(ExposedStatistic.NTBC_EXECUTION_TIME, System.nanoTime() - lastTS.getEndLastTxTs());\n lts.incrementValue(ExposedStatistic.NTBC_COUNT);\n }\n } else if (configuration == null) {\n if (log.isDebugEnabled()) {\n log.debugf(\"Trying to create a local transaction statistics in a not initialized Transaction Statistics Registry\");\n }\n } else {\n if (log.isTraceEnabled()) {\n log.tracef(\"Local transaction statistic is already initialized: %s\", lts);\n }\n }\n return lts;\n }",
"ManagementLockObject apply(Context context);",
"public MultiCache () {\n super();\n this.locals = new ArrayList<Coordinates>();\n this.stage = 0;\n }",
"LockLevel level();",
"IcedHM() { _m = new NonBlockingHashMap<>(); }",
"public void acquire(boolean forMerge) {\r\n return;\r\n }",
"void downgradeToReadLocks();",
"public CacheKey acquireDeferredLock(Vector primaryKey) {\n //check if the key is already in the hashtable\n CacheKey key = null;\n\n //cache key should not be changed in other threads during the lock acquire operation\n synchronized (this) {\n // bug 3094912 get must be synchronized as well\n key = getCacheKey(primaryKey);\n if (key == null) {\n //create a chachKey and lock the object\n CacheKey cacheKey = createCacheKey(primaryKey, null, null);\n cacheKey.acquireDeferredLock();\n put(cacheKey);\n return cacheKey;\n }\n }\n\n // code removed as key will never be null here, either one will be found or one created\n key.acquireDeferredLock();\n\n return key;\n }",
"SoftLock findSoftLockById(SoftLockID softLockId);",
"void acquireFeedPolicyReadLock(LockList locks, DataverseName dataverseName, String feedPolicyName)\n throws AlgebricksException;",
"void acquireFullTextConfigReadLock(LockList locks, DataverseName dataverseName, String fullTextConfigName)\n throws AlgebricksException;",
"public interface ILeveledCache<K, V> extends ICache<K, V>{\n void reCache() throws IOException, ClassNotFoundException;\n Map<K, V> add(K key, V object) throws IOException, ClassNotFoundException;\n List<K> sortedKeys();\n int maxLevel1size();\n Set<K> level1keys();\n}",
"public CacheObject(String pn, Runner runner) throws IOException, BadPathnameException {\n pathname = pn;\n // also sets server_checkin_time\n last_known_edit_time = get_server_edit_time(runner);\n content = new HashMap<>();\n final_block = -1;\n }",
"private Locks() {\n\t\tlockId = ObjectId.get().toString();\n\t}",
"public GcpLock createLock(String blob, long timeout, TimeUnit unit) throws InterruptedException {\n return new GcpLock(storage, bucketName, blob, timeout, unit);\n }",
"SoftLockID createSoftLockID(TransactionID transactionID, Object key, Element newElement, Element oldElement, boolean pinned);",
"@Test\n public void readLockShareTest() throws InterruptedException {\n final TestUse testUse = new TestUse();\n int threadNum = 10;\n final CountDownLatch countDownLatch = new CountDownLatch(threadNum);\n final ConcurrentHashMap concurrentHashMap = new ConcurrentHashMap();\n for (int i = 0; i < threadNum; i++) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n boolean result = testUse.ifGetReadLockIn2Milliseconds();\n Assert.assertTrue(result);\n if (result) {\n concurrentHashMap.put(Thread.currentThread().getName(), \"value\");\n }\n countDownLatch.countDown();\n }\n }).start();\n }\n countDownLatch.await();\n Assert.assertEquals(threadNum, concurrentHashMap.size());\n }",
"public OldOldCache()\n {\n this(DEFAULT_UNITS);\n }",
"void acquireNodeGroupReadLock(LockList locks, String nodeGroupName) throws AlgebricksException;",
"void acquireDataTypeReadLock(LockList locks, DataverseName dataverseName, String datatypeName)\n throws AlgebricksException;",
"public void addLock(I_MemoryLock lock);",
"public final /* synthetic */ java.lang.Object createFromParcel(android.os.Parcel r11) {\n /*\n r10 = this;\n int r0 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.validateObjectHeader(r11)\n r1 = 0\n r2 = 0\n r4 = r2\n r7 = r4\n r9 = r7\n r5 = 0\n r6 = 0\n r8 = 0\n L_0x000c:\n int r1 = r11.dataPosition()\n if (r1 >= r0) goto L_0x0059\n int r1 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readHeader(r11)\n int r2 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.getFieldId(r1)\n r3 = 2\n if (r2 == r3) goto L_0x004f\n r3 = 3\n if (r2 == r3) goto L_0x004a\n r3 = 4\n if (r2 == r3) goto L_0x0045\n r3 = 5\n if (r2 == r3) goto L_0x003b\n r3 = 7\n if (r2 == r3) goto L_0x0036\n r3 = 8\n if (r2 == r3) goto L_0x0031\n com.google.android.gms.common.internal.safeparcel.SafeParcelReader.skipUnknownField(r11, r1)\n goto L_0x000c\n L_0x0031:\n java.lang.String r9 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createString(r11, r1)\n goto L_0x000c\n L_0x0036:\n boolean r8 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readBoolean(r11, r1)\n goto L_0x000c\n L_0x003b:\n android.os.Parcelable$Creator<com.google.android.gms.drive.DriveId> r2 = com.google.android.gms.drive.DriveId.CREATOR\n android.os.Parcelable r1 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createParcelable(r11, r1, r2)\n r7 = r1\n com.google.android.gms.drive.DriveId r7 = (com.google.android.gms.drive.DriveId) r7\n goto L_0x000c\n L_0x0045:\n int r6 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readInt(r11, r1)\n goto L_0x000c\n L_0x004a:\n int r5 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.readInt(r11, r1)\n goto L_0x000c\n L_0x004f:\n android.os.Parcelable$Creator r2 = android.os.ParcelFileDescriptor.CREATOR\n android.os.Parcelable r1 = com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createParcelable(r11, r1, r2)\n r4 = r1\n android.os.ParcelFileDescriptor r4 = (android.os.ParcelFileDescriptor) r4\n goto L_0x000c\n L_0x0059:\n com.google.android.gms.common.internal.safeparcel.SafeParcelReader.ensureAtEnd(r11, r0)\n com.google.android.gms.drive.Contents r11 = new com.google.android.gms.drive.Contents\n r3 = r11\n r3.<init>(r4, r5, r6, r7, r8, r9)\n return r11\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.drive.zzc.createFromParcel(android.os.Parcel):java.lang.Object\");\n }",
"@Override\n public ActiveLock getLock(Type type, Scope scope) {\n ActiveLock lock = null;\n if (Type.WRITE.equals(type)) {\n try {\n if (!exists()) {\n log.warn(\"Unable to retrieve lock: no item found at '\" + getResourcePath() + \"'\");\n } else if (((Node) item).isLocked()) {\n Lock jcrLock = ((Node) item).getLock();\n lock = new JcrActiveLock(jcrLock);\n DavResourceLocator locator = super.getLocator();\n String lockroot = locator\n .getFactory()\n .createResourceLocator(locator.getPrefix(), locator.getWorkspacePath(), jcrLock.getNode().getPath(),\n false).getHref(false);\n lock.setLockroot(lockroot);\n }\n } catch (AccessDeniedException e) {\n log.error(\"Error while accessing resource lock: \"+e.getMessage());\n } catch (UnsupportedRepositoryOperationException e) {\n log.error(\"Error while accessing resource lock: \"+e.getMessage());\n } catch (RepositoryException e) {\n log.error(\"Error while accessing resource lock: \"+e.getMessage());\n }\n } else {\n lock = super.getLock(type, scope);\n }\n return lock;\n }",
"Thread getLocker();",
"@Override\n public PrimitiveSegment createFromParcel(Parcel in) {\n in.readInt();\n return new PrimitiveSegment(in);\n }",
"@Override\n protected void acquire(TransactionLocks locks) throws IOException {\n if (unresolvedBlockIds != null && unresolvedBlockIds.length != 0) {\n long[] inodeIdsForURBlks = INodeUtil.resolveINodesFromBlockIds(unresolvedBlockIds);\n blockIds = ArrayUtils.addAll(blockIds, unresolvedBlockIds);\n inodeIds = ArrayUtils.addAll(inodeIds, inodeIdsForURBlks);\n }\n \n blocks.addAll(acquireLockList(DEFAULT_LOCK_TYPE,\n BlockInfoContiguous.Finder.ByBlockIdsAndINodeIds, blockIds, inodeIds));\n }",
"private static LocalCacheValue createLocalCacheValue(Object internalValue, long ldtCreation, ExpiryPolicy policy,\n JCacheSyntheticKind kind)\n {\n return new LocalCacheValue(internalValue, ldtCreation, policy, kind);\n }",
"protected Lock(Block block) {\r\n this(block, null, null, null);\r\n }",
"public abstract void Lock(long offset, long len)\n\t\tthrows IOException, SMBException;",
"void acquireReadLock() throws InterruptedException;",
"public SimpleLock readLock() {\n\n\t\treturn readerLock;\n\t}",
"public static void alloc_cache_r(int request, int index_set,Memory[] memory_r, Cache[] cache_r, MCT[] mct_r){\n\t\tint replace_index=index_set*4+random_in_set_alloc_producer();\n\t\tmct_r[index_set].tag=cache_r[replace_index].address;\n\t\t\n\t\tcache_r[replace_index].address=memory_r[request].address;\n\t\tcache_r[replace_index].content=memory_r[request].content;\n\t\tcache_r[replace_index].priority=memory_r[request].priority;\n\t}",
"private VHorizontalLayout initLockInformationLayout() {\r\n VHorizontalLayout layout = new VHorizontalLayout();\r\n if(report.isLocked()) {\r\n Utils.removeAllThemes(layout);\r\n layout.getThemeList().add(ThemeAttribute.LOCKED);\r\n layout.add(getTranslation(\"reportView.reportLocked.label\", report.getLockOwner().getName() + \" \" +report.getLockOwner().getLastname()));\r\n }\r\n return layout;\r\n }",
"static int OPL_LockTable() {\n num_lock++;\n if (num_lock > 1) {\n return 0;\n }\n /* first time */\n cur_chip = null;\n /* allocate total level table (128kb space) */\n if (OPLOpenTable() == 0) {\n num_lock--;\n return -1;\n }\n return 0;\n }",
"public Locker(int capacity)\r\n {\r\n super(capacity);\r\n }",
"ManagementLockObject refresh(Context context);"
]
| [
"0.7340463",
"0.5823269",
"0.57108206",
"0.5625118",
"0.5382804",
"0.53817207",
"0.5300034",
"0.528965",
"0.5186171",
"0.5176732",
"0.5154018",
"0.50743043",
"0.5070028",
"0.50403374",
"0.50248396",
"0.502263",
"0.4963499",
"0.49608803",
"0.4953857",
"0.4932528",
"0.4905083",
"0.48903728",
"0.4887466",
"0.48820534",
"0.4869187",
"0.4864414",
"0.48391283",
"0.4838082",
"0.48380664",
"0.48209172",
"0.48168713",
"0.47990516",
"0.47815403",
"0.47716317",
"0.47560057",
"0.47558564",
"0.4736512",
"0.473305",
"0.4712775",
"0.47078946",
"0.4701129",
"0.47002253",
"0.4688746",
"0.46845073",
"0.46829644",
"0.46734262",
"0.46705872",
"0.4650759",
"0.46364546",
"0.46325538",
"0.4632431",
"0.46078172",
"0.45996118",
"0.45944586",
"0.45941696",
"0.45929867",
"0.458211",
"0.45808545",
"0.45767966",
"0.45596397",
"0.45531902",
"0.45508012",
"0.4544206",
"0.45307112",
"0.4515307",
"0.45097414",
"0.45096415",
"0.44986814",
"0.4489488",
"0.44852147",
"0.4483556",
"0.44781",
"0.44777042",
"0.4474445",
"0.44716167",
"0.44635335",
"0.44629562",
"0.4459505",
"0.44529098",
"0.44418404",
"0.443857",
"0.44244868",
"0.44237798",
"0.44138682",
"0.44131503",
"0.4404813",
"0.44009802",
"0.43983412",
"0.4394397",
"0.43790448",
"0.43704656",
"0.43571648",
"0.4355973",
"0.43504208",
"0.43490332",
"0.4344778",
"0.4327569",
"0.43244907",
"0.43170738",
"0.43143487"
]
| 0.7375758 | 0 |
MapDecoration are used to enrich a Map2D component. Thoses are added over the map or there can be one under the map. Decoration exemples : minimap, scalebar, navigation buttons, image in background ... | public interface FXMapDecoration {
/**
* called by the jdefaultmap2d when the decoration should
* reset completely
*/
public void refresh();
/**
* must be called when the decoration is not used anymore.
* to avoid memoryleack if it uses thread or other resources
*/
public void dispose();
/**
* set the related map2d
* @param map the map2D
*/
public void setMap2D(FXMap map);
/**
*
* @return Map2D, the related map2d of this decoration
*/
public FXMap getMap2D();
/**
*
* @return JComponent, the component which will be added at the map2D
*/
public Node getComponent();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface MCDecoration {\n}",
"public interface MapRenderer {\n\n AnnotationView viewForAnnotation(Annotation annotation);\n\n void annotationViewWillBeRemoved(AnnotationView annotationView);\n void annotationViewDidRemove(AnnotationView annotationView);\n\n void annotationViewWillBeAdded(AnnotationView annotationView);\n void annotationViewDidAdd(AnnotationView annotationView);\n\n}",
"@Override\r\n\tpublic void addToMap(MapView arg0) {\n\t\tsuper.addToMap(arg0);\r\n\t}",
"public JXMapKitModule2OverlayEditor(\n final JXMapViewer aMap) {\n super();\n this.map = aMap;\n aMap.addMouseListener(mouseListener);\n aMap.addMouseMotionListener(mouseListener);\n }",
"protected void refreshDecorations() {\n\t\tif (decoration != null) {\n\t\t\tgetFigure().remove(decoration);\n\t\t\tdecoration = null;\n\t\t}\n\t\tif (decorationImage != null) {\n\t\t\tdecorationImage.dispose();\n\t\t\tdecorationImage = null;\n\t\t}\n\t\tLink link = getLink();\n\t\tif (link.eContainer() == null) {\n\t\t\t// Yeesh, the link hasn't even been initialized yet. Return.\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tIMarkerHolder markerHolder = BPELUtil.adapt(link, IMarkerHolder.class);\n\t\tIMarker[] markers = markerHolder.getMarkers(link);\n\t\tIMarker markerToDisplay = null;\n\t\tfor (int i = 0; i < markers.length; i++) {\n\t\t\tIMarker marker = markers[i];\n\t\t\t// If the marker is not visible, skip it.\n\t\t\tboolean isVisible = marker.getAttribute(IModelMarkerConstants.DECORATION_MARKER_VISIBLE_ATTR, true);\n\t\t\tif (!isVisible) continue;\n\t\t\tif (markerToDisplay != null) {\n\t\t\t\t// There was already a marker.\n\t\t\t\t// Find out which one has the highest priority and display that one.\n\t\t\t\tint priority = marker.getAttribute(IModelMarkerConstants.DECORATION_MARKER_PRIORITY_ATTR, Integer.MIN_VALUE);\n\t\t\t\tint existingPriority = markerToDisplay.getAttribute(IModelMarkerConstants.DECORATION_MARKER_PRIORITY_ATTR, Integer.MIN_VALUE);\n\t\t\t\tif (priority > existingPriority) {\n\t\t\t\t\tmarkerToDisplay = marker;\n\t\t\t\t}\t\t\n\t\t\t} else {\n\t\t\t\t// There was no marker already, put this one in the map.\n\t\t\t\tmarkerToDisplay = marker;\n\t\t\t}\n\t\t}\n\t\tif (markerToDisplay != null) {\n\t\t\tImage temp = getImage(markerToDisplay);\n\t\t\tif (temp == null) return;\n\t\t\tImageData background = temp.getImageData();\n\t\t\tString uri = markerToDisplay.getAttribute(IBPELUIConstants.MARKER_OVERLAYIMAGETOPLEFT, \"\"); //$NON-NLS-1$\n\t\t\tImageData topLeft = getImageData(uri);\n\t\t\turi = markerToDisplay.getAttribute(IBPELUIConstants.MARKER_OVERLAYIMAGETOPRIGHT, \"\"); //$NON-NLS-1$\n\t\t\tImageData topRight = getImageData(uri);\n\t\t\turi = markerToDisplay.getAttribute(IBPELUIConstants.MARKER_OVERLAYIMAGEBOTTOMLEFT, \"\"); //$NON-NLS-1$\n\t\t\tImageData bottomLeft = getImageData(uri);\n\t\t\turi = markerToDisplay.getAttribute(IBPELUIConstants.MARKER_OVERLAYIMAGEBOTTOMRIGHT, \"\"); //$NON-NLS-1$\n\t\t\tImageData bottomRight = getImageData(uri);\n\t\t\tOverlayCompositeImageDescriptor descriptor = new OverlayCompositeImageDescriptor(background, topLeft, topRight, bottomLeft, bottomRight);\n\t\t\t//TODO: can we get into image registry?\t\t\t\n\t\t\tImage image = descriptor.createImage();\n\t\t\tthis.decorationImage = image;\n\t\t\tthis.decoration = new Label(this.decorationImage);\n\t\t\tgetFigure().add(this.decoration, new ConnectionLocator(getConnectionFigure(), ConnectionLocator.MIDDLE));\n\t\t} else {\n\t\t\tif (hasCondition()) {\n\t\t\t\tImage image = BPELUIPlugin.INSTANCE.getImage(IBPELUIConstants.ICON_LINK_CONDITIONAL);\n\t\t\t\tthis.decorationImage = null;\n\t\t\t\tthis.decoration = new Label(image);\n\t\t\t\tgetFigure().add(this.decoration, new ConnectionLocator(getConnectionFigure(), ConnectionLocator.MIDDLE));\n\t\t\t}\n\t\t}\n\t}",
"public void marcador(@NonNull Style loadedMapStyle) {\n loadedMapStyle.addImage(\"icon-image\", decodeResource(\n this.getResources(), R.drawable.mapbox_marker_icon_default));\n\n // Add the source to the map\n\n loadedMapStyle.addSource(new GeoJsonSource(ICON_GEOJSON_SOURCE_ID,\n Feature.fromGeometry\n (Point.fromLngLat(origin.longitude(), origin.latitude()))));\n\n\n\n\n\n loadedMapStyle.addLayer(new SymbolLayer(\"icon-layer-id\", ICON_GEOJSON_SOURCE_ID).withProperties(\n iconImage(\"icon-image\"),\n iconSize(1f),\n iconAllowOverlap(true),\n iconIgnorePlacement(true),\n iconOffset(new Float[] {0f, -7f})\n ));\n }",
"private void styleMap() {\n String JSON = \"[{\\\"featureType\\\":\\\"poi\\\", \\\"stylers\\\":[{\\\"visibility\\\":\\\"off\\\"}]}]\";\n //mMap.setMapStyle(new MapStyleOptions(JSON));\n }",
"public void testExtendsMap() {\n final LinkerDef baseLinker = new LinkerDef();\n baseLinker.setMap(true);\n final LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(baseLinker);\n setLinkerName(extendedLinker, \"msvc\");\n final String[] preArgs = getPreArguments(extendedLinker);\n assertEquals(\"/NOLOGO\", preArgs[0]);\n assertEquals(\"/SUBSYSTEM:WINDOWS\", preArgs[1]);\n assertEquals(\"/INCREMENTAL:NO\", preArgs[2]);\n assertEquals(\"/MAP\", preArgs[3]);\n }",
"public MapView(android.content.Context param0, android.util.AttributeSet param1, int param2) {\n super(param0, param1, param2);\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n this.setHInstance(new HImpl(param0, param1, param2));\n } else {\n this.setGInstance(new GImpl(param0, param1, param2));\n }\n wrapper = false;\n }",
"public void setMap2D(FXMap map);",
"public interface IDrawableMap {\n void prepareRenderingOnMap();\n void renderOnMap(SpriteBatch batch, float delta);\n}",
"public void addMapAdvice(MapAdvice mapAdvice);",
"public MapPanel(String map, Object[] toLoad) {\n\t\tthis.setLayout(null);\n\t\tthis.setBackground(Color.white);\n\t\tthis.setPreferredSize(new Dimension(WIDTH, HEIGHT));\n\t\tthis.setSize(this.getPreferredSize());\n\t\tthis.setVisible(true);\n\t\tthis.setFocusable(true);\n\t\tthis.requestFocus();\n\t\ttheMap = new Map(map, 50);\n\t\ttheTrainer = new Trainer(theMap, toLoad);\n\n\t\tinBattle = false;\n\t}",
"public MapPanel() {\r\n\t\tthis(EarthFlat.class);\r\n\t}",
"public interface IMapView {\n\n ///////////////////////////////////////////////////////////////////////////\n // 隐藏向上的箭头\n ///////////////////////////////////////////////////////////////////////////\n void hideUpArrows();\n\n ///////////////////////////////////////////////////////////////////////////\n // 隐藏空白的区域\n ///////////////////////////////////////////////////////////////////////////\n void hideEmptyView();\n\n ///////////////////////////////////////////////////////////////////////////\n // 用于再次点击Map页面时的数据刷新用\n ///////////////////////////////////////////////////////////////////////////\n void refreshFragment(Fragment fragment);\n\n ///////////////////////////////////////////////////////////////////////////\n // 给Presenter提供的AMap\n ///////////////////////////////////////////////////////////////////////////\n AMap onGetAMap();\n\n ///////////////////////////////////////////////////////////////////////////\n //用户是否正在滚动\n ///////////////////////////////////////////////////////////////////////////\n boolean onGetIsUserScolling();\n\n ///////////////////////////////////////////////////////////////////////////\n // 使其滚回旧的位置\n ///////////////////////////////////////////////////////////////////////////\n void scrollToCurrentY();\n\n}",
"public MapPanel() {\n painter = NONE_PAINTER;\n setBackground(BACKGROUND_COLOR);\n mapBounds = new Rectangle2D.Double(0, 0, MIN_WIDTH, MIN_HEIGHT);\n mouseClick = SwingObservable.mouse(this, SwingObservable.MOUSE_CLICK)\n .toFlowable(BackpressureStrategy.LATEST)\n .filter(ev -> ev.getID() == MouseEvent.MOUSE_CLICKED)\n .map(this::mapMouseEvent);\n logger.atDebug().log(\"Created\");\n }",
"public Map addToEditor (Composite composite, Object listener);",
"public void addOverlayObj(IOverlay a)\n/* 101: */ {\n/* 102:160 */ this.mapPanel.addOverlayObj(a);\n/* 103: */ }",
"@Override\n public void addMapInfo(GameMapInfo mapInfo) {\n }",
"public interface GameMapBuilder {\n void sapperStyle();//小兵装饰\n void mapColor();//地图颜色\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 }",
"@Override\n protected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tFont f = new Font(\"sansserif\", Font.BOLD, 12);\n\t\tg.setFont(f);\n\t\tif(type == 1){\n\t\t\t //draw the map\n\t g.drawImage(image, 0, 0, getWidth(), getHeight(), this);\n\t //draw the names on the map\n\t for (City city : cities) {\n\t \n\t \tif (city.hasLocation()) {\n\t \t\tPoint location = getLocationFromCoordinate(city.getLatitude(), city.getLongitude());\n\t \t\tg.drawString(city.getName(), (int)(location.getx())*multiplier, (int)(location.gety())*multiplier);\n\t \t\tg.fillRect((int)location.getx()*multiplier, (int)location.gety()*multiplier, 3, 3);\n\t \t}\n\t }\n\t\t}\n\t\tif(type == 2) {\n\t\t\t//draw the map\n\t g.drawImage(image, 0, 0, getWidth(), getHeight(), this);\n\t //draw the names on the map\n\t for (PointOfInterest point : points) {\n\t \tif (point.hasLocation()) {\n\t \t\tPoint location = getLocationFromCoordinate(point.getLatitude(), point.getLongitude());\n\t \t\tg.drawString(point.getName(), (int)(location.getx())*multiplier, (int)(location.gety())*multiplier);\n\t \t}\n\t }\n\t\t}\n\t\tif (type == 3) {\n\t\t\tg.drawImage(image, 0,0,getWidth(),getHeight(), this);\n\t\t\tfor(Region region : regions) {\n\t\t\t\tif (region.hasLocation()) {\n\t\t\t\t\tPoint location = getLocationFromCoordinate(region.getLatitude(), region.getLongitude());\n\t\t\t\t\tg.drawString(region.getName(), (int)location.getx()*multiplier, (int)(location.gety())*multiplier);\n\t\t\t\t\tg.drawRect((int)location.getx()*multiplier - (length/2)*3, (int)(location.gety())*multiplier - (breadth/2)*3, \n\t\t\t\t\t\t\tlength*multiplier, breadth*multiplier);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n }",
"public void paintMap(Graphics2D g2d) {\r\n\t\tLineMap map = model.getMap();\r\n\t\tif (map == null) return;\r\n\t\tLine[] lines = map.getLines();\r\n\t\tg2d.setColor(colors[MAP_COLOR_INDEX]);\r\n\t\tg2d.setStroke(new BasicStroke(2));\r\n\t\tfor (int i = 0; i < lines.length; i++) {\r\n\t\t\tLine2D line = new Line2D.Float(\r\n \t\t getX(lines[i].x1), \r\n \t\t getY(lines[i].y1), \r\n \t\t getX(lines[i].x2), \r\n \t\t getY(lines[i].y2));\r\n\t\t\tg2d.draw(line);\r\n\t\t}\r\n\t\tg2d.setStroke(new BasicStroke(1));\r\n\t}",
"public interface DecorationInfo {\n\n DecorationParams getDecorationParams();\n}",
"@Override\n public Color getMapColor() { return mapColor; }",
"public VisualStyle createVizMapper() {\r\n\r\n\t VisualMappingManager manager =\r\n\t Cytoscape.getVisualMappingManager();\r\n\t CalculatorCatalog catalog = manager.getCalculatorCatalog();\r\n\r\n\t VisualStyle existingStyle = catalog.getVisualStyle\r\n\t (BIOMOLECULE_VISUAL_STYLE);\r\n\t \r\n\t System.out.println(\r\n\t \t\t\"Got visual style for \" + BIOMOLECULE_VISUAL_STYLE + \" = \" + \r\n\t \t\texistingStyle);\r\n\r\n\t if (existingStyle != null) {\r\n// System.out.println(\"Got existing visual style: \" + existingStyle);\r\n return null;\r\n\t } else {\r\n\t VisualStyle bpVisualStyle = new VisualStyle(BIOMOLECULE_VISUAL_STYLE);\r\n\t // AJK: 03/29/06 define fields of visual style \r\n\t System.out.println(\"defining visual style: \" + bpVisualStyle);\r\n\t defineVisualStyle (bpVisualStyle, manager, catalog);\r\n\t manager.setVisualStyle(bpVisualStyle);\r\n\r\n\t // The visual style must be added to the Global Catalog\r\n\t // in order for it to be written out to vizmap.props upon user exit\r\n\t System.out.println(\"Adding visual style \" + bpVisualStyle \r\n\t \t\t+ \" to catalog \" + catalog);\r\n\t catalog.addVisualStyle(bpVisualStyle);\r\n\t \r\n\t // for debugging\r\n//\t \t\tVisualStyle vizStyle = catalog.getVisualStyle(BIOMOLECULE_VISUAL_STYLE);\r\n//\t \t\tSystem.out.println (\"Got visual Style from catalog: \" + catalog \r\n//\t \t\t\t\t+ \" = \" + vizStyle);\r\n\t \t\t\r\n\t // try setting the visual style to BioMolecule\r\n\t Cytoscape.getDesktop().setVisualStyle(bpVisualStyle);\r\n\t return bpVisualStyle;\r\n\t }\r\n\t }",
"public MapView(android.content.Context param0, android.util.AttributeSet param1) {\n super(param0, param1);\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n this.setHInstance(new HImpl(param0, param1));\n } else {\n this.setGInstance(new GImpl(param0, param1));\n }\n wrapper = false;\n }",
"public void addOverlayObj(String layer, IOverlay a)\n/* 195: */ {\n/* 196:275 */ this.mapPanel.addOverlayObj(layer, a);\n/* 197: */ }",
"@Subcomponent(modules = {MapModule.class})\npublic interface MapComponent {\n\n void inject(MapActivity activity);\n\n}",
"private BusRouteLegendOverlay createBusRouteLegendOverlay() {\n ResourceProxy rp = new DefaultResourceProxyImpl(context);\n return new BusRouteLegendOverlay(rp, BusesAreUs.dpiFactor());\n }",
"@Override\n public void paintContent(MapPaintArgs args) {\n if (isDragging && end != null && start != null) {\n int xmin = Math.min(end.x, start.x);\n int xmax = Math.max(end.x, start.x);\n int ymin = Math.min(end.y, start.y);\n int ymax = Math.max(end.y, start.y);\n Rectangle rect = new Rectangle(xmin, ymin, xmax - xmin, ymax - ymin);\n args.getGraphics().setColor(Color.BLACK);\n Stroke original = args.getGraphics().getStroke();\n BasicStroke strk = new BasicStroke(2, BasicStroke.CAP_BUTT,\n BasicStroke.JOIN_BEVEL, 1, new float[]{2.0f, 1.0f}, 0);\n args.getGraphics().setStroke(strk);\n args.getGraphics().drawRect(rect.x, rect.y, rect.width, rect.height);\n args.getGraphics().setStroke(original);\n }\n super.paintContent(args);\n }",
"@Override\r\n\tprotected void onComponentTag(ComponentTag tag)\r\n\t{\n\t\tcheckComponentTag(tag, \"map\");\r\n\r\n\t\tsuper.onComponentTag(tag);\r\n\t}",
"@Override\n public BiomeDecorator createBiomeDecorator()\n { \n return new BiomeDecoratorAtum(this);\n }",
"private void setExtraMapElements() {\n \t\tif (mGoogleMap == null && mLocationsList == null) {\n \t\t\treturn;\n \t\t}\n \t\tfor (int i = 0; i < mLocationsList.size(); i++) {\n \t\t\tMarkerOptions marker = new MarkerOptions().position(mLocationsList\n \t\t\t\t\t.get(i).mPosition);\n \t\t\tif (mLocationsList.get(i).mIcono != 0) {\n \t\t\t\tmarker.icon(BitmapDescriptorFactory.fromResource(mLocationsList\n \t\t\t\t\t\t.get(i).mIcono));\n \t\t\t}\n \t\t\tif (mLocationsList.get(i).mContenido.mNombre != null) {\n \t\t\t\tmarker.title(mLocationsList.get(i).mContenido.mNombre);\n \t\t\t}\n \t\t\tif (mLocationsList.get(i).mContenido.mSnippet != null) {\n \t\t\t\tmarker.snippet(mLocationsList.get(i).mContenido.mSnippet);\n \t\t\t}\n \n \t\t\tmGoogleMap.addMarker(marker);\n \t\t}\n \t\tmGoogleMap.setInfoWindowAdapter(new MarkerAdapter());\n \t}",
"protected void createMappingAnnotations() {\n\t\tString source = \"http://www.polarsys.org/capella/MNoE/CapellaLike/Mapping\";\t\n\t\taddAnnotation\n\t\t (blockArchitecturePkgEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (blockArchitectureEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"uml::Package\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedRequirementPkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Package::nestedPackage#uml::Package::packagedElement\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::Package::nestedPackage elements on which RequirementsPkg stereotype or any stereotype that inherits from it is applied\\r\\nOrder must be computed\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedAbstractCapabilityPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Package::nestedPackage#uml::Package::packagedElement\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::Package::nestedPackage elements on which AbstractCapabilityPkg stereotype or any stereotype that inherits from it is applied\\r\\nMultiplicity must be [1..1]\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Package::nestedPackage#uml::Package::packagedElement\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::Package::nestedPackage elements on which InterfacePkg stereotype or any stereotype that inherits from it is applied\\r\\nMultiplicity must be [0..1]\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Package::nestedPackage#uml::Package::packagedElement\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::Package::nestedPackage elements on which DataPkg stereotype or any stereotype that inherits from it is applied\\r\\nMultiplicity must be [0..1]\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_ProvisionedArchitectureAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_ProvisioningArchitectureAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_AllocatedArchitectures(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_AllocatingArchitectures(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (blockEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"uml::BehavioredClassifier\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedAbstractCapabilityPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::nearestpackage\",\n\t\t\t \"explanation\", \"Descendants are mapped to SysML::Blocks::Block, which cannot contain a Package.\\r\\nTherefore, store these AbstractCapabilityPackages in the nearest available package.\",\n\t\t\t \"constraints\", \"Multiplicity must be [0..1]\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Package::nestedPackage#uml::Package::packagedElement\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::Package::nestedPackage elements on which InterfacePkg stereotype or any stereotype that inherits from it is applied\\r\\nMultiplicity must be [0..1]\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Package::nestedPackage#uml::Package::packagedElement\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::Package::nestedPackage elements on which DataPkg stereotype or any stereotype that inherits from it is applied\\r\\nMultiplicity must be [0..1]\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedStateMachines(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::BehavioredClassifier::ownedBehavior\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::BehavioredClassifier::ownedBehavior elements on which StateMachine stereotype or any stereotype that inherits from it is applied\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentArchitectureEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"uml::Class\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedInterfaceUses(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::nearestpackage\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::NamedElement::clientDependency elements on which InterfaceUse stereotype or any stereotype that inherits from it is applied\\r\\nOrder must be computed\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_UsedInterfaceLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_UsedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedInterfaceImplementations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::BehavioredClassifier::interfaceRealization\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"Order must be computed\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ImplementedInterfaceLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ImplementedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ProvisionedComponentAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ProvisioningComponentAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_AllocatedComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_AllocatingComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ProvidedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_RequiredInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedParts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedPhysicalPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedPhysicalPath(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::nearestpackage\",\n\t\t\t \"explanation\", \"SysML::Blocks::Block cannot contain PhysicalPath\\'s equivalent, hence we find the nearest available package to store them.\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedPhysicalLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::StructuredClassifier::ownedConnector\",\n\t\t\t \"explanation\", \"since PhysicalLink is mapped to uml::Connector\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractActorEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"SysML::Blocks::Block\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (partEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"should be mapped to uml::Property, but one of its concrete ancestors already is (Property), so avoid redefining it\\r\\nat this level to avoid profile generation issue\",\n\t\t\t \"constraints\", \"information::Property must have as base metaclass uml::Property\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_ProvidedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_RequiredInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_OwnedDeploymentLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_DeployedParts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_DeployingParts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (architectureAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"uml::Realization\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getArchitectureAllocation_AllocatedArchitecture(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getArchitectureAllocation_AllocatingArchitecture(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"uml::ComponentRealization or uml::InterfaceRealization regarding the baseMetaClass of the realized element\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponentAllocation_AllocatedComponent(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponentAllocation_AllocatingComponent(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (systemComponentEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getSystemComponent_DataComponent(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getSystemComponent_DataType(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getSystemComponent_ParticipationsInCapabilityRealizations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfacePkgEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"uml::Package\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Package::nestedPackage#uml::Package::packagedElement\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::Package::nestedPackage elements on which Interface stereotype or any stereotype that inherits from it is applied\\r\\nOrder must be computed\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfacePkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Package::nestedPackage#uml::Package::packagedElement\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::Package::nestedPackage elements on which InterfacePkg stereotype or any stereotype that inherits from it is applied\\r\\nOrder must be computed\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"uml::Interface\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_Mechanism(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ImplementorComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_UserComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_InterfaceImplementations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Opposite reference of uml::InterfaceRealization::contract\",\n\t\t\t \"constraints\", \"uml::Element::ownedElement elements on which InterfaceImplementation stereotype or any stereotype that inherits from it is applied\\r\\nOrder must be computed\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_InterfaceUses(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Opposite reference of uml::Dependency::supplier\",\n\t\t\t \"constraints\", \"uml::Element::ownedElement elements on which InterfaceUse stereotype or any stereotype that inherits from it is applied\\r\\nOrder must be computed\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ProvisioningInterfaceAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_AllocatingInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_AllocatingComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ExchangeItems(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_OwnedExchangeItemAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RequiringComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RequiringComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ProvidingComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ProvidingComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizingLogicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizedContextInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizingPhysicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizedLogicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceImplementationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"uml::InterfaceRealization\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceImplementation_InterfaceImplementor(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceImplementation_ImplementedInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::InterfaceRealization::contract\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceUseEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"uml::Usage\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceUse_InterfaceUser(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Dependency::client\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceUse_UsedInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Dependency::supplier\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"Multiplicity must be [1..1]\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (providedInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"uml::InterfaceRealization\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getProvidedInterfaceLink_Interface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::InterfaceRealization::contract\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (requiredInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"uml::Usage\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getRequiredInterfaceLink_Interface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Dependency::supplier\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::Dependency::supplier elements on which Interface stereotype or any stereotype that inherits from it is applied\\r\\nMultiplicity must be [1..1]\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocation_AllocatedInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocation_AllocatingInterfaceAllocator(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceAllocatorEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"uml::Classifier\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocator_OwnedInterfaceAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::nearestpackage\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"Some elements on which InterfaceAllocation stereotype or any stereotype that inherits from it is applied\\r\\nOrder must be computed\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocator_ProvisionedInterfaceAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocator_AllocatedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (actorCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"uml::Dependency\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (systemComponentCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"uml::Dependency\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentContextEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (exchangeItemAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"uml::Realization\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_SendProtocol(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_ReceiveProtocol(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_AllocatedItem(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_AllocatingInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (deployableElementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"uml::NamedElement\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getDeployableElement_DeployingLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Opposite reference of uml::Dependency::supplier\",\n\t\t\t \"constraints\", \"Order must be computed\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (deploymentTargetEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"uml::DeploymentTarget\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getDeploymentTarget_DeploymentLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::NamedElement::clientDependency\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::DeploymentTarget::deployment elements on which AbstractDeployment stereotype or any stereotype that inherits from it is applied\\r\\nOrder must be computed\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractDeploymentLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"uml::Dependency,could be mapped on uml::Deployment, but dependencies diagram allows to \\\"deploy\\\" more capella element types.\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_DeployedElement(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Dependency::supplier\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"Multiplicity must be [1..1]\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_Location(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Dependency::client\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::Dependency::client elements on which DeploymentTarget stereotype or any stereotype that inherits from it is applied\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractPathInvolvedElementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractPhysicalArtifactEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractPhysicalArtifact_AllocatorConfigurationItems(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractPhysicalLinkEndEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractPhysicalLinkEnd_InvolvedLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractPhysicalPathLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"uml::Connector\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_LinkEnds(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::specific\",\n\t\t\t \"explanation\", \"first need to create ConnectorEnds pointing to the Ports, and then reference them in uml::Connector::end\",\n\t\t\t \"constraints\", \"cardinality must be [2..2]\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_OwnedComponentExchangeFunctionalExchangeAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::nearestpackage\",\n\t\t\t \"explanation\", \"Elements are contained in the nearest possible parent container.\",\n\t\t\t \"constraints\", \"some elements on which ComponentFunctionalExchangeAllocation stereotype or any stereotype that inherits from it is applied\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_OwnedPhysicalLinkEnds(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Connector::end\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_OwnedPhysicalLinkRealizations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"none\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_SourcePhysicalPort(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_TargetPhysicalPort(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalLinkEndEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"uml::ConnectorEnd\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Port(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::ConnectorEnd::role\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::ConnectorEnd::role elements on which PhysicalPort stereotype or any stereotype that inherits from it is applied\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Part(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::ConnectorEnd::partWithPort\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalLinkRealizationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"none\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPathEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"uml::Class\",\n\t\t\t \"explanation\", \"_todo_\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_InvolvedLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_OwnedPhysicalPathInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_FirstPhysicalPathInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_OwnedPhysicalPathRealizations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"none\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPathInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_NextInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_PreviousInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_InvolvedElement(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_InvolvedComponent(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPathReferenceEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathReference_ReferencedPhysicalPath(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPathRealizationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"none\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPortEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"SysML::PortAndFlows::FlowPort\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_OwnedPhysicalPortRealizations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"none\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_AllocatedComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPortRealizationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"none\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\n\t}",
"public OrderedMap<K, V> decorated() {\n return (OrderedMap) super.decorated();\n }",
"private void drawMap(HashMap<String, TrailObj> trailCollection,\n\t\t\tGoogleMap mMap2) {\n\n\t\tfor (TrailObj trail : trailCollection.values()) {\n\t\t\tfor (PlacemarkObj p : trail.getPlacemarks()) {\n\t\t\t\tPolylineOptions rectOptions = new PolylineOptions();\n\t\t\t\tfor (LatLng g : p.getCoordinates()) {\n\t\t\t\t\trectOptions.add(g);\n\t\t\t\t}\n\t\t\t\tPolyline polyline = mMap2.addPolyline(rectOptions);\n\t\t\t\tpolyline.setColor(Color.RED);\n\t\t\t\tpolyline.setWidth(5);\n\t\t\t\tpolyline.setVisible(true);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void DrawMap(Graphics g, float scale, Map m, DeliveryQuery delivery, RouteHelper routeHelper) {\n\t\t// No action\n\t}",
"public ADecoratorPaintStrategy(APaintStrategy decoree) {\n\t\tsuper(new AffineTransform());\n\t\tthis.decoree = decoree;\n\t}",
"@Override\r\n\tpublic void exportMap() {\n\r\n\t}",
"public void setMapRenderer(MapRenderer2 mr)\r\n\t{\r\n\t\tthis.mapRenderer = mr;\r\n\t}",
"private void setUpInfoWindowLayer() {\n map.addLayer(new SymbolLayer(CALLOUT_LAYER_ID, geojsonSourceId)\n .withProperties(\n /* show image with id title based on the value of the name feature property */\n iconImage(\"{hotel}\"),\n\n /* set anchor of icon to bottom-left */\n iconAnchor(ICON_ANCHOR_BOTTOM),\n\n /* all info window and marker image to appear at the same time*/\n iconAllowOverlap(false),\n\n /* offset the info window to be above the marker */\n iconOffset(new Float[] {-2f, -25f}),\n\n iconSize( 1.0f )\n\n\n )\n/* add a filter to show only when selected feature property is true */\n .withFilter(eq((get(PROPERTY_SELECTED)), literal(true)))\n\n );\n\n }",
"@Override\n\t protected void applyCustomConfiguration(SiteMeshFilterBuilder builder) {\n\t\t builder.addDecoratorPath(\"/*\", \"/WEB-INF/jsp/decorator/decorator.jsp\")\n//\t\t .addDecoratorPaths(\"/articles/*\", \"/decorators/article.html\",\n//\t\t \"/decoratos/two-page-layout.html\",\n//\t\t \"/decorators/common.html\")\n\t\t // Exclude path from decoration.\n\t\t .addExcludedPath(\"/member/list.do\")\n\t\t .addExcludedPath(\"/base/codeWindow.html*\")\n\t\t .addExcludedPath(\"/base/postWindow.html*\");\n\t\t \n\t\t builder.addTagRuleBundles(new DivExtractingTagRuleBundle());\n\n\t }",
"public interface Map {\n\n public void createMap(World world);\n public void destroyMap(World world);\n}",
"public MapPanel(int size, int style)\r\n {\r\n this.setLayout(new BorderLayout());\r\n zoom = 32;//set initail zoom to 32;\r\n\t\t\t\tyear = -4000;\r\n\r\n //set up initial key movements\r\n keyUp = KeyEvent.VK_W;\r\n keyLeft = KeyEvent.VK_A;\r\n keyRight = KeyEvent.VK_D;\r\n keyDown = KeyEvent.VK_S;\r\n keyZoom = KeyEvent.VK_Z;\r\n\r\n if(size == 100 && style == 2)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 100, 3, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 100, 3, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n else if(size == 75 && style == 2)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 75, 3, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 75, 3, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n else if(size == 50 && style == 2)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 50, 2, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 50, 2, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n if(size == 100 && style == 1)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 10, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 10, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n else if(size == 75 && style == 1)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 10, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 10, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n else if(size == 50 && style == 1)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 7, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 7, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n if(size == 100 && style == 3)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 120, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 120, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n else if(size == 75 && style == 3)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 100, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 100, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n else if(size == 50 && style == 3)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 75, 0, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 75, 0, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n //set up the cursor\r\n cursor = Cursor.getPredefinedCursor(Cursor.HAND_CURSOR);\r\n\r\n //set up the buttons\r\n leftButton = new JButton();\r\n leftButton.setFocusable(false);\r\n leftButton.setBorder(null);\r\n leftButton.setContentAreaFilled(false);\r\n leftButton.setCursor(cursor);\r\n iconDefault = new ImageIcon(\"images/left.gif\");\r\n leftButton.setIcon(iconDefault);\r\n\r\n rightButton = new JButton();\r\n rightButton.setFocusable(false);\r\n rightButton.setBorder(null);\r\n rightButton.setContentAreaFilled(false);\r\n rightButton.setCursor(cursor);\r\n iconDefault = new ImageIcon(\"images/right.gif\");\r\n rightButton.setIcon(iconDefault);\r\n\r\n upButton = new JButton();\r\n upButton.setFocusable(false);\r\n upButton.setBorder(null);\r\n upButton.setContentAreaFilled(false);\r\n upButton.setCursor(cursor);\r\n iconDefault = new ImageIcon(\"images/up.gif\");\r\n upButton.setIcon(iconDefault);\r\n\r\n downButton = new JButton();\r\n downButton.setFocusable(false);\r\n downButton.setBorder(null);\r\n downButton.setContentAreaFilled(false);\r\n downButton.setCursor(cursor);\r\n iconDefault = new ImageIcon(\"images/down.gif\");\r\n downButton.setIcon(iconDefault);\r\n\r\n leftButton.addActionListener(this);\r\n rightButton.addActionListener(this);\r\n upButton.addActionListener(this);\r\n downButton.addActionListener(this);\r\n\r\n //set up the panels\r\n worldPanel = new WorldPanel();\r\n this.add(worldPanel, BorderLayout.CENTER);\r\n\r\n southPanel = new JPanel(new FlowLayout());\r\n southPanel.setBackground(Color.black);\r\n southPanel.add(leftButton);\r\n\t\t\t\tsouthPanel.add(upButton);\r\n southPanel.add(downButton);\r\n southPanel.add(rightButton);\r\n this.add(southPanel, BorderLayout.SOUTH);\r\n\r\n miniMap = new MiniMap();\r\n unitPanel = new UnitInfoPanel();\r\n\r\n eastPanel1 = new JPanel(new BorderLayout());\r\n eastPanel1.setBackground(Color.black);\r\n eastPanel1.add(miniMap ,BorderLayout.SOUTH);\r\n eastPanel1.add(unitPanel, BorderLayout.CENTER);\r\n this.add(eastPanel1, BorderLayout.EAST);\r\n\r\n //create initial map\r\n worldPanel.setInitialMap(mapPieces, mapWidth, mapHeight);\r\n miniMap.setMap(mapPieces, mapWidth, mapHeight, 12, 12);\r\n int x = worldPanel.getFirstX();\r\n int y = worldPanel.getFirstY();\r\n miniMap.setNewXY(x,y,21,15);\r\n addKeyListener(this);\r\n this.setBackground(Color.black);\r\n this.requestFocus();\r\n }",
"public void drawMap() {\r\n\t\tfor (int x = 0; x < map.dimensionsx; x++) {\r\n\t\t\tfor (int y = 0; y < map.dimensionsy; y++) {\r\n\t\t\t\tRectangle rect = new Rectangle(x * scalingFactor, y * scalingFactor, scalingFactor, scalingFactor);\r\n\t\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\t\tif (islandMap[x][y]) {\r\n\t\t\t\t\tImage isl = new Image(\"island.jpg\", 50, 50, true, true);\r\n\t\t\t\t\tislandIV = new ImageView(isl);\r\n\t\t\t\t\tislandIV.setX(x * scalingFactor);\r\n\t\t\t\t\tislandIV.setY(y * scalingFactor);\r\n\t\t\t\t\troot.getChildren().add(islandIV);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trect.setFill(Color.PALETURQUOISE);\r\n\t\t\t\t\troot.getChildren().add(rect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public interface MapDrawableAdapterListener extends EventListener\r\n{\r\n /**\r\n * Signaled when an MapDrawableAdapters object is removed.\r\n *\r\n * @param drawableAdapter the MapDrawableAdapter whose object is being removed.\r\n */\r\n public abstract void mapDrawableAdapterRemoved(MapDrawableAdapter drawableAdapter);\r\n \r\n /**\r\n * Signaled when displaylists in an MapDrawableAdapter needs to be\r\n * recompiled.\r\n *\r\n * @param drawableAdapter the MapDrawableAdapter that needs to be updated.\r\n */\r\n public abstract void mapDrawableAdapterUpdated(MapDrawableAdapter drawableAdapter);\r\n\r\n /**\r\n * Signaled when an object is added to an MapDrawableAdapters object.\r\n *\r\n * @param object the new object.\r\n */\r\n public abstract void mapDrawableAdapterChildAdded(StratmasObject object);\r\n}",
"protected void createUML2MappingAnnotations() {\n\t\tString source = \"http://www.polarsys.org/capella/2007/UML2Mapping\";\t\n\t\taddAnnotation\n\t\t (blockArchitectureEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedRequirementPkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedAbstractCapabilityPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (blockEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedAbstractCapabilityPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentArchitectureEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedInterfaceUses(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_UsedInterfaceLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"clientDependency\",\n\t\t\t \"featureOwner\", \"NamedElement\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ImplementedInterfaceLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"interfaceRealization\",\n\t\t\t \"featureOwner\", \"BehavioredClassifier\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractActorEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (partEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Property\",\n\t\t\t \"stereotype\", \"eng.PhysicalPart\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (architectureAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (systemComponentEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getSystemComponent_ParticipationsInCapabilityRealizations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"umlOppositeReference\", \"supplier\",\n\t\t\t \"umlOppositeReferenceOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfacePkgEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Package\",\n\t\t\t \"stereotype\", \"eng.InterfacePkg\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfacePkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Interface\",\n\t\t\t \"stereotype\", \"eng.Interface\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_Mechanism(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"mechanism\",\n\t\t\t \"featureOwner\", \"eng.Interface\",\n\t\t\t \"fromStereotype\", \"true\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_InterfaceImplementations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"umlOppositeReference\", \"contract\",\n\t\t\t \"umlOppositeReferenceOwner\", \"InterfaceRealization\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_InterfaceUses(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"umlOppositeReference\", \"supplier\",\n\t\t\t \"umlOppositeReferenceOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceImplementationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"InterfaceRealization\",\n\t\t\t \"stereotype\", \"eng.InterfaceImplementation\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceImplementation_InterfaceImplementor(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"implementingClassifier\",\n\t\t\t \"featureOwner\", \"InterfaceRealization\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceImplementation_ImplementedInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"contract\",\n\t\t\t \"featureOwner\", \"InterfaceRealization\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceUseEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Usage\",\n\t\t\t \"stereotype\", \"eng.InterfaceUse\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceUse_InterfaceUser(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"client\",\n\t\t\t \"featureOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceUse_UsedInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"supplier\",\n\t\t\t \"featureOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (providedInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"InterfaceRealization\",\n\t\t\t \"stereotype\", \"eng.ProvidedInterfaceLink\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getProvidedInterfaceLink_Interface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"contract\",\n\t\t\t \"featureOwner\", \"InterfaceRealization\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (requiredInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Usage\",\n\t\t\t \"stereotype\", \"eng.RequiredInterfaceLink\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getRequiredInterfaceLink_Interface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"supplier\",\n\t\t\t \"featureOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Dependency\",\n\t\t\t \"stereotype\", \"eng.InterfaceRealization\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (actorCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Dependency\",\n\t\t\t \"stereotype\", \"eng.ActorCapabilityRealizationInvolvement\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (systemComponentCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Dependency\",\n\t\t\t \"stereotype\", \"eng.SystemComponentCapabilityRealizationInvolvement\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (deployableElementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"NamedElement\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getDeployableElement_DeployingLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"umlOppositeReference\", \"supplier\",\n\t\t\t \"umlOppositeReferenceOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (deploymentTargetEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Namespace\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getDeploymentTarget_DeploymentLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"clientDependency\",\n\t\t\t \"featureOwner\", \"NamedElement\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractDeploymentLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_DeployedElement(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"supplier\",\n\t\t\t \"featureOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_Location(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"client\",\n\t\t\t \"featureOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Port(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"role\",\n\t\t\t \"featureOwner\", \"ConnectorEnd\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Part(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"partWithPort\",\n\t\t\t \"featureOwner\", \"ConnectorEnd\"\n\t\t });\n\t}",
"@Override\n\tprotected void paintView(Graphics2D g2){\n\t\t// Create the image buffer for drawing the world.\n\t\tBufferedImage world_buffer = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_ARGB);\n\t\tGraphics2D world_g2 = (Graphics2D) world_buffer.getGraphics();\n\t\t// Translate and scale the world.\n\t\tworld_g2.setTransform(getTransform());\n\t\t// Draw the background.\n\t\tworld_g2.setPaint(getBackground());\n\t\treverseRectangle(world_g2, new Point(0,0), new Point(getWidth(), 0), new Point(getWidth(), getHeight()), new Point(0,getHeight()));\n\t\t// Draw the graded region.\n\t\tdrawGround(world_g2);\n\t\t// Draw the runway.\n\t\tdrawRunway(world_g2);\n\t\t// Draw the world to the screen.\n\t\tg2.drawImage(world_buffer, 0, 0, null);\n\t\t// Draw the overlay to the screen.\n\t\tdrawOverlay(g2);\n\t}",
"public interface RegionCategoryMapView {\n void init();\n\n void setToolbarLayout();\n\n void showToolbarTitle(String message);\n\n void setGoogleMap();\n\n void setGoogleMapPosition(Market market);\n\n void setMarkerLayout();\n\n LocationDto getCurrentLocation();\n\n void setLocationManager();\n\n void showProgressDialog();\n\n void goneProgressDialog();\n\n void showMarketInfo();\n\n void showMarketAvatar(String message);\n\n void showMarketName(String message);\n\n void showMarketAddress(String message);\n\n void showMarketPhone(String message);\n\n void showMarketDistance(String message);\n\n void goneMarketInfo();\n\n void goneMarketDistance();\n\n void goneMarketPhone();\n\n void onClickPosition();\n\n void onCameraFocusUpdate(LocationDto locationDto);\n\n void setLocationListener();\n\n void onClickBack();\n\n void showMessage(String message);\n\n Marker showMapMarker(Market market, boolean isSelected);\n\n Marker showMapCurrentPositionMarker(LocationDto locationDto);\n\n void onSnippetClick();\n\n void navigateToMarketActivity(Market market);\n}",
"public void addDefaultLayers()\n\t{\n\t\t/**\n\t\t\t// Default OSM layers\n\t\t\tOSM mapnikOSM = OSM.Mapnik(\"Mapnik\");\n\t\t\tOSM cycleOSM = OSM.CycleMap(\"CycleMap\");\n\t\t\tmapnikOSM.setIsBaseLayer(true);\n\t\t\tcycleOSM.setIsBaseLayer(true);\n\t\t\tthis.openLayersMap.getMap().addLayer(mapnikOSM);\n\t\t this.openLayersMap.getMap().addLayer(cycleOSM);\n\t\t*/\n\t\t\n\t\t/**\n\t\t // Google Maps Tiles\n\t\t\t// Also in Blipnip.html insert: <script src=\"http://maps.google.com/maps/api/js?v=3&sensor=false\"></script>\n\t\t\t// or <script src=\"http://maps.google.com/maps/api/js?&sensor=false\"></script>\n\t\t\t// Keep in mind: http://gis.stackexchange.com/questions/51992/how-to-obtain-to-max-zoom-levels-for-google-layer-using-open-layers\n\t\t\t// and http://gis.stackexchange.com/questions/5964/how-to-apply-custom-google-map-style-in-openlayers\n\t\t\tGoogleV3Options gNormalOptions = new GoogleV3Options();\n\t\t\tgNormalOptions.setIsBaseLayer(true);\n\t\t\tgNormalOptions.setSmoothDragPan(false);\n\t\t\tgNormalOptions.setNumZoomLevels(17);\n\t\t\tgNormalOptions.setType(GoogleV3MapType.G_NORMAL_MAP);\n\t\t\tGoogleV3 gNormal = new GoogleV3(\"Google Normal\", gNormalOptions);\n\t this.openLayersMap.getMap().addLayer(gNormal);\n */\n\t\t\n\t\t/** \n\t\t // MapQuest - MapQuest-OSM Tiles - These are also free - Very good free alternative\n\t XYZOptions mapQuestOption = new XYZOptions();\n\t mapQuestOption.setIsBaseLayer(true);\n\t mapQuestOption.setNumZoomLevels(17);\n\t mapQuestOption.setSphericalMercator(true);\n\t String[] tiles = new String[4];\n\t tiles[0] = \"http://otile1.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png\";\n\t tiles[1] = \"http://otile2.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png\";\n\t tiles[2] = \"http://otile3.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png\";\n\t tiles[3] = \"http://otile4.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.png\";\n\t XYZ mapQuest = new XYZ(\"mapQuest\",tiles, mapQuestOption);\n\t this.openLayersMap.getMap().addLayer(mapQuest);\n */\n\t\t\n\t\t/**\n // Openlayers, OpenStreetMaps blank and white - Free but do not zoom close enough\n\t XYZOptions bwOSMOption = new XYZOptions();\n\t bwOSMOption.setIsBaseLayer(true);\n\t bwOSMOption.setSphericalMercator(true);\n\t bwOSMOption.setNumZoomLevels(15);\n\t String[] bwOSMtiles = new String[2];\n\t bwOSMtiles[0] = \"http://a.www.toolserver.org/tiles/bw-mapnik/${z}/${x}/${y}.png\"; \n\t bwOSMtiles[1] = \"http://b.www.toolserver.org/tiles/bw-mapnik/${z}/${x}/${y}.png\";\n\t XYZ bwOSM = new XYZ(\"bwOSM\",bwOSMtiles, bwOSMOption);\n\t this.openLayersMap.getMap().addLayer(bwOSM); \n */\n\t\t\n\t\t/**\n\t\t\t// Unfortunately their policy has changed and will start charging from May 1st\n // CloudMade Tiles - Very good paid alternative, free 500,000 tile loads\n\t\t\t//String osmAtrribution = \"© 2014 <a href=\\\"http://openstreetmap.org\\\">OpenStreetMap</a> contributors\";\n\t\t\t//String cloudMadeAttribution = \"Map data \" + osmAtrribution + \", © 2014 <a href=\\\"http://cloudmade.com\\\">CloudMade</a>\";\n\t XYZOptions cloudMadeOption = new XYZOptions();\n\t cloudMadeOption.setIsBaseLayer(true);\n\t cloudMadeOption.setSphericalMercator(true);\n\t cloudMadeOption.setNumZoomLevels(19);\n\t cloudMadeOption.setTransitionEffect(TransitionEffect.RESIZE);\n\t //cloudMadeOption.setAttribution(cloudMadeAttribution);\n\t String[] cloudMadetiles = new String[3];\n\t cloudMadetiles[0] = \"http://a.tile.cloudmade.com/3295ec94195346989f8d67502c88e0ab/120472/256/${z}/${x}/${y}.png\"; //TODO - 256 for desktops, 64 for mobiles\n\t cloudMadetiles[1] = \"http://b.tile.cloudmade.com/3295ec94195346989f8d67502c88e0ab/120472/256/${z}/${x}/${y}.png\"; \n\t cloudMadetiles[2] = \"http://c.tile.cloudmade.com/3295ec94195346989f8d67502c88e0ab/120472/256/${z}/${x}/${y}.png\"; \n\t XYZ cloudMade = new XYZ(\"cloudMade\",cloudMadetiles, cloudMadeOption);\n\t this.openLayersMap.getMap().addLayer(cloudMade); \n\t */\n\t\t\n\t // MapBox is free for 3000 map loads - paid for more. Switching to this due to CloudMade's upcoming change of policy.\n\t\t\t// Nice and fairly cheap alternative. TileMill seems to be an awesome tool for complete map re-styling which\n\t\t\t// is a huge +. \n\t XYZOptions mapBoxOption = new XYZOptions();\n\t mapBoxOption.setIsBaseLayer(true);\n\t mapBoxOption.setSphericalMercator(true);\n\t mapBoxOption.setNumZoomLevels(19);\n\t mapBoxOption.setTransitionEffect(TransitionEffect.RESIZE);\n\t //mapBoxOption.setAttribution(cloudMadeAttribution);\n\t String[] mapBoxtiles = new String[3];\n\t mapBoxtiles[0] = \"http://a.tiles.mapbox.com/v3/thanos.hh91dmii/${z}/${x}/${y}.png\"; \n\t mapBoxtiles[1] = \"http://b.tiles.mapbox.com/v3/thanos.hh91dmii/${z}/${x}/${y}.png\"; \n\t mapBoxtiles[2] = \"http://c.tiles.mapbox.com/v3/thanos.hh91dmii/${z}/${x}/${y}.png\"; \n\t XYZ mapBox = new XYZ(\"mapBox\",mapBoxtiles, mapBoxOption);\n\t this.openLayersMap.getMap().addLayer(mapBox); \n\t \n\t \n\t}",
"@Override\n\tpublic void drawMap(Map map) {\n\t\tSystem.out.println(\"Draw map\"+map.getClass().getName()+\"on SD Screen\");\n\t}",
"public void addAgent(String layer, Agent a)\n/* 170: */ {\n/* 171:240 */ this.mapPanel.addAgent(layer, a);\n/* 172: */ }",
"public interface MapVisualizationInfo\r\n{\r\n /**\r\n * Gets the DataTypeInfo for this visualization info.\r\n *\r\n * @return The {@link DataTypeInfo}.\r\n */\r\n DataTypeInfo getDataTypeInfo();\r\n\r\n /**\r\n * Gets the tile level controller.\r\n *\r\n * @return the tile level controller\r\n */\r\n TileLevelController getTileLevelController();\r\n\r\n /**\r\n * Gets the tile render properties for this data type if the type is a\r\n * IMAGE_TILE type image, or null if this type does not support tiles.\r\n *\r\n * @return the tile render properties or null.\r\n */\r\n TileRenderProperties getTileRenderProperties();\r\n\r\n /**\r\n * Gets the default visualization type.\r\n *\r\n * @return the default visualization type\r\n */\r\n MapVisualizationType getVisualizationType();\r\n\r\n /**\r\n * Gets the Z-Order for this Type.\r\n *\r\n * @return the order.\r\n */\r\n int getZOrder();\r\n\r\n /**\r\n * Checks if is image tile type.\r\n *\r\n * @return true, if is image tile type\r\n */\r\n boolean isImageTileType();\r\n\r\n /**\r\n * Checks if is motion imagery type.\r\n *\r\n * @return true, if is motion imagery type\r\n */\r\n boolean isMotionImageryType();\r\n\r\n /**\r\n * Checks if is image type.\r\n *\r\n * @return true, if is image type\r\n */\r\n boolean isImageType();\r\n\r\n /**\r\n * Checks if is z-orderable.\r\n *\r\n * @return true, if is z-orderable\r\n */\r\n boolean isZOrderable();\r\n\r\n /**\r\n * Sets the DataTypeInfo for this visualization info.\r\n *\r\n * @param dti - the {@link DataTypeInfo}\r\n */\r\n void setDataTypeInfo(DataTypeInfo dti);\r\n\r\n /**\r\n * Sets the visualization type. Cannot be null.\r\n *\r\n * @param visType the new visualization type\r\n */\r\n void setVisualizationType(MapVisualizationType visType);\r\n\r\n /**\r\n * Sets the Z-Order for this Type.\r\n *\r\n * @param order - the order\r\n * @param source - the calling object\r\n */\r\n void setZOrder(int order, Object source);\r\n\r\n /**\r\n * True if this DataTypeInfo utilizes {@link MapDataElement}s.\r\n *\r\n * @return true if uses, false if not\r\n */\r\n boolean usesMapDataElements();\r\n\r\n /**\r\n * Returns true if this data type uses visualization styles, false if not.\r\n *\r\n * @return true, if uses visualization styles.\r\n */\r\n boolean usesVisualizationStyles();\r\n}",
"public HeatMapColorToolBar() {\n initialize();\n }",
"public TiledMap createMap() {\n map_inter = new MapTile[g_logic.MAP_WIDTH][g_logic.MAP_HEIGHT];\n \n //drawing stuff\n tiles = new Texture(Gdx.files.internal(\"packed/terrain.png\"));\n TextureRegion[][] splitTiles = TextureRegion.split(tiles, 54, 54);\n map = new TiledMap();\n MapLayers layers = map.getLayers();\n TiledMapTileLayer new_layer = new TiledMapTileLayer(g_logic.MAP_WIDTH, g_logic.MAP_HEIGHT, g_logic.ISO_WIDTH, g_logic.ISO_HEIGHT);\n \n //actual generation\n for (int x = 0; x < g_logic.MAP_WIDTH; x++) \n {\n for (int y = 0; y < g_logic.MAP_HEIGHT; y++) \n {\n char chara = '.';\n int ty = 0;\n int tx;\n if (x == 0 || x == g_logic.MAP_WIDTH-1)\n {\n tx = 1;\n chara = '#';\n }\n else\n {\n tx = 0; \n chara = '.';\n }\n \n //set up map tiles\n MapTile tile = new MapTile(x, y, tx, ty, chara);\n Gdx.app.log(\"Map gen\", \"Created a map tile @\" + x + \",\" + y + \" \" + tx + \" \" + ty + \" \" + chara);\n \n //put them in the internal map\n putInterMap(tile, x, y);\n \n //set up renderer cells\n TiledMapTileLayer.Cell cell = new TiledMapTileLayer.Cell();\n //y,x\n cell.setTile(new StaticTiledMapTile(splitTiles[tile.getTextureY()][tile.getTextureX()]));\n new_layer.setCell(x, y, cell);\n }\n }\n \n \n float y_off = g_logic.getYOffset();\n new_layer.setOffsetY(y_off);\n layers.add(new_layer);\n \n g_logic.setInterMap(map_inter);\n\n return map;\n }",
"public MapPanel(Class<? extends Globe> globeTypeClass, final Map<String, Boolean> layerNameEnabledMap) {\r\n\t\tsuper(new BorderLayout());\r\n\t\t\r\n\t\t// Curry the layerNameEnabledMap into the layer enabling/disabling process used by the start() method\r\n\t\tlayerEnableCmd = ()->{\r\n\t\t\tSystem.out.println(\"[MapPanel.layerEnableCmd] Enabling/disabling the following layers:\");\r\n\t\t\tgetWWD().getModel().getLayers().forEach((layer)->{\r\n\t\t\t\tlayer.setEnabled(layerNameEnabledMap.computeIfAbsent(layer.getName(), (key)->{return true;}));\t// enable any unknown layers by default\t\r\n\t\t\t\tSystem.out.println(\" layer: \"+layer.getName()+\" (enabled = \"+layer.isEnabled()+\") layer class = \"+layer.getClass().getName());\r\n\t\t\t});\r\n\t\t};\r\n\t\t\r\n\t\t/**\r\n\t\t * The following setPreferredSize(new Dimension(0,0)) is a work around\r\n\t\t * to a known JOGL problem when working with resizeable elements, e.g. JScrollPanes.\r\n\t\t * See http://jogamp.org/jogl/doc/userguide/ and look under the \r\n\t\t * \"Heavyweight and Lightweight Issues\" section.\r\n\t\t * Without this line, if this panel is put into a JScrollPane, when the scroll pane\r\n\t\t * size is _reduced_ and the scroll bars appear, the map will not scroll \r\n\t\t * properly; simply shifting in space on top of other elements. The displayed\r\n\t\t * map is also incorrect, an objects that should be visible on the edges may not \r\n\t\t * be visible. The problem does not appear when the scroll pane size is increased. With the\r\n\t\t * following line, the map will always be the same size of the scroll pane's \r\n\t\t * viewport and thus the scroll bars will never appear.\r\n\t\t */\r\n\t\tsetPreferredSize(new Dimension(0,0)); \r\n\t\tinitconfig(globeTypeClass);\r\n\t\t\r\n\t\t\r\n\t\tsetupAnnotationToggling();\r\n\t}",
"public org.openxmlformats.schemas.drawingml.x2006.main.CTColorMapping addNewClrMap()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTColorMapping target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTColorMapping)get_store().add_element_user(CLRMAP$2);\n return target;\n }\n }",
"public void printMap()\n {\n this.mapFrame.paint();\n this.miniMapFrame.paint();\n }",
"public void addLayerToMap(@NonNull Layer layer) {\n if (this.layerAbove != null) {\n this.style.addLayerAbove(layer, this.layerAbove);\n } else if (this.layerBelow != null) {\n this.style.addLayerBelow(layer, this.layerBelow);\n } else {\n this.style.addLayer(layer);\n }\n }",
"@Override\r\n \tpublic void setMap(Map m) {\n \t\t\r\n \t}",
"@Override\n public void addDecorator(PmCommandDecorator decorator, org.pm4j.core.pm.PmTable.TableChange... changes) {\n\n }",
"MiniMapRender(MiniMap parent) {\n \t\tthis.parent = parent;\n \t\timage = parent.getImage();\n \t}",
"private void decorate() {\n setBorderPainted(false);\n setOpaque(true);\n \n setContentAreaFilled(false);\n setMargin(new Insets(1, 1, 1, 1));\n }",
"public interface WorldMap {\n /**\n * This constant is used to define that a specific tile is empty.\n */\n int NO_TILE = 0;\n\n /**\n * The amount of tiles that are stored on the world map texture in height.\n */\n int WORLD_MAP_HEIGHT = 1024;\n\n /**\n * The amount of tiles that are stored on the world map texture in width.\n */\n int WORLD_MAP_WIDTH = 1024;\n\n /**\n * Get the origin location of the world map.\n *\n * @return the origin location\n */\n @Nonnull\n Location getMapOrigin();\n\n /**\n * Get the last reported location of the player.\n *\n * @return the player location\n */\n @Nonnull\n Location getPlayerLocation();\n\n /**\n * Get the texture of the world map.\n *\n * @return the world map texture\n */\n @Nonnull\n Texture getWorldMap();\n\n /**\n * Mark a tile as changed. The world map is supposed to update this tile at some later point.\n *\n * @param location the location of the tile that was changed\n */\n void setTileChanged(@Nonnull Location location);\n\n /**\n * Mark the entire map as changed. Once this is done the entire map needs to be updated.\n */\n void setMapChanged();\n\n /**\n * Set the location of the player on the map. This is used in some backend to prioritise the areas updated on the\n * world map.\n *\n * @param location the new location of the map\n */\n void setPlayerLocation(@Nonnull Location location);\n\n /**\n * Set the origin location of the world map. The map will expand starting from this point a specific amount of\n * tiles defined by {@link #WORLD_MAP_HEIGHT} and {@link #WORLD_MAP_WIDTH}.\n * <p/>\n * Changing the origin location automatically clears the map.\n *\n * @param location the new origin location of the map\n */\n void setMapOrigin(@Nonnull Location location);\n\n /**\n * This function causes all map data to be thrown away. The map turned empty.\n */\n void clear();\n\n /**\n * Render the changes to the world map. This does not render anything to the screen and it will not render\n * anything at all mostly. It will update the texture of the world map in case there are updates pending that\n * need to be applied.\n * <p/>\n * This function needs to be called during the render loop.\n *\n * @param container the container of the game\n */\n void render(@Nonnull GameContainer container);\n}",
"@Override\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tGraphics2D g2d = (Graphics2D) g;\n\t\t\t\tg2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n\t\t\t\tint w = getWidth();\n\t\t\t\tint h = getHeight();\n//\t\t\t\tColor color1 = new Color(30, 255, 90);\n//\t\t\t\tColor color2 = new Color(45, 110, 35);\n\t\t\t\tGradientPaint gp = new GradientPaint(0, 0, marsColor1, 0, h, marsColor2);\n\t\t\t\tg2d.setPaint(gp);\n\t\t\t\tg2d.fillRect(0, 0, w, h);\n\t\t\t}",
"public MapContainer() {\n this(new OpenStreetMapProvider());\n }",
"private void initializeMap() {\n // - Map -\n map = (MapView) this.findViewById(R.id.map);\n //map.setBuiltInZoomControls(true);\n map.setMultiTouchControls(true);\n map.setMinZoomLevel(16);\n // Tiles for the map, can be changed\n map.setTileSource(TileSourceFactory.MAPNIK);\n\n // - Map controller -\n IMapController mapController = map.getController();\n mapController.setZoom(19);\n\n // - Map overlays -\n CustomResourceProxy crp = new CustomResourceProxy(getApplicationContext());\n currentLocationOverlay = new DirectedLocationOverlay(this, crp);\n\n map.getOverlays().add(currentLocationOverlay);\n\n // - Location -\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n if(locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER) != null) {\n onLocationChanged(locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER));\n }\n else if (locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER) != null) {\n onLocationChanged(locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER));\n }\n else {\n currentLocationOverlay.setEnabled(false);\n }\n }",
"public void annotationBoundary(AnnotationBoundaryMap arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"public void annotationBoundary(AnnotationBoundaryMap arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"public void drawMap(Graphics g) {\r\n\t\tfor (UIElement field : fields.values())\r\n\t\t\tfield.draw(g);\r\n\r\n\t\tfor (UIElement stargate : stargates.values())\r\n\t\t\tstargate.draw(g);\r\n\t}",
"public void updateMap(boolean animate) {\n\t\tgetContentPane().add(mapContainer);\n\t\trevalidate();\n\t\t\n\t\t// Setting up map\n\t\tint width = mapContainer.getWidth();\n\t\tint height = mapContainer.getHeight();\n\t\tBufferedImage I = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n\t\tGraphics2D g2d = I.createGraphics();\n\t\tg2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t\n\t\t// Setting up map dimensions\n\t\tdouble xM = width*zoom, yM = height*zoom;\n\t\tdouble xL = Math.abs(mapBounds[1]-mapBounds[3]), yL = Math.abs(mapBounds[0]-mapBounds[2]);\n\t\tdouble xI = (xM-(yM-60)*(xL/yL))/2, yI = 30;\n\t\tif(xM/yM < xL/yL) {\n\t\t\txI = 30;\n\t\t\tyI += (yM-(xM-60)*(yL/xL))/2;\n\t\t}\n\t\tdouble yP = yM*yF-yM/zoom/2, xP = xM*xF-xM/zoom/2;\n\t\t\n\t\tg2d.setColor(Color.white);\n\t\tg2d.fillRect(20, 20, width-40, height-40);\n\t\tg2d.setColor(roadColor);\n\t\tg2d.setStroke(new BasicStroke(roadWidth));\n\t\t\n\t\t// Drawing each road\n\t\tint i, n = G.getSize();\n\t\tdouble[] v1, v2;\n\t\tfor(i = 0; i < n; i++) {\n\t\t\tfor(Edge e : G.getEdges(i)) {\t\t\t\t\n\t\t\t\tv1 = V.get(i);\n\t\t\t\tv2 = V.get(e.next);\n\t\t\t\tif(animate)\n\t\t\t\t\tdrawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], 0, g2d);\n\t\t\t\telse {\n\t\t\t\t\tdrawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], (int)(v1[2]*v2[2]), g2d);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Drawing each path\n\t\tif(animate) {\n\t\t\tn = P.size()-1;\n\t\t\tfor(i = 0; i < n; i++) {\n\t\t\t\t\n\t\t\t\tv1 = V.get(P.get(i));\n\t\t\t\tv2 = V.get(P.get(i+1));\n\t\t\t\t\n\t\t\t\tdrawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], 1, g2d);\n\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(10);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tmapContainer.setIcon(new ImageIcon(I));\n\t\t\t\trevalidate();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Creating image base\n\t\tg2d.setStroke(new BasicStroke(1));\n\t\tg2d.setColor(Color.lightGray);\n\t\tg2d.fillRect(0, 0, width, 20);\n\t\tg2d.fillRect(0, 0, 20, height);\n\t\tg2d.fillRect(width-20, 0, 20, height);\n\t\tg2d.fillRect(0, height-20, width, 20);\n\t\tg2d.setColor(Color.black);\n\t\tg2d.drawRect(20, 20, width-40, height-40);\n\t\tg2d.setFont(titleFont);\n\t\tg2d.drawString(title, 40, 15);\n\t\tint tw = g2d.getFontMetrics().stringWidth(title);\n\t\tg2d.setFont(subtitleFont);\n\t\tg2d.drawString(subtitle, 50+tw, 15);\n\t\t\n\t\t\n\t\tmapContainer.setIcon(new ImageIcon(I));\n\t\trevalidate();\n\t}",
"public Map(PApplet p, String id, float x, float y, float width, float height, boolean useMask,\n \t\t\tboolean useDistortion, AbstractMapProvider provider) {\n \t\tthis.p = p;\n \n \t\tthis.id = id;\n \t\tthis.x = x;\n \t\tthis.y = y;\n \t\tthis.width = width;\n \t\tthis.height = height;\n \n \t\tthis.mapDisplay = MapDisplayFactory.getMapDisplay(p, id, x, y, width, height, useMask,\n \t\t\t\tuseDistortion, provider);\n \t\t\n \t\tpanCenterZoomTo(PRIME_MERIDIAN_EQUATOR_LOCATION, DEFAULT_ZOOM_LEVEL);\n \t}",
"public void buildMap(){\n map =mapFactory.createMap(level);\n RefLinks.SetMap(map);\n }",
"public interface RegionCategoryMapPresenter {\n void init(RegionCategory regionCategory);\n\n void onLoadData();\n\n void onSuccessMapReady();\n\n void onNetworkError(HttpErrorDto httpErrorDto);\n\n void onSuccessGetMarketListById(List<Market> markets);\n\n void onSuccessGetMarketListByIdAndLocation(List<Market> markets);\n\n void onMarkerClick(Market market);\n\n void onMapClick();\n\n void onClickPosition();\n\n void onSnippetClick(Market market);\n}",
"@Override\n FeatureMapLayer getLayer();",
"public void updateMapGrid() {\n char[][] map = controller.getPopulatedMap();\n\t if (mapGrid == null) {\n mapGrid = new MapGrid(map.length, map[0].length, ICON_SIZE);\n }\n mapGrid.insertCharMap(map);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n // standard\n super.onCreate(savedInstanceState);\n setContentView(R.layout.maps);\n\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n\n // create a map view\n mapView = (MapView) findViewById(R.id.mapview);\n mapView.setBuiltInZoomControls(true);\n mapOverlays = mapView.getOverlays();\n\n // create a map controller\n mapController = mapView.getController();\n\n // initialize overlays\n eatOverlay = new MyItemizedOverlay(this.getResources().getDrawable(R.drawable.ico_eat), this);\n sleepOverlay = new MyItemizedOverlay(this.getResources().getDrawable(R.drawable.ico_sleep), this);\n studyOverlay = new MyItemizedOverlay(this.getResources().getDrawable(R.drawable.ico_study), this);\n havefunOverlay = new MyItemizedOverlay(this.getResources().getDrawable(R.drawable.ico_havefun), this);\n eat_study_havefun_multiOverlay = new MyItemizedOverlay(this.getResources().getDrawable(R.drawable.ico_eat_study_havefun), this); // ACC, Hoffmann Hall\n sleep_study_multiOverlay = new MyItemizedOverlay(this.getResources().getDrawable(R.drawable.ico_sleep_study), this); // Vis, all resident halls\n study_havefun_multiOverlay = new MyItemizedOverlay(this.getResources().getDrawable(R.drawable.ico_study_havefun), this); // K, Belmont house\n\n // create new overlays\n for (int i = 0; i < Locations.length; i++) {\n if (Locations[i].getCategory().equals(\"eat\")) // if a location is categorized as only a place to eat, it will be added to eatOverlay\n {\n eatOverlay.addOverlay(new OverlayItem(Locations[i].getGeoPoint(), Locations[i].getLocationName(), Locations[i].getDescription()));\n }\n if (Locations[i].getCategory().equals(\"sleep\")) // if a location is categorized as only a place to sleep, it will be added to sleepOverlay\n {\n sleepOverlay.addOverlay(new OverlayItem(Locations[i].getGeoPoint(), Locations[i].getLocationName(), Locations[i].getDescription()));\n }\n if (Locations[i].getCategory().equals(\"study\")) // if a location is categorized as only a place to study, it will be added to the studyOverlay\n {\n studyOverlay.addOverlay(new OverlayItem(Locations[i].getGeoPoint(), Locations[i].getLocationName(), Locations[i].getDescription()));\n }\n if (Locations[i].getCategory().equals(\"havefun\")) // if a location is categorized as only a place to have fun, it will be added to havefunOverlay\n {\n havefunOverlay.addOverlay(new OverlayItem(Locations[i].getGeoPoint(), Locations[i].getLocationName(), Locations[i].getDescription()));\n }\n if (Locations[i].getCategory().equals(\"eat_study_havefun\")) // if a location is categorized as a place to eat, study, and have fun, it will be added to eat_study_havefun_multiOverlay\n {\n eat_study_havefun_multiOverlay.addOverlay(new OverlayItem(Locations[i].getGeoPoint(), Locations[i].getLocationName(), Locations[i].getDescription()));\n }\n if (Locations[i].getCategory().equals(\"sleep_study\")) // if a location is categorized as a place to sleep and study, it will be added to sleep_study_multiOverlay\n {\n sleep_study_multiOverlay.addOverlay(new OverlayItem(Locations[i].getGeoPoint(), Locations[i].getLocationName(), Locations[i].getDescription()));\n }\n if (Locations[i].getCategory().equals(\"study_havefun\")) // if a location is categorized as a place to study and have fun, it will be added to the study_havefun_multiOverlay\n {\n study_havefun_multiOverlay.addOverlay(new OverlayItem(Locations[i].getGeoPoint(), Locations[i].getLocationName(), Locations[i].getDescription()));\n }\n }\n\n boolean[] checked = {false, false, false, false};\n\n // Activity life cycle?\n if (savedInstanceState != null) {\n if (savedInstanceState.getBooleanArray(\"overlayList\")[0]) {\n mapOverlays.add(eatOverlay);\n checked[0] = true;\n }\n if (savedInstanceState.getBooleanArray(\"overlayList\")[1]) {\n mapOverlays.add(sleepOverlay);\n checked[1] = true;\n }\n if (savedInstanceState.getBooleanArray(\"overlayList\")[2]) {\n mapOverlays.add(studyOverlay);\n checked[2] = true;\n }\n if (savedInstanceState.getBooleanArray(\"overlayList\")[3]) {\n mapOverlays.add(havefunOverlay);\n checked[3] = true;\n }\n if (savedInstanceState.getBooleanArray(\"overlayList\")[4]) {\n mapOverlays.add(eat_study_havefun_multiOverlay);\n }\n if (savedInstanceState.getBooleanArray(\"overlayList\")[5]) {\n mapOverlays.add(sleep_study_multiOverlay);\n }\n if (savedInstanceState.getBooleanArray(\"overlayList\")[6]) {\n mapOverlays.add(study_havefun_multiOverlay);\n }\n\n if (savedInstanceState.getBoolean(\"currentMapInSatelliteView\")) {\n mapView.setStreetView(false);\n mapView.setSatellite(true);\n } else {\n mapView.setSatellite(false);\n mapView.setStreetView(true);\n }\n\n int latitude = savedInstanceState.getInt(\"latitude\");\n int longitude = savedInstanceState.getInt(\"longitude\");\n\n mapController.animateTo(new GeoPoint(latitude, longitude));\n mapController.setZoom(savedInstanceState.getInt(\"currentZoomLevel\"));\n } else {\n // display overlays on the map\n mapOverlays.add(eatOverlay);\n mapOverlays.add(sleepOverlay);\n mapOverlays.add(studyOverlay);\n mapOverlays.add(havefunOverlay);\n mapOverlays.add(eat_study_havefun_multiOverlay);\n mapOverlays.add(sleep_study_multiOverlay);\n mapOverlays.add(study_havefun_multiOverlay);\n\n // all the layers in the layersDialog are checked so the checked array is initialized to true\n checked[0] = true;\n checked[1] = true;\n checked[2] = true;\n checked[3] = true;\n\n mapView.setSatellite(true);\n\n // set the location and zoom level to display when the Activity is created\n //mapController.animateTo(new GeoPoint(42503860, -90679350));\n mapController.animateTo(new GeoPoint(42503670, -90679330));\n mapController.setZoom(18); // the larger the number, the closer the zoom\n }\n\n // CREATE A \"LAYERS\" ALERT DIALOG BOX\n // This is a menu option in the Action Bar that allows the user to remove certain overlay items from displaying on the map \n final String[] layers = {\"Eat\", \"Sleep\", \"Study\", \"Have Fun\"}; // create a new string array and store the different layers (dialog options) in it\n AlertDialog.Builder layersDialogBuilder = new AlertDialog.Builder(this); // create a new MultiChoiceItems dialog that lists the layers as check boxes\n layersDialogBuilder.setTitle(\"Activity Layers\"); // title of the dialog popup\n layersDialogBuilder.setMultiChoiceItems(layers, checked, new OnMultiChoiceClickListener() {\n public void onClick(DialogInterface dialog, int which, boolean isChecked) {\n if (layers[which].equals(layers[0])) // if the selected item is \"Eat\"\n {\n if (isChecked == true) // if the user selects \"Eat\", add all layers to the map that correspond to a place where students can eat\n {\n mapOverlays.add(eatOverlay);\n mapOverlays.add(eat_study_havefun_multiOverlay);\n isEatChecked = true;\n }\n if (isChecked == false) // if the user deselects \"Eat\", remove only the eat layer\n {\n mapOverlays.remove(eatOverlay);\n isEatChecked = false;\n }\n }\n if (layers[which].equals(layers[1])) // if the selected item is \"Sleep\"\n {\n if (isChecked == true) // if the user selects \"Sleep\", add all layers to the map that correspond to a place where students can sleep\n {\n mapOverlays.add(sleepOverlay);\n mapOverlays.add(sleep_study_multiOverlay);\n isSleepChecked = true;\n }\n if (isChecked == false) // if the user deselects \"Sleep\", remove only the sleep layer\n {\n mapOverlays.remove(sleepOverlay);\n isSleepChecked = false;\n }\n }\n if (layers[which].equals(layers[2])) // if the selected item is \"Study\"\n {\n if (isChecked == true) // if the user selects \"Study\", add all layers to the map that correspond to a place where students can study\n {\n mapOverlays.add(studyOverlay);\n mapOverlays.add(eat_study_havefun_multiOverlay);\n mapOverlays.add(sleep_study_multiOverlay);\n mapOverlays.add(study_havefun_multiOverlay);\n isStudyChecked = true;\n }\n if (isChecked == false) // if the user deselects \"Study\", remove only the study layer\n {\n mapOverlays.remove(studyOverlay);\n isStudyChecked = false;\n }\n }\n if (layers[which].equals(layers[3])) // if the selected item is \"Have Fun\"\n {\n if (isChecked == true) {\n mapOverlays.add(havefunOverlay); // if the user selects \"Have Fun\", add all layers to the map that correspond to a place where students can have fun\n mapOverlays.add(eat_study_havefun_multiOverlay);\n mapOverlays.add(study_havefun_multiOverlay);\n isHaveFunChecked = true;\n }\n if (isChecked == false) // if the user deselects \"Have Fun\", remove only the have fun layer\n {\n mapOverlays.remove(havefunOverlay);\n isHaveFunChecked = false;\n }\n }\n }\n });\n layersDialogBuilder.setPositiveButton(\"Apply\", new DialogInterface.OnClickListener() {\n /* When the user hits the \"Apply\" button, the following code checks to see which items are not checked in the\n * layersDialog. Depending on what is checked or not checked, appropriate multi icons are removed from the map.\n * For some reason, the multi icons would not always disappear the first time the user hit \"Apply\", so the code\n * is contained within a loop to make sure the icons disappear the first attempt like they are supposed to.\n */\n public void onClick(DialogInterface dialog, int id) {\n for (int i = 0; i < 5; i++) {\n if (!isEatChecked && !isStudyChecked && !isHaveFunChecked) {\n mapOverlays.remove(eat_study_havefun_multiOverlay);\n }\n if (!isSleepChecked && !isStudyChecked) {\n mapOverlays.remove(sleep_study_multiOverlay);\n }\n if (!isStudyChecked && !isHaveFunChecked) {\n mapOverlays.remove(study_havefun_multiOverlay);\n }\n mapView.postInvalidate(); // refresh the map view when the user hits \"Apply\"\n }\n }\n });\n layersDialog = layersDialogBuilder.create();\n\n // CREATE A \"LOCATIONS\" ALERT DIALOG BOX\n // This allows the user to view a list of all the locations on the map, in alphabetical order\n // create a new string array and store all the location names in it\n final String[] locationNames = new String[Locations.length];\n for (int i = 0; i < Locations.length; i++) {\n locationNames[i] = Locations[i].getLocationName();\n }\n Arrays.sort(locationNames); // sort the location names alphabetically\n // create a new dialog that lists all the locations\n AlertDialog.Builder locationsDialogBuilder = new AlertDialog.Builder(this);\n locationsDialogBuilder.setTitle(\"Campus Locations\"); // title of the dialog popup\n locationsDialogBuilder.setItems(locationNames, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n for (int i = 0; i < Locations.length; i++) {\n if (Locations[i].getLocationName().equals(locationNames[which])) {\n // when a location is clicked on, animate to that location's geopoint and zoom in\n mapController.animateTo(Locations[i].getGeoPoint());\n }\n }\n // set the zoom level to 20\n mapController.setZoom(20);\n }\n });\n locationsDialog = locationsDialogBuilder.create();\n }",
"private void drawMap( Graphics2D g2 )\r\n {\r\n MobilityMap map = sim.getMap();\r\n \r\n /* Draw map nodes and their links */\r\n int numNodes = map.getNumberOfNodes();\r\n \r\n for( int i=0; i < numNodes; i++ )\r\n {\r\n MapNode node = map.getNodeAt(i);\r\n Point2D.Double nodeLoc = node.getLocation();\r\n \r\n // Draw the node\r\n drawCircle( g2, nodeLoc, MAP_NODE_COLOUR, MAP_NODE_RADIUS, false );\r\n \r\n // Draw the node's links\r\n int numLinks = node.getNumberOfLinks();\r\n for( int j=0; j < numLinks; j++ )\r\n {\r\n MapNode destNode = node.getLinkAt(j).getGoesTo();\r\n Point2D.Double destNodeLoc = destNode.getLocation();\r\n drawLine( g2, nodeLoc, destNodeLoc, MAP_LINK_COLOUR );\r\n }\r\n }\r\n }",
"public void addOverlays() {\n\n\t\t// TODO: why clearing them?\n\t\tmapOverlays = mapView.getOverlays();\n\t\tmapOverlays.clear();\n\n\t\t// TODO: check!\n\t\tif (currentPos.size() != 0)\n\t\t\tmapOverlays.add(currentPos);\n\n\t\tif (lastSearch.size() != 0)\n\t\t\tmapOverlays.add(lastSearch);\n\t\t\n\t\tif(routeOverlays.size() != 0) {\n\t\t\tIterator<MyOverLay> it = routeOverlays.iterator();\n\t\t\twhile (it.hasNext()){\n\t\t\t\tmapOverlays.add(it.next());\n\t\t\t}\n\t\t}\n\n\t\tfor (Category cat : allCategories) {\n\t\t\tif (cat.getLinkedOverlay().size() > 0 && cat.isActive()) {\n\t\t\t\tUtil.l(\"Adding overlay \" + cat.getName()\n\t\t\t\t\t\t+ \" to map: ADDED (size is: \"\n\t\t\t\t\t\t+ cat.getLinkedOverlay().size() + \")\");\n\t\t\t\tmapOverlays.add(cat.getLinkedOverlay());\n\t\t\t} else {\n\t\t\t\tUtil.l(\"Adding overlay \" + cat.getName()\n\t\t\t\t\t\t+ \" to map: NOT ADDED (zero size OR noActive)\");\n\t\t\t}\n\t\t}\n\t}",
"private void updateColorMap() {\n //if (colorMap == null) {\n colorMap = ColorUtil.buildColorMap(colorBar.getCurrentColors(),\n null);\n /* } else {\n colorMap = ColorUtil.updateColorMap(colorBar.getCurrentColors(),\n colorMap);\n }*/\n cmapParams.setColorMap(colorMap);\n cmapParams.setColorMapName(null);\n ((AbstractNcEditor) EditorUtil.getActiveEditor()).refresh();\n }",
"public abstract Placer createPlacer (Layer layer);",
"public abstract mapnik.Map createMap(Object recycleTag);",
"public MapEditor() throws LWJGLException {\n // TODO: Comment me\n setMinimumSize(new Dimension(1024, 800));\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setBounds(100, 100, 800, 796);\n contentPane = new JPanel();\n contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n setContentPane(contentPane);\n contentPane.setLayout(new MigLayout(\"\", \"[grow][grow]\",\n \"[][][603.00,grow,baseline]\"));\n \n // TODO: Comment me\n JToolBar toolBar = new JToolBar();\n toolBar.setBorder(UIManager.getBorder(\"ToolBar.border\"));\n contentPane.add(toolBar, \"flowx,cell 0 0 2 1,growx\");\n \n // TODO: Comment me\n JButton btnSave = new JButton(\"\");\n btnSave.setIcon(new ImageIcon(\"res/save.png\"));\n btnSave.setToolTipText(\"Save\");\n btnSave.setBorder(null);\n toolBar.add(btnSave);\n \n // TODO: Comment me\n Component horizontalStrut = Box.createHorizontalStrut(20);\n horizontalStrut.setMaximumSize(new Dimension(5, 32767));\n horizontalStrut.setPreferredSize(new Dimension(5, 0));\n horizontalStrut.setMinimumSize(new Dimension(5, 0));\n toolBar.add(horizontalStrut);\n \n // TODO: Comment me\n JButton btnLoad = new JButton(\"\");\n btnLoad.setBorder(null);\n btnLoad.setToolTipText(\"Load\");\n btnLoad.setIcon(new ImageIcon(\"res/load.png\"));\n toolBar.add(btnLoad);\n \n // TODO: Comment me\n Component horizontalStrut_1 = Box.createHorizontalStrut(20);\n toolBar.add(horizontalStrut_1);\n \n // TODO: Comment me\n JButton btnExport = new JButton(\"\");\n btnExport.setBorder(null);\n btnExport.setIcon(new ImageIcon(\"res/export.png\"));\n btnExport.setToolTipText(\"Export\");\n toolBar.add(btnExport);\n \n // TODO: Comment me\n Component horizontalStrut_2 = Box.createHorizontalStrut(20);\n toolBar.add(horizontalStrut_2);\n \n // TODO: Comment me\n JButton btnUndo = new JButton(\"\");\n btnUndo.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent arg0) {\n currentTab.getEditorCanvas().undo();\n }\n });\n btnUndo.setBorder(null);\n btnUndo.setToolTipText(\"Undo\");\n btnUndo.setIcon(new ImageIcon(\"res/undo.png\"));\n toolBar.add(btnUndo);\n \n // TODO: Comment me\n Component horizontalStrut_3 = Box.createHorizontalStrut(20);\n horizontalStrut_3.setPreferredSize(new Dimension(5, 0));\n horizontalStrut_3.setMinimumSize(new Dimension(5, 0));\n horizontalStrut_3.setMaximumSize(new Dimension(5, 32767));\n toolBar.add(horizontalStrut_3);\n \n // TODO: Comment me\n JButton btnRedo = new JButton(\"\");\n btnRedo.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent arg0) {\n currentTab.getEditorCanvas().redo();\n }\n });\n btnRedo.setBorder(null);\n btnRedo.setIcon(new ImageIcon(\"res/redo.png\"));\n btnRedo.setToolTipText(\"Redo\");\n toolBar.add(btnRedo);\n\n // TODO: Comment me\n JPanel toolboxPanel = new JPanel();\n toolboxPanel.setBackground(UIManager.getColor(\"Panel.background\"));\n contentPane.add(toolboxPanel, \"cell 0 1 2 1,grow\");\n toolboxPanel.setLayout(new MigLayout(\"\", \"[666px,grow]\", \"[122px]\"));\n Toolbox toolbox = new Toolbox();\n toolboxPanel.add(toolbox, \"cell 0 0,growx,aligny top\");\n\n // TODO: Comment me\n JPanel map2dPanel = new JPanel();\n map2dPanel.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\n map2dPanel.setBorder(new TitledBorder(null, \"2D Map\",\n TitledBorder.LEADING, TitledBorder.TOP, null,\n null));\n map2dPanel.setBackground(UIManager.getColor(\"Panel.background\"));\n map2dPanel.setLayout(new MigLayout(\"\", \"[19px,grow,fill]\",\n \"[19px,grow,fill]\"));\n Map2D map2d = new Map2D();\n map2dPanel.add(map2d, \"cell 0 0,alignx left,aligny top\");\n contentPane.add(map2dPanel, \"cell 0 2,grow\");\n\n // TODO: Comment me.\n btnSave.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent arg0) {\n map2d.save();\n }\n });\n \n // TODO: Comment me.\n btnLoad.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent arg0) {\n map2d.load();\n }\n });\n\n // TODO: Comment me\n JPanel map3dPanel = new JPanel();\n map3dPanel.setBorder(new TitledBorder(null, \"3D Map\",\n TitledBorder.LEADING, TitledBorder.TOP, null,\n null));\n map3dPanel.setBackground(UIManager.getColor(\"Panel.background\"));\n map3dPanel.setLayout(new MigLayout(\"\", \"[10px,grow]\", \"[10px,grow][]\"));\n map3dPanel.add(new Map3D(), \"cell 0 0,grow\");\n contentPane.add(map3dPanel, \"cell 1 2 1 2,grow\");\n }",
"public interface MapPresenter {\n /**\n * 注册广播\n */\n void registerReceiver();\n\n /**\n * 注销广播\n */\n void unregisterReceiver();\n}",
"public PlainsArea(MapManager manager) {\r\n super(MAPNAME, false);\r\n this.manager = manager; // manager for loading maps\r\n this.creator = B2WorldCreator.getInstance(); // for creating the game's physics\r\n this.setMusic();\r\n }",
"private void addMakerToMap() {\n if (mapboxMap != null) {\r\n mapboxMap.removeAnnotations();\r\n if (res.getData().size() > 0) {\r\n for (UserBasicInfo info : res.getData()) {\r\n if (info.getRole().equalsIgnoreCase(\"student\")) {\r\n if (isStudentSwitchOn) {\r\n setMarker(info);\r\n }\r\n }\r\n if (info.getRole().equalsIgnoreCase(\"teacher\")) {\r\n if (isTeacherSwitchOn) {\r\n setMarker(info);\r\n }\r\n }\r\n }\r\n } else {\r\n getMvpView().noRecordFound();\r\n }\r\n }\r\n }",
"WorldMaterialMap getMaterialMap();",
"public void setMapEditor(MapEditor m)\n\t{\n\t\tremove(mapEditor);\n\t\tthis.mapEditor = m;\n\t\tadd(mapEditor, BorderLayout.CENTER);\n\t}",
"private void render() {\n\t\ttheMap.draw(g);\n\t\ttheTrainer.draw(g);\n\t}",
"Map<String, Decorator> getDecorators();",
"public List<MapAdvice> getMapAdvices();",
"interface DownloadsMap extends PagerAdapterMap, InitViewMap, ContextMap\n {\n\n }",
"@SuppressWarnings(\"rawtypes\")\r\n\tpublic void addRenderingHints(Map hints)\r\n\t{\r\n\t\t// System.out.println(\"addRenderingHints\");\r\n\t}",
"public void addMap(GridMap map){\n mapsList.add(map);\n //Observer pattern\n setChanged();\n notifyObservers(this);\n }",
"protected BiomeDecorator createBiomeDecorator()\n {\n return new BiomeDecorator();\n }",
"public void MapFragment() {}",
"@Override\n\tpublic void render(Bitmap map) {\n\t\t\n\t}",
"public Graphical(Map map, Player player)\n {\n Swing.init();\n \n // Store paramaters\n this.player = player; \n\n /* TODO: Finish editor frame */\n this.editorFrame = new EditorFrame (this);\n this.miniMapFrame = new MiniMapFrame (this, map, player);\n this.mapFrame = new MapFrame (this, map, player);\n }",
"public static void paintLegend(final MapContext context,\n Graphics2D g2d,\n final Rectangle bounds,\n final LegendTemplate template) throws PortrayalException{\n\n g2d = (Graphics2D) g2d.create();\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);\n g2d.setClip(bounds);\n g2d.setStroke(new BasicStroke(1));\n\n float X = bounds.x;\n float Y = bounds.y;\n\n if(template == null){\n //no template generate a glyph\n for(MapLayer layer : context.layers()){\n DefaultGlyphService.render(layer.getStyle(), bounds, g2d, layer);\n }\n return;\n }\n\n\n final Dimension estimation = estimate(g2d, context, template, false);\n\n final BackgroundTemplate background = template.getBackground();\n if(background != null){\n final Rectangle area = new Rectangle(estimation);\n area.x = bounds.x;\n area.y = bounds.y;\n\n Insets insets = background.getBackgroundInsets();\n area.width += insets.left + insets.right;\n area.height += insets.top + insets.bottom;\n X += insets.left;\n Y += insets.top;\n\n BackgroundUtilities.paint(g2d, area, background);\n }\n\n\n final FontMetrics layerFontMetric = g2d.getFontMetrics(template.getLayerFont());\n final int layerFontHeight = layerFontMetric.getHeight();\n final FontMetrics ruleFontMetric = g2d.getFontMetrics(template.getRuleFont());\n final int ruleFontHeight = ruleFontMetric.getHeight();\n final float gapSize = template.getGapSize();\n final Dimension glyphSize = template.getGlyphSize();\n final Rectangle2D rectangle = new Rectangle2D.Float();\n float moveY = 0;\n\n g2d.translate(X, Y);\n\n final List<MapLayer> layers = context.layers();\n for(int l=0,n=layers.size();l<n;l++){\n final MapLayer layer = layers.get(l);\n final MutableStyle style = layer.getStyle();\n\n if(style == null) continue;\n\n if(template.isLayerVisible()){\n if(l!=0){\n moveY += gapSize;\n }\n String title = \"\";\n final Description description = layer.getDescription();\n if (description != null) {\n final InternationalString titleTmp = description.getTitle();\n if (titleTmp != null) {\n title = titleTmp.toString();\n }\n }\n\n moveY += layerFontMetric.getLeading() + layerFontMetric.getAscent();\n g2d.setFont(template.getLayerFont());\n g2d.setColor(Color.BLACK);\n g2d.drawString(title,0,moveY);\n moveY += layerFontMetric.getDescent();\n\n moveY += gapSize;\n }\n\n int numElement = 0;\n for(final MutableFeatureTypeStyle fts :style.featureTypeStyles()){\n for(final MutableRule rule : fts.rules()){\n if(numElement!=0){\n moveY += gapSize;\n }\n\n //calculate the rule text displacement with the glyph size\n final float stepRuleTitle;\n final float glyphHeight;\n final float glyphWidth;\n if(glyphSize == null){\n //find the best size\n final Dimension preferred = DefaultGlyphService.glyphPreferredSize(rule, glyphSize, layer);\n glyphHeight = preferred.height;\n glyphWidth = preferred.width;\n }else{\n //use the defined size\n glyphHeight = glyphSize.height;\n glyphWidth = glyphSize.width;\n }\n\n if(glyphHeight > ruleFontHeight){\n stepRuleTitle = ruleFontMetric.getLeading() + ruleFontMetric.getAscent()\n + (glyphHeight-ruleFontHeight)/2 ;\n }else{\n stepRuleTitle = ruleFontMetric.getLeading() + ruleFontMetric.getAscent();\n }\n\n\n String title = \"\";\n final Description description = rule.getDescription();\n if (description != null) {\n final InternationalString titleTmp = description.getTitle();\n if (titleTmp != null) {\n title = titleTmp.toString();\n }\n }\n rectangle.setRect(0, moveY, glyphWidth, glyphHeight);\n\n DefaultGlyphService.render(rule, rectangle, g2d,layer);\n g2d.setFont(template.getRuleFont());\n g2d.setColor(Color.BLACK);\n\n// final float baseline;\n// if(glyphHeight > ruleFontHeight){\n// baseline = moveY + ruleFontMetric.getLeading() + ruleFontMetric.getAscent()\n// + (glyphHeight-ruleFontHeight)/2 ;\n// }else{\n// baseline = moveY + ruleFontMetric.getLeading() + ruleFontMetric.getAscent();\n// }\n\n g2d.drawString(title, glyphWidth+GLYPH_SPACE, moveY + stepRuleTitle);\n\n\n moveY += (glyphHeight > ruleFontHeight) ? glyphHeight : ruleFontHeight;\n numElement++;\n }\n }\n }\n\n g2d.translate(0, -moveY);\n g2d.translate(-X, -Y);\n }"
]
| [
"0.5573454",
"0.54387146",
"0.54219013",
"0.5372845",
"0.52255654",
"0.5167854",
"0.50836325",
"0.5026076",
"0.5013403",
"0.49930418",
"0.49793684",
"0.4975715",
"0.4949715",
"0.49370494",
"0.49337852",
"0.49277064",
"0.4919854",
"0.4882362",
"0.48596793",
"0.48334616",
"0.4830102",
"0.4826397",
"0.4821138",
"0.48156214",
"0.47932804",
"0.47897488",
"0.47814015",
"0.47648168",
"0.47508925",
"0.47373262",
"0.47310093",
"0.4730706",
"0.4727473",
"0.47234938",
"0.47221714",
"0.47189894",
"0.47185916",
"0.469836",
"0.46873385",
"0.46824828",
"0.4681321",
"0.46783975",
"0.46599564",
"0.4658891",
"0.46474797",
"0.46311527",
"0.46112016",
"0.4610254",
"0.45986322",
"0.45854262",
"0.4556923",
"0.4555133",
"0.45525658",
"0.4534443",
"0.45236325",
"0.45231178",
"0.4522903",
"0.4514477",
"0.45129544",
"0.45068136",
"0.45024908",
"0.44936302",
"0.44849545",
"0.44849372",
"0.4484401",
"0.44824418",
"0.4478004",
"0.447699",
"0.44732648",
"0.44732648",
"0.44719598",
"0.44674432",
"0.44664195",
"0.44654024",
"0.44605502",
"0.44585487",
"0.44572395",
"0.44502246",
"0.44435915",
"0.44416982",
"0.44349733",
"0.44221184",
"0.4421351",
"0.44198582",
"0.44137806",
"0.44097885",
"0.44042766",
"0.4400542",
"0.43980253",
"0.43935028",
"0.4386583",
"0.4381969",
"0.4377202",
"0.4373968",
"0.43623593",
"0.4359731",
"0.43562365",
"0.43545955",
"0.43539745",
"0.43518117"
]
| 0.76754016 | 0 |
called by the jdefaultmap2d when the decoration should reset completely | public void refresh(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void resetHitMarker() {}",
"public native void setLegendOff();",
"protected void refreshDecorations() {\n\t\tif (decoration != null) {\n\t\t\tgetFigure().remove(decoration);\n\t\t\tdecoration = null;\n\t\t}\n\t\tif (decorationImage != null) {\n\t\t\tdecorationImage.dispose();\n\t\t\tdecorationImage = null;\n\t\t}\n\t\tLink link = getLink();\n\t\tif (link.eContainer() == null) {\n\t\t\t// Yeesh, the link hasn't even been initialized yet. Return.\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tIMarkerHolder markerHolder = BPELUtil.adapt(link, IMarkerHolder.class);\n\t\tIMarker[] markers = markerHolder.getMarkers(link);\n\t\tIMarker markerToDisplay = null;\n\t\tfor (int i = 0; i < markers.length; i++) {\n\t\t\tIMarker marker = markers[i];\n\t\t\t// If the marker is not visible, skip it.\n\t\t\tboolean isVisible = marker.getAttribute(IModelMarkerConstants.DECORATION_MARKER_VISIBLE_ATTR, true);\n\t\t\tif (!isVisible) continue;\n\t\t\tif (markerToDisplay != null) {\n\t\t\t\t// There was already a marker.\n\t\t\t\t// Find out which one has the highest priority and display that one.\n\t\t\t\tint priority = marker.getAttribute(IModelMarkerConstants.DECORATION_MARKER_PRIORITY_ATTR, Integer.MIN_VALUE);\n\t\t\t\tint existingPriority = markerToDisplay.getAttribute(IModelMarkerConstants.DECORATION_MARKER_PRIORITY_ATTR, Integer.MIN_VALUE);\n\t\t\t\tif (priority > existingPriority) {\n\t\t\t\t\tmarkerToDisplay = marker;\n\t\t\t\t}\t\t\n\t\t\t} else {\n\t\t\t\t// There was no marker already, put this one in the map.\n\t\t\t\tmarkerToDisplay = marker;\n\t\t\t}\n\t\t}\n\t\tif (markerToDisplay != null) {\n\t\t\tImage temp = getImage(markerToDisplay);\n\t\t\tif (temp == null) return;\n\t\t\tImageData background = temp.getImageData();\n\t\t\tString uri = markerToDisplay.getAttribute(IBPELUIConstants.MARKER_OVERLAYIMAGETOPLEFT, \"\"); //$NON-NLS-1$\n\t\t\tImageData topLeft = getImageData(uri);\n\t\t\turi = markerToDisplay.getAttribute(IBPELUIConstants.MARKER_OVERLAYIMAGETOPRIGHT, \"\"); //$NON-NLS-1$\n\t\t\tImageData topRight = getImageData(uri);\n\t\t\turi = markerToDisplay.getAttribute(IBPELUIConstants.MARKER_OVERLAYIMAGEBOTTOMLEFT, \"\"); //$NON-NLS-1$\n\t\t\tImageData bottomLeft = getImageData(uri);\n\t\t\turi = markerToDisplay.getAttribute(IBPELUIConstants.MARKER_OVERLAYIMAGEBOTTOMRIGHT, \"\"); //$NON-NLS-1$\n\t\t\tImageData bottomRight = getImageData(uri);\n\t\t\tOverlayCompositeImageDescriptor descriptor = new OverlayCompositeImageDescriptor(background, topLeft, topRight, bottomLeft, bottomRight);\n\t\t\t//TODO: can we get into image registry?\t\t\t\n\t\t\tImage image = descriptor.createImage();\n\t\t\tthis.decorationImage = image;\n\t\t\tthis.decoration = new Label(this.decorationImage);\n\t\t\tgetFigure().add(this.decoration, new ConnectionLocator(getConnectionFigure(), ConnectionLocator.MIDDLE));\n\t\t} else {\n\t\t\tif (hasCondition()) {\n\t\t\t\tImage image = BPELUIPlugin.INSTANCE.getImage(IBPELUIConstants.ICON_LINK_CONDITIONAL);\n\t\t\t\tthis.decorationImage = null;\n\t\t\t\tthis.decoration = new Label(image);\n\t\t\t\tgetFigure().add(this.decoration, new ConnectionLocator(getConnectionFigure(), ConnectionLocator.MIDDLE));\n\t\t\t}\n\t\t}\n\t}",
"public interface FXMapDecoration {\n\n /**\n * called by the jdefaultmap2d when the decoration should\n * reset completely\n */\n public void refresh();\n \n /**\n * must be called when the decoration is not used anymore.\n * to avoid memoryleack if it uses thread or other resources\n */\n public void dispose();\n \n /**\n * set the related map2d\n * @param map the map2D\n */\n public void setMap2D(FXMap map);\n \n /**\n * \n * @return Map2D, the related map2d of this decoration\n */\n public FXMap getMap2D();\n \n /**\n * \n * @return JComponent, the component which will be added at the map2D \n */\n public Node getComponent();\n \n}",
"public void resetAll()\n {\n _markers = null;\n setPrefSizeForText();\n repaint();\n }",
"void clearShapeMap();",
"void invalidatePalette();",
"protected void reset()\n {\n this.shapeDataCache.removeAllEntries();\n this.sector = null;\n }",
"@Override\n\tpublic void resetLocation() {\n\t\t\n\t}",
"private void clearPainting()\r\n\t{\r\n\t\tdockableDragPainter.clear();\r\n\t}",
"public synchronized void resetStyle() {\n \t\tstyleInitialized = false;\n \t}",
"public void mouseExited(MouseEvent e) {\n if (e.getSource() instanceof MapBean) {\n // erase the old line first\n paintRubberband(rPoint1, rPoint2);\n // set the second point to null so that a new line will be\n // re-drawn if the mouse comes back, and the line will use\n // the old starting point.\n rPoint2 = null;\n }\n }",
"public void reset() {\n\t\tif (marker >= 0) {\n\t\t\tsetSize(marker);\n\t\t\tmarker = -1;\n\t\t}\n\t}",
"public synchronized void landmarksChanged (CityMap sender) {\n mapLandmarks = cityMap.getMapLandmarks ();\n lastActivated = null;\n repaint ();\n }",
"private void decorate() {\n setBorderPainted(false);\n setOpaque(true);\n \n setContentAreaFilled(false);\n setMargin(new Insets(1, 1, 1, 1));\n }",
"public void reset() {\n points.reset();\n paintPolygon = false;\n paintResult = false;\n repaint();\n }",
"static void ClearMarks() {\n\t\tif (pop != null)\n\t\t{\n\t\t\tpop.clear();\n\t\t}\n\t\tClearDraw();\n\t\ti1.setOverlay(null);\n\t\tOL = new Overlay();\n\t}",
"private void reset() {\n darkSquare.reset();\n lightSquare.reset();\n background.reset();\n border.reset();\n showCoordinates.setSelected(resetCoordinates);\n pieceFont.reset();\n }",
"static void ClearDraw() {\n\t\tshape = new GeneralPath();\n\t\ti1.setOverlay(null);\n\t\tOL = new Overlay();\n\n\t}",
"@Override\n public void clearLineColors() {\n assemblyView.clearLinesColor();\n }",
"public void resetTool() {\n myPencil = new Path2D.Double(); \n }",
"void reset() {\n setVisible(false);\n myJumpedOver = false;\n }",
"@Override\n public void undo() {\n node.toggleBoundaryMarker();\n }",
"public void clearBorders() {\n\n findViewById(R.id.eslot1).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#00000000\")));\n findViewById(R.id.eslot2).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#00000000\")));\n findViewById(R.id.eslot3).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#00000000\")));\n findViewById(R.id.eslot4).setBackgroundTintList(ColorStateList.valueOf(Color.parseColor(\"#00000000\")));\n\n findViewById(R.id.eslot1).refreshDrawableState();\n findViewById(R.id.eslot2).refreshDrawableState();\n findViewById(R.id.eslot3).refreshDrawableState();\n findViewById(R.id.eslot4).refreshDrawableState();\n }",
"@Override\n protected void afterDraw(UI ui, PGraphics pg) {\n noLights();\n hint(DISABLE_DEPTH_TEST);\n }",
"public void figure() {\n this.isMap = false;\n System.out.println(\"Switch to figure mode\");\n }",
"public void supprimerJoueur() {\n cercle.setStroke(Color.TRANSPARENT);\n isVisible = false;\n }",
"public void resetMarker() {\n if(marker != null)\n marker.setIcon(BitmapDescriptorFactory.fromResource(GameSettings.getPlayerMarkerImage()));\n }",
"public void clearMapLayers() {\n if(internalNative != null) {\n internalNative.removeAllMarkers();\n markers.clear();\n } else {\n if(internalLightweightCmp != null) {\n internalLightweightCmp.removeAllLayers();\n points = null;\n } else {\n // TODO: Browser component \n }\n }\n }",
"public void cleanUp(){\n\t\t//offset(-1*bounds.left, -1*bounds.top);\n\t}",
"private void reset(){\n locationFieldX.setText(\"0.00\");\n locationFieldY.setText(\"0.00\");\n locationFieldZ.setText(\"0.00\");\n rotationFieldX.setText(\"0.00\");\n rotationFieldY.setText(\"0.00\");\n rotationFieldZ.setText(\"0.00\");\n scaleField.setText(\"1.00\");\n \n setObjects();\n setImage();\n }",
"private void resetSkyDrawing() {\n\t\tgc = canvas.getGraphicsContext2D();\n\t\tgc.setFill(usercolors[6]);\n\t\tgc.fillRect(0, 0, VIEWING_AREA_WIDTH, VIEWING_AREA_HEIGHT);\n\t\tdrawCircle(VIEWING_AREA_WIDTH / 2, VIEWING_AREA_WIDTH / 2, VIEWING_AREA_HEIGHT / 2, usercolors[4]);\n\t\tdrawCircleOutline(VIEWING_AREA_WIDTH / 2, VIEWING_AREA_HEIGHT / 2 ,VIEWING_AREA_WIDTH / 2, usercolors[5]);\n\t}",
"private void resetStroke(Graphics2D graphic) {\n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"reseting the graphics\");\n }\n \n graphic.setStroke(DEFAULT_STROKE);\n }",
"private void updateColorMap() {\n //if (colorMap == null) {\n colorMap = ColorUtil.buildColorMap(colorBar.getCurrentColors(),\n null);\n /* } else {\n colorMap = ColorUtil.updateColorMap(colorBar.getCurrentColors(),\n colorMap);\n }*/\n cmapParams.setColorMap(colorMap);\n cmapParams.setColorMapName(null);\n ((AbstractNcEditor) EditorUtil.getActiveEditor()).refresh();\n }",
"public void resetRenderer() {\n\n\t\tanimationComplete = true;\n\t\tif (pieceMove != null) {\n\t\t\tpieceMove.setPiece(null);\n\t\t\tpieceMove.setSquares(-99);\n\t\t}\n\t\tpieceMove = null;\n\t\tmoveFinalIndex = -999;\n\t\tmoveTempIndex = -999;\n\t\tmoveCount = -999;\n\t\tmoveCountHomeSq = 0;\n\t\trestMovedToStart = false;\n\t\tmovedToRest = false;\n\t\thomeSqMovedToHome = false;\n\n\t\tmoveToRestSq = null;\n\t\tmoveToHome = null;\n\n\t\tdiceList = new ArrayList<>();\n\t\tfor (int d = 0; d < selectedPlayer.getRuleEngine().dicePerGame(); d++) {\n\t\t\tDice newDice = createDiceInstance();\n\t\t\tnewDice.setShake(true);\n\t\t\tdiceList.add(newDice);\n\t\t}\n\n\t}",
"void restoreBefore() {\r\n\t\t\tsurface.basemap.clear();\r\n\t\t\tsurface.basemap.putAll(basemapBefore);\r\n\t\t\tsurface.buildingmap.clear();\r\n\t\t\tsurface.buildingmap.putAll(buildingmapBefore);\r\n\t\t\tsurface.features.clear();\r\n\t\t\tsurface.features.addAll(surfaceBefore);\r\n\t\t\tsurface.buildings.clear();\r\n\t\t\tsurface.buildings.addAll(buildingsBefore);\r\n\t\t}",
"public native void reset(GInfoWindow self, GLatLng point, GInfoWindowTab[] tabs, GSize size, GSize offset)/*-{\r\n\t\tself.reset(point, tabs, size, offset);\r\n\t}-*/;",
"public void removeAllOverlayObj()\n/* 91: */ {\n/* 92:146 */ this.mapPanel.removeAllOverlayObj();\n/* 93: */ }",
"void onStyleModify() {\n\t\tif (mergedStyleSheet != null) {\n\t\t\tmergedStyleSheet = null;\n\t\t\tsheets.setNeedsUpdate(true);\n\t\t} else if (sheets != null) {\n\t\t\tsheets.setNeedsUpdate(true);\n\t\t}\n\t}",
"public void InitMap() {\n for (int i=0; i<m_mapSize; i++) {\n SetColour(i, null);\n }\n }",
"@Override\n public void resetMap(){\n segmentList=new ArrayList<>();\n intersectionList=new ArrayList<>();\n this.setChanged();\n this.notifyObservers();\n }",
"public void restoreGraphics() {\n\n if ( g2 instanceof AimxcelGraphics2D ) {\n AimxcelGraphics2D aimxcelGraphics2D = (AimxcelGraphics2D) g2;\n aimxcelGraphics2D.popState();\n }\n else {\n if ( g2.getRenderingHints() != renderingHints ) {\n g2.setRenderingHints( renderingHints );\n }\n if ( g2.getPaint() != paint ) {\n g2.setPaint( paint );\n }\n if ( g2.getColor() != color ) {\n g2.setColor( color );\n }\n if ( g2.getStroke() != stroke ) {\n g2.setStroke( stroke );\n }\n if ( g2.getComposite() != composite ) {\n g2.setComposite( composite );\n }\n if ( g2.getTransform() != transform ) {\n g2.setTransform( transform );\n }\n if ( g2.getFont() != font ) {\n g2.setFont( font );\n }\n if ( g2.getClip() != clip ) {\n g2.setClip( clip );\n }\n if ( g2.getBackground() != background ) {\n g2.setBackground( background );\n }\n }\n }",
"public void completeRedraw()\r\n\t{\r\n\t\tg = (Graphics2D) s.getDrawGraphics();\r\n\t}",
"void reDraw();",
"@Override\n public void reset() {\n this.posx = 0;\n this.posy = 0;\n this.rad = 0;\n this.property = new Property();\n this.property.setColor(new Color(Color.BLUE));\n }",
"public void reset() {\n\t\tx = 0;\n\t\ty = 0;\n\t\tdir = -90;\n\t\tcoul = 0;\n\t\tcrayon = true;\n\t\tlistSegments.clear();\n \t}",
"private void resetFill(Graphics2D graphic) {\n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"reseting the graphics\");\n }\n \n graphic.setComposite(DEFAULT_COMPOSITE);\n }",
"void clearOffset();",
"private void repaint() {\n\t\tclear();\n\t\tfor (PR1Model.Shape c : m.drawDataProperty()) {\n\t\t\tif(!c.getText().equals(defaultshape))\n\t\t\t\tdrawShape(c, false);\n\t\t}\n\t\tif (getSelection() != null) {\n\t\t\tdrawShape(getSelection(), true);\n\t\t}\n\t}",
"@Override\n protected void doResetInterpolationHint(GGraphics2D g3, Object hint) {\n\t \n }",
"void restoreAfter() {\r\n\t\t\tsurface.basemap.clear();\r\n\t\t\tsurface.basemap.putAll(basemapAfter);\r\n\t\t\tsurface.buildingmap.clear();\r\n\t\t\tsurface.buildingmap.putAll(buildingmapAfter);\r\n\t\t\tsurface.features.clear();\r\n\t\t\tsurface.features.addAll(surfaceAfter);\r\n\t\t\tsurface.buildings.clear();\r\n\t\t\tsurface.buildings.addAll(buildingsAfter);\r\n\t\t}",
"@Override\n\tpublic void redraw() {\n\t\t\n\t}",
"public void mapViewLayedOut() {\n if (mPointToGoTo != null) {\n setCenter(mPointToGoTo);\n mPointToGoTo = null;\n }\n if (mZoomToZoomTo != -1) {\n setZoom(mZoomToZoomTo);\n mZoomToZoomTo = -1;\n }\n\n }",
"private void m146649c() {\n if (this.f108106a) {\n getHolder().setFormat(-2);\n setZOrderOnTop(true);\n }\n getHolder().addCallback(this.f108110e);\n setAlpha(0.0f);\n }",
"protected abstract void setMarkers();",
"public void resetCurrentValue()\r\n\t{\r\n\t\tborder=2;\r\n\t}",
"public void resetGraphicsWindowZoomAndMeasurement() {\r\n\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\tthis.graphicsTabItem.setModeState(GraphicsMode.RESET);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tGDE.display.asyncExec(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tDataExplorer.this.graphicsTabItem.setModeState(GraphicsMode.RESET);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}",
"public void reset() {\n\t\tfor (int i=0; i < this.WAYS; i++) {\n\t\t\tthis.cache[i] = new Line(this.alpha[i], REPL_VAL);\n\t\t}\n\t\t// set mru\n\t\tthis.cache[this.WAYS-1].state = INSERT_VAL;\n\t}",
"private void clear() {\r\n\t\tpstate.clear();\r\n\t\tdisplay.setLegend(\"\");\r\n\t\tship = null;\r\n\t}",
"public void reset(){\n\t\tthis.setPosition(DEFAULT_X, DEFAULT_Y);\t\n\t\tsetBounds(getX(), getY(), getDefaultWidth(), getHeight());\n\t\tcollisionBounds.setWidth(defaultWidth);\n\t\tspeed = 400;\n\t\tsetGlue(true);\n\t}",
"void reconfigure() {\n computePosition(_primaryPlot.getScreenCoords(findCurrentCenterPoint()), false);\n }",
"@Override\n public void reset() {\n super.reset();\n }",
"public void clearLoci() {\n // Override in proxy if lazily loaded; otherwise does nothing\n }",
"public void cleanCanvas() {\n\t\tclean = true;\n\t\tthis.invalidate();\n\t\t\n\t\t// adiciona ponto fict’cio para informar que o canvas foi limpo num dado momento\n\t\tif (toReplay) {\n\t\t\txs.add(-2.0f);\n\t\t\tys.add(-2.0f);\n\t\t\tcolors.add(mPaint.getColor());\n\t\t}\n\t}",
"public void update()\n\t{\n\t\tGViewMapManager gViewMapManager = this.guiController.getCurrentStyleMapManager();\n\t\tLayout layout = gViewMapManager.getLayout();\n\n\t\tswitch (layout)\n\t\t{\n\t\t\tcase LINEAR:\n\t\t\t\tthis.linear.setSelected(true);\n\t\t\t\tbreak;\n\t\t\tcase CIRCULAR:\n\t\t\t\tthis.circular.setSelected(true);\n\t\t\t\tbreak;\n default:\n break;\n\t\t}\n\t}",
"public void clearLastMarker(){\n lastMarker.remove();\n }",
"public final void mo39711K() {\n setBackgroundColor(0);\n }",
"@Override\n public void reset()\n {\n super.reset();\n }",
"public void reset(){\n x = originalX;\n y = originalY;\n dx = originalDX;\n dy = originalDY;\n }",
"public void resetFeatureState()\r\n {\r\n myMetaDataHandler.reset();\r\n myTimeHandler.reset();\r\n myFeatureId = 0;\r\n myFeatureColor = Color.WHITE;\r\n }",
"private void setUpMap() {\n if (points.size()>2) {\n drawCircle();\n }\n\n\n }",
"private void restoreStyle() {\n if(this.backedup) {\n this.backedup = false;\n\n this.currentFillColor = this.lastFillColor;\n DOM.setStyleAttribute(fill.getElement(), \"backgroundColor\",currentFillColor.toCss(false));\n this.fillOpacity.setValue(this.lastFillOpacity);\n this.currentFillColor.setAlpha(this.fillOpacity.getValue());\n\n this.currentStrokeColor = this.lastStrokeColor;\n DOM.setStyleAttribute(stroke.getElement(), \"backgroundColor\",currentStrokeColor.toCss(false));\n this.strokeOpacity.setValue(this.lastStrokeOpacity);\n this.currentStrokeColor.setAlpha(this.strokeOpacity.getValue());\n\n this.currentStrokeSize.setValue(this.lastStrokeSize);\n }\n }",
"private void removeMappings() {\n\t\tfor (final VisualMappingFunction<?, ?> vm : validMappings)\n\t\t\tstyle.removeVisualMappingFunction(vm.getVisualProperty());\n\t}",
"public void clear() {\n\t\tdoily.lines.clear();\n\t\tclearRedoStack();\n\t\tredraw();\n\t}",
"public void resetColor(){\n myRectangle.setFill(PADDLE_COLOR);\n }",
"public void reset() {\n clearMappings();\n if (converters != null) {\n converters.clear();\n }\n }",
"public void deselectAll()\n {\n map.deselectAll();\n mapComponent.repaint();\n mapper.resetMenus();\n }",
"@Override\n protected void paint2d(Graphics2D g) {\n \n }",
"@Override\n public void redraw() {\n firePropertyChange(AVKey.LAYER, null, this);\n }",
"private void m19558b() {\n this.f21607h = false;\n this.f21602c.invalidateSelf();\n }",
"public void death(){\n setCoordinate(super.getGameImage().getCoordInit());\n diminueVies();\n super.initAnimation();\n\n }",
"private void backupStyle() {\n if(!this.backedup) {\n this.backedup = true;\n this.lastFillColor = this.currentFillColor;\n this.lastFillOpacity = this.fillOpacity.getValue();\n this.lastStrokeColor = this.currentStrokeColor;\n this.lastStrokeOpacity = this.strokeOpacity.getValue();\n this.lastStrokeSize = this.currentStrokeSize.getValue();\n }\n }",
"protected void setFilterInMapChanged() {\n rowCount = null;\n }",
"protected void reinitialize() {\n \t\t\tfStart= fEnd= -1;\n \t\t\tfText= fPreservedText= null;\n \t\t\tfUndoModificationStamp= IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP;\n \t\t\tfRedoModificationStamp= IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP;\n \t\t}",
"@Override\r\n\t\t\tpublic void reset() {\n\t\t\t\t\r\n\t\t\t}",
"private void fixColorState() {\n\t\tfinal Spatial lines = this.getChild(LINES_NAME);\n \tTealWorldManager.getWorldManager().addRenderUpdater(new RenderUpdater(){\n \t\tpublic void update(Object arg) { \t\t\t\n \t\t\tboolean coloredVertices = (Boolean) arg;\n \t\t\tMaterialState ms = (MaterialState) lines.getRenderState(RenderState.StateType.Material);\n \t\t\tif(ms == null) {\n \t\t\t\tms = DisplaySystem.getDisplaySystem().getRenderer().createMaterialState();\n \t\t\t\tms.setColorMaterial(ColorMaterial.AmbientAndDiffuse);\n \t\t\t\tlines.setRenderState(ms);\n \t\t\t}\n \t\t\tms.setEnabled(coloredVertices);\n \t\t};\n \t}, this.coloredVertices);\n\t}",
"private void reset()\r\n\t{\r\n\t\t\r\n\t\toriginDock = null;\r\n\t\tdraggedDockable = null;\r\n\r\n\t}",
"public void reset() {\n super.reset();\n }",
"void unsetControlPosition();",
"public void mo8778a() {\n try {\n if (this.f1286b != null) {\n this.f1286b.recycle();\n }\n if (this.f1287c != null) {\n this.f1287c.recycle();\n }\n this.f1286b = null;\n this.f1287c = null;\n if (this.f1288d != null) {\n this.f1288d.recycle();\n this.f1288d = null;\n }\n if (this.f1289e != null) {\n this.f1289e.recycle();\n this.f1289e = null;\n }\n this.f1290f = null;\n } catch (Throwable th) {\n SDKLogHandler.m2563a(th, \"WaterMarkerView\", \"destory\");\n th.printStackTrace();\n }\n }",
"public void clear(){\r\n\t\tbeginMarker.next = endMarker;\r\n\t\tendMarker.prev = beginMarker;\r\n\t\tnumAdded=0;\r\n\t\tsize=0;\r\n \tmodCount++;\r\n\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}",
"protected abstract void restoreGraphicsState();",
"public void defed() {\n\n if (coalesceBridge != null) {\n coalesceBridge.defed();\n } else if (preColor) {\n defed = true;\n }\n }",
"void effacer() {\r\n Graphics g = this.zoneDessin.getGraphics();\r\n g.setColor(Color.gray);\r\n g.fillRect(0, 0, this.getWidth(), this.getHeight());\r\n }",
"public void changeToStandard(){\n drawAttributeManager.toggleStandardView();\n getContentPane().setBackground(DrawAttribute.whiteblue);\n canvas.repaint();\n }",
"@Override\r\n public void tearDownEffect() {\r\n CSS.setLocation(rootPanel, 0, 0);\r\n }",
"public void bringSimpleMapToBack()\n\t{\n\t\tthis.openLayersMap.setStyleName(\"blipnip-gwt-Menu-Map-Back\");\n\t\t//this.openLayersMap.getElement().getStyle().setZIndex(-1); \n\t\t//this.openLayersMap.getElement().getFirstChildElement().getStyle().setZIndex(-1); // \n\t}"
]
| [
"0.6914813",
"0.6422822",
"0.6229016",
"0.61490875",
"0.6088668",
"0.6048594",
"0.6015831",
"0.59998083",
"0.5989808",
"0.59876806",
"0.5985815",
"0.5978339",
"0.5960548",
"0.595258",
"0.59377754",
"0.59133285",
"0.5895413",
"0.58893096",
"0.5878277",
"0.58748114",
"0.58708537",
"0.5866301",
"0.5862006",
"0.5827879",
"0.5813802",
"0.5805006",
"0.5770031",
"0.5756897",
"0.5755113",
"0.5752481",
"0.57408154",
"0.5717244",
"0.5710841",
"0.5710635",
"0.56646734",
"0.56599253",
"0.5646304",
"0.563261",
"0.5629235",
"0.5628238",
"0.56188285",
"0.56108505",
"0.56100744",
"0.5608336",
"0.5608185",
"0.5607275",
"0.5607127",
"0.55999625",
"0.5599314",
"0.55963665",
"0.55853546",
"0.5584421",
"0.5579164",
"0.5577163",
"0.55694383",
"0.55683416",
"0.55655277",
"0.5565237",
"0.554949",
"0.5549156",
"0.5548944",
"0.55481154",
"0.5541759",
"0.5537662",
"0.55375844",
"0.5534706",
"0.553247",
"0.5528307",
"0.5525553",
"0.5520797",
"0.5518305",
"0.5512784",
"0.55093443",
"0.5507511",
"0.54949284",
"0.5482325",
"0.54819995",
"0.5481929",
"0.5478645",
"0.5465132",
"0.5457735",
"0.5447101",
"0.5445262",
"0.5444057",
"0.5439475",
"0.5438534",
"0.5438175",
"0.54273015",
"0.5421858",
"0.54166085",
"0.54112625",
"0.54097235",
"0.54097235",
"0.54097235",
"0.54097235",
"0.5407802",
"0.5400582",
"0.5398072",
"0.53956616",
"0.5394552",
"0.53893024"
]
| 0.0 | -1 |
must be called when the decoration is not used anymore. to avoid memoryleack if it uses thread or other resources | public void dispose(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Unescaper() {\n\n\t}",
"public void setDecoratedDefinition(BeanDefinitionHolder decoratedDefinition)\n/* */ {\n/* 214 */ this.decoratedDefinition = decoratedDefinition;\n/* */ }",
"protected void refreshDecorations() {\n\t\tif (decoration != null) {\n\t\t\tgetFigure().remove(decoration);\n\t\t\tdecoration = null;\n\t\t}\n\t\tif (decorationImage != null) {\n\t\t\tdecorationImage.dispose();\n\t\t\tdecorationImage = null;\n\t\t}\n\t\tLink link = getLink();\n\t\tif (link.eContainer() == null) {\n\t\t\t// Yeesh, the link hasn't even been initialized yet. Return.\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tIMarkerHolder markerHolder = BPELUtil.adapt(link, IMarkerHolder.class);\n\t\tIMarker[] markers = markerHolder.getMarkers(link);\n\t\tIMarker markerToDisplay = null;\n\t\tfor (int i = 0; i < markers.length; i++) {\n\t\t\tIMarker marker = markers[i];\n\t\t\t// If the marker is not visible, skip it.\n\t\t\tboolean isVisible = marker.getAttribute(IModelMarkerConstants.DECORATION_MARKER_VISIBLE_ATTR, true);\n\t\t\tif (!isVisible) continue;\n\t\t\tif (markerToDisplay != null) {\n\t\t\t\t// There was already a marker.\n\t\t\t\t// Find out which one has the highest priority and display that one.\n\t\t\t\tint priority = marker.getAttribute(IModelMarkerConstants.DECORATION_MARKER_PRIORITY_ATTR, Integer.MIN_VALUE);\n\t\t\t\tint existingPriority = markerToDisplay.getAttribute(IModelMarkerConstants.DECORATION_MARKER_PRIORITY_ATTR, Integer.MIN_VALUE);\n\t\t\t\tif (priority > existingPriority) {\n\t\t\t\t\tmarkerToDisplay = marker;\n\t\t\t\t}\t\t\n\t\t\t} else {\n\t\t\t\t// There was no marker already, put this one in the map.\n\t\t\t\tmarkerToDisplay = marker;\n\t\t\t}\n\t\t}\n\t\tif (markerToDisplay != null) {\n\t\t\tImage temp = getImage(markerToDisplay);\n\t\t\tif (temp == null) return;\n\t\t\tImageData background = temp.getImageData();\n\t\t\tString uri = markerToDisplay.getAttribute(IBPELUIConstants.MARKER_OVERLAYIMAGETOPLEFT, \"\"); //$NON-NLS-1$\n\t\t\tImageData topLeft = getImageData(uri);\n\t\t\turi = markerToDisplay.getAttribute(IBPELUIConstants.MARKER_OVERLAYIMAGETOPRIGHT, \"\"); //$NON-NLS-1$\n\t\t\tImageData topRight = getImageData(uri);\n\t\t\turi = markerToDisplay.getAttribute(IBPELUIConstants.MARKER_OVERLAYIMAGEBOTTOMLEFT, \"\"); //$NON-NLS-1$\n\t\t\tImageData bottomLeft = getImageData(uri);\n\t\t\turi = markerToDisplay.getAttribute(IBPELUIConstants.MARKER_OVERLAYIMAGEBOTTOMRIGHT, \"\"); //$NON-NLS-1$\n\t\t\tImageData bottomRight = getImageData(uri);\n\t\t\tOverlayCompositeImageDescriptor descriptor = new OverlayCompositeImageDescriptor(background, topLeft, topRight, bottomLeft, bottomRight);\n\t\t\t//TODO: can we get into image registry?\t\t\t\n\t\t\tImage image = descriptor.createImage();\n\t\t\tthis.decorationImage = image;\n\t\t\tthis.decoration = new Label(this.decorationImage);\n\t\t\tgetFigure().add(this.decoration, new ConnectionLocator(getConnectionFigure(), ConnectionLocator.MIDDLE));\n\t\t} else {\n\t\t\tif (hasCondition()) {\n\t\t\t\tImage image = BPELUIPlugin.INSTANCE.getImage(IBPELUIConstants.ICON_LINK_CONDITIONAL);\n\t\t\t\tthis.decorationImage = null;\n\t\t\t\tthis.decoration = new Label(image);\n\t\t\t\tgetFigure().add(this.decoration, new ConnectionLocator(getConnectionFigure(), ConnectionLocator.MIDDLE));\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n public void cleanup() {\n \n }",
"@Override\n public void cleanup() {\n \n }",
"GorgeousFormatter() {\r\n\t\t}",
"public RequiredControlDecorationUpdater() {\n\t\tthis(true);\n\t}",
"@Override\n protected Object freshBatch(Object reuse)\n {\n throw new NotImplementedException();\n }",
"@Override\n\tprotected void doDispose() {\n\t}",
"@Override\r\n public void afterVisit() {\n final MethodCallUtils.EnclosingRefs enclosing = \r\n MethodCallUtils.getEnclosingInstanceReferences(\r\n thisExprBinder, expr,\r\n superClassDecl,\r\n context.theReceiverNode, getEnclosingSyntacticDecl());\r\n /* The transformer will already be set in the map correctly for these\r\n * effects when they are original generated. We are just modifying\r\n * the lock and evidence information for the effects.\r\n */\r\n for (final Effect e : newContext.theEffects.build()) {\r\n Effect maskedEffect = e.mask(thisExprBinder);\r\n if (maskedEffect != null) {\r\n // Mask again if the effect is on the receiver of the anonymous class\r\n if (maskedEffect.affectsReceiver(newContext.theReceiverNode)) {\r\n context.theEffects.add(\r\n Effect.effect(\r\n maskedEffect.getSource(), maskedEffect.isRead(),\r\n new EmptyTarget(new EmptyEvidence(Reason.UNDER_CONSTRUCTION)),\r\n new MaskedEffectEvidence(maskedEffect),\r\n maskedEffect.getNeededLocks()));\r\n } else {\r\n final Target target = maskedEffect.getTarget();\r\n \r\n final TargetEvidence te = target.getEvidence();\r\n if (te instanceof EmptyEvidence\r\n && ((EmptyEvidence) te).getReason() == Reason.METHOD_CALL) {\r\n /* Special case: empty effect that carries lock preconditions */\r\n final ImmutableSet.Builder<NeededLock> newLockSet = ImmutableSet.builder();\r\n for (final NeededLock lock : maskedEffect.getNeededLocks()) {\r\n newLockSet.add(lock.replaceEnclosingInstanceReference(enclosing));\r\n }\r\n context.theEffects.add(\r\n Effect.empty(maskedEffect.getSource(),\r\n new EmptyEvidence(Reason.METHOD_CALL), \r\n ImmutableSet.of(getEvidence()), newLockSet.build()));\r\n } else if (target instanceof InstanceTarget) {\r\n final IRNode ref = target.getReference();\r\n \r\n final IRNode newRef = enclosing.replace(ref);\r\n if (newRef != null) {\r\n final IRNode objectExpr = thisExprBinder.bindThisExpression(newRef);\r\n final Target newTarget = new InstanceTarget(\r\n objectExpr, target.getRegion(),\r\n new EnclosingRefEvidence(maskedEffect.getSource(), ref, newRef));\r\n final Set<NeededLock> newLocks = new HashSet<>();\r\n for (final NeededLock lock : maskedEffect.getNeededLocks()) {\r\n newLocks.add(lock.replaceEnclosingInstanceReference(enclosing));\r\n }\r\n elaborateInstanceTarget(\r\n context.bcaQuery, lockFactory, thisExprBinder, lockModel.get(),\r\n maskedEffect.getSource(), maskedEffect.isRead(), newTarget, getEvidence(),\r\n newLocks, context.theEffects);\r\n } else {\r\n /* XXX: Not sure if it is possible to get here. External\r\n * variable references are turned into ANyInstance targets\r\n * during elaboration.\r\n */\r\n /* 2012-08-24: We have to clean the type to make sure it is not a \r\n * type formal.\r\n */\r\n IJavaType type = thisExprBinder.getJavaType(ref);\r\n if (type instanceof IJavaTypeFormal) {\r\n type = TypeUtil.typeFormalToDeclaredClass(\r\n thisExprBinder.getTypeEnvironment(), (IJavaTypeFormal) type);\r\n }\r\n context.theEffects.add(Effect.effect(\r\n maskedEffect.getSource(), maskedEffect.isRead(),\r\n new AnyInstanceTarget(\r\n (IJavaReferenceType) type, target.getRegion(),\r\n new UnknownReferenceConversionEvidence(\r\n maskedEffect, ref, (IJavaReferenceType) type)),\r\n getEvidence(), maskedEffect.getNeededLocks()));\r\n }\r\n } else {\r\n context.theEffects.add(\r\n maskedEffect.updateEvidence(target.getEvidence(), ImmutableSet.of(getEvidence())));\r\n }\r\n }\r\n }\r\n }\r\n }",
"private void decorate() {\n setBorderPainted(false);\n setOpaque(true);\n \n setContentAreaFilled(false);\n setMargin(new Insets(1, 1, 1, 1));\n }",
"void decorate(IDecoratedSource decoratedSource);",
"private EagerlySinleton()\n\t{\n\t}",
"private IncreaseEdgeCurvatureBiomeDecorator() {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\npublic void dispose(GLAutoDrawable arg0) {\n \n}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\npublic void dispose(GLAutoDrawable arg0) {\n\t\n}",
"public interface DecorationInfo {\n\n DecorationParams getDecorationParams();\n}",
"@Override\n\tpublic void dispose(GLAutoDrawable arg0) {\n\n\t}",
"@Override\n public void dispose() {\n \n }",
"@Override\n\tpublic void dispose(GLAutoDrawable arg0) {\n\t\t\n\t}",
"private void activeDrawEffects() {\n }",
"@Override\n public void run() {\n overlay.remove(shadowContainerLayer);\n mViewToAnimate.setBackground(oldBackground);\n if (mViewBitmap != null) {\n mViewBitmap.recycle();\n }\n }",
"@Override\n public void cleanup() {\n }",
"private void onAccess() {\n ctx.itHolder().checkWeakQueue();\n\n checkRemoved();\n }",
"@Override\r\n public void cleanup() {\n }",
"private LineSymbolizer() {\n // Thread-local factory will be used.\n }",
"public BeanDefinitionHolder getDecoratedDefinition()\n/* */ {\n/* 221 */ return this.decoratedDefinition;\n/* */ }",
"private void m146649c() {\n if (this.f108106a) {\n getHolder().setFormat(-2);\n setZOrderOnTop(true);\n }\n getHolder().addCallback(this.f108110e);\n setAlpha(0.0f);\n }",
"@SuppressWarnings(\"unused\")\n\t\t\tprivate void dispose() {\n\t\t\t\t\n\t\t\t}",
"public void reuse() {}",
"public void treat()\n\t{\n\t\tstroked();\n\t}",
"@Override\n public void dispose(GLAutoDrawable drawable) {\n }",
"@Override\n\tpublic String crier() {\n\t\treturn \"...\";\n\t}",
"@Override\r\n public void invalidate() {\r\n }",
"@Override\r\n\tpublic void cleanup() {\n\t\t\r\n\t}",
"@Override\r\n protected void finalize() throws Throwable {\r\n super.finalize();\r\n dispose();\r\n }",
"@Override\r\n\tprotected void dispose() {\n\t\t\r\n\t}",
"@Override\n public void dispose() {\n\n }",
"protected void additionalProcessing() {\n\t}",
"@Override\n public void dispose() {\n \n }",
"@Override\n\tpublic void invalidate() {\n\t\t\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"private boolean hasDecorations() {\n \t\tsynchronized (fDecorationMapLock) {\n \t\t\treturn !fDecorationsMap.isEmpty();\n \t\t}\n \t}",
"@Override\r\n protected void innerInit() throws Exception {\n \r\n }",
"@Override\r\n\tpublic void dispose(GLAutoDrawable drawable) {\n\t\t\r\n\t}",
"@Override\n\t\t\tpublic void dispose() {\n\t\t\t}",
"@Override\n public void dispose(GLAutoDrawable drawable) {\n }",
"protected Span() {/* intentionally empty block */}",
"DecoratedCallable(Callable target) {\n super();\n this.target = target;\n }",
"@Override\n public Object preProcess() {\n return null;\n }",
"private void handleDrawRequest(PaintEvent event) {\n \n \t\tif (fTextWidget == null) {\n \t\t\t// is already disposed\n \t\t\treturn;\n \t\t}\n \n \t\tIRegion clippingRegion= computeClippingRegion(event);\n \t\tif (clippingRegion == null)\n \t\t\treturn;\n \t\t\n \t\tint vOffset= clippingRegion.getOffset();\n \t\tint vLength= clippingRegion.getLength();\n \t\t\n \t\tfinal GC gc= event != null ? event.gc : null;\n \n \t\t// Clone decorations\n \t\tCollection decorations;\n \t\tsynchronized (fDecorationMapLock) {\n \t\t\tdecorations= new ArrayList(fDecorationsMap.size());\n \t\t\tdecorations.addAll(fDecorationsMap.entrySet());\n \t\t}\n \n \t\t/*\n \t\t * Create a new list of annotations to be drawn, since removing from decorations is more\n \t\t * expensive. One bucket per drawing layer. Use linked lists as addition is cheap here.\n \t\t */\n \t\tArrayList toBeDrawn= new ArrayList(10);\n \t\tfor (Iterator e = decorations.iterator(); e.hasNext();) {\n \t\t\tMap.Entry entry= (Map.Entry)e.next();\n \t\t\t\n \t\t\tAnnotation a= (Annotation)entry.getKey();\n \t\t\tDecoration pp = (Decoration)entry.getValue();\n \t\t\t// prune any annotation that is not drawable or does not need drawing\n \t\t\tif (!(a.isMarkedDeleted() || pp.fPainter == fgNullDrawer || pp.fPainter instanceof NullStrategy || skip(a) || !pp.fPosition.overlapsWith(vOffset, vLength))) {\n \t\t\t\t// ensure sized appropriately\n \t\t\t\tfor (int i= toBeDrawn.size(); i <= pp.fLayer; i++)\n \t\t\t\t\ttoBeDrawn.add(new LinkedList());\n \t\t\t\t((List) toBeDrawn.get(pp.fLayer)).add(entry);\n \t\t\t}\n \t\t}\n \t\t\n \t\tReusableRegion range= new ReusableRegion();\n \t\tfor (Iterator it= toBeDrawn.iterator(); it.hasNext();) {\n \t\t\tList layer= (List) it.next();\n \n \t\t\tfor (Iterator e = layer.iterator(); e.hasNext();) {\n \t\t\t\tMap.Entry entry= (Map.Entry)e.next();\n \n \t\t\t\tDecoration pp = (Decoration)entry.getValue();\n \t\t\t\tPosition p= pp.fPosition;\n \t\t\t\tIDocument document= fSourceViewer.getDocument();\n \t\t\t\ttry {\n \n \t\t\t\t\tint startLine= document.getLineOfOffset(p.getOffset());\n \t\t\t\t\tint lastInclusive= Math.max(p.getOffset(), p.getOffset() + p.getLength() - 1);\n \t\t\t\t\tint endLine= document.getLineOfOffset(lastInclusive);\n \n \t\t\t\t\tfor (int i= startLine; i <= endLine; i++) {\n \t\t\t\t\t\tint lineOffset= document.getLineOffset(i);\n \t\t\t\t\t\tint paintStart= Math.max(lineOffset, p.getOffset());\n \t\t\t\t\t\tString lineDelimiter= document.getLineDelimiter(i);\n \t\t\t\t\t\tint delimiterLength= lineDelimiter != null ? lineDelimiter.length() : 0;\n \t\t\t\t\t\tint paintLength= Math.min(lineOffset + document.getLineLength(i) - delimiterLength, p.getOffset() + p.getLength()) - paintStart;\n \t\t\t\t\t\tif (paintLength >= 0 && overlapsWith(paintStart, paintLength, vOffset, vLength)) {\n \t\t\t\t\t\t\t// otherwise inside a line delimiter\n \t\t\t\t\t\t\trange.setOffset(paintStart);\n \t\t\t\t\t\t\trange.setLength(paintLength);\n \t\t\t\t\t\t\tIRegion widgetRange= getWidgetRange(range);\n \t\t\t\t\t\t\tif (widgetRange != null) {\n \t\t\t\t\t\t\t\tAnnotation a= (Annotation)entry.getKey();\n \t\t\t\t\t\t\t\tpp.fPainter.draw(a, gc, fTextWidget, widgetRange.getOffset(), widgetRange.getLength(), pp.fColor);\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} catch (BadLocationException x) {\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}",
"@Override\n public void dispose() {\n\n }",
"@Override\n public void dispose() {\n\n }",
"protected void apply() {\n dispose();\n }",
"@Override\n\tpublic void cleanup() {\n\n\t}",
"@Override\n\tpublic void cleanup() {\n\n\t}",
"@Override\n\tpublic void invalidate() {\n\n\t}",
"protected Doodler() {\n\t}",
"@Override\n \t\t\tpublic void dispose() {\n \n \t\t\t}",
"@Override()\r\n protected void finalize() {\r\n destroy();\r\n }",
"@Override\n\tpublic void cleanup() {\n\t\t\n\t}",
"@Override\n\tpublic void cleanup() {\n\t\t\n\t}",
"@Override\n\tpublic void cleanup() {\n\t\t\n\t}",
"@Override\n public void dispose(GLAutoDrawable drawable) { }",
"@Override\n public void dispose(GLAutoDrawable drawable) { }",
"@Override\r\n public void dispose(GLAutoDrawable drawable) {\n }",
"@Override protected void finalize() throws Throwable {\r\n\t\tsuper.finalize();\r\n\t\tif (flusher != null) {\r\n\t\t\tflusher.stop();\r\n\t\t}\r\n\t\tflush();\r\n\t}",
"protected void render() {\n\t\tString accion = Thread.currentThread().getStackTrace()[2].getMethodName();\n\t\trender(accion);\n\t}",
"@Override\r\n\tprotected void finalize() throws Throwable {\n\t\tsuper.finalize();\r\n\t}",
"@Override\n public void onStart(Trace parent) throws Throwable\n {\n \n }",
"protected View getDecorContent() {\n return mDecorContent;\n }",
"public void onDispose() {\n\n\t}",
"@Override\n\t\tpublic void dispose() {\n\t\t \n\t\t}",
"@Override\n protected void finalize() throws Throwable {\n if(!mFinished) {\n finish(\"Request on the loose\", \"\");\n e(\"\", \"Marker log finalized without finish() - uncaught exit point for request\");\n\n }\n }",
"@Override\n\tpublic void dispose () {\n\n\t}",
"private DocumentInterceptor(Context ctx) {\n }",
"@Override\n\tpublic void setHasDecorations(boolean hasDecorations) {\n\t\t\n\t}",
"private void onQuitter() {\n dispose();\r\n }",
"protected void finalize()throws Throwable{\t\t\n //---------------------------------------------------------------------------\n super.finalize();\n\t}",
"protected void finalize()throws Throwable{\t\t\n //---------------------------------------------------------------------------\n super.finalize();\n\t}",
"public OutputDecorator getOutputDecorator()\n/* */ {\n/* 675 */ return this._outputDecorator;\n/* */ }",
"public JsonFactory setOutputDecorator(OutputDecorator d)\n/* */ {\n/* 682 */ this._outputDecorator = d;\n/* 683 */ return this;\n/* */ }",
"public void m63704a() {\n DisposableHelper.dispose(this.f53847e);\n }",
"@Override\n protected void cleanup() {\n bundle.setParameter(BundleParameter.NODE_BUNDLE_ELAPSED_PARAM, accumulatedElapsed.get());\n this.dataProvider = null;\n usedClassLoader.dispose();\n usedClassLoader = null;\n //taskNotificationDispatcher.setBundle(this.bundle = null);\n this.taskList = null;\n this.uuidList = null;\n setJobCancelled(false);\n this.taskWrapperList = null;\n timeoutHandler.clear();\n }",
"private TedCorrigendumHandler() {\n throw new AssertionError();\n }",
"protected void customizeContext()\r\n throws Exception\r\n {\r\n }",
"protected final InputStream _decorate(InputStream in, IOContext ctxt)\n/* */ throws IOException\n/* */ {\n/* 1416 */ if (this._inputDecorator != null) {\n/* 1417 */ InputStream in2 = this._inputDecorator.decorate(ctxt, in);\n/* 1418 */ if (in2 != null) {\n/* 1419 */ return in2;\n/* */ }\n/* */ }\n/* 1422 */ return in;\n/* */ }",
"@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}",
"MarkOccurrencesSupport() {\n\t\tthis(DEFAULT_DELAY_MS);\n\t}",
"@Override // com.zhihu.android.app.p1311ui.fragment.paging.BasePagingFragment\n public RecyclerView.ItemDecoration provideItemDecoration() {\n if (getContext() == null) {\n return null;\n }\n return C30150b.m140274a(getContext()).mo122496a(R.color.transparent).mo122498b(DisplayUtils.m87171b(getContext(), 8.0f)).mo122497a(TodoAnswerHolder.class);\n }",
"@Override\n public void dispose() {\n\n }"
]
| [
"0.56528413",
"0.55920434",
"0.5563492",
"0.542591",
"0.5423807",
"0.5423807",
"0.53786725",
"0.53500056",
"0.5343821",
"0.53111774",
"0.5302982",
"0.527867",
"0.5276694",
"0.5248251",
"0.524787",
"0.5243305",
"0.52250254",
"0.5207062",
"0.5203739",
"0.5190099",
"0.518989",
"0.5183292",
"0.5175943",
"0.51478636",
"0.5131522",
"0.51268786",
"0.51221114",
"0.5118622",
"0.51173997",
"0.5103356",
"0.50931686",
"0.50770754",
"0.50761044",
"0.50651294",
"0.505091",
"0.5042042",
"0.5037325",
"0.5036583",
"0.50338835",
"0.50275016",
"0.5024078",
"0.50207204",
"0.5018857",
"0.50152373",
"0.49968588",
"0.49882045",
"0.497884",
"0.4977016",
"0.49684042",
"0.4967992",
"0.49609086",
"0.49562663",
"0.49537653",
"0.49519184",
"0.49513",
"0.49513",
"0.49434802",
"0.4939471",
"0.4939471",
"0.49352813",
"0.4934466",
"0.493235",
"0.4928432",
"0.49229604",
"0.49229604",
"0.49229604",
"0.4921854",
"0.4921854",
"0.4906217",
"0.4905436",
"0.49027535",
"0.48967043",
"0.48951244",
"0.48925954",
"0.48902234",
"0.48870945",
"0.48853406",
"0.48808104",
"0.48749122",
"0.48724002",
"0.4870234",
"0.48633453",
"0.48633453",
"0.48569027",
"0.48547068",
"0.4851641",
"0.48459446",
"0.48425946",
"0.48415592",
"0.48372182",
"0.48348734",
"0.48348734",
"0.48348734",
"0.48348734",
"0.48348734",
"0.48348734",
"0.48348734",
"0.48348734",
"0.4829856",
"0.48290795",
"0.48257032"
]
| 0.0 | -1 |
set the related map2d | public void setMap2D(FXMap map); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setOnTheMapXY(IEntity entity, int x, int y) {\r\n\t\tthis.map[x][y] = entity;\r\n\t}",
"public void setLocation(Point2D p);",
"@Override\r\n \tpublic void setMap(Map m) {\n \t\t\r\n \t}",
"void setMapChanged();",
"private void setUpMap() {\n if (points.size()>2) {\n drawCircle();\n }\n\n\n }",
"public abstract void setPosition(Point2D position);",
"public void setMap()\n {\n gameManager.setMap( savedFilesFrame.getCurrent_index() );\n }",
"public void setMapPosition() {\n\t\txmap = levelState.getx();\n\t\tymap = levelState.gety();\n\t}",
"private void updateMap(){\n mMap.clear();\n // this instruction clears the Map object from the other object, it's needed in orther to display\n //the right current geofences without having the previous ones still on screen\n\n mOptions.setOption(mOptions.getOption().center(circle.getCenter()));\n mOptions.setOption(mOptions.getOption().radius(circle.getRadius()));\n\n\n circle=mMap.addCircle(mOptions.getOption());//i need to add again the user circle object on screen\n\n //TODO have to implement settings\n //set markers based on the return objects of the geoquery\n for (int ix = 0; ix < LOCATIONS.length; ix++) {\n mMap.addMarker(new MarkerOptions()\n .title(LOCATIONS[ix].getExplaination())\n .snippet(\"TODO\")\n .position(LOCATIONS[ix].getPosition()));\n }\n }",
"public void setMapRenderer(MapRenderer2 mr)\r\n\t{\r\n\t\tthis.mapRenderer = mr;\r\n\t}",
"public void setMap(int idRoom, int x, int y, Stack<AuxiliarElement> cjtElem, String nameRoom, int[][] doors, int[][] windows){ \r\n int key = sequence.getValue();\r\n sequence.increase();\r\n Map map = new Map(x, y, idRoom, nameRoom, doors, windows);\r\n map.setCjtElement(cjtElem);\r\n cjtMap.put(key, map);\r\n }",
"public void buildMap(){\n map =mapFactory.createMap(level);\n RefLinks.SetMap(map);\n }",
"public void setMap01(){\n\t\tmapSelect = \"map01.txt\";\n\t\treloadMap(mapSelect);\n\t\tsetImg(mapSelect);\n\t}",
"protected abstract void setMarkers();",
"public void setMap(Map map) {\r\n\t\tthis.map = map;\r\n\t\tsmap.setMap(map);\r\n\t}",
"public void initMap() {\n\t\tmap = new Map();\n\t\tmap.clear();\n\t\tphase = new Phase();\n\t\tmap.setPhase(phase);\n\t\tmapView = new MapView();\n\t\tphaseView = new PhaseView();\n\t\tworldDomiView = new WorldDominationView();\n\t\tcardExchangeView = new CardExchangeView();\n\t\tphase.addObserver(phaseView);\n\t\tphase.addObserver(cardExchangeView);\n\t\tmap.addObserver(worldDomiView);\n\t\tmap.addObserver(mapView);\n\t}",
"public void map(){\n this.isMap = true;\n System.out.println(\"Switch to map mode\");\n }",
"public void setMap(Map map, int layer, int i, int j) {\n assert map != null;\n //remove from previous map\n this.map.ifPresent((value)->value.removeTile(this));\n this.map = Optional.of(map);\n setPosition(layer, i, j);\n }",
"public final native void setMap(MapJSO map) /*-{\n\t\tthis.setMap(map);\n\t}-*/;",
"void setMap(Map aMap);",
"public void set_map(int[][] map) \n\t{\n\t\tthis.map = map;\n\t}",
"private void setMap(final Map map) {\n\t\tthis.map = map;\n\t\tthis.setChanged();\n\t\tthis.notifyObservers();\n\t}",
"private void mapAreaOne()\n\n {\n\n Area area = areaIDMap.get(Constants.FIRST_AREA_ID);\n\n area.areaMap.put(Constants.North, areaIDMap.get(Constants.SECOND_AREA_ID));\n\n area.areaMap.put(Constants.South, areaIDMap.get(Constants.FIFTH_AREA_ID));\n\n area.areaMap.put(Constants.East, areaIDMap.get(Constants.FOURTH_AREA_ID));\n\n area.areaMap.put(Constants.West, areaIDMap.get(Constants.SIXTH_AREA_ID));\n\n area.paths = Constants.NorthSouthEastAndWest;\n\n }",
"void updateMap(MapData map);",
"public void setSimpleSolidMap(SimpleMap m) {\n\t\tthis.m = m;\n\t}",
"public void setActiveMap(IMap map) {\n\t\tm_activeMap = map;\n\t\t\n\t\tFile imageLocation = map.getImage();\n\t\tif (! imageLocation.exists()) {\n\t\t\tFile altImage = map.getAltImage();\n\t\t\tif ( altImage != null && altImage.exists()) {\n\t\t\t\timageLocation = altImage;\n\t\t\t}\n\t\t}\n\t\t\n\t\tloadImage(imageLocation);\n\t\tupdateZoomCanvas();\n\t}",
"public void changeMap(int x, int y, TipoCelda t) throws Exception {\n\t\tthis.itfPlanificadorMRS.changeMap(x,y,t);\n\t}",
"public void EditMap(int new_x,int new_y,int x,int y,String name1,String name2) {\n\t\tif(name2==null) {\n\t\t\tname2 = \" \";\n\t\t}\n\t\tmap[x][y] = name2;\n\t\tmap[new_x][new_y] = name1;\n\t\t\n\t\t\n\t}",
"private void setupMapView(){\n Log.d(TAG, \"setupMapView: Started\");\n\n view_stage_map = VIEW_MAP_FULL;\n cycleMapView();\n\n }",
"private void createMapOfSecondType(){\n\n this.typeOfMap=2;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.BLUE, true,0,0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, false,0,1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = createSquare( ColorOfFigure_Square.GREEN, true,0,3);\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.RED, true,1,1);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.YELLOW, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = null;\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.YELLOW, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, false,2,3);\n\n\n }",
"public void setMap(String mn){\r\n mapName = mn;\r\n currentMap = new ImageIcon(mapName);\r\n }",
"private void drawMap( Graphics2D g2 )\r\n {\r\n MobilityMap map = sim.getMap();\r\n \r\n /* Draw map nodes and their links */\r\n int numNodes = map.getNumberOfNodes();\r\n \r\n for( int i=0; i < numNodes; i++ )\r\n {\r\n MapNode node = map.getNodeAt(i);\r\n Point2D.Double nodeLoc = node.getLocation();\r\n \r\n // Draw the node\r\n drawCircle( g2, nodeLoc, MAP_NODE_COLOUR, MAP_NODE_RADIUS, false );\r\n \r\n // Draw the node's links\r\n int numLinks = node.getNumberOfLinks();\r\n for( int j=0; j < numLinks; j++ )\r\n {\r\n MapNode destNode = node.getLinkAt(j).getGoesTo();\r\n Point2D.Double destNodeLoc = destNode.getLocation();\r\n drawLine( g2, nodeLoc, destNodeLoc, MAP_LINK_COLOUR );\r\n }\r\n }\r\n }",
"private void updateMowerCords() {\n\t\tfor (int i = 0; i < this.map.size(); i++) {\r\n\t\t\tfor (int j = 0; j < this.map.get(i).size(); j++) {\r\n\t\t\t\tif (this.map.get(i).get(j) == this.mower) {\r\n\t\t\t\t\tthis.x = j;\r\n\t\t\t\t\tthis.y = i;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void updateMap() {\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tif (newMap[i][j] instanceof Player) {\n\t\t\t\t\tmap[i][j] = new Player(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof BlankSpace) {\n\t\t\t\t\tmap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof Mho) {\n\t\t\t\t\tmap[i][j] = new Mho(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof Fence) {\n\t\t\t\t\tmap[i][j] = new Fence(i, j, board);\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}",
"public void saveMap(){\n dataBase.updateMap(level);\n }",
"public AB2Fcc2SwitchMap() {\n\t\tnpc[0] = 3;\n\t\tnpc[1] = 3;\n\t}",
"private void setMapPos()\r\n {\r\n try\r\n {\r\n Thread.sleep(1000);//so that you can see players move\r\n }\r\n catch(Exception e){}\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n int unitPos = 0;\r\n int firstX = 0;\r\n int firstY = 0;\r\n if (currentPlayer == 1)\r\n {\r\n unitPos = worldPanel.player1.units[currentUnit - 1].getPosition();\r\n }\r\n if (currentPlayer == 2)\r\n {\r\n unitPos = worldPanel.player2.units[currentUnit - 1].getPosition();\r\n }\r\n int tempX = unitPos % mapWidth;\r\n int tempY = unitPos - tempX;\r\n if (tempY == 0) {}\r\n else\r\n tempY = tempY / mapHeight;\r\n tempX = tempX - 11;\r\n tempY = tempY - 7;\r\n if (tempX >= 0)\r\n firstX = tempX;\r\n else\r\n firstX = tempX + mapWidth;\r\n if (tempY >= 0)\r\n firstY = tempY;\r\n else\r\n firstY = tempY + mapWidth;\r\n\r\n int drawWidth = worldPanel.getDrawWidth();\r\n int drawHeight = worldPanel.getDrawHeight();\r\n worldPanel.setNewXYPos(firstX, firstY);\r\n miniMap.setNewXY(firstX, firstY, drawWidth, drawHeight);\r\n }",
"public static void adicionaMap2() {\n\t\t\t\tcDebitos_DFlorianopolis.put(\"seq\", new Integer[] { 1, 5 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"dam\", new Integer[] { 6, 18 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"fiti\", new Integer[] { 19, 26 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"data_Venc\", new Integer[] { 27, 38 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"cartorio\", new Integer[] { 39, 76 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"valor\", new Integer[] { 77, 90 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"multa\", new Integer[] { 91, 104 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"juros\", new Integer[] { 105, 118 });\r\n\t\t\t\tcDebitos_DFlorianopolis.put(\"total\", new Integer[] { 119, 132 });\r\n\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"seq\", new Integer[] { 1, 5 });\t\t\t\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"dam\", new Integer[] { 6, 20 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"processo\", new Integer[] { 21, 34 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"data_Venc\", new Integer[] { 35, 46 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"tributos\", new Integer[] { 47, 60 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"historico\", new Integer[] { 61, 78 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"valor\", new Integer[] { 79, 90 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"multa\", new Integer[] { 91, 104 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"juros\", new Integer[] { 105, 118 });\r\n\t\t\t\tcDebitos_GFlorianopolis.put(\"total\", new Integer[] { 119, 132 });\t\t\t\t\r\n\t\t\t\t\r\n\r\n\r\n\t\t\r\n\r\n\t\t// No DAM ANO DATA VENC No. PROCESSO\r\n\t\t// No. PARCELAMENTO VALOR JUROS TOTAL\r\n\t\tcDebitos_JFlorianopolis.put(\"seq\", new Integer[] { 1, 5 });\r\n\t\tcDebitos_JFlorianopolis.put(\"dam\", new Integer[] { 6, 20 });\r\n\t\tcDebitos_JFlorianopolis.put(\"ano\", new Integer[] { 21, 26 });\r\n\t\tcDebitos_JFlorianopolis.put(\"data_Venc\", new Integer[] { 27, 38 });\r\n\t\tcDebitos_JFlorianopolis.put(\"processo\", new Integer[] { 39, 55 });\r\n\t\tcDebitos_JFlorianopolis.put(\"nParcelamento\", new Integer[] { 55, 76 });\r\n\t\tcDebitos_JFlorianopolis.put(\"valor\", new Integer[] { 77, 104 });\r\n\t\tcDebitos_JFlorianopolis.put(\"juros\", new Integer[] { 105, 118 });\r\n\t\tcDebitos_JFlorianopolis.put(\"total\", new Integer[] { 119, 132 });\r\n\r\n\t\t// DAM LIV/FOLHA/CERT. DATA INSC HISTORICO\r\n\t\t// INSCRICAO VALOR\r\n\r\n\t\tcDebitos_J1Florianopolis.put(\"dam\", new Integer[] { 1, 13 });\r\n\t\tcDebitos_J1Florianopolis.put(\"liv_Folha_Cert\", new Integer[] { 14, 34 });\r\n\t\tcDebitos_J1Florianopolis.put(\"data_Insc\", new Integer[] { 35, 46 });\r\n\t\tcDebitos_J1Florianopolis.put(\"historico\", new Integer[] { 47, 92 });\r\n\t\tcDebitos_J1Florianopolis.put(\"inscricao\", new Integer[] { 93, 119 });\r\n\t\tcDebitos_J1Florianopolis.put(\"valor\", new Integer[] { 120, 132 });\r\n\t\t\r\n\t\t\r\n\t\t// No DAM ANO DATA VENC HISTORICO PROCESSO VALOR JUROS TOTAL\r\n\t\tcDebitos_LFlorianopolis.put(\"seq\", new Integer[] { 1, 5 });\r\n\t\tcDebitos_LFlorianopolis.put(\"dam\", new Integer[] { 6, 20 });\r\n\t\tcDebitos_LFlorianopolis.put(\"ano\", new Integer[] { 21, 26 });\r\n\t\tcDebitos_LFlorianopolis.put(\"data_Venc\", new Integer[] { 27, 38 });\r\n\t\tcDebitos_LFlorianopolis.put(\"historico\", new Integer[] { 39, 76 });\r\n\t\tcDebitos_LFlorianopolis.put(\"processo\", new Integer[] { 77, 91 });\r\n\t\tcDebitos_LFlorianopolis.put(\"valor\", new Integer[] { 92, 104 });\r\n\t\tcDebitos_LFlorianopolis.put(\"juros\", new Integer[] { 105, 118 });\r\n\t\tcDebitos_LFlorianopolis.put(\"total\", new Integer[] { 119, 132 });\r\n\r\n\t\t\r\n\t}",
"public void getMap1() throws SQLException {\n\t}",
"public void updateMap(TileMap tileMap){\n\t\tthis.tileMap = tileMap;\n\n\t}",
"public void setAfter() {\r\n\t\t\tbasemapAfter = new HashMap<Location, SurfaceEntity>(surface.basemap);\r\n\t\t\tsurfaceAfter = new ArrayList<SurfaceFeature>(surface.features);\r\n\t\t\t\r\n\t\t\tbuildingmapAfter = new HashMap<Location, SurfaceEntity>(surface.buildingmap);\r\n\t\t\tbuildingsAfter = new ArrayList<Building>(surface.buildings);\r\n\t\t}",
"private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.mapView2))\n .getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n setUpMap( lat, longi, \"ISS/ NUS\");\n }\n }\n }",
"public void setXY(Point2D aPoint) { setXY(aPoint.getX(), aPoint.getY()); }",
"private void setUpMapIfNeeded() {\n if (map == null) {\n map = fragMap.getMap();\n if (map != null) {\n setUpMap();\n }\n }\n }",
"public void setPosition(Point2D position)\n {\n mPosition = position;\n }",
"public void setPoint2(Point3D point2) {\r\n this.point2 = point2;\r\n }",
"public void drawMap() {\n\t\tRoad[] roads = map.getRoads();\r\n\t\tfor (Road r : roads) {\r\n\t\t\tif (r.turn) {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road = true;\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_vert = true;\r\n\t\t\t} else if (r.direction == Direction.NORTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_north = true;\r\n\t\t\telse if (r.direction == Direction.SOUTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_south = true;\r\n\t\t\telse if (r.direction == Direction.WEST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_west = true;\r\n\t\t\telse if (r.direction == Direction.EAST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_east = true;\r\n\t\t\ttry {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].updateImage();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void setGeometry() {\n this.setCullHint(Spatial.CullHint.Dynamic);\n this.setLocalTranslation(realPosition);\n //attach geometry to this object\n // mat.setColor(\"Color\", colors[r.nextInt(colors.length)]);\n if (!companyTextures.containsKey(this.company)) {\n mat.setTexture(\"ColorMap\", Colors.get(r.nextInt(Colors.size())));\n } else {\n mat.setTexture(\"ColorMap\", companyTextures.get(this.company));\n }\n geom.setMaterial(mat);\n this.attachChild(geom.clone());\n }",
"public void setSubTreeNodeInMOMap(Map<String, Node> subTreeNodeInMOMap) {\n\t\tthis.subTreeNodeInMOMap = subTreeNodeInMOMap;\n\t}",
"public void set_map(int[][] map, Random_map_generator generator) \n\t{\n\t\tthis.start_edge_coord_x = generator.get_start_x();\n\t\tthis.start_edge_coord_y = generator.get_start_y();\n\t\tthis.end_edge_coord_x = generator.get_end_x();\n\t\tthis.end_edge_coord_y = generator.get_end_y();\n\t\tthis.random_map = true;\n\t\tthis.map = map;\n\t\tif ((map[1][2] == 0) && (map[2][2] == 0)) \n\t\t{\n\t\t\tmap[1][2] = SCORE_AREA;\n\t\t\tmap[2][2] = TUITION_AREA;\n\t\t}\n\t\telse if ((map[1][14] == 0) && (map[2][14] == 0)) \n\t\t{\n\t\t\tmap[1][14] = SCORE_AREA;\n\t\t\tmap[2][14] = TUITION_AREA;\n\t\t}\n\t\telse if ((map[10][2] == 0) && (map[11][2] == 0)) \n\t\t{\n\t\t\tmap[10][2] = SCORE_AREA;\n\t\t\tmap[11][2] = TUITION_AREA;\n\t\t}\n\t\telse if ((map[10][14] == 0) && (map[11][14] == 0)) \n\t\t{\n\t\t\tmap[10][14] = SCORE_AREA;\n\t\t\tmap[11][14] = TUITION_AREA;\n\t\t}\n\t}",
"private void setUpMapIfNeeded() {\n \tif (mMap == null) {\r\n \t\t//Instanciamos el objeto mMap a partir del MapFragment definido bajo el Id \"map\"\r\n \t\tmMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();\r\n \t\t// Chequeamos si se ha obtenido correctamente una referencia al objeto GoogleMap\r\n \t\tif (mMap != null) {\r\n \t\t\t// El objeto GoogleMap ha sido referenciado correctamente\r\n \t\t\t//ahora podemos manipular sus propiedades\r\n \t\t\t//Seteamos el tipo de mapa\r\n \t\t\tmMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\r\n \t\t\t//Activamos la capa o layer MyLocation\r\n \t\t\tmMap.setMyLocationEnabled(true);\r\n \t\t\t\r\n \t\t\tAgregarPuntos();\r\n \t\t\t\r\n \t\t\t\r\n \t\t}\r\n \t}\r\n }",
"public JbootVoModel set(Map<String, Object> map) {\n super.putAll(map);\n return this;\n }",
"public void initializeMaps(Detector det, String SubdetectorName) {\n\n List<SvtStereoLayer> stereoLayers = ((HpsTracker2) det.getSubdetector(\n SubdetectorName).getDetectorElement()).getStereoPairs();\n\n for (SvtStereoLayer stereoLayer : stereoLayers) {\n int layer = stereoLayer.getLayerNumber(); // returns 1 to 6\n\n if (stereoLayer.getAxialSensor().isTopLayer()) {\n if (!StereoLayersMapTop.containsKey(layer)) {\n StereoLayersMapTop.put(layer,\n new ArrayList<SvtStereoLayer>());\n // System.out.format(\"new layer %d \\n\", layer);\n }\n StereoLayersMapTop.get(layer).add(stereoLayer);\n } else {\n if (!StereoLayersMapBottom.containsKey(layer)) {\n StereoLayersMapBottom.put(layer,\n new ArrayList<SvtStereoLayer>());\n // System.out.format(\"new layer %d \\n\", layer);\n }\n StereoLayersMapBottom.get(layer).add(stereoLayer);\n }\n\n }\n\n sensors = det.getSubdetector(SubdetectorName).getDetectorElement()\n .findDescendants(HpsSiSensor.class);\n for (ChargeCarrier carrier : ChargeCarrier.values()) {\n for (SiSensor sensor : sensors) {\n if (sensor.hasElectrodesOnSide(carrier)) {\n StripPositionsMap.put(sensor,\n new HashMap<Integer, Hep3Vector>());\n SiStrips strips = (SiStrips) sensor\n .getReadoutElectrodes(carrier);\n ITransform3D parentToLocal = sensor.getReadoutElectrodes(\n carrier).getParentToLocal();\n for (int physicalChannel = 0; physicalChannel < 640; physicalChannel++) {\n Hep3Vector localStripPosition = strips\n .getCellPosition(physicalChannel);\n Hep3Vector stripPosition = parentToLocal\n .transformed(localStripPosition);\n StripPositionsMap.get(sensor).put(physicalChannel,\n stripPosition);\n\n }\n }\n }\n }\n\n }",
"public void paintMap(Graphics2D g2d) {\r\n\t\tLineMap map = model.getMap();\r\n\t\tif (map == null) return;\r\n\t\tLine[] lines = map.getLines();\r\n\t\tg2d.setColor(colors[MAP_COLOR_INDEX]);\r\n\t\tg2d.setStroke(new BasicStroke(2));\r\n\t\tfor (int i = 0; i < lines.length; i++) {\r\n\t\t\tLine2D line = new Line2D.Float(\r\n \t\t getX(lines[i].x1), \r\n \t\t getY(lines[i].y1), \r\n \t\t getX(lines[i].x2), \r\n \t\t getY(lines[i].y2));\r\n\t\t\tg2d.draw(line);\r\n\t\t}\r\n\t\tg2d.setStroke(new BasicStroke(1));\r\n\t}",
"@Override\n public void onConnected(Bundle arg0) {\n setupMap();\n\n\n }",
"private void setP2( Point p2 ){\n this.p2=p2;\n }",
"public void drawMap() {\r\n\t\tfor (int x = 0; x < map.dimensionsx; x++) {\r\n\t\t\tfor (int y = 0; y < map.dimensionsy; y++) {\r\n\t\t\t\tRectangle rect = new Rectangle(x * scalingFactor, y * scalingFactor, scalingFactor, scalingFactor);\r\n\t\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\t\tif (islandMap[x][y]) {\r\n\t\t\t\t\tImage isl = new Image(\"island.jpg\", 50, 50, true, true);\r\n\t\t\t\t\tislandIV = new ImageView(isl);\r\n\t\t\t\t\tislandIV.setX(x * scalingFactor);\r\n\t\t\t\t\tislandIV.setY(y * scalingFactor);\r\n\t\t\t\t\troot.getChildren().add(islandIV);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trect.setFill(Color.PALETURQUOISE);\r\n\t\t\t\t\troot.getChildren().add(rect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public Map(Dimension dim){\r\n\t\tthis.dim = dim;\r\n\t\tinitiateMap();\r\n\t\tcreateWorldMap();\r\n\t}",
"public void setOb2(CPointer<BlenderObject> ob2) throws IOException\n\t{\n\t\tlong __address = ((ob2 == null) ? 0 : ob2.getAddress());\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeLong(__io__address + 8, __address);\n\t\t} else {\n\t\t\t__io__block.writeLong(__io__address + 4, __address);\n\t\t}\n\t}",
"private void update() {\n\t\ttheMap.update();\n\t\ttheTrainer.update();\n\t}",
"public Point2D setPoint(int i, double x, double y);",
"@Override\n\tpublic void changeMapPointer(ImageView posView) {\n\t\tif (room.equals(properties.getRoomFromProperties().get(1))) {\n\t\t\tposView.relocate(789, 272);\n\n\t\t} else if (room.equals(properties.getRoomFromProperties().get(2))) {\n\t\t\tposView.relocate(788, 185);\n\n\t\t} else if (room.equals(properties.getRoomFromProperties().get(3))) {\n\t\t\tposView.relocate(880.0, 281);\n\n\t\t} else if (room.equals(properties.getRoomFromProperties().get(4))) {\n\t\t\tposView.relocate(867.0, 200);\n\n\t\t} else if (room.equals(properties.getRoomFromProperties().get(5))) {\n\t\t\tposView.relocate(880.0, 64.0);\n\n\t\t} else {\n\t\t\tposView.relocate(788.0, 60.0);\n\t\t}\n\t}",
"public abstract void recycleMap(Object recycleTag, mapnik.Map m);",
"public void updateMapGrid() {\n char[][] map = controller.getPopulatedMap();\n\t if (mapGrid == null) {\n mapGrid = new MapGrid(map.length, map[0].length, ICON_SIZE);\n }\n mapGrid.insertCharMap(map);\n }",
"public Map(){\r\n map = new Square[0][0];\r\n }",
"public void adjustMap(MapData mapd){\n int[][] map = mapd.getMap();\n int mx=mapd.getX();\n int my=mapd.getY();\n for(int y=0;y<my;y++){\n for(int x=0;x<mx;x++){\n boolean l = false;\n boolean r = false;\n boolean t = false;\n boolean b = false;\n boolean tl = false;\n boolean tr = false;\n boolean bl = false;\n boolean br = false;\n \n\n if(map[x][y]>0 && map[x][y]<26) {\n int mustSet = 0;\n //LEFT\n if (x > 0 && map[x - 1][y] > 0 && map[x-1][y]<26) {\n l = true;\n }\n //RIGHT\n if (x < mx - 1 && map[x + 1][y] > 0 && map[x+1][y]<26) {\n r = true;\n }\n //TOP\n if (y > 0 && map[x][y - 1] > 0 && map[x][y-1]<26) {\n t = true;\n }\n //Bottom\n if (y < my - 1 && map[x][y + 1] > 0 && map[x][y+1]<26) {\n b = true;\n }\n //TOP LEFT\n if (x > 0 && y > 0 && map[x - 1][y - 1] > 0 && map[x-1][y-1]<26) {\n tl = true;\n }\n //TOP RIGHT\n if (x < mx - 1 && y > 0 && map[x + 1][y - 1] > 0 && map[x+1][y-1]<26) {\n tr = true;\n }\n //Bottom LEFT\n if (x > 0 && y < my - 1 && map[x - 1][y + 1] > 0 && map[x-1][y+1]<26) {\n bl = true;\n }\n //Bottom RIGHT\n if (x < mx - 1 && y < my - 1 && map[x + 1][y + 1] > 0 && map[x+1][y+1]<26) {\n br = true;\n }\n\n //Decide Image to View\n if (!r && !l && !t && !b) {\n mustSet = 23;\n }\n if (r && !l && !t && !b) {\n mustSet = 22;\n }\n if (!r && l && !t && !b) {\n mustSet = 25;\n }\n if (!r && !l && t && !b) {\n mustSet = 21;\n }\n if (!r && !l && !t && b) {\n mustSet = 19;\n }\n if (r && l && !t && !b) {\n mustSet = 24;\n }\n if (!r && !l && t && b) {\n mustSet = 20;\n }\n if (r && !l && t && !b && !tr) {\n mustSet = 11;\n }\n if (r && !l && t && !b && tr) {\n mustSet = 2;\n }\n if (!r && l && t && !b && !tl) {\n mustSet = 12;\n }\n if (!r && l && t && !b && tl) {\n mustSet = 3;\n }\n if (r && !l && !t && b && br) {\n mustSet = 1;\n }\n if (r && !l && !t && b && !br) {\n mustSet = 10;\n }\n if (!r && l && !t && b && bl) {\n mustSet = 4;\n }\n if (r && !l && t && b && !tr) {\n mustSet = 15;\n }\n if (r && !l && t && b && tr) {\n mustSet = 6;\n }\n if (!r && l && t && b && !tl) {\n mustSet = 17;\n }\n if (!r && l && t && b && tl) {\n mustSet = 8;\n }\n if (r && l && !t && b && !br) {\n mustSet = 14;\n }\n if (r && l && !t && b && br) {\n mustSet = 5;\n }\n if (r && l && t && !b && !tr) {\n mustSet = 16;\n }\n if (r && l && t && !b && tr) {\n mustSet = 7;\n }\n if (!r && l && !t && b && !bl) {\n mustSet = 13;\n }\n if (r && l && t && b && br && tl) {\n mustSet = 9;\n }\n if (r && l && t && b && !br && !tl) {\n mustSet = 18;\n }\n\n //System.out.println(\"MAP SEGMENT : \" + mustSet);\n map[x][y] = mustSet;\n }\n mapd.setMap(map);\n }\n }\n System.out.println(\"Map Adjust OK !\");\n }",
"public void setValues(Map map)\n\t\t{\n\t\t\tm_structuredArtifact = map;\n\n\t\t}",
"public void setStreets(int numx, int numy);",
"public void setOtherInfo(Map<String, Object> otherInfo) {\n this.otherInfo = TimelineServiceHelper.mapCastToHashMap(otherInfo);\n }",
"public void updatePositionOnMap(RVOAgent agent, double x, double y) {\n agentSpace.setObjectLocation(agent, new Double2D(x, y));\n if(agent.hasDevice()){\n deviceSpace.setObjectLocation(agent.getDevice(), new Double2D(x, y));\n }\n }",
"public interface FXMapDecoration {\n\n /**\n * called by the jdefaultmap2d when the decoration should\n * reset completely\n */\n public void refresh();\n \n /**\n * must be called when the decoration is not used anymore.\n * to avoid memoryleack if it uses thread or other resources\n */\n public void dispose();\n \n /**\n * set the related map2d\n * @param map the map2D\n */\n public void setMap2D(FXMap map);\n \n /**\n * \n * @return Map2D, the related map2d of this decoration\n */\n public FXMap getMap2D();\n \n /**\n * \n * @return JComponent, the component which will be added at the map2D \n */\n public Node getComponent();\n \n}",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Set the long click listener as a way to exit the map.\n mMap.setOnMapLongClickListener(this);\n\n if (mapType == MapType.MOTOR_FOUR_POINT) {\n if (listLeg.size() == 1) {\n MotorMapUtils.drawMapWithTwoPoint(mMap, listLeg);\n } else if (listLeg.size() > 1) {\n MotorMapUtils.drawMapWithFourPoint(mMap, listLeg);\n }\n } else if (mapType == MapType.BUS_TWO_POINT) {\n mMap.clear();\n BusMapUtils.drawMapWithTwoPoint(mMap, result);\n } else if (mapType == MapType.BUS_FOUR_POINT) {\n mMap.clear();\n BusMapUtils.drawMapWithFourPoint(mMap, journey);\n }\n\n }",
"public void setObsMap(Map<Concept, List<Obs>> obsMap) {\n \tthis.obsMap = obsMap;\n }",
"public void LoadSecondMap(int up_offset, int down_offset, int left_offset,\n int right_offset) {\n int counter = 0;\n for (int y = 0; y < MAP_HEIGHT; y++) {\n for (int x = 0; x < MAP_WIDTH; x++) {\n tiles[x][y] = new Tile(x * TILE_SIZE, y * TILE_SIZE,\n Constants.waterMap[counter], true);\n backGroundTiles[x][y] = new Tile(x * TILE_SIZE, y * TILE_SIZE,\n Constants.waterMap_base[counter], true);\n grassTiles[x][y] = new Tile(x * TILE_SIZE, y * TILE_SIZE,\n Constants.waterMap_grass[counter], true);\n counter++;\n }\n }\n\n for (int i = 0; i < up_offset; i++) {\n for (int j = 0; j < 4; j++) {\n adjustUp();\n }\n }\n for (int i = 0; i < down_offset; i++) {\n for (int j = 0; j < 4; j++) {\n adjustDown();\n }\n }\n for (int i = 0; i < left_offset; i++) {\n for (int j = 0; j < 4; j++) {\n adjustLeft();\n }\n }\n for (int i = 0; i < right_offset; i++) {\n for (int j = 0; j < 4; j++) {\n adjustRight();\n }\n }\n\n this.setGrassTileRaw(Constants.waterMap_grass); // used for IsInGrass\n this.id = 2;\n\n }",
"private void drawMap(HashMap<String, TrailObj> trailCollection,\n\t\t\tGoogleMap mMap2) {\n\n\t\tfor (TrailObj trail : trailCollection.values()) {\n\t\t\tfor (PlacemarkObj p : trail.getPlacemarks()) {\n\t\t\t\tPolylineOptions rectOptions = new PolylineOptions();\n\t\t\t\tfor (LatLng g : p.getCoordinates()) {\n\t\t\t\t\trectOptions.add(g);\n\t\t\t\t}\n\t\t\t\tPolyline polyline = mMap2.addPolyline(rectOptions);\n\t\t\t\tpolyline.setColor(Color.RED);\n\t\t\t\tpolyline.setWidth(5);\n\t\t\t\tpolyline.setVisible(true);\n\t\t\t}\n\t\t}\n\t}",
"public void moveTheMap() {\n \t if(streetLevelFragment != null && map != null){\n \t\t map.setCenter(streetLevelFragment.getStreetLevelModel().getPosition(), MapAnimation.LINEAR, map.getZoomLevel(), streetLevelFragment.getStreetLevelModel().getHeading(), 0);\n \t }\n }",
"public void update()\n\t{\n\t\tGViewMapManager gViewMapManager = this.guiController.getCurrentStyleMapManager();\n\t\tLayout layout = gViewMapManager.getLayout();\n\n\t\tswitch (layout)\n\t\t{\n\t\t\tcase LINEAR:\n\t\t\t\tthis.linear.setSelected(true);\n\t\t\t\tbreak;\n\t\t\tcase CIRCULAR:\n\t\t\t\tthis.circular.setSelected(true);\n\t\t\t\tbreak;\n default:\n break;\n\t\t}\n\t}",
"public void switchToMap()\n {\n feedbackLabel.setVisible(false);\n d.setVisible(false);\n a.setText(destinations[0].getName());\n b.setText(destinations[1].getName());\n c.setText(destinations[2].getName());\n currentClue=destinations[0].getRandClue();\n questionLabel.setText(currentClue);\n atQuestionStage=false;\n shuffleButtons();\n questionLabel.setBounds(650-questionLabel.getPreferredSize().width,120,600,30);\n mapImageLabel.setVisible(true);\n mapImageLabel.repaint();\n revalidate();\n }",
"private void setUpMap() {\n\t\t \n\t\tmMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n\t\t//mMap.setMyLocationEnabled(true);\n\t\t\t \n\t\tmMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(\n\t\t\t\tlatitude, longitude), 12.0f));\n\n\t}",
"public static native void OpenMM_AmoebaMultipoleForce_setCovalentMap(PointerByReference target, int index, int typeId, PointerByReference covalentAtoms);",
"void setPose(IPose2D newPose);",
"public void setMappingTable(PathTreeDictionary mappingtable) { \n super.setMappingTable(mappingtable);\n }",
"public MapView(android.content.Context param0, android.util.AttributeSet param1, int param2) {\n super(param0, param1, param2);\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n this.setHInstance(new HImpl(param0, param1, param2));\n } else {\n this.setGInstance(new GImpl(param0, param1, param2));\n }\n wrapper = false;\n }",
"@Override\n public void onMapLoaded() {\n mMap.animateCamera(cu);\n\n }",
"private void setExtraMapElements() {\n \t\tif (mGoogleMap == null && mLocationsList == null) {\n \t\t\treturn;\n \t\t}\n \t\tfor (int i = 0; i < mLocationsList.size(); i++) {\n \t\t\tMarkerOptions marker = new MarkerOptions().position(mLocationsList\n \t\t\t\t\t.get(i).mPosition);\n \t\t\tif (mLocationsList.get(i).mIcono != 0) {\n \t\t\t\tmarker.icon(BitmapDescriptorFactory.fromResource(mLocationsList\n \t\t\t\t\t\t.get(i).mIcono));\n \t\t\t}\n \t\t\tif (mLocationsList.get(i).mContenido.mNombre != null) {\n \t\t\t\tmarker.title(mLocationsList.get(i).mContenido.mNombre);\n \t\t\t}\n \t\t\tif (mLocationsList.get(i).mContenido.mSnippet != null) {\n \t\t\t\tmarker.snippet(mLocationsList.get(i).mContenido.mSnippet);\n \t\t\t}\n \n \t\t\tmGoogleMap.addMarker(marker);\n \t\t}\n \t\tmGoogleMap.setInfoWindowAdapter(new MarkerAdapter());\n \t}",
"public void setPosition(Vector2 position);",
"public SnagImageMap(Context context) {\n\t\tsuper(context);\n\t\tinit();\n\t\tthis.context=context;\n\t//\tsm=getSnag();\n\t}",
"private void createMapOfFirstType() {\n\n this.typeOfMap=1;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.BLUE, true, 0, 0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, false, 0, 1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = null;\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.RED, true,1,1);\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.RED, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = null;\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.GREY, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, true,2,3);\n\n }",
"public void method_1882(Map var1) {\r\n super.method_1449();\r\n this.field_1677 = var1;\r\n }",
"public void SetShape2(int randomNumber)\t{\n\tcoordsTable = new int[][][] {\n\n\t\t{ { 0,0 }, { 0, -1}, { 1, 0 }, { 0, 1},{-1,1} /* F */},\n\t\t{ { 0,0 }, {0, - 1}, { 0,1 }, { -1, -1 }, { -1, 0} /* P */},\n\t\t{ { 0,0 }, { 0, -1 }, { 0, 1}, { -1,1},{1,1} /* T */},\n\t\t{ { 0,0 }, { -1, 0 }, { -1, 1 }, { 1, 0},{1,1} /* U */},\n\t\t{ { 0,0 }, { 0, -1 }, { 0, -2 }, { -1, 0},{-2,0} /* V */},\n\t\t{ { 0,0 }, { 0,-1 }, { -1, 1 }, { -1, 0},{1,-1} /* W */},\n\t\t{ { 0,0 }, { 0, 1 }, { 0, -1 }, { -1, 0},{1,0} /* X */},\n\t\t{ { 0,0 }, { 0, 1 }, { 0, -1 }, { 0, -2},{1,0} /* Y */},\n \t{ { 0,0 }, { 0, -1 }, { 0,1 }, {1, -1},{-1,1} /* Z */},\n \t\n\n\n };\n \n for (int i = 0; i < 5 ; i++) {\n for (int j = 0; j < 2; ++j) {\n coords[i][j] = coordsTable[randomNumber][i][j];\n }\n }\n \n \n\t}",
"private void updateTargetProductGeocoding() {\n }",
"void setNode(int nodeId, double lat, double lon);",
"public RectificationMapping (Camera cam) {\n//\t\tthis.isInverseFlag = true;\t// maps target -> source\n\t\tthis.cam = cam;\n\t\tthis.Ai = cam.getInverseA();\n\t}",
"public void initializeMap() {\n\t\tgameMap = new GameMap(GameMap.MAP_HEIGHT, GameMap.MAP_WIDTH);\n\t\tgameMap.initializeFields();\n\t}",
"private void refreshMapAndFrame()\n\t{\n\t\tMapAccess.refresh();\n\t\tFrameMap.refresh();\n\t}",
"public void setUpMapIfNeeded() {\n // Do a null check to confirm that we have not already instantiated the map.\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n ((SupportMapFragment) getChildFragmentManager().findFragmentById(R.id.farmMap)).getMapAsync(new OnMapReadyCallback() {\n @Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n setUpMap();\n\n db.open();\n Cursor c1 = db.getallContour(AppConstant.user_id);\n\n allFarmsArray = new ArrayList<String>();\n allFarmsContour = new ArrayList<String>();\n allFarmsArray.add(\"All\");\n\n if (c1.moveToFirst()) {\n do {\n String ss = c1.getString(c1.getColumnIndex(DBAdapter.FARM_NAME));\n String c_lat = c1.getString(c1.getColumnIndex(DBAdapter.CENTRE_LAT));\n String c_lon = c1.getString(c1.getColumnIndex(DBAdapter.CENTRE_LON));\n String contour = c1.getString(c1.getColumnIndex(DBAdapter.CONTOUR));\n allFarmsContour.add(contour);\n allFarmsArray.add(ss);\n\n Log.v(\"contourrrr\", \"\" + contour);\n\n FarmData data = new FarmData();\n\n data.setFarmerName(ss);\n\n if (c_lat != null) {\n data.setLatitude(Double.parseDouble(c_lat));\n data.setLongitude(Double.parseDouble(c_lon));\n }\n\n if (mMap != null) {\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.home);\n\n MarkerOptions markerOptions = new MarkerOptions().position(new LatLng(data.getLatitude(), data.getLongitude()))\n .title(\"\" + data.getFarmerName())\n .icon(icon);\n\n\n Marker mMarker = mMap.addMarker(markerOptions);\n if (mMarker != null) {\n\n Log.v(\"markerAddd\", \"Addedddd\");\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(data.getLatitude(), data.getLongitude()), 5));\n }\n data.setMarker(mMarker);\n }\n mandiArray.add(data);\n\n Log.v(\"contour\", \"-0\" + ss);\n } while (c1.moveToNext());\n }\n db.close();\n\n if (mandiArray.size() < 1) {\n if (mMap != null) {\n mMap.addMarker(new MarkerOptions().position(new LatLng(latitude, longitude)).title(\"My Home\").snippet(\"Home Address\"));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitude, longitude), 12.0f));\n }\n }\n\n\n ArrayAdapter<String> chooseYourFarmSpiner = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_spinner_item, allFarmsArray);\n chooseYourFarmSpiner.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n farmSpinner.setAdapter(chooseYourFarmSpiner);\n\n farmSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n if (i > 0) {\n String conto = allFarmsContour.get(i - 1);\n if (conto != null) {\n if (mMap != null) {\n mMap.clear();\n\n }\n points = new ArrayList<LatLng>();\n List<String> l_List = Arrays.asList(conto.split(\"-\"));\n Double lat1 = null;\n Double lon1 =null;\n\n /* Double lat1 = Double.valueOf(l_List.get(0));\n Double lon1 = Double.valueOf(l_List.get(l_List.size() - 1));\n points.add(new LatLng(lat1, lon1));*/\n\n for (int j = 0; j < l_List.size(); j++) {\n String currentString = l_List.get(j);\n if (currentString != null) {\n String[] separated = currentString.split(\",\");\n if (separated.length>1) {\n String la = separated[0];\n String lo = separated[1];\n\n lat1=Double.parseDouble(la);\n lon1=Double.parseDouble(lo);\n\n points.add(new LatLng(Double.valueOf(la), Double.valueOf(lo)));\n\n Log.v(\"points\",la+\",\"+lo);\n }\n }\n }\n\n if (lat1 != null) {\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lat1, lon1), 19.0f));\n mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\n\n SharedPreferences prefs = getActivity().getSharedPreferences(AppConstant.SHARED_PREFRENCE_NAME, getActivity().MODE_PRIVATE);\n SharedPreferences.Editor ed = prefs.edit();\n ed.putString(\"lat\",lat1+\"\");\n ed.putString(\"lon\",lon1+\"\");\n ed.apply();\n\n } else {\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(Double.valueOf(latitude), Double.valueOf(longitude)), 13.0f));\n Log.v(\"latlon2\", lat1 + \"---\" + lon1);\n mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\n\n SharedPreferences prefs = getActivity().getSharedPreferences(AppConstant.SHARED_PREFRENCE_NAME, getActivity().MODE_PRIVATE);\n SharedPreferences.Editor ed = prefs.edit();\n ed.putString(\"lat\",latitude+\"\");\n ed.putString(\"lon\",longitude+\"\");\n ed.apply();\n }\n if (mMap != null) {\n mMap.clear();\n setUpMap();\n }\n }\n } else {\n\n if (mMap != null) {\n mMap.clear();\n\n }\n\n db.open();\n Cursor c1 = db.getallContour(AppConstant.user_id);\n\n allFarmsArray = new ArrayList<String>();\n allFarmsContour = new ArrayList<String>();\n allFarmsArray.add(\"All\");\n\n if (c1.moveToFirst()) {\n do {\n String ss = c1.getString(c1.getColumnIndex(DBAdapter.FARM_NAME));\n String c_lat = c1.getString(c1.getColumnIndex(DBAdapter.CENTRE_LAT));\n String c_lon = c1.getString(c1.getColumnIndex(DBAdapter.CENTRE_LON));\n String contour = c1.getString(c1.getColumnIndex(DBAdapter.CONTOUR));\n allFarmsContour.add(contour);\n allFarmsArray.add(ss);\n\n FarmData data = new FarmData();\n\n data.setFarmerName(ss);\n\n if (c_lat != null) {\n data.setLatitude(Double.parseDouble(c_lat));\n data.setLongitude(Double.parseDouble(c_lon));\n }\n\n if (mMap != null) {\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.home);\n\n MarkerOptions markerOptions = new MarkerOptions().position(new LatLng(data.getLatitude(), data.getLongitude()))\n .title(\"\" + data.getFarmerName())\n .icon(icon);\n\n\n Marker mMarker = mMap.addMarker(markerOptions);\n if (mMarker != null) {\n\n Log.v(\"markerAddd\", \"Addedddd\");\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(data.getLatitude(), data.getLongitude()), 5));\n }\n data.setMarker(mMarker);\n }\n mandiArray.add(data);\n\n Log.v(\"contour\", \"-0\" + ss);\n } while (c1.moveToNext());\n }\n db.close();\n\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n\n }\n });\n\n // Setting a custom info window adapter for the google map\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n // Use default InfoWindow frame\n @Override\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n // Defines the contents of the InfoWindow\n @Override\n public View getInfoContents(Marker arg0) {\n View v = getActivity().getLayoutInflater().inflate(R.layout.info_window, null);\n // Getting reference to the TextView to set latitude\n TextView tvLat = (TextView) v.findViewById(R.id.title);\n\n // Getting reference to the TextView to set longitude\n TextView tvLng = (TextView) v.findViewById(R.id.distance);\n System.out.println(\"Title : \" + arg0.getTitle());\n if (arg0.getTitle() != null && arg0.getTitle().length() > 0) {\n // Getting the position from the marker\n\n final String title = arg0.getTitle();\n\n db.open();\n Cursor c = db.getStateFromSelectedFarm(title);\n if (c.moveToFirst()) {\n do {\n AppConstant.stateID = c.getString(c.getColumnIndex(DBAdapter.STATE_ID));\n /* String contour = c.getString(c.getColumnIndex(DBAdapter.CONTOUR));\n getAtLeastOneLatLngPoint(contour);*/\n }\n while (c.moveToNext());\n }\n db.close();\n\n final String distance = arg0.getSnippet();\n tvLat.setText(title);\n tvLng.setText(distance);\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(title).\n setMessage(distance).\n setPositiveButton(\"Farm Data\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n dialogInterface.cancel();\n Intent intent = new Intent(getActivity(), NavigationDrawerActivity.class);\n intent.putExtra(\"calling-activity\", AppConstant.HomeActivity);\n intent.putExtra(\"FarmName\", title);\n\n startActivity(intent);\n getActivity().finish();\n\n\n }\n }).\n setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.cancel();\n }\n });\n builder.show();\n\n } else {\n // Setting the latitude\n tvLat.setText(String.valueOf(arg0.getPosition().latitude));\n // Setting the longitude\n tvLng.setText(String.valueOf(arg0.getPosition().longitude));\n }\n return v;\n }\n });\n\n\n }\n });\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n\n }\n }\n }",
"void setHashMap();",
"@Override\n public void setParameterMap(Map arg0) {\n\n }",
"public void loadMap(Player player) {\r\n\tregionChucks = RegionBuilder.findEmptyChunkBound(8, 8); \r\n\tRegionBuilder.copyAllPlanesMap(235, 667, regionChucks[0], regionChucks[1], 8);\r\n\t\r\n\t}",
"public abstract void setData(Map<ID, T> data);"
]
| [
"0.6337889",
"0.6292012",
"0.61634535",
"0.609544",
"0.6080596",
"0.5948286",
"0.5943313",
"0.59265804",
"0.59260523",
"0.59134626",
"0.5903648",
"0.5887812",
"0.58816344",
"0.5869408",
"0.5862209",
"0.5852701",
"0.5845975",
"0.58288914",
"0.58178544",
"0.5798062",
"0.57727605",
"0.57655704",
"0.5744554",
"0.57427645",
"0.5642176",
"0.5641469",
"0.5640061",
"0.5632193",
"0.56270874",
"0.5618086",
"0.56071913",
"0.55601054",
"0.5548341",
"0.552371",
"0.55163586",
"0.5515347",
"0.5513853",
"0.54884166",
"0.5476695",
"0.5474813",
"0.54714626",
"0.5462825",
"0.54604465",
"0.54505104",
"0.5438535",
"0.54370826",
"0.5427856",
"0.54267347",
"0.5426653",
"0.5423436",
"0.54173297",
"0.5414302",
"0.5411993",
"0.5395305",
"0.53794396",
"0.5349694",
"0.53319824",
"0.53245676",
"0.5315951",
"0.5313717",
"0.53083444",
"0.53070086",
"0.5297594",
"0.5296073",
"0.52947277",
"0.5292659",
"0.5285405",
"0.52815694",
"0.5279498",
"0.5277861",
"0.5274819",
"0.52701557",
"0.5253482",
"0.5240606",
"0.5240384",
"0.5232623",
"0.52284706",
"0.52186656",
"0.521696",
"0.52152073",
"0.5211405",
"0.52110034",
"0.5208923",
"0.5204759",
"0.5204639",
"0.5199339",
"0.5197105",
"0.51936746",
"0.51920485",
"0.51889426",
"0.5188685",
"0.51886004",
"0.51885575",
"0.51848084",
"0.5184331",
"0.51823735",
"0.51778144",
"0.51646984",
"0.5164231",
"0.5163249"
]
| 0.774751 | 0 |
TODO Autogenerated method stub public : it can be called from anywhere. static : doesn't belong to a specific object. void : returns to no value. main : is special because it will start the program. | public static void main(String[] args)throws IOException {
Method m=new Method();//taking an object
m.accept();
//here it is accepting the object class
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main() {\n \n }",
"public static void main()\n\t{\n\t}",
"public static void main(){\n\t}",
"public static void main() {\n }",
"public static void main(String[] args) {\n\t\tnon_static(); // static contain only static methods, variables\r\n//\t\tnon_static2();\r\n\t}",
"public void main(){\n }",
"private Main() {}",
"public static void main(String[] args) {\n\r\n}",
"public static void main(String[] args) {\r\n// Use for unit testing\r\n }",
"public static void main (String []args){\n }",
"public static void main(String[] args) {\n\t\tStatic_Demo s=new Static_Demo();\r\n\t\ts.add();\r\n\t\t\r\n\t\tStatic_Demo.sub();\r\n\r\n\t}",
"public static void main(String[] args) {}",
"public static void main(String[] args) {}",
"public void Main(){\n }",
"public static void main(String[] args) {\n\t\tStaticDemo1.f3();\n\t\tStaticDemo1 sd1 = new StaticDemo1();\n\t\tsd1.f1();\n\t\t/*you cannot call instance methods in static methods*/\n\t\t\n\t}",
"public static void main(String []args){\n\n }",
"public static void main(String[]args) {\n\t\n\t\t\n\n}",
"public static void main(String[] args)\r\n\t{\r\n\t\t//static members belong to the class instead of a specific instance\r\n\t\t/*\r\n\t\t * Podsumowujac:\r\n\t\t * static oznacza, ze sa wykonywane dzialania na KLASIE a nie na obiekcie\r\n\t\t * bez znacznika static metoda/zmienna jest zalezna od instancji\r\n\t\t * a static powoduje zmiany na CAŁEJ KLASIE\r\n\t\t * \r\n\t\t * \r\n\t\t * w przypadku klasy NIE MOZNA uzywac metod które nie maja słowa klucz 'static'\r\n\t\t * w przypadku instancji NIE POWINNO sie uzywac metod ktore maja slowo klucz 'static'\r\n\t\t */\r\n\t\t\r\n\t\tHello hello = new Hello();\r\n\t\tHello hello1 = new Hello();\r\n\t\t\r\n\t\t//tak powinno sie uzywac metod z 'static' (czyli nazwa klasy a nie instancji)\r\n\t\tHello.DoSomething(\"Hi youtube\");\r\n\r\n\t\t//tak powinno sie uzywac metod bez 'static' (nazwa instancji)\r\n\t\thello.DoSomethingElse(\"hello world\");\r\n\t\t\r\n\t\t//tak NIE powinno sie uzywac zmiennych z 'static' \r\n\t\thello.age= 10;\r\n\t\t\r\n\t\tSystem.out.println(hello.age);\r\n\t\t\r\n\t\thello1.age =50;\r\n\t\tSystem.out.println(hello1.age);\r\n\t\tSystem.out.println(hello.age);\r\n\t\t\r\n\t\t//tak powinno sie uzywac zmniennych z 'static'\r\n\t\tHello.age = 15;\r\n\t\tSystem.out.println(Hello.age);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"public Main() {}",
"public static void main(String[] args) \n {\n\t \n\t \n\t \n}",
"public static void main(String[] args) {\n //cara memanggil static member\n\n //panggil nama class kemudian nama fieldnya\n System.out.println(Constant.APPLICATION);\n System.out.println(Constant.VERSION);\n\n //JIKA kita menggunakan static import kita bisa langusg panggil nama field-nya\n //System.out.println(APPLICATION);\n //System.out.println(VERSION);\n\n\n //panggil nama class kmeudian nama method\n System.out.println(\n MathUtil.sum(1,1,1,1,1)\n );\n\n //panggil nama outer class kemudian nama static inner class\n Country.City city = new Country.City();\n city.setName(\"Jakarta\");\n\n System.out.println(city.getName());\n\n //panggil nama class kemudian nama static field yang ada di block static\n System.out.println(Application.PROCESSOR);\n\n //JIKA kita menggunakan static import kita bisa langusg panggil nama method-nya\n //System.out.println(PROCESSOR);\n\n }",
"public static void main(String[] args) {\n \r\n}",
"static void main(String[] args)\n {\n }",
"public static void main(String[] args) {\n new Main();\n }",
"public static void main (String [] args){\n\n\n\n \n\n\n\n\n\n \n\n\n\n\n\n\n\n }",
"public static void main(String[] args) // every Java program starts with a main method or function\r\n\t{\n\t}",
"private Main() {\n }",
"public static void main (String[] args)\r\n{\r\n}",
"public static void main(String []args){\n }",
"public static void main(String []args){\n }",
"public static void main(String[] args) {\n MainIntrence mainintrence = new MainIntrence();\r\n\r\n\r\n\r\n }",
"public static void main(String[] args){\n // isveda teksta i konsole\n // sout - greitai atspausdina\n System.out.println(\"Hello world\");\n // metodo kvietimas maine\n\n int a = 10;\n\n // sukurtas objektas\n // tipas pavadinimas = new tipas\n MyFirstClass myFirstClass = new MyFirstClass();\n\n // per objekta kvieciamas metodas\n // ne statinis kvieciamas statiniame per klases objekta\n myFirstClass.myNotStaticMethod(a);\n\n // tiesiogiai per varda toje pacioje klaseje\n myStaticMethod();\n\n // float visada su f\n float b = 4.6f;\n\n // galima pridet d, bet nebutina\n double c = 2.4;\n\n // saugo true arba false(1 bito)\n boolean d = true;\n\n // viena raide, simbolis\n char e = 'A';\n\n // Javoj string neturi atskiro tipo, todel naudoja klase ir rasomas is didziosios(nes klase)\n String f = \"This is string!!!\";\n }",
"public static void main(String[] args) {\n\n\n\n\n\n\n\n }",
"public Main() {\r\n\t}",
"public Main() {\n \n \n }",
"public static void main(String[] args) {\n\t\tcallingstatic obj = new callingstatic(); //object to call nonstatic func or var. \n\t\t\n\tsum(); //Direct calling static method.\n\tcallingstatic.sum(); //indirect calling static method through class name.\n\t//obj.sum(); //nonstatic way to call static method. \n\t\n\tobj.divide(); //calling nonstatic func though obj\n\tSystem.out.println(obj.name); //calling nonstatic var though obj\n\t}",
"private Main()\n {{\n System.err.println ( \"Internal error: \"+\n\t \"unexpected call to default constructor for Main.\" );\n System.exit(-127);\n }}",
"public static void main(String[] args) {\n\t\r\n}",
"static void main(String[] args) {\n }",
"public static void main(String[] args) { }",
"public Main() {\n\t\tsuper();\n\t}",
"public static void main(String[] args)\r\n {\r\n \r\n \r\n \r\n }",
"public static void main(String[] args) {\r\n \r\n }",
"public static void main(String[] args) {\r\n \r\n }",
"public static void main(String[] args){\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n }",
"public static void main(String[] args) { }",
"private Main() {\n\n super();\n }",
"static public void main(String[] args) {\n\t}",
"public static void main(String[] args)\r\n {\n\r\n }",
"public static void main(String[] args) {\r\n // 2. Call your method in various ways to test it here.\r\n }",
"public static void main(String args[]) {}",
"public static void main(String args[]) {}",
"public static void main(String args[]) {}",
"public Main() {\r\n }",
"public Main() {\r\n }",
"public static void main(String[] args) {\n\r\n }",
"public static void main(String [] args){\n \n \n \n \n }",
"public static void main(String[] args){\r\n\t\t\r\n\tSystem.out.println(\"main method(-)\");\r\n\t\r\n\t}",
"public static void main(String[] args)\n {\n\t\n }",
"public static void main(String[] args)\r\n {\n \r\n \r\n }",
"public static void main(String[] args) {\n\n\n //1.5 Call the above instance method into the Main method and Run the programme.\n\n Program1 obj = new Program1();\n obj.m1();\n\n\n }",
"public static void main(String[] args) {\n \n\n }",
"public static void main(String args[]) throws Exception\n {\n \n \n \n }",
"public static void main(String[] args) {\n\t\t/**Mandamos a llamar el metodo estatico ya que no requiere ser instanciado*/\n\t\tClaseInservible.ejecutarEstatico();\n\t}",
"public static void main(String[] args) {\n \n \n \n \n }",
"private Main ()\n {\n super ();\n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\r\n\t\t//method body\r\n\t}",
"@Test\r\n\tpublic void mainTest(){\r\n\t\tMain m = new Main();\r\n\t\tm.main(null);\r\n\t}",
"public static void main(String[] args) {\n\n\n\n }",
"public static void main(String[] args) {\n\n\n\n }",
"public static void main(String[] args) {\n\n\n\n }",
"private ThoseMain()\n {\n // Do nothing\n }",
"public static void main(String[] args) {\n new Main();\r\n }",
"public static void main (String [] args){\n\t}",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args){\n\n\n\n }",
"public static void main (String[] args)\r\n {\n }",
"public static void main(String[] args) {\n \r\n\t}",
"public static void main(String[] args) {\t}",
"public static void main(String[] args) {\n\n}",
"public static void main(String[] args) {\n\n}",
"public static void main(String[] args) {\n\n}",
"public static void main(String[] args) {\n\n}",
"public static void main(String[] args){ //Declaration of the main function. Public it's an access specifier that means that you can \r\n\t \t\t\t\t\t//call this method from outside the class (publically). Static it's an access modifier that \r\n\t \t\t\t\t\t//creates space in memory automatically when java program is load. Void it's a return type.\r\n\t \t\t\t\t\t//Main it's the name of the method. String[] args are arguments of type String that your Java \r\n\t \t\t\t\t\t//application accepts when you run it.\r\n\r\n\t\tSystem.out.println(74+36); \t//Printing the addition of two numbers. System it's a class. Out it's a field on the system class, \r\n\t\t\t\t\t\t//it's an standard output stream. Println() it's a method of the PrintStream class \r\n\t\t\t\t\t\t//which prints any type of primitive data types and then terminates the line.\r\n\t}",
"public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}",
"public Main() {\n }",
"public Main() {\n }",
"public Main() {\n }",
"public static void main(String[] args) {\n}",
"public static void main(String[] args) {\n \n \n \n\t}",
"public static void main(String args[]) { \r\n }",
"public static void main(String[] args) {// we can create psvm method but cannot create objects in abstract class\n\t\tSchool.bonus();// as bonus method is static we can print it without create class name so we can use\n\t\t\t\t\t\t// with classname.mthdname hence it is accepted in abstract class\n\t\tSystem.out.println(\"i am from main method\");// we can write anything in main mthd it prints automatically without\n\t\t\t\t\t\t\t\t\t\t\t\t\t// creating obj\n\t}",
"public static void main(String[] args) {\n\t\tString Name = \"Tofael\"; //no static required\n\t\tint age = 44; // no static required\n\t\tchar sex = 'M'; //no static required as variable declared under Main Static Method above\n\t\tdouble grade = 3.876; //no static required\n\t\n\t\t//implementation of variables below\n\t\t\t\n\t\t\tSystem.out.println(Name); \n\t\t\tSystem.out.println(age);\n\t\t\tSystem.out.println(sex);\t\t\n\t\t\tSystem.out.println(grade);\n\t\t\t\n\t\t\tSystem.out.println(\"My Name: \" +Name + \", My Age: \" +age+ \", My Sex: \" + sex + \", My Grade: \" +grade);\n\t\t\n\t}",
"public static void main(String[] args) {\n }",
"public static void main(String[] args) \r\n\t{\n\t\tStaticExample c1=new StaticExample();\r\n\t\tStaticExample c2=new StaticExample();\r\n\t\tStaticExample c3=new StaticExample();\r\n\t}"
]
| [
"0.8135525",
"0.812782",
"0.807804",
"0.80477375",
"0.75378466",
"0.7460706",
"0.71840715",
"0.71752465",
"0.71578383",
"0.7156084",
"0.7136113",
"0.7107486",
"0.7107486",
"0.7094863",
"0.70865405",
"0.708408",
"0.7081566",
"0.7076846",
"0.7066384",
"0.7061089",
"0.70605445",
"0.70515627",
"0.70492876",
"0.70381457",
"0.7030722",
"0.7029758",
"0.70278496",
"0.70004",
"0.699044",
"0.699044",
"0.6988888",
"0.69870526",
"0.6983718",
"0.69773555",
"0.6973102",
"0.6956969",
"0.6947632",
"0.69435006",
"0.6940384",
"0.6922097",
"0.6916242",
"0.6910519",
"0.69095296",
"0.69095296",
"0.6901211",
"0.6900496",
"0.6886067",
"0.6882478",
"0.6867681",
"0.6865338",
"0.686389",
"0.686389",
"0.686389",
"0.68620944",
"0.68620944",
"0.68599755",
"0.68504614",
"0.68431675",
"0.6839788",
"0.6835387",
"0.6834166",
"0.6832088",
"0.6815151",
"0.6811546",
"0.68080306",
"0.6800901",
"0.6798128",
"0.6798128",
"0.6798128",
"0.6798128",
"0.6798128",
"0.6798128",
"0.67972165",
"0.67918617",
"0.6790195",
"0.6790195",
"0.6790195",
"0.6790004",
"0.6787119",
"0.67814636",
"0.6779224",
"0.67774594",
"0.6773683",
"0.6772134",
"0.67687565",
"0.6763889",
"0.6763889",
"0.6763889",
"0.6763889",
"0.6761281",
"0.67611164",
"0.6759375",
"0.67562515",
"0.67562515",
"0.6753514",
"0.674827",
"0.67428136",
"0.6734656",
"0.67346376",
"0.6734038",
"0.6718907"
]
| 0.0 | -1 |
Created by Harlan1994 on 2017/11/21. | public interface IPostService {
Post getPost(Long id);
Page<Post> getPosts(Integer page, Integer size);
Page<Post> getPagedPostsByTag(Integer page, Integer size, String tag);
Page<Post> getPostsByKeywords(Integer page, Integer size,String[] keywords);
void updatePost(Post post);
void deletePostById(Long id);
List<Post> getAllPosts();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"private void poetries() {\n\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\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"protected boolean func_70814_o() { return true; }",
"private void m50366E() {\n }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"private void kk12() {\n\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n public int describeContents() { return 0; }",
"public void mo38117a() {\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"public void gored() {\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}",
"private void strin() {\n\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"private void init() {\n\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"private Rekenhulp()\n\t{\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n public void init() {\n }",
"@Override\n void init() {\n }",
"@Override\n protected void getExras() {\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"public void method_4270() {}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n public void init() {}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void init() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo21877s() {\n }",
"public abstract void mo70713b();",
"public void m23075a() {\n }",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tprotected void doF4() {\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 protected void initialize() \n {\n \n }",
"@Override\n\tpublic void init() {\n\t}",
"@Override public int describeContents() { return 0; }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"public void mo6081a() {\n }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"public void mo12930a() {\n }",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"public void mo12628c() {\n }",
"private MetallicityUtils() {\n\t\t\n\t}",
"private void init() {\n\n\n\n }"
]
| [
"0.5946154",
"0.58451116",
"0.5833454",
"0.5717281",
"0.570625",
"0.57008874",
"0.56966656",
"0.56966656",
"0.56938934",
"0.5686754",
"0.5637822",
"0.5601666",
"0.55902284",
"0.5558308",
"0.5553098",
"0.55408186",
"0.55347556",
"0.5534528",
"0.5529497",
"0.5524365",
"0.55205804",
"0.5512753",
"0.55095613",
"0.55009043",
"0.5488767",
"0.5462827",
"0.54625386",
"0.54625386",
"0.54625386",
"0.54625386",
"0.54625386",
"0.5453674",
"0.54327065",
"0.5419922",
"0.5419817",
"0.54168105",
"0.5413149",
"0.5401676",
"0.539092",
"0.5389269",
"0.5376035",
"0.53511083",
"0.53476393",
"0.5337172",
"0.5337172",
"0.5327449",
"0.5326354",
"0.53191215",
"0.5315817",
"0.531524",
"0.53146243",
"0.5313078",
"0.5313078",
"0.5313078",
"0.5310045",
"0.5304031",
"0.53008896",
"0.53008896",
"0.53008896",
"0.52974826",
"0.52974826",
"0.52974826",
"0.5296121",
"0.5296026",
"0.5296026",
"0.5296026",
"0.5296026",
"0.5296026",
"0.5296026",
"0.5289722",
"0.5286546",
"0.5286546",
"0.5286546",
"0.5286546",
"0.5286546",
"0.5286546",
"0.5286546",
"0.5277941",
"0.52776337",
"0.5276858",
"0.5271598",
"0.5269233",
"0.5268273",
"0.5268273",
"0.52599704",
"0.52571654",
"0.52571654",
"0.5250293",
"0.52472746",
"0.52455413",
"0.52386546",
"0.5236003",
"0.52348304",
"0.522586",
"0.522371",
"0.5210631",
"0.5209891",
"0.5207793",
"0.52075326",
"0.52000225",
"0.51904625"
]
| 0.0 | -1 |
Returns the position of the entity. | @Basic @Raw
public double[] getPosition(){
double[] result = {this.position[0], this.position[1]};
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.Integer getPosition() {\n return position;\n }",
"public java.lang.Integer getPosition() {\n return position;\n }",
"public int getPosition()\n\t{\n\t\treturn position;\n\t}",
"public final int getPosition() {\n return position;\n }",
"public long position() {\n return _pos;\n }",
"public int getPosition() {\r\n\t\treturn position;\r\n\t}",
"public int getPosition()\r\n {\r\n return position;\r\n }",
"public int getPosition() {\r\n return position;\r\n }",
"public int getPosition() {\n return position;\n }",
"public int getPosition() {\n return position;\n }",
"public int getPosition() {\n return position;\n }",
"public int getPosition() {\n return position;\n }",
"public Integer getPosition() {\n return this.position;\n }",
"public Integer getPosition() {\n return position;\n }",
"public long getPosition();",
"public Integer getPosition()\n {\n return position;\n }",
"public int getPosition()\n {\n return getInt(\"Position\");\n }",
"public Integer getPosition();",
"public long getPos()\n\t{\n\t\treturn -1;\n\t}",
"public Pos getPos()\r\n\t{\r\n\t\treturn position;\r\n\t}",
"public int position() {\n return pos;\n }",
"@Override\n\tpublic Position getPosition() {\n\t\treturn this.posn;\n\t}",
"public int getPosition();",
"public Position getPosition()\n\t{\n\t\treturn position;\n\t}",
"public int getPos()\n {\n return pos;\n }",
"public String getPosition() {\n return position;\n }",
"public String getPosition() {\n return position;\n }",
"public String getPosition() {\n return position;\n }",
"public String getPosition() {\n return position;\n }",
"public String getPosition() {\n return position;\n }",
"public Position getPosition() {\n\t\treturn position;\n\t}",
"public String getPosition(){\r\n\t\treturn position;\r\n\t}",
"public int getPosition(){\n return -1;\n }",
"@PersistField(contained = true)\n public BlockVector getPosition()\n {\n return position;\n }",
"public int getPosition() {\n log.log(Level.FINE, \"position: \" + position + \"ms\");\n return position;\n }",
"public IntegerTulep getPosition() {\n return position;\n }",
"public int getPos();",
"public int getPos();",
"Object getPosition();",
"public int getPos()\n {\n return pos;\n }",
"public Position getPosition() {\n return position;\n }",
"public Position getPosition() {\n return position;\n }",
"public Position getPosition() {\n return position;\n }",
"public Position getPosition() {\n return position;\n }",
"public Position getPosition() {\n return position;\n }",
"public Position getPosition() {\n return position;\n }",
"public Position getPosition() {\n return this.position;\n }",
"@Override\n public int getPosition() {\n return position;\n }",
"public Point getPosition(){\n\t\treturn position;\n\t}",
"public Point getPosition()\n\t{\n\t\treturn pos;\n\t}",
"public int PositionGet();",
"public long position() {\n\t\tif (mPlayer.isInitialized()) {\n\t\t\treturn mPlayer.position();\n\t\t}\n\t\treturn -1;\n\t}",
"@Override\n\t/**\n\t * returns the position of the class\n\t * \n\t * @return position\n\t */\n\tpublic int getPosition() {\n\t\treturn position;\n\t}",
"public final Point getPosition()\n\t{\n\t\treturn pos;\n\t}",
"public Coordinate getPosition() {\n return cPosition;\n }",
"public Point getPosition() {\n return position;\n }",
"public Position getPosition(){\n return this.position;\n }",
"public Point getPosition() {\n return this.position;\n }",
"@JsOverlay\n\tpublic final String getPosition() {\n\t\treturn this.position;\n\t}",
"public final BlockPos getPos() {\n\t\treturn baseTile.getPos();\n\t}",
"@Override\n public Position getPosition() {\n return position;\n }",
"public final native CoOrdinates getPosition() /*-{\r\n\t\treturn this.position;\r\n\t}-*/;",
"@Override\n public Optional<Position> getPosition() {\n return this.pos;\n }",
"public int getX() { return position.x; }",
"int getPosition();",
"public Cell getPosition() {\n return position;\n }",
"public Position getPosition();",
"public Position getPosition();",
"public Position getPosition();",
"public Vector2 getPosition() {\n\t\treturn pos;\n\t}",
"public PVector getPosition(){\n\t\treturn position;\n\t}",
"public GeoPoint getPosition() {\n\t\treturn position;\n\t}",
"@Override\n\tpublic int getPosition() {\n\t\treturn 0;\n\t}",
"@Override\n public double getPosition()\n {\n final String funcName = \"getPosition\";\n double pos = getMotorPosition() - zeroPosition;\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", pos);\n }\n\n return pos;\n }",
"@Override\n\tpublic int getPos() {\n\t\treturn 0;\n\t}",
"public int getPosition()\n {\n return m_sequence;\n }",
"Position getPosition();",
"Position getPosition();",
"public Integer getPositionnum() {\n\t\treturn positionnum;\n\t}",
"RealLocalizable getPosition();",
"public Vector2 getPosition() {\n\t\treturn position;\n\t}",
"static Vector getEntityPosition(Entity entity, Object nmsEntity) {\n if(entity instanceof Hanging) {\n Object blockPosition = ReflectUtils.getField(nmsEntity, \"blockPosition\");\n return MathUtils.moveToCenterOfBlock(ReflectUtils.blockPositionToVector(blockPosition));\n } else {\n return entity.getLocation().toVector();\n }\n }",
"public Coordinate getPosition();",
"public int getPositionIndex()\n {\n return positionIndex;\n }",
"BlockPos getPosTarget() {\n BlockPosDim loc = LocationGpsCard.getPosition(inventory.getStackInSlot(0));\n if (loc != null && loc.getPos() != null) {\n return loc.getPos();\n }\n return this.getBlockPos();\n }",
"public int getPosition() {\n return preferences.getInt(\"position\",0);\n }",
"public PVector getPosition() { return position; }",
"public Vector2D getPosition() {\n\t\treturn position;\n\t}",
"public PVector getPos() {\n\t\treturn pos;\n\t}",
"public Vector3f getPosition() {\r\n\t\treturn this.position;\r\n\t}",
"@Override\n\tpublic D3int getPos() {\n\t\treturn myPos;\n\t}",
"public double getPosition() {\n return sequence.getPosition(BPMNode);\n }",
"public Position getPosition() {\r\n\t\treturn new Position(this.position.getX(), this.position.getY());\r\n\t}",
"public int getPosition(){\n\t\treturn this.cell;\n\t}",
"public final Optional<Position> getPosition() {\n return position;\n }",
"public int getX() {\n return positionX;\n }",
"public int getPositionX() {\n return positionX;\n }",
"@Override\n\tpublic long getPosition()\n\t{\n\t\treturn inputStream.Position;\n\t}",
"public final int getPositionX() {\r\n return (int) position.x();\r\n }",
"@Override\n\tpublic Vector2 getPosition() {\n\t\treturn body.getPosition();\n\t}",
"public final Vector2f getPosition() {\r\n return position;\r\n }"
]
| [
"0.79132545",
"0.78884256",
"0.7858709",
"0.7827041",
"0.7826209",
"0.7823225",
"0.78141797",
"0.77841556",
"0.7779429",
"0.77629685",
"0.77629685",
"0.77629685",
"0.7749676",
"0.77446777",
"0.77377295",
"0.7711891",
"0.7696557",
"0.76495004",
"0.7589346",
"0.7585941",
"0.7582772",
"0.7567241",
"0.75610983",
"0.74739176",
"0.74656653",
"0.7449279",
"0.7449279",
"0.7449279",
"0.7449279",
"0.7449279",
"0.7428879",
"0.74220717",
"0.7417106",
"0.7383133",
"0.7379739",
"0.73712367",
"0.7359419",
"0.7359419",
"0.7355915",
"0.7342279",
"0.7324444",
"0.7324444",
"0.7324444",
"0.7324444",
"0.7324444",
"0.7324444",
"0.73243755",
"0.7305425",
"0.7289436",
"0.72773606",
"0.72724485",
"0.7249806",
"0.7240668",
"0.72162926",
"0.72070426",
"0.72045135",
"0.7199736",
"0.7195783",
"0.7182433",
"0.7163851",
"0.71586186",
"0.7143202",
"0.71378374",
"0.71210897",
"0.7115908",
"0.7115409",
"0.7114085",
"0.7114085",
"0.7114085",
"0.71084976",
"0.7085879",
"0.7071786",
"0.7063886",
"0.704574",
"0.70433563",
"0.703212",
"0.7024653",
"0.7024653",
"0.7015585",
"0.7010239",
"0.70091075",
"0.70028186",
"0.699878",
"0.6992589",
"0.6982334",
"0.6969347",
"0.69656754",
"0.695129",
"0.69316643",
"0.6930771",
"0.6914245",
"0.69109935",
"0.69084835",
"0.69084144",
"0.68976355",
"0.6897058",
"0.68856955",
"0.6884257",
"0.6878215",
"0.687012",
"0.6866516"
]
| 0.0 | -1 |
Moves the entity to a new position during a time span of dt. | public void move(double dt) throws IllegalArgumentException{
if (dt < 0.0) throw new IllegalArgumentException("Invalid time");
else{
this.setPosition(this.getPosition()[0] + (this.getVelocity()[0] * dt), this.getPosition()[1] + (this.getVelocity()[1] * dt));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void timePassed(double dt) {\r\n this.moveOneStep(dt);\r\n }",
"@Override\n\tpublic void live(long _dt) {\n\t\tList<IPerceivable> surroundingEntities = getPerceptions();\n\n\t\tVector2f newDirection = decide(surroundingEntities);\n\n\t\tmove(newDirection);\n\n\t}",
"public void timePassed(double dt) {\n this.moveOneStep(dt);\n }",
"public void updatePosition(double dt)\n {\n if (!projectedVelocity.equals(Vector3.ZERO))\n {\n projectedPosition = projectedPosition.add(projectedVelocity.multiply(dt));\n }\n }",
"public void move() {\n this.pposX = this.posX;\n this.pposY = this.posY;\n this.posX = newPosX;\n this.posY = newPosY;\n }",
"public void timePassed(double dt) {\r\n moveOneStep(dt);\r\n }",
"public void move(float deltaTime) {\n }",
"public void setLastMoved(double time);",
"public void setPosition(int indexInST, float time, Vector3f position) {\n PointInTime toAdd=findTime(time);\n toAdd.setTranslation(indexInST,position);\n }",
"public void updatePosition(double timestep){\n\t\tx = x + vx * timestep;\n\t y = y + vy * timestep;\n\t}",
"public abstract void move(int elapsedTime);",
"public void move (long delta){\r\n\r\n super.move(delta);\r\n }",
"public void moveBy(Delta delta)\n\t{\n\t\ttry {\n\t\t\tcurrentPosition = Position.fromCoordinates(currentPosition.X + delta.X, currentPosition.Y + delta.Y);\n\t\t}\n\t\tcatch(IllegalArgumentException invalidDelta)\n\t\t{\n\t\t\t// Convert exception to convey the correct semantics \n\t\t\tthrow new IllegalStateException(invalidDelta);\n\t\t}\n\t}",
"public void move(long timePassed) {\n\t\tif (x < -100) {\r\n\t\t\tthis.destroy();\r\n\t\t}\r\n\r\n\t\tsuper.move(timePassed);\r\n\t}",
"public void move(int delta);",
"public void moveOneStep(double dt) {\r\n this.checkLeftAndRightXs();\r\n if (this.leftX <= 20) {\r\n for (Enemy e : enemies) {\r\n e.moveDown();\r\n e.setSpeed(-(e.getSpeed().getDx() * 1.1));\r\n }\r\n\r\n }\r\n if (this.rightX >= 780) {\r\n for (Enemy e : enemies) {\r\n e.moveDown();\r\n\r\n e.setSpeed(-(e.getSpeed().getDx() * 1.1));\r\n\r\n }\r\n\r\n }\r\n for (Enemy e : enemies) {\r\n e.moveOneStep(dt);\r\n }\r\n }",
"@Override\r\n public void tick() {\n playerNextTo();\r\n if (playerContact() && isCollisioned()) {\r\n if (!((GameState) game.getGameState()).getWorld().getTile((int) (x + xMove), (int) (y + yMove)).isSolid()\r\n && isValidMove(xMove, yMove)) {\r\n x += xMove;\r\n y += yMove;\r\n }\r\n }\r\n }",
"void moveElement(int elementId, double xCoordinate, double yCoordinate);",
"private void move(double newXPos){\n this.setX(newXPos);\n }",
"protected void move(int newX, int newY) {\n if (grid.inBounds(newX, newY)) {\n grid.exit(this, newX, newY);\n }\n if (grid.valid(newX, newY) && System.currentTimeMillis() - lastMovement > 100) {\n grid.addTokenAt(null, positionX, positionY);\n grid.addTokenAt(this, newX, newY);\n positionX = newX;\n positionY = newY;\n lastMovement = System.currentTimeMillis();\n grid.repaint();\n }\n }",
"void move(int dx, int dy) {\n position = position.addX(dx);\n position = position.addY(dy);\n }",
"@Override\n public void update(double millis) throws InvalidDataException {\n myMovable.update(millis);\n }",
"public void move() {\n\t\tthis.position.stepForwad();\n\t\tthis.position.spin();\n\t}",
"public void moveTo(Vector3d pos) {\r\n currentPosition = pos;\r\n transform3D.setTranslation(currentPosition);\r\n transformGroup.setTransform(transform3D);\r\n }",
"private void moveItem(int oldPos, int newPos) {\n adapter.notifyItemMoved(oldPos, newPos);\n }",
"public void update(long delta){\n \n if(placement <= -1000){\n placement = zPosition;\n }\n placement -= 5;\n \n \n }",
"private void moveTowards(GridPoint pt) {\n\t\tif (!pt.equals(grid.getLocation(this))) {\r\n\t\t\tNdPoint myPoint = space.getLocation(this);\r\n\t\t\tNdPoint otherPoint = new NdPoint(pt.getX(), pt.getY());\r\n\t\t\tdouble angle = SpatialMath.calcAngleFor2DMovement(space, myPoint, otherPoint);\r\n\t\t\tspace.moveByVector(this, 1, angle, 0);\r\n\t\t\tmyPoint = space.getLocation(this);\r\n\t\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\r\n\t\t\tmoved = true;\r\n\r\n\t\t}\r\n\r\n\t}",
"public void moveTo(Position newPosition)\n\t{\n\t\tcurrentPosition = newPosition;\n\t}",
"public void update(float dt) {\n gameStates.peek().update(dt);\n }",
"public void move(double dist){\n VectorMovement newPositionAndLines = myGrid.addMovement(xPos, yPos, myAngle, dist, myPen);\n Point newPosition = newPositionAndLines.getPosition();\n updateUndoBuffers(newPositionAndLines.getLinesAssociatedWithMovement());\n xPos = newPosition.getMyX();\n yPos = newPosition.getMyY();\n }",
"public void timePassed(double dt) {\r\n if (keyboard.isPressed(KeyboardSensor.RIGHT_KEY)) {\r\n moveRight(dt);\r\n }\r\n if (keyboard.isPressed(KeyboardSensor.LEFT_KEY)) {\r\n moveLeft(dt);\r\n }\r\n }",
"public void moveEntry(int oldIndex, int newIndex) {\n\n\t\tif (oldIndex > newIndex) {\n\t\t\t// moving up the list\n\t\t\t// hold the old entry in a temporary object\n\t\t\tToDoEntry tempToDo = toDoList.get(oldIndex);\n\t\t\t// move all the ones in between up by 1\n\t\t\tfor (int i = oldIndex; i > newIndex; i--) {\n\t\t\t\ttoDoList.set(i, toDoList.get(i - 1));\n\t\t\t}\n\t\t\t// put the temporary object in the new position\n\t\t\ttoDoList.set(newIndex, tempToDo);\n\n\t\t} else if (oldIndex < newIndex) {\n\t\t\t// moving down the list\n\t\t\t// hold the old entry in a temporary object\n\t\t\tToDoEntry tempToDo = toDoList.get(oldIndex);\n\t\t\t// move all the ones in between down by 1\n\t\t\tfor (int i = oldIndex; i < newIndex; i++) {\n\t\t\t\ttoDoList.set(i, toDoList.get(i + 1));\n\t\t\t}\n\t\t\t// put the temporary object in the new position\n\t\t\ttoDoList.set(newIndex, tempToDo);\n\t\t}\n\t\t// if they are the same this does nothing\n\t}",
"public void move(int dx, int dy) {\n\t\ttileX = tileX + dx;\n\t\ttileY = tileY + dy;\n\t}",
"public void onEntityMove(Entity entity) {\n\n }",
"public void move(int dx, int dy) {\n this.xPosition += dx;\n this.yPosition += dy;\n }",
"public void onTick(long nanosSincePreviousTick) {\n\t\tif (_freeMoving) \n\t\t\tthis.move(_dx, _dy);\n\t}",
"public Point applyToPoint(Point p, double dt) {\r\n p.setX(p.getX() + dt * this.dx);\r\n p.setY(p.getY() + dt * this.dy);\r\n return p;\r\n }",
"private void moveToNewPosition(float tpf) {\r\n\t\tif (linearVelocity == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tVector3f previousSpeed = linearVelocity;\r\n\t\tVector3f pos = targetSpatial.getLocalTranslation().clone();\r\n\t\tpos.addLocal(linearVelocity.mult(tpf));\r\n\t\tfloat oldX = targetSpatial.getLocalTranslation().x;\r\n\t\tfloat oldY = targetSpatial.getLocalTranslation().y;\r\n\t\ttargetSpatial.setLocalTranslation(pos);\r\n\t\ttargetSpatial.updateWorldVectors();\r\n\t\tfloat newX = targetSpatial.getLocalTranslation().x;\r\n\t\tfloat newY = targetSpatial.getLocalTranslation().y;\r\n\t\t\r\n\t\tif (FastMath.abs(previousSpeed.x) < FastMath.abs(linearVelocity.x)) {\r\n\t\t\tif (linearVelocity.x < 0) {\r\n\t\t\t\tlinearVelocity.setX(-FastMath.abs(previousSpeed.x));\r\n\t\t\t} else {\r\n\t\t\t\tlinearVelocity.setX(FastMath.abs(previousSpeed.x));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (FastMath.abs(previousSpeed.y) < FastMath.abs(linearVelocity.y)) {\r\n\t\t\tif (linearVelocity.y < 0) {\r\n\t\t\t\tlinearVelocity.setY(-FastMath.abs(previousSpeed.y));\r\n\t\t\t} else {\r\n\t\t\t\tlinearVelocity.setY(FastMath.abs(previousSpeed.y));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (listeners != null) {\r\n\t\t\tfor (int i = 0; i < listeners.size(); i++) {\r\n\t\t\t\tif (listeners.get(i) != null) {\r\n\t\t\t\t\tlisteners.get(i).itemFlicked(this, targetSpatial, newX,\r\n\t\t\t\t\t\t\tnewY, oldX, oldY);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void move() {\n spriteBase.move();\n\n Double newX = spriteBase.getXCoordinate() + spriteBase.getDxCoordinate();\n Double newY = spriteBase.getYCoordinate() + spriteBase.getDyCoordinate();\n\n if (!newX.equals(spriteBase.getXCoordinate())\n || !newY.equals(spriteBase.getYCoordinate())) {\n Logger.log(String.format(\"Monster moved from (%f, %f) to (%f, %f)\",\n spriteBase.getXCoordinate(), spriteBase.getYCoordinate(), newX, newY));\n }\n }",
"@Override\n public void moveToWaypoint(Vector3f location, float secTime) {\n motionPath.clearWayPoints();\n motionPath.addWayPoint(new Vector3f((int)Math.round(getWorldTranslation().x),Main.BLOCKHEIGHT,(int)Math.round(getWorldTranslation().z)));\n motionPath.addWayPoint(location);\n motionPath.addListener(this);\n if(motionEvent != null && motionEvent.isEnabled())\n motionEvent.stop();\n motionEvent = new MotionEvent(this,motionPath, secTime);\n motionEvent.setDirectionType(MotionEvent.Direction.Path);\n motionEvent.play();\n Quaternion quat = motionEvent.getRotation();\n }",
"@Override\n\tpublic void update(double dt) {\n\t\tcurrentSurvivalTime += dt;\n\t\texplosionCurrentSize = currentSurvivalTime * explosionFinalSize / survivalTime;\n\t\tif (explosionCurrentSize > explosionFinalSize) {\n\t\t\trules.deleteObject(this);\n\t\t}\n\t}",
"@Override\n public State update() {\n if(mRuntime.seconds()<=time) {\n arm.setPosition(pos);\n return this;\n }\n //(1000);\n\n return NextState;\n\n\n\n\n\n }",
"public synchronized void scheduleTick(long deltat){\n\t\tscheduler.schedule(tickTask, deltat, TimeUnit.MILLISECONDS);\n\t}",
"@Override\r\n\tpublic void move()\r\n\t{\r\n\t\t//Updates the X and Y position by using dx and dy\r\n float x = location.getX() + dx;\r\n float y = location.getY() + dy;\r\n \r\n //Updates the particle emitter's position to the missiles current position\r\n emitter.setPosition(this.getPositionX(), this.getPositionY(),false);\r\n \r\n //Updates the location of the missile\n setLocation(x, y);\n\t}",
"net.opengis.gml.x32.TimePositionType addNewEndPosition();",
"public void moveEntity(Entity entity, Direction direction, float delta) {\r\n float newX = entity.getX();\r\n float newY = entity.getY();\r\n\r\n float velocity = entity.getVelocity();\r\n float distanceCovered = velocity * delta;\r\n\r\n switch (direction) {\r\n case NORTH:\r\n newY = newY + distanceCovered;\r\n if(isColliding(newX, newY))\r\n return;\r\n\r\n if(entity instanceof Player)\r\n gameCamera.moveCameraVertically(newY);\r\n break;\r\n case EAST:\r\n newX = newX + distanceCovered;\r\n if(isColliding(newX, newY))\r\n return;\r\n\r\n if(entity instanceof Player)\r\n gameCamera.moveCameraHorizontally(newX);\r\n break;\r\n case WEST:\r\n newX = newX - distanceCovered;\r\n if(isColliding(newX, newY))\r\n return;\r\n\r\n if(entity instanceof Player)\r\n gameCamera.moveCameraHorizontally(newX);\r\n break;\r\n case SOUTH:\r\n newY = newY - distanceCovered;\r\n if(isColliding(newX, newY))\r\n return;\r\n\r\n if(entity instanceof Player)\r\n gameCamera.moveCameraVertically(newY);\r\n break;\r\n }\r\n\r\n //TODO: Increase performance (e.g. only check for items when actually changing layer position)\r\n Position tilePosition = Utils.toTilePosition(newX + 20, newY + 20);\r\n Optional<Map.Entry<Position, Item>> optMapItem = getMapItem(tilePosition.x, tilePosition.y);\r\n if(optMapItem.isPresent()) {\r\n Map.Entry<Position, Item> itemEntry = optMapItem.get();\r\n entity.getItems().add(itemEntry.getValue());\r\n gameItems.remove(itemEntry.getKey());\r\n }\r\n\r\n entity.setMoving(true);\r\n entity.setX(newX);\r\n entity.setY(newY);\r\n }",
"public void updateLastMoveTime(long nowTime) {\r\n\t\tthis.lastMoveTime = nowTime;\r\n\t}",
"public void moveDelay ( )\r\n\t{\r\n\t\ttry {\r\n\t\t\tThread.sleep( 1000 );\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void redoMove(){\n circleObj.setX(newX);\n circleObj.setY(newY);\n }",
"void move(IntVector delta);",
"public void update(float dt){\n\t\tresultSprite.update(dt);\n\t\tnewRound.update(dt);\n\t\tbackMenu.update(dt);\n\t}",
"public void move(double time) throws IllegalArgumentException {\n\t\tif (time < -0.000001)\n\t\t\tthrow new IllegalArgumentException(\"Argument time must be positive\");\n\t\tif (time < 0.000001 && time > -0.000001)\n\t\t\treturn;\n\t\telse {\n\t\t\tsetXCoordinate(this.getXCoordinate() + time * this.getXVelocity());\n\t\t\tsetYCoordinate(this.getYCoordinate() + time * this.getYVelocity());\n\t\t}\n\t}",
"public void moveChild( ChildType child, int index );",
"public void movePoint(int slots) {\n if (0 >= this.pointInventory + slots) {\n this.pointInventory = 0;\n }\n else this.pointInventory = Math.min(this.lenInventory - 1, this.pointInventory + slots);\n }",
"@Override\r\n public void postMove(double localTime) {\n for (Integer key : mEntityMap.keySet()) {\r\n Entity value = mEntityMap.get(key);\r\n if (value instanceof Character) {\r\n float bias = (key == mLocalCharId) ? 1.0f : 0.5f;\r\n Character c = (Character)value;\r\n c.sample(localTime + mClockCorrection - Config.SAMPLE_DELAY, bias);\r\n }\r\n }\r\n\r\n // update controller with local position\r\n if (mEntityMap.containsKey(mLocalCharId)) {\r\n Character localChar = (Character)mEntityMap.get(mLocalCharId);\r\n localChar.postMove();\r\n }\r\n }",
"private void move() {\n\t\t\tx += Math.PI/12;\n\t\t\thead.locY = intensity * Math.cos(x) + centerY;\n\t\t\thead.yaw = spinYaw(head.yaw, 3f);\n\t\t\t\t\t\n\t\t\tPacketHandler.teleportFakeEntity(player, head.getId(), \n\t\t\t\tnew Location(player.getWorld(), head.locX, head.locY, head.locZ, head.yaw, 0));\n\t\t}",
"@Override\n\tpublic void move(int xPos, int yPos) {\n\t}",
"net.opengis.gml.x32.TimePositionType addNewBeginPosition();",
"public void movePlayerPiece(int newRow, int newCol) {\n int currentPlayerNumber = GameService.getInstance().getCurrentPlayerNum();\n playerPieces[currentPlayerNumber].addPreviousPlayerPosition(playerPiecePositions[currentPlayerNumber]);\n playerPiecePositions[currentPlayerNumber] = new Position(newRow, newCol);\n }",
"public abstract void advance(double deltaTime);",
"public void move(int dx, int dy) {\n this.x = this.x + dx;\n this.y = this.y + dy;\n }",
"public static void new_position( Body body, double t ){\r\n body.lastState.copyStateVectors( body.currentState );\r\n body.currentState.x = body.currentState.x + body.currentState.vx * t; // new x\r\n body.currentState.y = body.currentState.y + body.currentState.vy * t; // new y\r\n body.currentState.z = body.currentState.z + body.currentState.vz * t; // new z\r\n }",
"void move( float deltaTime, Body body );",
"public void move() {\n if(Objects.nonNull(this.position)) {\n Position position = this.getPosition();\n Function<Position, Position> move = moveRobotInDirectionMap.get(position.getDirection());\n this.position = move.apply(position);\n }\n }",
"public void movePiece(Coordinate from, Coordinate to);",
"public void move() {\n\t\tthis.hero.setPF(1);\n\t\tthis.hero.setState(this.hero.getMoved());\n\t}",
"@Override\n\tpublic void update() {\n\t\tmove();\n\t\tplace();\n\t}",
"void setLastTickPos(Vec3 pos);",
"public void update(float dt) {\n\t\tfor (Road road : this.roads) {\r\n\t\t\t//run the road update\r\n\t\t\troad.update(dt); //spawns in a car if it should\r\n\t\t}\r\n\t}",
"public void applyMovement(Vector3d deltaMov) {\r\n currentPosition.add(deltaMov);\r\n moveTo(currentPosition);\r\n }",
"@Model\n\tprotected double advanceTimeInvincible(double dt){\n\t\treturn Math.max(0, getTimeInvincible() - dt);\n\t}",
"@Override\n public void timePassed() {\n moveOneStep();\n }",
"protected void move()\n {\n // Find a location to move to.\n Debug.print(\"Fish \" + toString() + \" attempting to move. \");\n Location nextLoc = nextLocation();\n\n // If the next location is different, move there.\n if ( ! nextLoc.equals(location()) )\n {\n // Move to new location.\n Location oldLoc = location();\n changeLocation(nextLoc);\n\n // Update direction in case fish had to turn to move.\n Direction newDir = environment().getDirection(oldLoc, nextLoc);\n changeDirection(newDir);\n Debug.println(\" Moves to \" + location() + direction());\n }\n else\n Debug.println(\" Does not move.\");\n }",
"public void setMovementDate (Timestamp MovementDate);",
"public void move(Vector start,Vector dist);",
"public void move()\n {\n daysSurvived+=1;\n\n energy -= energyLostPerDay;\n\n Random generator = new Random();\n\n //losowo okreslony ruch na podstawie genomu\n int turnIndex = generator.nextInt((int)Math.ceil(Genome.numberOfGenes));\n int turn = genome.getGenome().get(turnIndex);\n\n //wywolujemy metode obrotu - dodaje odpowiednio liczbe do aktualnego kierunku\n direction.turn(turn);\n\n //zmieniamy pozycje zwierzaka przez dodanie odpowiedniego wektora\n position = position.add(direction.move());\n //walidacja pozycji tak, by wychodzac za mape byc na mapie z drugiej strony\n position.validatePosition(map.getWidth(),map.getHeight());\n\n moveOnSimulation();\n\n //jesli po ruchu zwierzaczek nie ma juz energii na kolejny ruch\n if(energy < energyLostPerDay )\n {\n this.animalHungry = true;\n }\n }",
"@Override\n\tpublic void move(){\n\t\tSector tail = null;\n\t\tif(hit){\n\t\t\ttail = getNext();\n\t\t\tif(tail == null){\t\n\t\t\t\tselfDestruct();\n\t\t\t} else {\t\t\n\t\t\t\tsector.setInhabitant(null);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tsectors.add(sector);\n\t\tSector nextSector = quadrant.getNext(sector, velocity[0]);\t\n\t\tif(nextSector == null){\n\t\t\thit = true;\n\t\t} else {\n\t\t\tSpaceObject object = nextSector.getInhabitant();\n\t\t\tif(object != null) {\n\t\t\t\tobject.bump(this);\n\t\t\t} else {\n\t\t\t\tsetSector(nextSector); \n\t\t\t}\n\t\t} \n\t}",
"public void move()\n\t{\n\t\tx = x + dx;\n\t}",
"@Override\n public void move(double xa, double ya) {\n if (alive) {\n y += ya;\n x += xa;\n }\n }",
"public void move(double dx, double dy)\n\t{\n\t\txPosition += dx;\n\t\tyPosition += dy;\n\t}",
"public void Obstaclemove() {\n for (int i = 0; i < getNumberObstacles(); i++) {\n if (ObstacleDeplace.class.isInstance(getObstacle()[i])) {\n getObstacle()[i].setX(getObstacle()[i].getX() - getObstacle()[i].getSpeed());\n\n if (getObstacle()[i].getX() < -200) {\n getObstacle()[i].setX(600);\n getObstacle()[i].setSpeed(randomGenerator.nextFloat());\n }\n }\n setChanged();\n notifyObstacle(i, getObstacle()[i].getX(), getObstacle()[i].getY());\n }\n }",
"public void moveTowards(GridPoint pt, int amount) {\n\t\tNdPoint myPoint = space.getLocation(this);\n\t\tNdPoint otherPoint = new NdPoint(pt.getX(), pt.getY());\n\t\tdouble angle = SpatialMath.calcAngleFor2DMovement(space, myPoint,\n\t\t\t\totherPoint);\n\t\tspace.moveByVector(this, amount, angle, 0);\n\t\tmyPoint = space.getLocation(this);\n\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\n\t}",
"public void move() {\n\t\tGrid<Actor> gr = getGrid();\n\t\tif (gr == null) {\n\t\t\treturn;\n\t\t}\n\t\tLocation loc = getLocation();\n\t\tLocation next = loc.getAdjacentLocation(getDirection());\n\t\t\n\t\tLocation next2 = next.getAdjacentLocation(getDirection());\n\t\tif (gr.isValid(next2)) {\n\t\t\tmoveTo(next2);\n\t\t} else {\n\t\t\tremoveSelfFromGrid();\n\t\t}\n\t}",
"public void setMovedate(Date movedate) {\n this.movedate = movedate;\n }",
"public void move(int distance);",
"public void move(float tpf) {\r\n if (!atTarget) {\r\n if (direction < 0 && position <= target) {\r\n atTarget = true;\r\n position = target;\r\n return;\r\n }\r\n if (direction > 0 && position >= target) {\r\n atTarget = true;\r\n position = target;\r\n return;\r\n }\r\n if (direction < 0) {\r\n position -= tpf * speed;\r\n } else {\r\n position += tpf * speed;\r\n }\r\n }\r\n }",
"void moveNode( int from, int to );",
"@Override protected void processEntity(Time time, Entity entity) {\n }",
"public void update(Entity e1, double heartBeat, double dt) {\n\t\t\r\n\t}",
"public void moveInside(Field.RadioData rd, Location newLoc)\r\n {\r\n rd = move(rd, newLoc);\r\n if(Main.ASSERT) Util.assertion(rd==null);\r\n }",
"@Override\n public void tick() {\n setPosition(getPosition().add(getSpeed())); \n }",
"public void moveTo(double newX, double newY, double newZ){\n pos[0] = newX;\n pos[1] = newY;\n pos[2] = newZ;\n }",
"public void creatureMoved(long creatureId, float diffX, float diffY, float diffZ, int diffTileX, int diffTileY) throws NoSuchCreatureException, NoSuchPlayerException {\n/* 2725 */ creatureMoved(creatureId, diffX, diffY, diffZ, diffTileX, diffTileY, false);\n/* */ }",
"@Override\n public void update(double dt) {\n myLifetime -= dt;\n \n if (myLifetime <= 0) {\n destroy();\n }\n else {\n double d = SPEED * dt;\n double angle = Math.toRadians(getRotation());\n translate(d * Math.cos(angle), d * Math.sin(angle));\n \n // add momentum term\n translate(dt * myMomentum[0], dt * myMomentum[1]);\n }\n }",
"private void moveCloud(long elapsedNanos) {\n\t\tif (x > xLength + offset) {\n\t\t\tx = -cloud.getWidth();\n\t\t\ty = (int) (Math.random() * (yHeight / 4)) + 50;\n\t\t\toffset = (int) (Math.random() * 200);\n\t\t}\n\t\telse x += rate * ((double) elapsedNanos / 1000000000.0);\n\t}",
"public void step (double dt){ \r\n setValues();\r\n //Do Step \r\n int steps=(int)dt;\r\n for (int i=0;i<steps;i++)\r\n eval(commandUpdate); \r\n getValues(); \r\n }",
"public void update(float delta) {\n\t\tposition.add(1*60*delta, 1*60*delta);\r\n\t\tposition.x += 10;\r\n\t\tif(position.x >= 400) {\r\n\t\t\talive = false;\r\n\t\t}\r\n\t}",
"public void tick(double dt) {\n }",
"private void move() {\n resetUpdate();\n\n gameMessage.setSpace1(clientMessage.getSpace1());\n gameMessage.resetGameMessage();\n gameMessage.notify(gameMessage);\n\n\n if( liteGame.isWinner() ) endOfTheGame = true;\n }",
"public void moveEntity(Entity entity) {\n\t\tIMoveBehaviour b = entity.getBehaviour();\n\t\tb.preMove();\n\t\t\n\t\tCollisionMask mask = entity.getBoundingArea();\n\t\tif (hitsWall(entity, mask)) {\n\t\t\tentity.hitWall();\n\t\t}\n\n\t\tmask.move(b.getSpeedVector());\n\n\t\tif (!entity.canMoveThroughWall()) {\n\t\t\tmoveWithinScreen(mask);\n\t\t}\n\t}"
]
| [
"0.6066657",
"0.6033002",
"0.6030564",
"0.5999055",
"0.59649575",
"0.59596914",
"0.5758265",
"0.56555337",
"0.5562699",
"0.5493759",
"0.5477262",
"0.545713",
"0.5422817",
"0.5402715",
"0.5371666",
"0.5368065",
"0.5361104",
"0.5323922",
"0.53173345",
"0.5309342",
"0.5300989",
"0.52473706",
"0.52329636",
"0.5229986",
"0.5204297",
"0.51979184",
"0.51896554",
"0.5189372",
"0.51808155",
"0.51563513",
"0.51550484",
"0.5147247",
"0.51380664",
"0.5132565",
"0.51138693",
"0.5110595",
"0.5103604",
"0.5100302",
"0.50904083",
"0.5088622",
"0.5060981",
"0.50549936",
"0.5045426",
"0.50371194",
"0.5026917",
"0.5025693",
"0.5022861",
"0.50198245",
"0.5016819",
"0.5014398",
"0.5011312",
"0.5004584",
"0.49871966",
"0.49869847",
"0.4986306",
"0.49846715",
"0.49839061",
"0.4982933",
"0.49823138",
"0.49822816",
"0.49706727",
"0.49608213",
"0.4959106",
"0.49551788",
"0.49445975",
"0.49441674",
"0.49346006",
"0.49324554",
"0.49323046",
"0.49318933",
"0.49286884",
"0.49116632",
"0.4909024",
"0.49088255",
"0.49084255",
"0.49070054",
"0.48982933",
"0.48977706",
"0.48972762",
"0.4895847",
"0.48955667",
"0.48952112",
"0.48902538",
"0.48846978",
"0.48841128",
"0.4880588",
"0.4876374",
"0.48738182",
"0.48726094",
"0.48644724",
"0.48633137",
"0.48624203",
"0.48594502",
"0.48554355",
"0.48530072",
"0.48527053",
"0.48462301",
"0.48438767",
"0.4837967",
"0.483674"
]
| 0.647944 | 0 |
Set the position of an entity to the given values. | protected void setPosition(double xPosition, double yPosition) throws IllegalArgumentException {
if ( (!isValidPosition(xPosition)) || (!isValidPosition(yPosition))) throw new IllegalArgumentException("Invalid position");
else {
this.position[0] = xPosition;
this.position[1] = yPosition;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void PositionSet(int position);",
"void setPosition(Position position);",
"void setPosition(Position position);",
"public void setPosition(Position pos);",
"public void setPosition(int position);",
"public void set(int pos);",
"void setPosition(double xPos, double yPos);",
"public void setPos(int pos);",
"public void setPos(int pos);",
"void setPosition(Position p);",
"public void setPosition(Integer position);",
"public abstract void setPosition(Position position);",
"void setPos(float x, float y);",
"public void setPosition(float x, float y);",
"public void setPosition(Position p);",
"public void setPosition(Point newPosition);",
"public void setPosition(Point position);",
"void setPos(Vec3 pos);",
"public void setPosition(Position pos) {\n \tthis.position = pos;\n \t//setGrade();\n }",
"void setPosition(Point point);",
"public void setPosition(Position pos) {\n position = new Position(pos);\n }",
"<E extends CtElement> E setPositions(SourcePosition position);",
"@Override\n public void setPosition(float x, float y) {\n }",
"@External\r\n\t@ClientFunc\r\n\tpublic MetaVar SetPos(MetaVarVector positionVar);",
"public void setPosition(Vector2 position);",
"public void setCoordinates(double[] pos) {\n \tthis.currentX = pos[0];\n \tthis.currentY = pos[1];\n }",
"private void set_position(int pos[])\r\n\t{\r\n\t\tthis.position = pos;\r\n\t}",
"void setPosition(Vector3f position);",
"public void setPosition(int posX, int posY) {\n\t}",
"void setPosition(Unit unit, MapLocation position);",
"public void setPosition(int position) {\r\r\r\r\r\r\n this.position = position;\r\r\r\r\r\r\n }",
"public void sett(int pos, T x);",
"public void setFromCoordinates(int fromX, int fromY);",
"@Override\n\tpublic void setPos(int x, int y) {\n\t\txPos = x;\n\t\tyPos = y;\n\t}",
"public void setPosition(java.util.List position)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(POSITION$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(POSITION$0);\n }\n target.setListValue(position);\n }\n }",
"@Override public void setPosition(double nx, double ny) {\n super.setPosition(nx, ny);\n ppx = px = nx;\n ppy = py = ny;\n }",
"void setPosition (double x, double y, double z);",
"public void setPosition(int position)\r\n {\r\n this.position = position;\r\n }",
"public void setPosition(int index, float value) {\r\n\t\tswitch(index)\r\n\t\t{\r\n\t\t\tcase 0:\tthis.position.setX(value); break;\r\n\t\t\tcase 1: this.position.setY(value); break;\r\n\t\t\tcase 2: this.position.setZ(value); break;\r\n\t\t\tdefault: break;\r\n\t\t}\r\n\t}",
"void set(int[] pos, Tuple tuple) {\n verifyModifiable();\n\n if (pos.length != tuple.size())\n throw new RuntimeException(\"given tuple not same size as position array, tuple: \" + tuple.print());\n\n int count = 0;\n for (int i : pos)\n elements.set(i, tuple.elements.get(count++));\n }",
"public void setCoordinates(int pos){\n if(this.pIndex<2){\n this.coordinates[0]=TILE_SIZE*15-DICE_SIZE-pos;}\n else{\n this.coordinates[0]=pos;}\n if(this.pIndex%3==0){\n this.coordinates[1]=pos;}\n else{\n this.coordinates[1]=TILE_SIZE*15-DICE_SIZE-pos;}\n }",
"@Override\n\tpublic void setPosition(Vector3 pos) {\n\t\t\n\t}",
"public void setPosition(double x, double y) {\r\n this.x = x;\r\n this.y = y;\r\n }",
"public void setPosition(double x, double y){\r\n this.x = (float)x;\r\n this.y = (float)y;\r\n changed();\r\n }",
"protected void setPosition(Position p) {\n\t\tposition = p;\n\t}",
"@Override\n public Position setPosition(double x, double y) {\n this.x = x;\n this.y = y;\n\n return new Position(x, y);\n }",
"@Override\n public void setValueAt(java.lang.Object arg0, int arg1, int arg2) {\n\n }",
"@Override\n public void setValueAt(java.lang.Object arg0, int arg1, int arg2) {\n\n }",
"public void setPosition(Vector2 pos) {\n\t\tsetX(pos.x);\n\t\tsetY(pos.y);\n\t}",
"public void setPosition(int position)\n {\n put(\"Position\", position);\n }",
"public void setPositionIds(Iterable<? extends ObjectIdentifiable> positionIds) {\n if (positionIds == null) {\n _positionIds = null;\n } else {\n _positionIds = new ArrayList<ObjectIdentifier>();\n for (ObjectIdentifiable positionId : positionIds) {\n _positionIds.add(positionId.getObjectId());\n }\n }\n }",
"public void setPosition(com.hps.july.persistence.Position arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().setPosition(arg0);\n }",
"public void setPosition(double x, double y)\n {\n mPosition = new Point2D.Double(x, y);\n }",
"void setPosition(Tile t);",
"public void setPos(double[] coords) {\r\n\t\tthis.pos.setCoord(coords);\r\n\t\tthis.setD(norm.dot(this.pos.toVec()));\r\n\t}",
"public void setToCoordinates(int toX, int toY);",
"public void setX(int x){ xPosition = x; }",
"public void setPosition(final Vector2f position);",
"public void setPosition(int position) {\r\n this.position = position;\r\n }",
"T set(Position<T> p, T data) throws IllegalStateException;",
"@Generated\n @Selector(\"setPosition:\")\n public native void setPosition(@ByValue CGPoint value);",
"@Override\n public void setPosition(int position) {\n this.position = position;\n }",
"public void setPosition(BlockVector position)\n {\n this.position = position;\n }",
"protected abstract void setValue(Entity e,FloatTrait t,float value);",
"public void setPosition(Position<Edge<E>> p) { pos = p; }",
"public void setPosition(int x, int y) {\n this.x = x;\n this.y = y;\n }",
"@Override\n\tpublic void setValueAt(Object arg0, int arg1, int arg2) {\n\t\t\n\t}",
"@Override\n\tpublic void setValueAt(Object arg0, int arg1, int arg2) {\n\t\t\n\t}",
"@PropertySetter(role = POSITION)\n\t<E extends CtElement> E setPosition(SourcePosition position);",
"public void setPos(int index, int value) {\r\n this.pos[index] = value;\r\n }",
"public void setLocation(float x, float y);",
"public void setPosition(double x, double y) {\n this.x = x;\n this.y = y;\n }",
"public abstract void setPosition(Point2D position);",
"public void setPos(PVector pos) {\n\t\tlog.finest(\"Updating position to \" + pos);\n\t\tthis.pos = pos;\n\t}",
"void setPosition (DVector3C xyz);",
"public void setPosition(float x, float y) {\n this.x = x;\n this.y = y;\n }",
"public void setPosition(Point pos) {\n this.topLeft = pos.asVector();\n }",
"public void setPosition(Point2D position)\n {\n mPosition = position;\n }",
"void setLocation(int x, int y);",
"public void SetPosition(float x, float y) {\n mX = x;\n mY = y;\n for (int i = 0; i < mCardCount; i++) {\n SetCardPosition(i);\n }\n }",
"void setPosiblesValores(int[] valores);",
"public void setEntity(String parName, Object parVal) throws HibException;",
"public void setPosition(Integer position) {\n this.position = position;\n }",
"public void setObjectAtLocation(Point p, Object o);",
"public void setPosition(Coordinate position) {\n cPosition = position;\n }",
"public void setOnTheMapXY(IEntity entity, int x, int y) {\r\n\t\tthis.map[x][y] = entity;\r\n\t}",
"public void setPosition(int x, int y) {\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}",
"@Override\n\tpublic void setPosition(Interface inter, Point position) {\n\t\tthis.position=new Point(position);\n\t}",
"@Override\n public void setValue(Value[] values) throws ValueFormatException,\n VersionException, LockException, ConstraintViolationException,\n RepositoryException {\n \n }",
"public void setPosition(int position) {\r\n\t\tthis.position = position;\r\n\t}",
"public void setValue(Entity value) {\r\n\t\t\tthis.value = value;\r\n\t\t}",
"public void setPosition(int xpos, int ypos) {\r\n this.xpos = xpos;\r\n this.ypos = ypos;\r\n bounds.x = xpos;\r\n bounds.y = ypos;\r\n }",
"private void setPosition(float x, float y) {\n this.x = x;\r\n this.y = y;\r\n group();\r\n }",
"public void setPosition(int x, int y) {\r\n\t\tmyX = x;\r\n\t\tmyY = y;\r\n\t}",
"public void set(long index);",
"public void setPosition(Position position) {\n this.position = position;\n }",
"public void setPosition(Position position) {\n this.position = position;\n }",
"public void setPosition(Position position) {\n this.position = position;\n }",
"@Override\n\tpublic void setPosition(Position p) {\n\t\tthis.position = p;\n\n\t}",
"private MsoSmartArtNodePosition(int value) { this.value = value; }"
]
| [
"0.7196182",
"0.7120364",
"0.7120364",
"0.7119488",
"0.70872605",
"0.7087137",
"0.7078168",
"0.7008537",
"0.7008537",
"0.6988143",
"0.6979048",
"0.6964363",
"0.69625795",
"0.689086",
"0.6825003",
"0.6780963",
"0.67142075",
"0.66134816",
"0.6596279",
"0.6595326",
"0.65688795",
"0.65501213",
"0.6529613",
"0.6506809",
"0.649465",
"0.64928144",
"0.6440838",
"0.63973135",
"0.63793385",
"0.6334782",
"0.6316089",
"0.62913007",
"0.6274322",
"0.627345",
"0.62648094",
"0.62564653",
"0.6249289",
"0.6225714",
"0.6216212",
"0.6195741",
"0.61920726",
"0.6175048",
"0.61555487",
"0.6140803",
"0.6126671",
"0.61260897",
"0.6109587",
"0.6109587",
"0.608478",
"0.6081494",
"0.60810494",
"0.6080623",
"0.6076907",
"0.60764295",
"0.60675216",
"0.6063315",
"0.6057663",
"0.6050456",
"0.6048584",
"0.6046683",
"0.60438627",
"0.60407513",
"0.6040739",
"0.602849",
"0.6024988",
"0.6020088",
"0.6019849",
"0.6019849",
"0.60167044",
"0.6009288",
"0.60044706",
"0.6002804",
"0.6000945",
"0.59907055",
"0.59731495",
"0.5966598",
"0.5965606",
"0.5959936",
"0.59375006",
"0.59300804",
"0.5927681",
"0.5924894",
"0.5915408",
"0.5904851",
"0.5897474",
"0.5894862",
"0.5890102",
"0.5888199",
"0.58743244",
"0.5865338",
"0.5864272",
"0.5860263",
"0.58529305",
"0.58461094",
"0.58417034",
"0.58390284",
"0.58390284",
"0.58390284",
"0.582394",
"0.5818945"
]
| 0.606217 | 56 |
Check whether the given position is a valid position for a entity. | @Model
private boolean isValidPosition(double position){
if (this.superWorld == null) return (!Double.isNaN(position));
else return Helper.isValidDouble(position);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean isValidPosition(Point pos){\r\n return (0 <= pos.getFirst() && pos.getFirst() < 8 && \r\n 0 <= pos.getSecond() && pos.getSecond() < 8);\r\n }",
"public boolean isValidPosition(Position pos){\n\t\t// check whether the specified position is a valid position for the board\n\t\t// return true for valid positions and false for invalid ones\n\t\t// O(1)\n\t\tif((pos.getRow() >= 0 && pos.getRow() <= numRows) && (pos.getCol() >= 0 && pos.getCol() <= numCols)) { //If the row and columns are within the bounds then it returns true\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Test\n public void testIsPositionValid() {\n assertFalse(this.board.isPositionValid(new Position(-1, -1)));\n assertFalse(this.board.isPositionValid(new Position(11, 11)));\n for (int line = 0; line < 11; line++) {\n for (int column = 0; column < 11; column++) {\n assertTrue(this.board.isPositionValid(new Position(line, column)));\n }\n }\n }",
"public boolean isPositionValid(String position) {\n boolean isActive = false;\n PositionVVOImpl positionVO =\n (PositionVVOImpl)findValidationViewObject(\"PositionVVO1\");\n positionVO.initQuery(position);\n\n // Just do a simple existence check. If you don't find a\n // match, return false.\n if (positionVO.hasNext()) {\n isActive = true;\n }\n return isActive;\n }",
"private boolean checkPosition(int position) {\r\n\t\treturn position>size||position < 0;\r\n\t}",
"private boolean validate(int position) {\n return ((position >= 0) && (position < this.values.length));\n }",
"public PNode<E> checkPos(Position<E> arg) throws InvalidPositionException {\n if (!(arg instanceof PNode)){\n throw new InvalidPositionException(\"Wrong type! Given \"+arg );\n }\n PNode<E> node = (PNode<E>)arg; // safe cast\n \n return node;\n }",
"public boolean isPositionValid(){\n\t\t//check overlapping with walls\n\t\tfor(Wall wall : Game.gameField.getWalls()){\n\t\t\tif(wall.overlaps(center))\n\t\t\t\treturn false;\n\t\t}\n\t\t//check overlapping with other balls\n\t\tfor(Ball ball : Game.gameField.getBalls()){\n\t\t\tif(ball == this)\n\t\t\t\tcontinue;\n\t\t\tif(ball.getCenterPoint().distance(center) < RADIUS * 2)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn GameField.FIELD.contains(center);\n\t}",
"public boolean isValid(World world, BlockPos pos, IBlockState state) {\n return true;\n }",
"boolean hasPosition();",
"boolean hasPosition();",
"boolean hasPosition();",
"boolean hasPosition();",
"public boolean isPositionValid(int row, int col, int value){\n return !isInRow(row, value) && !isInCol(col, value) && !isInBox(row, col, value);\n }",
"protected void validatePosition(long position, long size) throws IOException {\n if (position < 0) {\n throw new EOFException(\n String.format(\n \"Invalid seek offset: position value (%d) must be >= 0 for '%s'\",\n position, resourceId));\n }\n\n if (size >= 0 && position >= size) {\n throw new EOFException(\n String.format(\n \"Invalid seek offset: position value (%d) must be between 0 and %d for '%s'\",\n position, size, resourceId));\n }\n }",
"public boolean hasTent(Position pos){\n\t\t// check whether there is a tent at position pos\n\t\t// return true if yes and false otherwise\n\t\t// return false for invalid positions\n\t\t// assuming HashMap overhead constant, O(1)\n\t\t\n\t\tif(isValidPosition(pos)) { //If the position is valid\n\t\t\t\n\t\t\tif(grid.get(pos).equals(tentSymbol)) { //If the symbol gotten from the position is a tent\n\t\t\t\treturn true;\n\t\t\t}else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\n\t}",
"private boolean isLegalPositon(Position checkPosition){\n if (checkPosition.equalPosition(start)||checkPosition.equalPosition(end))\n return true;\n if(checkPosition.getRow()<0 || checkPosition.getCol()<0 || checkPosition.getRow()>=this.rows || checkPosition.getCol() >= this.cols){\n return false;\n }\n\n if(maze[checkPosition.getRow()][checkPosition.getCol()]== WallType.wall){\n return false;\n }\n return true;\n }",
"boolean isInternal(Position<E> p) throws IllegalArgumentException;",
"@java.lang.Override\n public boolean hasPosition() {\n return position_ != null;\n }",
"@java.lang.Override\n public boolean hasPosition() {\n return position_ != null;\n }",
"@Test(expected = IllegalArgumentException.class)\r\n public void case1_Position() {\r\n Position testPosition = new Position(-1, -2);\r\n\r\n }",
"public boolean validPosition(Player p, double x, double y) {\n\n\t\tTile tile = getTile(p, x + p.BOUNDING_BOX_X, y);\n\t\tif (tile == null || !tile.canEnter(p)) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttile = getTile(p, x, y + p.BOUNDING_BOX_Y);\n\t\tif (tile == null || !tile.canEnter(p)) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttile = getTile(p, x - p.BOUNDING_BOX_X, y);\n\t\tif (tile == null || !tile.canEnter(p)) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttile = getTile(p, x, y - p.BOUNDING_BOX_Y);\n\t\tif (tile == null || !tile.canEnter(p)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"private boolean isValidMove(int position) {\n\t\tif( !(position >= 0) || !(position <= 8) ) return false;\n\n\t\treturn gameBoard[position] == 0;\n\t}",
"@Test(expected = IllegalArgumentException.class)\r\n public void case2_Position() {\r\n Position testPosition = new Position(6, 7);\r\n\r\n }",
"private boolean isValidPosition(RotorPosition positionToValidate) {\n return !((positionToValidate == RotorPosition.GREEK && numberOfRotors != 4)\n || positionToValidate == RotorPosition.REFLECTOR);\n }",
"public boolean hasPosition() {\n return positionBuilder_ != null || position_ != null;\n }",
"public boolean hasPosition() {\n return positionBuilder_ != null || position_ != null;\n }",
"@SuppressWarnings(\"ConstantConditions\")\n private boolean isStuck(Position pos, Position posNow) {\n if (pos.isSimilar(posNow)) {\n return true;\n }\n\n Instance instance = getInstance();\n Chunk chunk = null;\n Collection<Entity> entities = null;\n\n /*\n What we're about to do is to discretely jump from the previous position to the new one.\n For each point we will be checking blocks and entities we're in.\n */\n double part = .25D; // half of the bounding box\n Vector dir = posNow.toVector().subtract(pos.toVector());\n int parts = (int) Math.ceil(dir.length() / part);\n Position direction = dir.normalize().multiply(part).toPosition();\n for (int i = 0; i < parts; ++i) {\n // If we're at last part, we can't just add another direction-vector, because we can exceed end point.\n if (i == parts - 1) {\n pos.setX(posNow.getX());\n pos.setY(posNow.getY());\n pos.setZ(posNow.getZ());\n } else {\n pos.add(direction);\n }\n BlockPosition bpos = pos.toBlockPosition();\n Block block = instance.getBlock(bpos.getX(), bpos.getY() - 1, bpos.getZ());\n if (!block.isAir() && !block.isLiquid()) {\n teleport(pos);\n return true;\n }\n\n Chunk currentChunk = instance.getChunkAt(pos);\n if (currentChunk != chunk) {\n chunk = currentChunk;\n entities = instance.getChunkEntities(chunk)\n .stream()\n .filter(entity -> entity instanceof LivingEntity)\n .collect(Collectors.toSet());\n }\n /*\n We won't check collisions with entities for first ticks of arrow's life, because it spawns in the\n shooter and will immediately damage him.\n */\n if (getAliveTicks() < 3) {\n continue;\n }\n Optional<Entity> victimOptional = entities.stream()\n .filter(entity -> entity.getBoundingBox().intersect(pos.getX(), pos.getY(), pos.getZ()))\n .findAny();\n if (victimOptional.isPresent()) {\n LivingEntity victim = (LivingEntity) victimOptional.get();\n victim.setArrowCount(victim.getArrowCount() + 1);\n callEvent(EntityAttackEvent.class, new EntityAttackEvent(this, victim));\n remove();\n return super.onGround;\n }\n }\n return false;\n }",
"private boolean positionExists(int row, int column) {\n\t\treturn row >= 0 && row < rows && column >= 0 && column < columns;\n\t}",
"@Test\n public void shouldBeAbleToCreatePiecePosition() {\n Assert.assertNotNull(position);\n }",
"public boolean canMoveTo(Position position){\n return !isOccupied(position);\n }",
"public boolean canMoveTo(Position position){\n if(position.x > mapSize.x || position.x < 0 || position.y > mapSize.y || position.y < 0){\n return false;\n }\n return !isOccupied(position);\n }",
"public boolean isPosValid(int x, int y, int tokNum, int rotNum) {\n int [] xArray = xRotations[tokNum][rotNum];\n int [] yArray = yRotations[tokNum][rotNum];\n \n for (int i = 0; i < 4; i++) {\n \n //Positions to check \n int xIndex = x+xArray[i];\n int yIndex = y+yArray[i];\n \n //Check range\n if (xIndex < 0) return false;\n if (xIndex >= 10) return false;\n if (yIndex < 0) return false;\n if (yIndex >= 20) return false;\n \n //Check to see if space is occupied\n if (gameBoard[xIndex][yIndex] == 1) return false;\n }\n\n return true;\n }",
"@Override\n public boolean isValidEntity(Entity entity, IGame game,\n boolean useValidNonInfantryCheck) {\n return (super.isValidEntity(entity, game, useValidNonInfantryCheck) \n && (unitNumber == entity.getUnitNumber()));\n }",
"public static boolean validPos(String moveTo)\n\t{\n\t\tfor(int rows = 0; rows < 8; rows++)\n\t\t{\n\t\t\tfor(int cols = 0; cols < 8; cols++)\n\t\t\t{\n\t\t\t\tif(posMap[rows][cols].equals(moveTo))\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}\n\t\treturn false;\n\t}",
"public boolean isValidPosition(Rectangular r) {\n\t\tLine AB = new Line(A1, B1);\n\t\tLine CD = new Line(C1, AB.getU());\n\t\tLine AD = new Line(A1, D1);\n\t\tLine BC = new Line(B1, AD.getU());\n\n\t\tif (isInRect2(AB, CD, AD, BC, r.getA1()))\n\t\t\treturn true;\n\t\tif (isInRect2(AB, CD, AD, BC, r.getB1()))\n\t\t\treturn true;\n\t\tif (isInRect2(AB, CD, AD, BC, r.getC1()))\n\t\t\treturn true;\n\t\tif (isInRect2(AB, CD, AD, BC, r.getD1()))\n\t\t\treturn true;\n\n\t\treturn false;\n\t}",
"boolean isExternal(Position<E> p) throws IllegalArgumentException;",
"boolean hasPositionX();",
"boolean hasPositionX();",
"boolean hasPositionX();",
"private Vector2d checkOutOfBounds(Vector2d position) {\n\t\t//Check for x\n\t\tif (position.x < 0) position.x = 0;\n\t\tif (position.x > course.TERRAIN_SIZE) position.x = course.TERRAIN_SIZE;\n\t\t//Check for y\n\t\tif (position.y < 0) position.y = 0;\n\t\tif (position.y > course.TERRAIN_SIZE) position.y = course.TERRAIN_SIZE;\n\n\t\treturn new Vector2d(position.x,position.y);\n\t}",
"protected boolean validCoord(int row, int col) {\n\t\treturn (row >= 0 && row < b.size() && col >= 0 && col < b.size());\n\t}",
"public boolean isContactExist(int position) {\n\t\tif (position>=0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private boolean isLegalPos(int row, int col){\r\n return !(row < 0 || row > 7 || col < 0 || col > 7);\r\n }",
"@Override\n public boolean isValidEntity(Entity entity, IGame game) {\n boolean retVal = false;\n // Null entities don't need to be checked.\n if (null != entity) {\n\n // Any entity in the array is valid.\n // N.B. Stop looking after we've found the match.\n final int entityId = entity.getId();\n for (int index = 0; (index < entityIds.length) && !retVal; index++) {\n if (entityId == entityIds[index]) {\n retVal = true;\n }\n }\n\n } // End entity-isn't-null\n\n return retVal;\n }",
"public static boolean isValidPlace(int[] setPos){\n if(setPos[0]<=4 && setPos[0]>=0)\n return (setPos[1]<=4 && setPos[1]>=0);\n return false;\n }",
"private boolean isNearToEndPosition() {\n switch (direction) {\n case UP:\n return posY <= endPosition;\n case DOWN:\n return posY >= endPosition;\n case LEFT:\n return posX <= endPosition;\n case RIGHT:\n return posX >= endPosition;\n }\n throw new RuntimeException(\"Unknown position\");\n }",
"public boolean isValidEntity(Entity entity, IGame game) {\n return isValidEntity(entity,game,true);\n }",
"private boolean isPositionIndex(final long index) {\r\n\t\treturn index >= 0 && index <= size;\r\n\t}",
"private boolean isValidCoordinate(int x, int y) {\n return x >= 0 && x < gameState.mapSize\n && y >= 0 && y < gameState.mapSize;\n }",
"public abstract boolean isInternal(Position<E> p);",
"public Boolean isValid(IMDBBaseEntity entity) {\n return entity !=null;\n }",
"public boolean canPlaceEntity() {\n boolean blocked = this.mapCoordinatesForEntityToPlace.stream().anyMatch(c -> c.placeableState == PlaceableState.BLOCKED);\n if (blocked) return false;\n\n return this.mapCoordinatesForEntityToPlace.stream().anyMatch(c -> c.placeableState == PlaceableState.PLACEABLE);\n }",
"boolean isRoot(Position<E> p) throws IllegalArgumentException;",
"public boolean isValidPlaceCommand(String cmd) {\r\n\t\tboolean isValidPlaceCmd = true;\r\n\t\tString[] splitedSpaceArr = cmd.split(\"\\\\s+\");\r\n\r\n\t\tif (splitedSpaceArr.length == 2) {\r\n\t\t\tif (!splitedSpaceArr[0].equalsIgnoreCase(\"PLACE\")) {\r\n\t\t\t\tisValidPlaceCmd = false;\r\n\t\t\t}\r\n\r\n\t\t\tif (isValidPlaceCmd) {\r\n\t\t\t\tString[] splitedCommaArr = splitedSpaceArr[1].split(\"\\\\s*,\\\\s*\");\r\n\r\n\t\t\t\tif (splitedCommaArr.length == 3) {\r\n\t\t\t\t\tint row = RobotSimulator.isInteger(splitedCommaArr[0]) ? Integer.parseInt(splitedCommaArr[0]) : -1;\r\n\t\t\t\t\tint col = RobotSimulator.isInteger(splitedCommaArr[1]) ? Integer.parseInt(splitedCommaArr[1]) : -1;\r\n\t\t\t\t\tString faceStr = splitedCommaArr[2];\r\n\r\n\t\t\t\t\t// check is position value out of bounds\r\n\t\t\t\t\tif (row > 4 || row < 0 || col > 4 || col < 0) {\r\n\t\t\t\t\t\tisValidPlaceCmd = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// check is valid face value\r\n\t\t\t\t\tList validFaceArr = Arrays.asList(\"WEST\", \"NORTH\", \"EAST\", \"SOUTH\");\r\n\t\t\t\t\tif (!validFaceArr.contains(faceStr.toUpperCase())) {\r\n\t\t\t\t\t\tisValidPlaceCmd = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tisValidPlaceCmd = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tisValidPlaceCmd = false;\r\n\t\t}\r\n\t\treturn isValidPlaceCmd;\r\n\t}",
"public boolean contains(Index position) { // TODO rename: adjoinsOrContains\n return position != null && position.getX() + 1 >= start.getX() && position.getY() + 1 >= start.getY() && position.getX() <= end.getX() && position.getY() <= end.getY();\n }",
"private boolean isViewerPositionInvalid(ViewerPosition3D position)\n {\n Vector3d location = new Vector3d(position.getLocation());\n double terrainTolerance = TERRAIN_SAFETY_TOLERANCE;\n if (position.getGeoPosition() != null && position.getGeoPosition().getAlt().getReferenceLevel() != ReferenceLevel.TERRAIN)\n {\n terrainTolerance *= 10;\n }\n\n if (!myMapContext.getProjection().isOutsideModel(location.add(location.multiply(terrainTolerance)))\n || Math.abs(location.getX()) > ourMaxOriginDistance\n || Math.abs(location.getY()) > ourMaxOriginDistance\n || Math.abs(location.getZ()) > ourMaxOriginDistance)\n {\n return true;\n }\n\n return false;\n }",
"public boolean contains(int position) {\n return position >= startPosition.getOffset() || position <= endPosition.getOffset();\n }",
"@Override\n public boolean isValidEntity(Entity entity, IGame game, \n boolean useValidNonInfantryCheck) {\n return super.isValidEntity(entity, game, useValidNonInfantryCheck)\n && (entity.getId() == entityId);\n }",
"public boolean someLegalPos() {\n return !legalPos.isEmpty();\n }",
"public void testPosition() {\n System.out.println(\"position\");\n BufferedCharSequence instance = null;\n int expResult = 0;\n int result = instance.position();\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 boolean hasValidPoint() {\n return mPoint.x != 0 || mPoint.y != 0;\n }",
"private boolean isLegalCoordinate(int row, int col) {\n return row > 0 && row <= getSize() && col > 0 && col <= getSize();\n }",
"@Test(expected = InvalidDataExcecption.class)\n public void test_InValid_Hill_Insertion()\n throws InvalidDataExcecption, InvalidPositionException, OverflowException {\n landscapeObject.createPosition(0, -100);\n landscapeObject.createPosition(1, 32200);\n landscapeObject.createPosition(2, 1055500);\n landscapeObject.createPosition(3, 9000);\n }",
"Entity(Vector3f position) {\n this.position = position;\n }",
"public boolean shouldExecute()\n\t{\n\t\tif (this.entity.getAge() >= 100)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse if (this.entity.getRNG().nextInt(120) != 0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tVec3d Vec3d = RandomPositionGenerator.findRandomTarget(this.entity, 10, 7);\n\n\t\t\tif (Vec3d == null)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.xPosition = Vec3d.xCoord;\n\t\t\t\tthis.yPosition = Vec3d.yCoord;\n\t\t\t\tthis.zPosition = Vec3d.zCoord;\n\t\t\t\tthis.leapTarget = Vec3d;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}",
"public boolean areValidCoordinates(int x, int y) {\n return (x >= 0 && x < WIDTH && y >= 0 && y < HEIGHT);\n }",
"public boolean containsExclusive(DecimalPosition position) { // TODO rename: contains\n if (position.getX() < start.getX() || position.getY() < start.getY()) {\n return false;\n }\n if (width() > 0) {\n if (position.getX() >= end.getX()) {\n return false;\n }\n } else {\n if (position.getX() > end.getX()) {\n return false;\n }\n }\n\n if (height() > 0) {\n if (position.getY() >= end.getY()) {\n return false;\n }\n } else {\n if (position.getY() > end.getY()) {\n return false;\n }\n }\n return true;\n }",
"@Override\n\tpublic boolean isLegalMove(Square newPosition) {\n\t\treturn false;\n\t}",
"public boolean isPositionFree(\n final Point position,\n final FieldObject object\n ) {\n int x = position.x;\n int y = position.y;\n int halfObjectSize = object.getSize() / 2;\n\n /* Checking field borders */\n if (x - halfObjectSize < 0\n || x + halfObjectSize >= FIELD_WIDTH\n || y - halfObjectSize < 0\n || y + halfObjectSize >= FIELD_HEIGHT) {\n return false;\n }\n\n /* Checking overlays with other field objects */\n for (FieldObject fieldObject : _fieldObjects) {\n int x1 = fieldObject.getPosition().x;\n int y1 = fieldObject.getPosition().y;\n\n double distanceBetweenCenters =\n Math.sqrt((x - x1) * (x - x1) + (y - y1) * (y - y1));\n\n final double minDistance =\n (object.getSize() + fieldObject.getSize()) / 2.0;\n if (distanceBetweenCenters <= minDistance) {\n return false;\n }\n }\n\n return true;\n }",
"public boolean contains2(DecimalPosition position) { // TODO rename: ???\n return position != null && position.getX() >= start.getX() && position.getY() >= start.getY() && position.getX() <= end.getX() && position.getY() <= end.getY();\n }",
"private boolean isAnExaminedPosition() {\n\t\treturn this\n\t\t\t\t.getFindedThreats()\n\t\t\t\t.stream()\n\t\t\t\t.anyMatch(\n\t\t\t\t\t\tthreat -> threat.getPosition().equals(\n\t\t\t\t\t\t\t\tthis.getCurrentPosition().getCoordinate()));\n\t}",
"boolean canMoveTo(Vector2d position);",
"@Override\n public boolean isLocationValid(XYCoord coords)\n {\n return master.isLocationValid(coords);\n }",
"public boolean isLegal(int x_pos, int y_pos){\n //TODO\n //if the color is black,\n if(color==\"black\" || color.equals(\"black\")){\n for(int i=1; i<8; i++){\n if(this.x_pos-i==x_pos && y_pos==this.y_pos) return true;\n if(this.x_pos==x_pos && this.y_pos-i==y_pos) return true;\n }\n }\n //if the color is white, then its going up the board (you add the position)\n else{\n for(int i=1; i<8; i++){\n if(this.x_pos+i==x_pos && y_pos==this.y_pos) return true;\n if(this.x_pos==x_pos && this.y_pos+i==y_pos) return true;\n }\n }\n return false;\n }",
"public boolean canMoveEntity (Entity entity, Point dest) {\n if (entity == null) throw new IllegalArgumentException(\"Entity is null\");\n if (dest == null) throw new IllegalArgumentException(\"Point is null\");\n if (!grid.containsKey(dest)) throw new IllegalArgumentException(\"The cell is not on the grid\");\n\n Point origin = entity.getCoords();\n\n if (origin.equals(dest)) return false;\n\n Vector vector = Vector.findStraightVector(origin, dest);\n\n if (vector == null) return false;\n Vector step = new Vector(vector.axis(), (int) (1 * Math.signum(vector.length())));\n Point probe = (Point) origin.clone();\n while (!probe.equals(dest)) {\n probe = step.applyVector(probe);\n if (!grid.containsKey(probe)) return false;\n }\n\n\n return true;\n }",
"@Override\n public boolean isLocationValid(int x, int y)\n {\n return master.isLocationValid(x, y);\n }",
"public boolean checkValidCoordinate(int i, int j)\n\t{\n\t\tif(i>=0 && i<this.numberOfRows && j>=0 && j<this.numberOfColumns)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean canCoordinateBeSpawn(int par1, int par2)\n {\n return false;\n }",
"public boolean isPositionAvailable(Position position) {\n for (Position unavailablePosition : unavailablePositions) {\n if (unavailablePosition.equals(position)) {\n return false;\n }\n }\n return true;\n }",
"@Override\n public boolean shouldExecute()\n {\n if (!this.mustUpdate)\n {\n if (this.entity.getRNG().nextInt(this.executionChance) != 0)\n {\n return false;\n }\n }\n\n Vec3d vec3d = RandomPositionGenerator.findRandomTarget(this.entity, 10, 7);\n int attempts = 0;\n while (attempts < 10 && entity.getHomePosition().getDistance(vec3d != null ? (int)vec3d.xCoord : (int)entity.posX, vec3d != null ? (int)vec3d.yCoord : (int)entity.posY, vec3d != null ? (int)vec3d.zCoord : (int)entity.posZ) > entity.getMaximumHomeDistance()) {\n vec3d = RandomPositionGenerator.findRandomTarget(this.entity, 12, 8);\n attempts++;\n }\n\n if (vec3d == null || attempts >= 10)\n {\n return false;\n }\n else\n {\n this.xPosition = vec3d.xCoord;\n this.yPosition = vec3d.yCoord;\n this.zPosition = vec3d.zCoord;\n this.mustUpdate = false;\n return true;\n }\n }",
"@SuppressWarnings(\"unchecked\")\n \tpublic static boolean isChunkPosition(final Object obj) {\n \t\treturn getChunkPositionClass().isAssignableFrom(obj.getClass());\n \t}",
"public boolean hasPositionX() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"@Override\n public boolean isValid(int playerId, Entity entity, IGame game) {\n return ((null != entity) && (entity.getOwnerId() == playerId) && isValidEntity(\n entity, game));\n }",
"public boolean hasPositionX() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }",
"@Test\n public void checkValidEntity() {\n cleanEntity0();\n entity0 = EntityUtil.getSampleRole();\n final Set<ConstraintViolation<Object>> cv = PersistenceValidation.validate(entity0);\n assertTrue(cv.isEmpty());\n }",
"public boolean hasCollision(final Entity entity) throws Exception\r\n {\r\n return (getCharacter(entity) != null);\r\n }",
"public boolean hasPositionX() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"@Test\n public void testPositionEquals(){\n assertEquals(Maze.position(0,0), Maze.position(0,0));\n assertThat(Maze.position(1, 0), not(Maze.position(0, 0)));\n assertThat(Maze.position(0,0), not(Maze.position(0,1)));\n }",
"public synchronized boolean isInPosition(){\r\n\t\tSystem.out.println(\"wheel: \" + flywheel.isFlywheelAtSpeed() + \r\n\t\t\t\t\" hood: \" + hood.isInPosition() + \r\n\t\t\t\t\" turret: \" + turret.isInPosition() + \r\n\t\t\t\t\" kicker: \" + kicker.isInPosition());\r\n\t\treturn flywheel.isFlywheelAtSpeed() && \r\n\t\t\t\thood.isInPosition() && \r\n\t\t\t\tturret.isInPosition() && \r\n\t\t\t\tkicker.isInPosition();\r\n\t}",
"public boolean hasPositionX() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean checkInput(Vector2f normalizedPosition, float aspectRatio) {\n\t\tPositionComponent pc = (PositionComponent) this.getFirstComponentInstance(PositionComponent.class);\n\t\t\n\t\tfloat xLength = pc.getScale().x;\n\t\tfloat yLength = pc.getScale().y * aspectRatio;\n\t\tfloat xCenter = pc.getPosition().x;\n\t\tfloat yCenter = pc.getPosition().y * aspectRatio;\n\t\t\n\t\tif (normalizedPosition.x >= xCenter - xLength / 2f && normalizedPosition.x <= xCenter + xLength / 2f ) {\n\t\t\tif (normalizedPosition.y >= yCenter - yLength / 2f && normalizedPosition.y <= yCenter + yLength / 2f ) {\n\t\t\t\t//We are inside the square\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isSetPos() {\n return this.pos != null;\n }",
"public boolean isSetPos() {\n return this.pos != null;\n }",
"public boolean isValid(int row, int col) {\r\n return row < this.arrangement[0].length && col < this.arrangement.length\r\n && row >= 0 && col >= 0;\r\n }",
"@Test(expected=IllegalArgumentException.class)\n\tpublic void testInvalidSquare() {\n\t\tassertFalse(Player.isValidStartPosition(null));\n\t\t\n\t\tnew Player(null, 0);\n\t}",
"public boolean hasPositionX() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }",
"public boolean hasPositionX() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean validate(Graph<V,E> graph) {\n\t\treturn (pos != null);\n\t}",
"boolean isValidLoop(int xPos, int yPos, boolean valid){\r\n\t\tfor (int j = 0; j < ChessBoard.bauer.length; j++)\r\n\t\t\tif (xPos == ChessBoard.bauer[j].xPos && yPos == ChessBoard.bauer[j].yPos)\r\n\t\t\t\tvalid = true;\r\n\t\tfor (int j = 0; j < ChessBoard.turm.length; j++)\r\n\t\t\tif (xPos == ChessBoard.turm[j].xPos && yPos == ChessBoard.turm[j].yPos)\r\n\t\t\t\tvalid = true;\r\n\t\tfor (int j = 0; j < ChessBoard.springer.length; j++)\r\n\t\t\tif (xPos == ChessBoard.springer[j].xPos && yPos == ChessBoard.springer[j].yPos)\r\n\t\t\t\tvalid = true;\r\n\t\tfor (int j = 0; j < ChessBoard.läufer.length; j++)\r\n\t\t\tif (xPos == ChessBoard.läufer[j].xPos && yPos == ChessBoard.läufer[j].yPos)\r\n\t\t\t\tvalid = true;\r\n\t\tfor (int j = 0; j < ChessBoard.dame.length; j++)\r\n\t\t\tif (xPos == ChessBoard.dame[j].xPos && yPos == ChessBoard.dame[j].yPos)\r\n\t\t\t\tvalid = true;\r\n\t\tfor (int j = 0; j < ChessBoard.könig.length; j++)\r\n\t\t\tif (xPos == ChessBoard.könig[j].xPos && yPos == ChessBoard.könig[j].yPos)\r\n\t\t\t\tvalid = true;\r\n\t\treturn valid;\r\n\t}"
]
| [
"0.71240187",
"0.70173514",
"0.6788299",
"0.6718065",
"0.669656",
"0.6629966",
"0.6316299",
"0.6279108",
"0.62422144",
"0.61732423",
"0.61732423",
"0.61732423",
"0.61732423",
"0.61604196",
"0.61518216",
"0.6133922",
"0.6090821",
"0.60594577",
"0.6022876",
"0.6022876",
"0.60166776",
"0.5969091",
"0.5966666",
"0.59666246",
"0.5951889",
"0.58921176",
"0.58921176",
"0.58862615",
"0.58765024",
"0.58471686",
"0.5841296",
"0.5826435",
"0.57881224",
"0.5741291",
"0.5732106",
"0.57280123",
"0.5726315",
"0.5704277",
"0.5704277",
"0.5704277",
"0.5698906",
"0.56726676",
"0.566368",
"0.5610836",
"0.55789614",
"0.5571712",
"0.55658805",
"0.5562099",
"0.55591846",
"0.5557438",
"0.55543494",
"0.5554129",
"0.55502135",
"0.55464697",
"0.55403745",
"0.5537335",
"0.5515942",
"0.551155",
"0.5505652",
"0.5504918",
"0.55017596",
"0.5497799",
"0.5489025",
"0.5470134",
"0.54679304",
"0.54596215",
"0.5459072",
"0.5445744",
"0.5412664",
"0.54029423",
"0.53977174",
"0.53928435",
"0.5390137",
"0.5375465",
"0.5370975",
"0.53685915",
"0.53604454",
"0.533665",
"0.5332597",
"0.5332192",
"0.5324684",
"0.5301856",
"0.5296389",
"0.52962387",
"0.529559",
"0.52914",
"0.5290717",
"0.5285063",
"0.5281721",
"0.52814084",
"0.52787966",
"0.52725196",
"0.5268335",
"0.5268335",
"0.5267992",
"0.5267069",
"0.52661633",
"0.52633804",
"0.52631617",
"0.5259168"
]
| 0.6906939 | 2 |
Returns the velocity of the entity. | @Basic @Raw
public double[] getVelocity(){
return this.velocity.getVelocity();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Velocity getVelocity() {\r\n return this.v.getVelocity();\r\n }",
"public double getVelocity() {\n return mV;\n }",
"public Velocity getVelocity() {\n return this.velocity;\n }",
"public Velocity getVelocity() {\n return this.v;\n\n }",
"public Velocity getVelocity() {\r\n return this.vel;\r\n }",
"public Vector2D getVelocity()\n\t{\n\t\treturn velocity;\n\t}",
"public double getVelocity() {\n\t\treturn velocity.getlength();\n\t}",
"public org.bukkit.util.Vector getVelocity ( ) {\n\t\treturn invokeSafe ( \"getVelocity\" );\n\t}",
"public Point2D.Float getVelocity() {\r\n\t\treturn velocity;\r\n\t}",
"public float getVerticalVelocity( )\r\n {\r\n return this.v_velocity;\r\n }",
"public final Vector2D getVelocity() {\n return velocity;\n }",
"public Vector2f getVelocity(){\n\t\treturn velocity.copy();\n\t}",
"public double getVelocity() {\n return _avTable.getDouble(ATTR_VELOCITY, 0.0);\n }",
"public Vector2f getVelocity()\n\t{\n\t\treturn this.vel;\n\t}",
"public Vector3d getVelocity() {\n return getMotion().getVelocity();\n }",
"public double getVelocity()\n {\n return velocity * FPS;\n }",
"@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 }",
"public Vector2D getVelocity ();",
"public double getVelocity() {\n return 360000./(projDensity * projRadius);\n }",
"public double getVelocity() {\n \treturn this.currentSpeed;\n }",
"@Override\n public Point3D getValue() {\n return velocity;\n }",
"public Point2D.Float getVelocityPPT() {\n return velocityPPT;\n }",
"public double getVelocity() {\n return spark_encoder.getVelocity();\n }",
"double getVy() { return vel[1]; }",
"@Override\n\tpublic Vector2 getLinearVelocity() {\n\t\treturn body.getLinearVelocity();\n\t}",
"private double getVelocity() {\n \tif (currentState == DriveState.accelerating) {\n \t\treturn acceleration * timer.get();\n \t}\n \telse if (currentState == DriveState.cruisung) {\n \t\treturn maxVelocity;\n \t}\n \telse if (currentState == DriveState.decelerating) {\n \t\treturn maxVelocity - acceleration * (timer.get());\n \t}\n \t\t\n \treturn 0;\n }",
"@Override\n\tpublic float getAngularVelocity() {\n\t\treturn body.getAngularVelocity();\n\t}",
"public float getAngularVelocity () {\n\t\treturn body.getAngularVelocity();\n\t}",
"public double getVelocityY() {\n\t\treturn velocity.getY();\n\t}",
"public double getCurrentVelocity( )\r\n {\r\n return Math.sqrt( this.h_velocity * this.h_velocity + this.v_velocity * this.v_velocity );\r\n }",
"public int getVelocity()\n\t{\n\t\treturn logDx;\n\t}",
"public Vector2d getVe() {\n return ve;\n }",
"public Vector3f getAngularVelocity() {\n return Converter.convert(rBody.getAngularVelocity(tempVec));\n }",
"protected void calcVelocity()\n\t{}",
"double getVx() { return vel[0]; }",
"public double getXVel() {\n return this.xVel;\n }",
"public int getXVelocity()\r\n {\r\n return xVel;\r\n }",
"public double getYVel() {\n return this.yVel;\n }",
"public VelocityMetric velocityMetric() {\n _initialize();\n return velocityMetric;\n }",
"public double getV() {\r\n return Math.sqrt(Math.pow(this.dx, 2) + Math.pow(this.dy, 2));\r\n }",
"public Vector2d getVte() {\n return vte;\n }",
"@Override\n\tpublic double calculateVelocity() {\n\t\tdouble result = distance / time + velocitySame - velocityReverse;\n\t\treturn result;\n\t}",
"public double getVelocityX() {\n\t\treturn velocity.getX();\n\t}",
"public VelocityEngine getVelocityEngine();",
"public Vector2d getVve() {\n return vve;\n }",
"@Basic\n\tpublic double getYVelocity(){\n\t\treturn this.yVelocity;\n\t}",
"@Basic\n\tpublic double getVy() {\n\t\treturn this.vy;\n\t}",
"public float getHorizontalVelocity( )\r\n {\r\n return this.h_velocity;\r\n }",
"public Vector3f getLinearVelocity() {\r\n\t\treturn linearVelocity;\r\n\t}",
"static int getVelocity(){return currentVelocity;}",
"@NativeType(\"ovrVector3f\")\n public OVRVector3f AngularVelocity() { return nAngularVelocity(address()); }",
"double getVz() { return vel[2]; }",
"@Basic\n\tpublic double getXVelocity(){\n\t\treturn this.xVelocity;\n\t}",
"public Vector3f getLinearVelocity() {\n return Converter.convert(rBody.getLinearVelocity(tempVec));\n }",
"public double getVelocitySize() {\r\n return Math.sqrt(this.dx * this.dx + this.dy * this.dy);\r\n }",
"public float getHorizontalVelocity() {\n return mHorizontalVelocity;\n }",
"public int getVelX() {\r\n\t\treturn velX;\r\n\t}",
"public int getVy() { return vy; }",
"@NativeType(\"ovrVector3f\")\n public OVRVector3f LinearVelocity() { return nLinearVelocity(address()); }",
"private void calculateVelocity() {\n\t\tthis.velocity = Math.sqrt((this.roughRange *this.roughRange * this.gravity_Math)\n\t\t\t\t/ ((this.roughRange * Math.sin(2 * angle)) + (2\n\t\t\t\t\t\t* Constant.heroBaseHeight * Math.cos(angle) * Math\n\t\t\t\t\t\t\t.cos(angle))));\n\t\t\n\t}",
"private Vector3f getOrbitalVelocity(CelestialEntity entity1, CelestialEntity entity2) {\r\n\t\tVector3f p1 = entity1.getPosition();\r\n\t\tVector3f p2 = entity2.getPosition();\r\n\t\tfloat m1 = entity1.getMass();\r\n\t\tfloat m2 = entity2.getMass();\r\n\t\tVector3f r = Vector3f.sub(p2, p1);\r\n\t\t\r\n\t\tVector3f velocity = new Vector3f();\r\n\t\t// Perpendicular vector in the x-z plane\r\n\t\tvelocity.x = -r.z;\r\n\t\tvelocity.z = r.x;\r\n\t\t// Calculate velocity magnitude (speed)\r\n\t\tdouble distance = r.magnitude();\r\n\t\tdouble speed = Math.sqrt(Constants.G * (m1 + m2) / distance);\r\n\t\tvelocity.setMagnitude((float) speed);\r\n\t\t\r\n\t\treturn velocity;\r\n\t}",
"private float getVelocity(float velocityDp) {\n return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, velocityDp,\n getResources().getDisplayMetrics());\n }",
"public Vector2f getVelocityAtPoint(final Vector2f point);",
"public VelocityEngine getVelocityEngine() {\n\t\treturn velocityEngine;\n\t}",
"public double getY_vel() {\n return this.y_vel;\n }",
"public Vector2d getVtm() {\n return vtm;\n }",
"double getMotorVelocity( MotorName m ) {\n double vol = 0.0;\n if( motor_read_mode_==MotorBulkReadMode.BULK_READ_MANUAL && loop_cnt_!=last_motor_read_loop_id_ ) {\n // Important Step 4: If you are using MANUAL mode, you must clear the BulkCache once per control cycle\n for( LynxModule module : all_hubs_ ) {\n module.clearBulkCache();\n }\n }\n switch ( m ) {\n case MOTOR_LF:\n vol = motorLF_.getVelocity();\n break;\n case MOTOR_LB:\n vol = motorLB_.getVelocity();\n break;\n case MOTOR_RF:\n vol = motorRF_.getVelocity();\n break;\n case MOTOR_RB:\n vol = motorRB_.getVelocity();\n break;\n case MOTOR_LEFT_INTAKE:\n vol = motor_left_intake_.getVelocity();\n break;\n case MOTOR_RIGHT_INTAKE:\n vol = motor_right_intake_.getVelocity();\n break;\n case MOTOR_LIFT:\n vol = motor_lift_.getVelocity();\n break;\n default:\n break;\n }\n last_motor_read_loop_id_ = loop_cnt_ ;\n return vol;\n }",
"public Vector2d getVm() {\n return vm;\n }",
"@Basic\n\t@Raw\n\t@Immutable\n\tpublic static double getVelocityUpperBound() {\n\t\treturn VELOCITYUPPERBOUND;\n\t}",
"public Vector2d getEvte() {\n return evte;\n }",
"public Vector2d getVvm() {\n return vvm;\n }",
"public float getMotor_lin_target_velocity() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readFloat(__io__address + 128);\n\t\t} else {\n\t\t\treturn __io__block.readFloat(__io__address + 120);\n\t\t}\n\t}",
"public int getVx() { return vx; }",
"public float getSpeed() {\n\t\tfloat result = (float) Math.sqrt(velocity.x * velocity.x + velocity.y * velocity.y);\n\t\treturn result;\n\t}",
"public Vector3f getTranslationVel(int xform) {\n\t\treturn m_xforms[xform].m_translateVel;\n\t}",
"public double getV() {\r\n\t\treturn v;\t\r\n\t\t}",
"@Basic\n\tpublic double getVx() {\n\t\treturn this.vx;\n\t}",
"@Basic\n\t@Raw\n\t@Immutable\n\tpublic static double getVelocityLowerBound() {\n\t\treturn VELOCITYLOWERBOUND;\n\t}",
"public float getCurrVelocity() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e3 in method: android.widget.OppoScroller.getCurrVelocity():float, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.widget.OppoScroller.getCurrVelocity():float\");\n }",
"public Vector2d getVre() {\n return vre;\n }",
"@Override\r\n\tpublic double getVET() {\r\n\t\treturn getTMB() * getFatorAtividadeFisica();\r\n\t}",
"private Vector2D rightVelocity() {\n return new Vector2D(this.movementSpeed * this.differenceTime, 0);\n }",
"public float getVerticalSpeed() { return VerticalSpeed; }",
"public double fromVelocityToSpeed() {\n return Math.sqrt(Math.pow(this.getDx(), 2) + Math.pow(this.getDy(), 2));\n }",
"public Point2D.Float getVelocityPPS() {\n return velocityPPS;\n /* old method for velocity estimation is as follows\n * The velocity is instantaneously\n * computed from the movement of the cluster caused by the last event, then this velocity is mixed\n * with the the old velocity by the mixing factor. Thus the mixing factor is appplied twice: once for moving\n * the cluster and again for changing the velocity.\n * */\n }",
"public Vec2f getDelta() {\n\t\treturn new Vec2f(_dx, _dy);\n\t}",
"double getVerVel(double initial_ver_vel, double time)\n {\n uy = initial_ver_vel;\n t = time;\n vy = uy - (g*t);\n return vy;\n }",
"public double getVelocityRPM();",
"@Basic @Raw @Immutable\n public double getMaxVelocity(){\n return this.maxVelocity = SPEED_OF_LIGHT;\n }",
"public Vector2D getSpeedVector()\n {\n return mSpeedVector;\n }",
"private Vector2D leftVelocity() {\n return new Vector2D(this.movementSpeed * this.differenceTime * -1, 0);\n }",
"public nvo_coords.CoordsType getVector() {\n return vector;\n }",
"public static double getSpeed(Entity entity) {\r\n\t\treturn new Vec3d(mc.player.posX, mc.player.posY, mc.player.posZ).distanceTo(new Vec3d(mc.player.lastTickPosX, mc.player.lastTickPosY, mc.player.lastTickPosZ));\r\n\t}",
"public Vector3f getRotationVel(int xform) {\n\t\treturn m_xforms[xform].m_rotateVel;\n\t}",
"public float getXComponent() {\n return this.vx;\n }",
"public double getVerticalFOV()\n {\n return myHalfFOVy * 2.;\n }",
"public VelocityEngine getEngine() {\n\t\treturn this.engine;\n\t}",
"public double calculateVelocity(){\n double storyPoints = 0.0; // number of story points completed in total\n double numWeeks = BoardManager.get().getCurrentBoard().getAge()/7.0;\n LinkedList<Card> allCompletedCards = BoardManager.get().getCurrentBoard().getCardsOf(Role.COMPLETED_WORK);\n for (Card card : allCompletedCards) {\n storyPoints += card.getStoryPoints();\n }\n if (storyPoints == 0.0){\n return 0.0;\n }\n return Math.round(storyPoints/numWeeks * 100D) / 100D;\n }",
"double getVelComp(double vel, double angle)\n {\n angle = Math.toRadians(angle);\n double cos = Math.cos(angle);\n double sin = Math.sin(angle);\n ux = vel*cos;\n uy = vel*sin;\n this.angle = angle; \n return ux;\n }",
"@Override\n\tpublic double getSelectedSensorVelocity() {\n return encoder.getVelocity();\n\t}"
]
| [
"0.82062876",
"0.8044153",
"0.80403703",
"0.8010352",
"0.79634225",
"0.7924323",
"0.78821194",
"0.78761363",
"0.78628016",
"0.7853122",
"0.782253",
"0.77726257",
"0.77310145",
"0.7666094",
"0.76110446",
"0.7602703",
"0.75664204",
"0.74911237",
"0.7464702",
"0.7292431",
"0.7263965",
"0.7201381",
"0.71600664",
"0.71333253",
"0.71118414",
"0.7106666",
"0.709273",
"0.7060438",
"0.7028116",
"0.7023146",
"0.6985566",
"0.69373614",
"0.6905615",
"0.6903505",
"0.68712974",
"0.68358254",
"0.68299395",
"0.6810014",
"0.68078405",
"0.67861956",
"0.6767539",
"0.6766305",
"0.67418635",
"0.67347026",
"0.67035913",
"0.6696782",
"0.6640396",
"0.6627618",
"0.66097707",
"0.6605864",
"0.65764225",
"0.65763575",
"0.6563739",
"0.6514846",
"0.6476004",
"0.645113",
"0.6448206",
"0.64133954",
"0.6401561",
"0.63927823",
"0.6387162",
"0.63809186",
"0.6365449",
"0.6340645",
"0.6316258",
"0.6277336",
"0.62459356",
"0.62406355",
"0.62241864",
"0.6202985",
"0.61559266",
"0.6151013",
"0.6126641",
"0.61141855",
"0.61104184",
"0.60892636",
"0.6084424",
"0.6080362",
"0.60040843",
"0.5999898",
"0.5990997",
"0.59861547",
"0.5971525",
"0.59659815",
"0.59600043",
"0.595984",
"0.5957892",
"0.5933576",
"0.5932345",
"0.5923561",
"0.58553207",
"0.58523047",
"0.5845541",
"0.58326316",
"0.58004975",
"0.5797041",
"0.57943356",
"0.57850456",
"0.57417715",
"0.5740532"
]
| 0.7238617 | 21 |
Set the velocity of the entity to the given values. | @Raw
protected void setVelocity(double xVelocity, double yVelocity){
if ( !isValidVelocity(xVelocity, yVelocity)){
this.velocity.setVelocity(0.0, 0.0);
}
else {
this.velocity.setVelocity(xVelocity, yVelocity);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void setValue(Point3D value) {\n this.velocity = value;\n }",
"public void setVelocity(Velocity v) {\n this.velocity = v;\n }",
"public void setVelocity(Velocity v) {\n this.velocity = v;\n }",
"public void setVelocity(Velocity v) {\n this.velocity = v;\n }",
"public void setVelocity(double x, double y) {\n velocity[X] = x;\n velocity[Y] = y;\n //velocity[Z] = z;\n }",
"public void setVelocity(Velocity velocity) {\n this.v = velocity;\n }",
"void setVelocity(int vel) {\n\t\tthis.velocity = vel;\n\t}",
"public void setVelocity ( org.bukkit.util.Vector velocity ) {\n\t\texecute ( handle -> handle.setVelocity ( velocity ) );\n\t}",
"public void setVelocity(Velocity v) {\r\n this.vel = v;\r\n }",
"public void setVelocity(double x, double y) {\n velocityX = x;\n velocityY = y;\n }",
"public void setVelocity(double value) {\n _avTable.set(ATTR_VELOCITY, value);\n }",
"public void setVelocity () {\n\t\t\tfb5.getCommunicationModule().setClientHandler(null);\n\t\t\tif(state == BotMove.SHARP_RIGHT){\n\t\t\t\tfb5.setVelocity((byte)200,(byte)0);\n\t\t\t}\n\t\t\telse if(state == BotMove.LEFT){\n\t\t\t\tfb5.setVelocity((byte)100,(byte)200);\n\t\t\t}\n\t\t\telse if(state == BotMove.SOFT_RIGHT){\n\t\t\t\tfb5.setVelocity((byte)200,(byte)100);\n\t\t\t}\n\t\t\telse if(state == BotMove.FORWARD){\n\t\t\t\twt.turning = false;\n\t\t\t\tLog.d(TAG,\"Setting forward velocity\");\n\t\t\t\tfb5.setVelocity((byte)150,(byte)150);\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(state == BotMove.STOP){\n\t\t\t\twt.turning = false;\n\t\t\t\tfb5.setVelocity((byte)0,(byte)0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfb5.moveForward();\n\t\t\tfb5.accModifiedStart();\n\t\t}",
"public void setVelocity(Velocity velocity) {\r\n this.v.setVelocity(velocity);\r\n }",
"public void setVelocity(float x, float y)\n\t{\n\t\tthis.vel.x = x;\n\t\tthis.vel.y = y;\n\t}",
"public void setVelocity(double dx, double dy) {\n this.v = new Velocity(dx, dy);\n }",
"public void setVelocity(String value) {\n setVelocity(Format.toDouble(value));\n }",
"public void changeVel(double xV, double yV){ \n this.xVel += xV;\n this.yVel += yV;\n }",
"public void setVelocity(double dx, double dy) {\n this.velocity = new Velocity(dx, dy);\n }",
"public void setVelocity(double dx, double dy) {\n this.velocity = new Velocity(dx, dy);\n }",
"public void setVelocity(double dx, double dy) {\r\n this.vel = new Velocity(dx, dy);\r\n }",
"public void setVelocity(double x, double y) {\n getMotion().setVelocity(x, y);\n }",
"public void setVelocity(Vector3d velocity) {\n getMotion().setVelocity(velocity);\n }",
"public void setVelocity(double dx, double dy) {\n this.velocity.setDx(dx);\n this.velocity.setDy(dy);\n }",
"public void setVelocityProperties(Properties velocityProperties)\n\t{\n\t\tsetVelocityPropertiesMap(velocityProperties);\n\t}",
"public void setVelocity(double dx, double dy) {\r\n this.v.setVelocity(dx, dy);\r\n }",
"private void updateVelocity() {\n\t \t//Update x velocity\n\t \tif (getNode().getTranslateX() > MAX_SPEED_X) {\n\t \t\tsetvX(MAX_SPEED_X);\n\t \t} else if (getNode().getTranslateX() < -MAX_SPEED_X) {\n\t \t\tsetvX(-MAX_SPEED_X);\n\t } else {\n\t \t\tsetvX(getNode().getTranslateX());\n\t \t}\n\n\t \t//Update x velocity\n\t \tif (getNode().getTranslateY() > MAX_SPEED_Y) {\n\t \t\tsetvY(MAX_SPEED_Y);\n\t \t} else if (getNode().getTranslateY() < -MAX_SPEED_Y) {\n\t \t\tsetvY(-MAX_SPEED_Y);\n\t \t} else {\n\t \t\tsetvY(getNode().getTranslateY());\n\t \t}\n\t }",
"public void setVelocity(Vector2D velocity)\n\t{\n\t\tthis.velocity = velocity;\n\t}",
"public void setVelocity(Vector2d velocity) {\n\t\tthis.velocity=velocity;\n\t}",
"public void setVelocity(double x, double y, double z) {\n getMotion().setVelocity(x, y, z);\n }",
"public void setVelocity(float dummyX, float dummyZ){\n\t\t\n\t}",
"public void setVelocity(double velocity) {\n //set the velocity of the motors\n m_masterMotor.set(ControlMode.Velocity, velocity);\n \n //set our slave motors to follow master\n m_closeSlaveMotor.follow(m_masterMotor, FollowerType.PercentOutput);\n m_farSlaveMotor1.follow(m_masterMotor, FollowerType.PercentOutput);\n m_farSlaveMotor2.follow(m_masterMotor, FollowerType.PercentOutput);\n }",
"public void setVelocityVector(double newDX, double newDY) {\r\n this.dx = newDX;\r\n this.dy = newDY;\r\n }",
"protected void calcVelocity()\n\t{}",
"public void setVelocity(Vector2f n)\n\t{\n\t\tsetVelocity(n.x, n.y);\n\t}",
"public void setVelocity(double velocity) {\n m_motor.set(ControlMode.Velocity, toEncoderPulsesPer100ms(velocity));\n }",
"public void setV(double vx, double vy, double vz){\n vel[0] = vx;\n vel[0] = vy;\n vel[0] = vz;\n }",
"public void applyVelocityChange(final Vector2f velocityChange);",
"@Override\n\t@SideOnly(Side.CLIENT)\n\tpublic void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_)\n\t{\n\t\tthis.motionX = p_70016_1_;\n\t\tthis.motionY = p_70016_3_;\n\t\tthis.motionZ = p_70016_5_;\n\n\t\tif ((this.prevRotationPitch == 0.0F) && (this.prevRotationYaw == 0.0F))\n\t\t{\n\t\t\tfloat f = MathHelper.sqrt_double((p_70016_1_ * p_70016_1_) + (p_70016_5_ * p_70016_5_));\n\t\t\tthis.prevRotationYaw = this.rotationYaw = (float) ((Math.atan2(p_70016_1_, p_70016_5_) * 180.0D) / Math.PI);\n\t\t\tthis.prevRotationPitch = this.rotationPitch = (float) ((Math.atan2(p_70016_3_, f) * 180.0D) / Math.PI);\n\t\t}\n\t}",
"public void setVelocity(double x, double y, double z) {\n/* 72 */ this.motionX = x;\n/* 73 */ this.motionY = y;\n/* 74 */ this.motionZ = z;\n/* */ \n/* 76 */ if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) {\n/* */ \n/* 78 */ float var7 = MathHelper.sqrt_double(x * x + z * z);\n/* 79 */ this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(x, z) * 180.0D / Math.PI);\n/* 80 */ this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(y, var7) * 180.0D / Math.PI);\n/* */ } \n/* */ }",
"public GameObject setVelocity(Vector vel) {\n\t\tthis.velocity = vel;\n\t\treturn this;\n\t}",
"public void setLinearVelocity (Vector2 v) {\n\t\ttmp.set(v.x, v.y);\n\t\tbody.setLinearVelocity(tmp);\n\t}",
"private void doVels() {\n\t\tthis.launchPerVel = Math.sqrt((2d * body.getGm() * this.launchApoAlt) / (this.launchPerAlt * this.a));\n\t\tthis.launchApoVel = Math.sqrt((2d * body.getGm() * this.launchPerAlt) / (this.launchApoAlt * this.a));\n\t}",
"public static void initVelocity() {\n }",
"public void setVerticalVelocity( final float velocity )\r\n {\r\n this.v_velocity = velocity;\r\n }",
"public void configVelocityControl() {\n leftDrive.configTeleopVelocity();\n rightDrive.configTeleopVelocity();\n }",
"public void addVelocity(double var1, double var3, double var5)\n {}",
"public void setVelocity(float horizontalInput, float verticalInput) {\n\t\tbody.setLinearVelocity(speed*horizontalInput , speed*verticalInput );\n\t}",
"public void setVy( int vy ) {\n\t\t//every velocity is valid depending on the coordinate system\n\t\tthis.vy = vy;\n\t}",
"public void updateVelocity (Body[] bodies, int dt) {\n this.updateAcceleration(bodies);\n this.vx += 0.5 * (this.ax + this.axplusone) * dt;\n this.vy += 0.5 * (this.ay + this.ayplusone) * dt;\n }",
"void addVelocityValue(int velocityValue);",
"public void updateVelocity(){\r\n if (getPosition().x <= 0 || getPosition().x >= GameBoard.MAX_X) {\r\n setVelocity(getVelocity().add(getVelocity().mul(reverse)));\r\n }\r\n }",
"public void setVelocidad(int vel)\r\n\t{\r\n\t\tvelocidad=vel;\r\n\t}",
"public void update(Vehicle v, float dt) {\nPoint2D.Float p = v.getPosition();\r\nPoint2D.Float tp = target.getPosition();\r\nPoint2D.Float desired_velocity = new Point2D.Float(tp.x - p.x , tp.y - p.y);\r\nVehicle.scale(desired_velocity, v.getMaxSpeed());\r\nv.updateSteering(desired_velocity.x, desired_velocity.y);\r\n}",
"public VelocityComponent(Point3D velocity) {\n this.velocity = velocity;\n }",
"public void setLinearVelocity (float vX, float vY) {\n\t\ttmp.set(vX, vY);\n\t\tbody.setLinearVelocity(tmp);\n\t}",
"protected void setLinearVelocity(Vector2 vel)\n\t\t{\n\t\tthis.projectileType.getBody().setLinearVelocity(vel);\n\t\t}",
"public Velocity(int dx, int dy) {\n this((double) dx, (double) dy);\n }",
"@Override\n public Point3D getValue() {\n return velocity;\n }",
"public void setAngularVelocity(Vector3f vec) {\n rBody.setAngularVelocity(Converter.convert(vec, tempVec));\n rBody.activate();\n }",
"public Velocity(double dx, double dy) {\r\n this.dx = dx;\r\n this.dy = dy;\r\n }",
"public Velocity(double dx, double dy) {\r\n this.dx = dx;\r\n this.dy = dy;\r\n }",
"public void setVector(float x, float y)\n {\n speedVector.x = x / 5;\n speedVector.y = y / 5;\n if((mag = speedVector.x * speedVector.x + speedVector.y * speedVector.y) > 1)\n {\n mag = FloatMath.sqrt(mag);\n speedVector.x /= mag;\n speedVector.y /= mag;\n }\n }",
"public void set(Vec2 v) {\r\n\t\tx = v.x;\r\n\t\ty = v.y;\r\n\t}",
"public Velocity(double dx, double dy) {\n this.dx = dx;\n this.dy = dy;\n }",
"public Velocity(double dx, double dy) {\n this.dx = dx;\n this.dy = dy;\n }",
"public static void setVectors( Body body, StateVector state ) {\r\n\r\n body.lastState.copyStateVectors( body.currentState );\r\n body.currentState.x = state.x;\r\n body.currentState.y = state.y;\r\n body.currentState.z = state.z;\r\n body.currentState.vx = state.vx;\r\n body.currentState.vy = state.vy;\r\n body.currentState.vz = state.vz;\r\n\r\n }",
"public Vector2f (float[] values)\n {\n set(values);\n }",
"public void setSpeed( Vector2 sp ) { speed = sp; }",
"@Override\r\n public void setAllServoValues(float[] values) {\r\n if(values==null || values.length!=getNumServos()) throw new IllegalArgumentException(\"wrong number of servo values, need \"+getNumServos());\r\n checkServoCommandThread();\r\n ServoCommand cmd=new ServoCommand();\r\n cmd.bytes=new byte[1+getNumServos()*2];\r\n cmd.bytes[0]=CMD_SET_ALL_SERVOS;\r\n int index=1;\r\n for(int i=0;i<getNumServos();i++){\r\n byte[] b=pwmValue(values[getServo(i)]); // must correct here for flipped labeling on PCB\r\n cmd.bytes[index++]=b[0];\r\n cmd.bytes[index++]=b[1];\r\n lastServoValues[getServo(i)]=values[i];\r\n }\r\n submitCommand(cmd);\r\n }",
"public void setPosition(Vector2 position);",
"@Override\n protected void execute() {\n \n //get velocity from SmartDashboard\n double m_sideVelocity = SmartDashboard.getNumber(\"Side Velocity\", 0);\n double m_beltVelocity = SmartDashboard.getNumber(\"Belt velocity\", 0);\n // if velocity coefficients on SmartDashboard have changed, write new values to controller\n \n Robot.CD7.setSideMotor(m_sideVelocity);\n Robot.CD7.setBeltMotor(m_beltVelocity);\n }",
"public void set(VectorFloat values) {\n for (int i = 0; i < values.storage.length; i++) {\n storage[i] = values.storage[i];\n }\n }",
"public Velocity getVelocity() {\n return this.v;\n\n }",
"public void setVelocityPoints(int velocityPoints) {\n if (velocityPoints >= pathLength) {\n velocityPoints = pathLength;\n }\n this.velocityPoints = velocityPoints;\n getPrefs().putInt(\"RectangularClusterTracker.velocityPoints\", velocityPoints);\n }",
"public void setSpeedVector(Vector2D vector)\n {\n mSpeedVector = vector;\n }",
"static void resetVelocity(){currentVelocity = INITIAL_SPEED;}",
"public void setSpeed(float val) {speed = val;}",
"public void setTranslationVel(Vector3f vec, int xform) {\n\t\tm_xforms[xform].m_translateVel.set(vec);\n\t}",
"private void calculateVelocity() {\n\t\tthis.velocity = Math.sqrt((this.roughRange *this.roughRange * this.gravity_Math)\n\t\t\t\t/ ((this.roughRange * Math.sin(2 * angle)) + (2\n\t\t\t\t\t\t* Constant.heroBaseHeight * Math.cos(angle) * Math\n\t\t\t\t\t\t\t.cos(angle))));\n\t\t\n\t}",
"public Vector2f set (float[] values)\n {\n return set(values[0], values[1]);\n }",
"void setPos(Vec3 pos);",
"protected void setVy(double vy) {\n\t\t\tthis.vy = vy;\n\t}",
"protected abstract void setValue(Entity e,FloatTrait t,float value);",
"public void setSpeed(double left, double right){\n leftMasterVictor.setSpeed(left);\n rightMasterVictor.setSpeed(-right);\n }",
"public VelocityComponent(double xVector, double yVector, double zVector) {\n velocity = new Point3D(xVector, yVector, zVector);\n }",
"public Velocity(double dx, double dy) {\n this.dxVelocity = dx;\n this.dyVelocity = dy;\n }",
"public synchronized void setVelocitySetpoint(DriveSignal signal, double leftFeed,\n double rightFeed) {\n if (RobotState.mDriveControlState == DriveControlState.PATH_FOLLOWING) {\n leftDrive.set(ControlMode.Velocity, signal.getLeftNativeVelTraj(), signal.getBrakeMode(),\n leftFeed);\n rightDrive.set(ControlMode.Velocity, signal.getRightNativeVelTraj(), signal.getBrakeMode(),\n rightFeed);\n } else {\n RobotState.mDriveControlState = DriveControlState.VELOCITY_SETPOINT;\n leftDrive.set(ControlMode.Velocity, signal.getLeftNativeVel(), signal.getBrakeMode());\n rightDrive.set(ControlMode.Velocity, signal.getRightNativeVel(), signal.getBrakeMode());\n }\n currentSetpoint = signal;\n }",
"public double getVelocity() {\n return mV;\n }",
"public void setRefFrameVelocity(double value) {\n _avTable.set(ATTR_RF_VELOCITY, value);\n }",
"void setMotion(Vec3 motion);",
"private void setLinearVelocity() {\r\n\t\tif (movingElement.getWorldLocations().size() < 4) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tList<WorldCursorRecord> positions = movingElement.getWorldLocations();\r\n\t\tint lastIndex = positions.size() - 1;\r\n\t\tint nextLastIndex = lastIndex - 2;\r\n\t\tVector3f lastPosition = positions.get(lastIndex).worldLocation;\r\n\t\tlong lastTime = positions.get(lastIndex).time;\r\n\t\tVector3f nextLastPosition = positions.get(nextLastIndex).worldLocation;\r\n\t\tlong nextLastTime = positions.get(nextLastIndex).time;\r\n\t\tfloat diffTimeMS = (lastTime - nextLastTime) / 1000000f;\r\n\t\tlinearVelocity = lastPosition.subtract(nextLastPosition).mult(\r\n\t\t\t\t(1f / diffTimeMS) * 1000f);\r\n\t\tlinearVelocity.setZ(0);\r\n\t}",
"public void setValues(List values) {\n/* 115 */ super.setValues(values);\n/* 116 */ for (Iterator<ConfigurableEffect.Value> iter = values.iterator(); iter.hasNext(); ) {\n/* 117 */ ConfigurableEffect.Value value = iter.next();\n/* 118 */ if (value.getName().equals(\"Wavelength\")) {\n/* 119 */ this.wavelength = ((Float)value.getObject()).floatValue(); continue;\n/* 120 */ } if (value.getName().equals(\"Amplitude\")) {\n/* 121 */ this.amplitude = ((Float)value.getObject()).floatValue();\n/* */ }\n/* */ } \n/* */ }",
"@Override\n public void set(double value)\n {\n final String funcName = \"set\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"value=%f\", value);\n }\n\n if (!TrcUtil.inRange(value, -1.0, 1.0))\n {\n throw new IllegalArgumentException(\"Value must be in the range of -1.0 to 1.0.\");\n }\n\n if (softLowerLimitEnabled && value < 0.0 && getPosition() <= softLowerLimit\n || softUpperLimitEnabled && value > 0.0 && getPosition() >= softUpperLimit)\n {\n value = 0.0;\n }\n\n if (maxVelocity == 0.0)\n {\n currPower = value;\n }\n // else\n // {\n // controlMode = ControlMode.Velocity;\n // value *= maxVelocity;\n // value = TrcUtil.round(value); // Velocity mode is in sensor units/100ms, and sensor units are in integers.\n // }\n motor.set(value);\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"! (value=%f)\", value);\n }\n }",
"@Model\n\tprotected void setVx(double vx) {\n\t\tassert isValidVx(vx);\n\t\tthis.vx = vx;\n\t}",
"protected abstract void setValues(double[] values);",
"public void setVelocityEngine(VelocityEngine engine) {\n\t\tve = engine;\n\t}",
"public void setMomentum(double vx, double vy) {\n myMomentum[0] = vx;\n myMomentum[1] = vy;\n }",
"public static void new_speed( Body body, double t ){\r\n body.currentState.vx = body.currentState.vx + body.currentState.ax * t; // new x velocity\r\n body.currentState.vy = body.currentState.vy + body.currentState.ay * t; // new y velocity\r\n body.currentState.vz = body.currentState.vz + body.currentState.az * t; // new z velocity\r\n }",
"@Override\n\tpublic void updateState(final Ball context, IDispatcher<TDispMsg> dispatcher) {\n\t\tPoint oldV = context.getVelocity();\n\t\toldV.x = Randomizer.singleton.randomInt(-50, 50);\n\t\toldV.y = Randomizer.singleton.randomInt(-50, 50);\n\t\tcontext.setVelocity(oldV);\n\t}",
"public static void mountVelocity(Entity e, double x, double y, double z) {\r\n\t\tList<Entity> collidingEnts = WorldHelper.collidingEntities(e);\r\n\t\tif (!e.world.isRemote) {\r\n\t\t\tfor (Entity collider : collidingEnts) {\r\n\t\t\t\tcollider.addVelocity(x, y, z);\r\n\t\t\t}\r\n\t\t}\r\n\t}"
]
| [
"0.710351",
"0.70984316",
"0.70984316",
"0.70984316",
"0.70748794",
"0.7024962",
"0.70126605",
"0.69905305",
"0.69804394",
"0.696979",
"0.6968508",
"0.6953797",
"0.68611574",
"0.67811424",
"0.67689097",
"0.66583306",
"0.66561127",
"0.66210115",
"0.66210115",
"0.66205275",
"0.6613485",
"0.6583884",
"0.65483654",
"0.65361965",
"0.6533691",
"0.65284956",
"0.6521059",
"0.6517274",
"0.64794195",
"0.6468506",
"0.645923",
"0.6457443",
"0.6392571",
"0.6373951",
"0.63676375",
"0.63653773",
"0.635624",
"0.63486624",
"0.62957984",
"0.6277819",
"0.6252126",
"0.62382025",
"0.6220098",
"0.6197518",
"0.61839175",
"0.6171252",
"0.6169475",
"0.61029404",
"0.6076448",
"0.60732806",
"0.6066235",
"0.60099995",
"0.59879375",
"0.59750813",
"0.59412014",
"0.5932712",
"0.59236073",
"0.59028184",
"0.5899387",
"0.58941644",
"0.58941644",
"0.5849427",
"0.58419603",
"0.58339065",
"0.58339065",
"0.58183366",
"0.58178407",
"0.5814869",
"0.58079994",
"0.5803288",
"0.580205",
"0.577738",
"0.5764842",
"0.5763939",
"0.5762819",
"0.57623553",
"0.5759943",
"0.574804",
"0.5737921",
"0.571702",
"0.57003754",
"0.5699243",
"0.5685425",
"0.56703085",
"0.5659901",
"0.5651183",
"0.56472105",
"0.56466526",
"0.5644445",
"0.5639361",
"0.56391746",
"0.5634731",
"0.5626027",
"0.56246406",
"0.5611446",
"0.5611395",
"0.56032664",
"0.5586899",
"0.5568782",
"0.55615824"
]
| 0.68764967 | 12 |
Check whether the given velocities are a valid velocities for a entity. | @Model
private boolean isValidVelocity(double velocityX, double velocityY){
return (Math.hypot(velocityX, velocityY) <= maxVelocity && Velocity.isValidVelocity(velocityX, velocityY));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isVelocityValid() {\n return velocityValid;\n }",
"public static boolean containsVelocityCoord(int[] coords){\r\n for(int i=0; i < coords.length; i++){\r\n if(coords[i] == COORD_V0 || coords[i] == COORD_V1 || coords[i] == COORD_V2)\r\n return true;\r\n }\r\n return false;\r\n }",
"private static boolean isUnsafeVelocity(Vector vel) {\n/* 448 */ double x = vel.getX();\n/* 449 */ double y = vel.getY();\n/* 450 */ double z = vel.getZ();\n/* */ \n/* 452 */ if (x > 4.0D || x < -4.0D || y > 4.0D || y < -4.0D || z > 4.0D || z < -4.0D) {\n/* 453 */ return true;\n/* */ }\n/* */ \n/* 456 */ return false;\n/* */ }",
"public static boolean isValidVector(double x, double y){\r\n\t\treturn (isValidComponent(x) && isValidComponent(y));\r\n\t}",
"public boolean hasVelocityInformation() {\n return _avTable.exists(ATTR_VELOCITY);\n }",
"public void testVelocityNumerically() {\n // crud, I don't know, how much can we expect velocity and finite differences to agree?\n double bound = dt*dt*velocity*velocity; // sure, let's go with that. Keep in mind this changes with sampling rates, velocity, the order of the function, etc.\n double endtime = racetrack.getPerimeter() / racetrack.getVelocity();\n differentiatePosition(racetrack, 0.0, endtime, dt, bound);\n }",
"public boolean isValidVx(double vx) {\n\t\treturn ((-getVxmax() <= vx && vx <= -getVxi())\n\t\t\t\t|| (vx == 0)\n\t\t\t\t|| (getVxi() <= vx && vx <= getVxmax()));\n\t}",
"public static boolean validateVariance(String city) {\n try {\n List<Double> web = getWebTempValues(city);\n List<Double> api = getAPITempValues();\n List<Double> variance = IntStream.range(0, web.size()).mapToObj(i -> web.get(i) - api.get(i)).collect(Collectors.toList());\n boolean flag = false;\n for (Double d : variance) {\n if (d > 0 && d < 1) flag = true;\n else throw new TemperatureDifferenceException(\"Temperature difference not within specified range\");\n }\n return flag;\n } catch (TemperatureDifferenceException e) {\n e.printStackTrace();\n return false;\n }\n }",
"public boolean checkYCoords(Entity entity) {\r\n\r\n // Gets y level\r\n Location location = entity.getLocation();\r\n int y = location.getBlockY();\r\n\r\n // Determines if entity is ready to be teleported for being in the teleportation range\r\n // Uses short-circuit programming for extra speed (The || operator and all in one statement)\r\n\r\n if(worldToIsBelow)\r\n return y <= yFrom;\r\n else\r\n return y >= yFrom;\r\n }",
"@Model\n private boolean isValidMaxVelocity(double max){\n \treturn !(max > SPEED_OF_LIGHT || !Helper.isValidDouble(max) || max < 0);\n }",
"boolean collideWithVehicles(Vehicle v);",
"public boolean isProjectileDestroyed(World world, Entity entity) {\n // Return false if entity has AT LEAST ONE of the following components\n return !(world.hasComponent(entity, ProjectileComponent.class)\n || world.hasComponent(entity, PositionComponent.class)\n || world.hasComponent(entity, InstantDamageComponent.class)\n || world.hasComponent(entity, MovementComponent.class)\n || world.hasComponent(entity, CollisionComponent.class)\n || world.hasComponent(entity, SpriteComponent.class)\n || world.hasComponent(entity, MassComponent.class)\n || world.hasComponent(entity, GravityComponent.class)\n || world.hasComponent(entity, RectangleComponent.class));\n }",
"protected void validateEntity()\n {\n super.validateEntity();\n \n Date startDate = getStartDate();\n Date endDate = getEndDate();\n \n validateStartDate(startDate);\n validateEndDate(endDate);\n\n // We validate the following here instead of from within an attribute because\n // we need to make sure that both values are set before we perform the test.\n\n if (endDate != null)\n {\n // Note that we want to truncate these values to allow for the possibility\n // that we're trying to set them to be the same day. Calling \n // dateValue( ) does not include time. Were we to want the time element,\n // we would call timestampValue(). Finally, whenever comparing jbo\n // Date objects, we have to convert to long values.\n \n long endDateLong = endDate.dateValue().getTime();\n\n // We can assume we have a Start Date or the validation of this \n // value would have thrown an exception.\n \n if (endDateLong < startDate.dateValue().getTime())\n {\n throw new OARowValException(OARowValException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(),\n getPrimaryKey(),\n \"AK\", // Message product short name\n \"FWK_TBX_T_START_END_BAD\"); // Message name\n } \n } \n \n }",
"@Check\n\tpublic void checkIfVariableDefinitionsAreValid(VariableDefinition anEntity) {\n\t\tif (anEntity.getName() != null) {\n\t\t\tString tempName = anEntity.getName().getName();\n\t\t\tif (tempName != null) {\n\t\t\t\tif (tempName.contains(\".\")) {\n\t\t\t\t\terror(\"Variable definitions may not be fully or partly qualified. Please put the variable in the according packagedef to qualify it!\",\n\t\t\t\t\t\t\tnull);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"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 isPositionValid(){\n\t\t//check overlapping with walls\n\t\tfor(Wall wall : Game.gameField.getWalls()){\n\t\t\tif(wall.overlaps(center))\n\t\t\t\treturn false;\n\t\t}\n\t\t//check overlapping with other balls\n\t\tfor(Ball ball : Game.gameField.getBalls()){\n\t\t\tif(ball == this)\n\t\t\t\tcontinue;\n\t\t\tif(ball.getCenterPoint().distance(center) < RADIUS * 2)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn GameField.FIELD.contains(center);\n\t}",
"public boolean setMotorVelocities(final double leftVelocity, final double rightVelocity)\n {\n return finchController.setMotorVelocities(leftVelocity, rightVelocity);\n }",
"public boolean setMotorVelocities(final int leftVelocity, final int rightVelocity)\n {\n return finchController.setMotorVelocities(leftVelocity, rightVelocity);\n }",
"public List<Object> validateCollisions()\n {\n List<Object> collisions = new ArrayList<Object>();\n\n // collision with any other treatments\n List<DietTreatmentBO> treatments = _dietTreatment.getPatient()\n .getTreatments();\n for (DietTreatmentBO other : treatments)\n {\n if (other.equals(_dietTreatment)) continue;\n if (isCollision(_dietTreatment.getStart(), _dietTreatment.getEnd(),\n other.getStart(), other.getEnd()))\n {\n collisions.add(other);\n }\n }\n\n return collisions;\n }",
"private boolean checkVillagerCollision(float dt, int direction) {\n\t\tboolean found = false;\n\t\tIterator<Integer> it = sprites.keySet().iterator();\n\t\twhile (it.hasNext() && !found) {\n\t\t\tSprite as = sprites.get(it.next());\n\t\t\tif (as instanceof Villager) {\n\t\t\t\tVillager v = (Villager) as;\n\t\t\t\tfound = player.checkCollision(dt, v, direction);\n\t\t\t}\n\t\t}\n\t\treturn found;\n\t}",
"@SuppressWarnings(\"ConstantConditions\")\n private boolean isStuck(Position pos, Position posNow) {\n if (pos.isSimilar(posNow)) {\n return true;\n }\n\n Instance instance = getInstance();\n Chunk chunk = null;\n Collection<Entity> entities = null;\n\n /*\n What we're about to do is to discretely jump from the previous position to the new one.\n For each point we will be checking blocks and entities we're in.\n */\n double part = .25D; // half of the bounding box\n Vector dir = posNow.toVector().subtract(pos.toVector());\n int parts = (int) Math.ceil(dir.length() / part);\n Position direction = dir.normalize().multiply(part).toPosition();\n for (int i = 0; i < parts; ++i) {\n // If we're at last part, we can't just add another direction-vector, because we can exceed end point.\n if (i == parts - 1) {\n pos.setX(posNow.getX());\n pos.setY(posNow.getY());\n pos.setZ(posNow.getZ());\n } else {\n pos.add(direction);\n }\n BlockPosition bpos = pos.toBlockPosition();\n Block block = instance.getBlock(bpos.getX(), bpos.getY() - 1, bpos.getZ());\n if (!block.isAir() && !block.isLiquid()) {\n teleport(pos);\n return true;\n }\n\n Chunk currentChunk = instance.getChunkAt(pos);\n if (currentChunk != chunk) {\n chunk = currentChunk;\n entities = instance.getChunkEntities(chunk)\n .stream()\n .filter(entity -> entity instanceof LivingEntity)\n .collect(Collectors.toSet());\n }\n /*\n We won't check collisions with entities for first ticks of arrow's life, because it spawns in the\n shooter and will immediately damage him.\n */\n if (getAliveTicks() < 3) {\n continue;\n }\n Optional<Entity> victimOptional = entities.stream()\n .filter(entity -> entity.getBoundingBox().intersect(pos.getX(), pos.getY(), pos.getZ()))\n .findAny();\n if (victimOptional.isPresent()) {\n LivingEntity victim = (LivingEntity) victimOptional.get();\n victim.setArrowCount(victim.getArrowCount() + 1);\n callEvent(EntityAttackEvent.class, new EntityAttackEvent(this, victim));\n remove();\n return super.onGround;\n }\n }\n return false;\n }",
"static boolean isValid(Movement m) {\n return m.speed != JUNK && m.angle != JUNK;\n }",
"private void validateTime()\n {\n List<Object> collisions = validateCollisions();\n\n for (Object object : collisions)\n {\n if (DietTreatmentBO.class.isAssignableFrom(object.getClass()))\n {\n _errors.add(String\n .format(\"Die Diätbehandlung '%s' überschneidet sich mit der Diätbehandlung '%s'\",\n _dietTreatment.getDisplayText(),\n ((DietTreatmentBO) object).getName()));\n }\n }\n }",
"boolean isValidLoop(int xPos, int yPos, boolean valid){\r\n\t\tfor (int j = 0; j < ChessBoard.bauer.length; j++)\r\n\t\t\tif (xPos == ChessBoard.bauer[j].xPos && yPos == ChessBoard.bauer[j].yPos)\r\n\t\t\t\tvalid = true;\r\n\t\tfor (int j = 0; j < ChessBoard.turm.length; j++)\r\n\t\t\tif (xPos == ChessBoard.turm[j].xPos && yPos == ChessBoard.turm[j].yPos)\r\n\t\t\t\tvalid = true;\r\n\t\tfor (int j = 0; j < ChessBoard.springer.length; j++)\r\n\t\t\tif (xPos == ChessBoard.springer[j].xPos && yPos == ChessBoard.springer[j].yPos)\r\n\t\t\t\tvalid = true;\r\n\t\tfor (int j = 0; j < ChessBoard.läufer.length; j++)\r\n\t\t\tif (xPos == ChessBoard.läufer[j].xPos && yPos == ChessBoard.läufer[j].yPos)\r\n\t\t\t\tvalid = true;\r\n\t\tfor (int j = 0; j < ChessBoard.dame.length; j++)\r\n\t\t\tif (xPos == ChessBoard.dame[j].xPos && yPos == ChessBoard.dame[j].yPos)\r\n\t\t\t\tvalid = true;\r\n\t\tfor (int j = 0; j < ChessBoard.könig.length; j++)\r\n\t\t\tif (xPos == ChessBoard.könig[j].xPos && yPos == ChessBoard.könig[j].yPos)\r\n\t\t\t\tvalid = true;\r\n\t\treturn valid;\r\n\t}",
"public ErrorCheck checkVNode(){\n\t\tif(id.isEmpty() || label.isEmpty() || id == null || label == null)\n\t\t\treturn ErrorCheck.VNODE_NOT_COMPLETED;\n\t\tErrorCheck ec;\n\t\tfor(VirtualMachine aux : vms){\n\t\t\tec = aux.checkVM();\n\t\t\tif(ec.equals(ErrorCheck.VM_NOT_COMPLETED)){\n\t\t\t\treturn ec;\n\t\t\t}\n\t\t}\n\t\treturn ErrorCheck.ALL_OK;\n\t}",
"private static boolean validos(int d1, int d2, \n\t\t\tList<Par<Integer,Integer>> v) {\n\t\tboolean result = v != null;\n\t\tfor(int i = 0 ; i < v.size() && result ; i++) {\n\t\t\tPar<Integer,Integer> p = v.get(i);\n\t\t\tresult = result && p != null;\n\t\t\tresult = result && \n\t\t\t\t\tp.primeiro() >= 0 && p.primeiro() < d1 && \n\t\t\t\t\tp.segundo() >= 0 && p.segundo() < d2;\n\t\t}\n\t\treturn result;\n\t}",
"@Override\n public boolean isValidEntity(Entity entity, IGame game) {\n boolean retVal = false;\n // Null entities don't need to be checked.\n if (null != entity) {\n\n // Any entity in the array is valid.\n // N.B. Stop looking after we've found the match.\n final int entityId = entity.getId();\n for (int index = 0; (index < entityIds.length) && !retVal; index++) {\n if (entityId == entityIds[index]) {\n retVal = true;\n }\n }\n\n } // End entity-isn't-null\n\n return retVal;\n }",
"private boolean checkRange(final int actualVerticalSize,\n final int actualHorizontalSize) {\n return actualVerticalSize >= 0\n && actualVerticalSize < values.length\n && actualHorizontalSize >= 0\n && actualHorizontalSize < values[0].length;\n }",
"private void doVels() {\n\t\tthis.launchPerVel = Math.sqrt((2d * body.getGm() * this.launchApoAlt) / (this.launchPerAlt * this.a));\n\t\tthis.launchApoVel = Math.sqrt((2d * body.getGm() * this.launchPerAlt) / (this.launchApoAlt * this.a));\n\t}",
"private void validateDietTreatmentParameters()\n {\n List<IDietParameterizable> conflicts = ParameterTemplateValidator\n .getInstance().getConflictingComponents();\n for (IDietParameterizable component : conflicts)\n {\n getErrors().add(\n \"Parameterkonflikt in: \" + component.getDisplayText());\n }\n }",
"private boolean isDeltaValid() {\n\t\treturn deltaValid;\n\t}",
"public void validarTareasDepartamento(){\r\n\t\tif ((this.equipo != null) && !(this.equipo.isEmpty()) ){\r\n\t\t\tthis.equipo = gerente.validarTareasEquipo(this.equipo);\r\n\t\t}\r\n\t}",
"public boolean valid(InstanceIdentifier instanceId, Collection<Seed> seeds, Target t);",
"public boolean isMoveLegal() {\n if (!getGame().getBoard().contains(getFinalCoords())) {\n return false;\n }\n\n // for aero units move must use up all their velocity\n if (getEntity() instanceof Aero) {\n Aero a = (Aero) getEntity();\n if (getLastStep() == null) {\n if ((a.getCurrentVelocity() > 0) && !getGame().useVectorMove()) {\n return false;\n }\n } else {\n if ((getLastStep().getVelocityLeft() > 0) && !getGame().useVectorMove()\n && !(getLastStep().getType() == MovePath.MoveStepType.FLEE\n || getLastStep().getType() == MovePath.MoveStepType.EJECT)) {\n return false;\n }\n }\n }\n\n if (getLastStep() == null) {\n return true;\n }\n\n if (getLastStep().getType() == MoveStepType.CHARGE) {\n return getSecondLastStep().isLegal();\n }\n if (getLastStep().getType() == MoveStepType.RAM) {\n return getSecondLastStep().isLegal();\n }\n return getLastStep().isLegal();\n }",
"public boolean isProjectileAlive(World world, Entity entity) {\n // return true iff the entity has all of the following components\n return world.hasComponent(entity, ProjectileComponent.class)\n && world.hasComponent(entity, PositionComponent.class)\n && world.hasComponent(entity, MovementComponent.class)\n && world.hasComponent(entity, CollisionComponent.class)\n && world.hasComponent(entity, SpriteComponent.class)\n && world.hasComponent(entity, MassComponent.class)\n && world.hasComponent(entity, GravityComponent.class)\n && world.hasComponent(entity, RectangleComponent.class);\n }",
"public boolean willBoxesCollide(Unit player, float deltaX, float deltaY) {\n\tScene currentScene = WorldMap.getInstance().getCurrentScene();\n\tfor (Obstacle obstacle : currentScene.getObstacleList()) {\n\t if (player.collisionBetweenBoxes(deltaX, deltaY, obstacle) && player.getPosZ() < obstacle.getProtrusionHeight())\n\t\treturn true;\n\t}\n\t \n\treturn false;\n }",
"public void verifyInPlanet() {\n if (!this.isInPlanet())\n return;\n if (this.getPosition().dst2(this.getPlanet().getPosition()) > maximumAllowedDistance) {\n this.removeFromPlanet();\n this.setState(new FloatState(this.state.getTime()));\n }\n }",
"public void checkInvariant() {\n\t\tif (!(getPositionX() >= 0 && getPositionX() < getEngine().getWidth()))\r\n\t\t\tthrow new InvariantError(\"Error checkInvariant: getPositionX() > 0 && getPositionX() < getEngine().getWidth()\");\r\n\r\n\t\t// inv: getPositionY() >= 0 && getPositionY() < Engine::getHeight()\r\n\t\tif (!(getPositionY() >= 0 && getPositionY() < getEngine().getHeight()))\r\n\t\t\tthrow new InvariantError(\"Error checkInvariant: getPositionY() > 0 && getPositionY() < getEngine().getHeight()\");\r\n\r\n\t\t// inv: isDead() == not (getLife() >= 0)\r\n\t\tif (!(isDead() == !(getLife() > 0)))\r\n\t\t\tthrow new InvariantError(\"Error checkInvariant: isDead() == !getLife() > 0\");\r\n\t\t\r\n\t}",
"@Override\n\t\t\t\tpublic boolean validEntity(Entity me, Entity other) {\n\t\t\t\t\tif(Mappers.status.get(me).same(Mappers.status.get(other))) return false;\n\t\t\t\t\t\n\t\t\t\t\tFacingComponent facingComp = Mappers.facing.get(me);\n\t\t\t\t\tBody myBody = Mappers.body.get(me).body;\n\t\t\t\t\tBody otherBody = Mappers.body.get(other).body;\n\t\t\t\t\t\n\t\t\t\t\tfloat xOff = facingComp.facingRight ? 0.5f : -0.5f;\n\t\t\t\t\t\n\t\t\t\t\tfloat myX = myBody.getPosition().x + xOff;\n\t\t\t\t\tfloat myY = myBody.getPosition().y;\n\t\t\t\t\tfloat otherX = otherBody.getPosition().x;\n\t\t\t\t\tfloat otherY = otherBody.getPosition().y;\n\t\t\t\t\t\n\t\t\t\t\tfloat minX = 0.0f;\n\t\t\t\t\tfloat maxX = minX + range;\n\t\t\t\t\tfloat yRange = 0.9f;\n\t\t\t\t\t\n\t\t\t\t\t// Construct box in front of you\n\t\t\t\t\tfloat closeX = facingComp.facingRight ? myX + minX : myX - minX;\n\t\t\t\t\tfloat farX = facingComp.facingRight ? myX + maxX : myX - maxX;\n\t\t\t\t\tfloat top = myY + yRange;\n\t\t\t\t\tfloat bottom = myY - yRange;\n\t\t\t\t\t\n\t\t\t\t\tDebugRender.setType(ShapeType.Line);\n\t\t\t\t\tDebugRender.setColor(Color.CYAN);\n\t\t\t\t\tDebugRender.rect(facingComp.facingRight ? closeX : farX, bottom, Math.abs(farX - closeX), top - bottom, 1.0f);\n\t\t\t\t\t\n\t\t\t\t\tRectangle kick = new Rectangle(Math.min(closeX, farX), bottom, Math.abs(closeX - farX), top - bottom);\n\t\t\t\t\tRectangle enemy = new Rectangle(Mappers.body.get(other).getAABB());\n\t\t\t\t\tenemy.x = otherX - enemy.width * 0.5f;\n\t\t\t\t\tenemy.y = otherY - enemy.height * 0.5f;\n\t\t\t\t\t\n\t\t\t\t\treturn kick.overlaps(enemy);\n//\t\t\t\t\treturn (((facingComp.facingRight && otherX >= closeX && otherX <= farX) || (!facingComp.facingRight && otherX >= farX && otherX <= closeX)) && otherY <= top && otherY >= bottom);\n\t\t\t\t}",
"public boolean atVelocity() {\n return false;\n }",
"private boolean isValid() {\n // If start is greater or equal to end then it's invalid\n return !(start.compareTo(end) >= 0);\n }",
"public boolean isValidEntity(Entity entity, IGame game) {\n return isValidEntity(entity,game,true);\n }",
"public boolean isValid() {\n return super.isValid()\n && getUnit().isPerson()\n && checkTileImprovementPlan(tileImprovementPlan)\n && (hasTools() || checkColonyForTools(getAIUnit(), colonyWithTools));\n }",
"void checkCollision(Entity other);",
"public boolean areValidCoordinates(int x, int y) {\n return (x >= 0 && x < WIDTH && y >= 0 && y < HEIGHT);\n }",
"protected boolean validateParameterBlocks(ParameterBlockContainer container,\n DiagnosticChain diagnostics, Map<Object, Object> context)\n {\n ValidityPeriod newPeriod = container.getValidityPeriod();\n \n boolean result=true;\n EList<ParameterBlock> blocks = container.getParameterBlocks();\n for(int i=0;i<blocks.size();i++){\n ParameterBlock pb=blocks.get(i);\n if(!newPeriod.contains(pb.getStart())){\n result &= false;\n if (diagnostics != null)\n {\n diagnostics.add\n (new BasicDiagnostic(Diagnostic.ERROR,\n SOURCE_PARAMETER_BLOCK,\n PARAMETER_BLOCK__START_IN_RANGE,\n String.format(\"[Start] '%s' is out of range '%s'\",pb.getStart().getDisplayString(),getDisplayString(newPeriod)),\n new Object[]{pb}));\n }\n }\n }\n return result;\n }",
"public boolean isValidPlacementSpot() {\n return isEmpty() && ! getNeighbours().stream().allMatch(Spot::isEmpty);\n }",
"public boolean isValid() {\n return coordinates != null && coordinates.size() == 2\n && coordinates.get(0) >= -180.0 && coordinates.get(0) <= 180.0\n && coordinates.get(1) >= -90.0 && coordinates.get(1) <= 90.0\n && (coordinateSystem == null || coordinateSystem.isValid());\n }",
"private boolean isRangeValid() {\n\n\t\tboolean valid = true;\n\n\t\tif (getRange() == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\tLong.parseLong(getRange());\n\t\t} catch (NumberFormatException nfe) {\n\t\t\tvalid = false;\n\t\t}\n\n\t\tvalid = valid || getRange().compareToIgnoreCase(CCLConstants.INDIRECT_RANGE_ALL) == 0;\n\n\t\treturn valid;\n\t}",
"public boolean foodDetection() {\n ArrayList<Creature> creatures = world.getCreatureList();\n for (Creature c : creatures) {\n if (c.creatureLocation().equals((x + 1) + \",\" + y) || c.creatureLocation().equals((x - 1) + \",\" + y) ||\n c.creatureLocation().equals(x + \",\" + (y + 1)) || c.creatureLocation().equals(x + \",\" + (y - 1))) {\n //System.out.println(\"Creature Found: \" + c.creatureLocation());\n return true;\n }\n }\n return false;\n }",
"public boolean hasCollision(final Entity entity) throws Exception\r\n {\r\n return (getCharacter(entity) != null);\r\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 isValidEntity(Entity entity, IGame game, \n boolean useValidNonInfantryCheck) {\n\n return (entity != null) && (entity.getOwnerId() == playerId)\n && entity.isSelectableThisTurn()\n // This next bit enforces the \"A players Infantry/Protos\n // move after that players other units\" options.\n && !(useValidNonInfantryCheck &&\n (game.getPhase() == IGame.Phase.PHASE_MOVEMENT)\n && (((entity instanceof Infantry) && \n game.getOptions().booleanOption(\"inf_move_later\")) \n || \n ((entity instanceof Protomech) && \n game.getOptions().booleanOption(\"protos_move_later\"))) \n && game.checkForValidNonInfantryAndOrProtomechs(playerId));\n }",
"public List<Velocity> getVelocitiesForLevel() {\n List<Velocity> listOfVelocities = new ArrayList<>();\n String velocities = this.map.get(\"ball_velocities\");\n // create an array of velocities\n String[] listOfVelocitiesString = velocities.split(\" \");\n int size = listOfVelocitiesString.length;\n // run over all of the possible velocities\n for (int i = 0; i < size; i++) {\n // in every velocity split it to speed and angel\n String[] oneVel = listOfVelocitiesString[i].split(\",\");\n Velocity v = Velocity.fromAngleAndSpeed(Integer.parseInt(oneVel[0]), Integer.parseInt(oneVel[1]));\n // add the veloctiy to the list of velocities\n listOfVelocities.add(v);\n }\n return listOfVelocities;\n }",
"public boolean isAlmostVertical() {\n \t\t// estimation heuristic: if world x and y are both small, the vector is almost vertical\n \t\tif (Math.abs(x)<vecPrecision && Math.abs(y)<vecPrecision) return true;\n \t\telse return false;\n \t}",
"boolean computeVelocityCommands(Twist cmd_vel){\n if(!initialized_){\n this.node.getLog().error(\"This planner has not been initialized, please call initialize() before using this planner\");\n return false;\n }\n\n //TODO: Transform\n/* PoseStamped global_pose;\n Header hdr=messageFactory.newFromType(Header._TYPE);\n hdr.setStamp(this.node.getCurrentTime());\n hdr.setFrameId(robot_base_frame_);\n global_pose.setHeader(hdr);\n Pose pose=messageFactory.newFromType(Pose._TYPE);\n Point p=messageFactory.newFromType(Point._TYPE);\n Quaternion q=messageFactory.newFromType(Quaternion._TYPE);\n p.setX(0.0);p.setY(0.0);p.setZ(0.0);\n pose.setPosition(p);\n q.setX(0.0);q.setY(0.0);q.setZ(0.0);q.setW(1);\n pose.setOrientation(q);\n global_pose.setPose(pose);\n tf_.getTree().lookupTransformBetween();*/\n\n\n\n // Set current velocities from odometry\n Twist global_vel=messageFactory.newFromType(Twist._TYPE);\n\n me.me_lock_.lock();\n try{\n linear.setX(me.base_odom_.getTwist().getTwist().getLinear().getX());\n linear.setY(me.base_odom_.getTwist().getTwist().getLinear().getY());\n angular.setZ(me.base_odom_.getTwist().getTwist().getAngular().getY());\n global_vel.setLinear(linear);\n global_vel.setAngular(angular);\n }finally {\n me.me_lock_.unlock();\n }\n\n //TODO: Transform\n //WARNNING not transformed\n/* tf::Stamped<tf::Pose> robot_vel;\n robot_vel.setData(tf::Transform(tf::createQuaternionFromYaw(global_vel.angular.z), tf::Vector3(global_vel.linear.x, global_vel.linear.y, 0)));\n robot_vel.frame_id_ = robot_base_frame_;\n robot_vel.stamp_ = ros::Time();*/\n PoseStamped robot_vel=messageFactory.newFromType(PoseStamped._TYPE);\n\n/* //WARNNING not transformed\n tf::Stamped<tf::Pose> goal_point;\n tf::poseStampedMsgToTF(global_plan_.back(), goal_point);*/\n PoseStamped goal_point=messageFactory.newFromType(PoseStamped._TYPE);\n\n //we assume the global goal is the last point in the global plan\n //WARNNING not transformed\n goal_point=global_plan_.get(global_plan_.size()-1);\n double goal_x = goal_point.getPose().getPosition().getX();\n double goal_y = goal_point.getPose().getPosition().getY();\n double yaw = LPutils.getYaw(goal_point.getPose().getOrientation());\n double goal_th = yaw;\n\n //TODO:get position in global frame of the robot\n //WARNNING not transformed\n /* tf::Stamped<tf::Pose> global_pose;\n //let's get the pose of the robot in the frame of the plan\n global_pose.setIdentity();\n global_pose.frame_id_ = robot_base_frame_;\n global_pose.stamp_ = ros::Time();\n tf_->transformPose(global_frame_, global_pose, global_pose);*/\n PoseStamped global_pose=messageFactory.newFromType(PoseStamped._TYPE);\n\n //check to see if we've reached the goal position\n if (xy_tolerance_latch_ || (LPutils.getGoalPositionDistance(global_pose.getPose(), goal_x, goal_y) <= xy_goal_tolerance_)) {\n\n //if(base_local_planner::goalPositionReached(global_pose, goal_x, goal_y, xy_goal_tolerance_) || xy_tolerance_latch_){\n\n //if the user wants to latch goal tolerance, if we ever reach the goal location, we'll\n //just rotate in place\n if(latch_xy_goal_tolerance_)\n xy_tolerance_latch_ = true;\n\n //check to see if the goal orientation has been reached\n double angle = LPutils.getGoalOrientationAngleDifference(global_pose.getPose(), goal_th);\n //check to see if the goal orientation has been reached\n if (Math.abs(angle) <= yaw_goal_tolerance_) {\n\n //set the velocity command to zero\n linear.setX(0.0);\n linear.setY(0.0);\n linear.setZ(0.0);\n cmd_vel.setLinear(linear);\n angular.setZ(0.0);\n cmd_vel.setAngular(angular);\n rotating_to_goal_ = false;\n xy_tolerance_latch_ = false;\n }\n else {\n //copy over the odometry information\n Odometry base_odom=messageFactory.newFromType(Odometry._TYPE);\n me.me_lock_.lock();\n try{\n base_odom=me.getBaseOdom();\n }finally {\n me.me_lock_.unlock();\n }\n\n //if we're not stopped yet... we want to stop... taking into account the acceleration limits of the robot\n if(!rotating_to_goal_ && !LPutils.stopped(base_odom, rot_stopped_velocity_, trans_stopped_velocity_)){\n //ROS_DEBUG(\"Not stopped yet. base_odom: x=%6.4f,y=%6.4f,z=%6.4f\", base_odom.twist.twist.linear.x,base_odom.twist.twist.linear.y,base_odom.twist.twist.angular.z);\n if(!stopWithAccLimits(global_pose, robot_vel, cmd_vel))\n return false;\n }\n //if we're stopped... then we want to rotate to goal\n else{\n //set this so that we know its OK to be moving\n rotating_to_goal_ = true;\n if(!rotateToGoal(global_pose, robot_vel, goal_th, cmd_vel))\n return false;\n }\n }\n\n //publish an empty plan because we've reached our goal position\n transformed_plan_.clear();\n LPutils.publishPlan(transformed_plan_, g_plan_pub_);\n LPutils.publishPlan(transformed_plan_, l_plan_pub_);\n //we don't actually want to run the controller when we're just rotating to goal\n return true;\n }\n\n //TODO:transform\n/* tf::Stamped<tf::Pose> target_pose;\n target_pose.setIdentity();\n target_pose.frame_id_ = robot_base_frame_;*/\n PoseStamped target_pose=messageFactory.newFromType(PoseStamped._TYPE);\n\n if (!skip_next_){\n if(!transformGlobalPlan(tf_, global_plan_, costmap_ros_, global_frame_, transformed_plan_)){\n this.node.getLog().warn(\"Could not transform the global plan to the frame of the controller\");\n return false;\n }\n PoseStamped target_pose_msg=messageFactory.newFromType(PoseStamped._TYPE);\n findBestWaypoint(target_pose_msg, global_pose);\n }\n //TODO\n /*tf::poseStampedMsgToTF(transformed_plan_[current_waypoint_], target_pose);*/\n\n\n Twist res=messageFactory.newFromType(Twist._TYPE);\n\n linear.setX(target_pose.getPose().getPosition().getX() - global_pose.getPose().getPosition().getX());\n linear.setY(target_pose.getPose().getPosition().getY() - global_pose.getPose().getPosition().getY());\n res.setLinear(linear);\n angular.setZ(Angles.shortest_angular_distance(LPutils.getYaw(global_pose.getPose().getOrientation()), Math.atan2(res.getLinear().getY(), res.getLinear().getX())));\n res.setAngular(angular);\n\n Vector2 goal_dir = new Vector2(res.getLinear().getX(),res.getLinear().getY());\n if (Vector2.abs(goal_dir) > me.max_vel_x_) {\n goal_dir = Vector2.mul(Vector2.normalize(goal_dir),me.max_vel_x_);\n }\n else if (Vector2.abs(goal_dir) < me.min_vel_x_) {\n goal_dir =Vector2.mul(Vector2.normalize(goal_dir), me.min_vel_x_ * 1.2);\n }\n\n\n Vector2 pref_vel = new Vector2(goal_dir.getX(),goal_dir.getY());\n\n //TODO collvoid added\n\n me.computeNewVelocity(pref_vel, cmd_vel);\n\n\n if(Math.abs(cmd_vel.getAngular().getZ())<me.min_vel_th_)\n angular.setZ(0.0);\n\n if(Math.abs(cmd_vel.getLinear().getX())<me.min_vel_x_)\n linear.setX(0.0);\n\n if(Math.abs(cmd_vel.getLinear().getY())<me.min_vel_y_)\n linear.setY(0.0);\n\n cmd_vel.setLinear(linear);\n cmd_vel.setAngular(angular);\n\n\n boolean valid_cmd = true; //collision_planner_.checkTrajectory(cmd_vel.linear.x, cmd_vel.linear.y, cmd_vel.angular.z,true);\n\n if (!valid_cmd){\n angular.setZ(0.0);\n linear.setX(0.0);\n linear.setY(0.0);\n cmd_vel.setLinear(linear);\n cmd_vel.setAngular(angular);\n }\n\n if (cmd_vel.getLinear().getX() == 0.0 && cmd_vel.getAngular().getZ() == 0.0 && cmd_vel.getLinear().getY() == 0.0) {\n\n this.node.getLog().debug(\"Did not find a good vel, calculated best holonomic velocity was:\"\n + me.velocity.getX()+\", \"+me.velocity.getY()+\", cur wp \"+current_waypoint_+\" of \"+transformed_plan_.size()+\" trying next waypoint\");\n if (current_waypoint_ < transformed_plan_.size()-1){\n current_waypoint_++;\n skip_next_= true;\n }\n else {\n transformed_plan_.clear();\n LPutils.publishPlan(transformed_plan_, g_plan_pub_);\n LPutils.publishPlan(transformed_plan_, l_plan_pub_);\n\n return false;\n }\n }\n else {\n skip_next_ = false;\n }\n\n\n List<PoseStamped> local_plan=new ArrayList<PoseStamped>();\n PoseStamped pos=messageFactory.newFromType(PoseStamped._TYPE);\n\n //TODO\n //tf::poseStampedTFToMsg(global_pose,pos);\n pos.setPose(global_pose.getPose());\n pos.setHeader(global_pose.getHeader());\n local_plan.add(pos);\n local_plan.add(transformed_plan_.get(current_waypoint_));\n LPutils.publishPlan(transformed_plan_, g_plan_pub_);\n LPutils.publishPlan(local_plan, l_plan_pub_);\n //me_->publishOrcaLines();\n return true;\n }",
"public static boolean isValidDt(double dt) {\n\t\treturn ((0 < dt) && (dt < 0.2));\n\t}",
"public boolean isValidPosition(Position pos){\n\t\t// check whether the specified position is a valid position for the board\n\t\t// return true for valid positions and false for invalid ones\n\t\t// O(1)\n\t\tif((pos.getRow() >= 0 && pos.getRow() <= numRows) && (pos.getCol() >= 0 && pos.getCol() <= numCols)) { //If the row and columns are within the bounds then it returns true\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean canVehicleFit(Vehicle v) {\n\t\treturn false;\n\t}",
"protected void validate() {\n Validator mandatoryValidator = validateMandatoryOptions();\n Validator exclusionsValidator = validateOptionExclusions();\n Validator inapplicableOptionValidator = validateInapplicableOptions();\n Validator optionalValidator = validateOptionalParameters();\n\n List<String> validationMessages = new LinkedList<>();\n\n validationMessages.addAll(mandatoryValidator.getValidationMessages());\n validationMessages.addAll(exclusionsValidator.getValidationMessages());\n validationMessages.addAll(optionalValidator.getValidationMessages());\n validationMessages.addAll(inapplicableOptionValidator.getValidationMessages());\n\n if (!validationMessages.isEmpty()) {\n String tablePathString =\n (tablePath != null) ? SourceUtils.pathToString(tablePath) : \"null\";\n throw new DeltaOptionValidationException(tablePathString, validationMessages);\n }\n }",
"private boolean collidingWithModels(\n\t\t\tWorldModel model,\n\t\t\tCommand command,\n\t\t\tEntity entity){\n\n\t\t/*\n\t\t * Perform collision check - now that we have updated the positions,\n\t\t * see if this new position causes a collision.\n\t\t */\n\t\trch.performCollisionCheck(command, true, false, false);\n\n\t\tif(rch.collisionEntities == null){\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// Extract the relationship data\n\t\tString[] classRelationship = (String[])\n\t\t\tRulePropertyAccessor.getRulePropertyValue(\n\t\t\t\tentity,\n\t\t\t\tChefX3DRuleProperties.RELATIONSHIP_CLASSIFICATION_PROP);\n\n\t\tint[] relationshipAmount = (int[])\n\t\t\tRulePropertyAccessor.getRulePropertyValue(\n\t\t\t\tentity,\n\t\t\t\tChefX3DRuleProperties.RELATIONSHIP_AMOUNT_PROP);\n\n\t\tEnum[] relModifier = (Enum[])\n\t\t\tRulePropertyAccessor.getRulePropertyValue(\n\t\t\t\tentity,\n\t\t\t\tChefX3DRuleProperties.RELATIONSHIP_MODIFIER_PROP);\n\n\t\tString[] colReplaceClass = (String[])\n\t\t\tRulePropertyAccessor.getRulePropertyValue(\n\t\t\t\tentity,\n\t\t\t\tChefX3DRuleProperties.REPLACE_PROD_CLASS_PROP);\n\n\t\t/*\n\t\t * If any of these are null, check collision entities. If there are\n\t\t * no collisions, return false, otherwise true.\n\t\t */\n\t\tif(classRelationship == null ||\n\t\t\t\trelationshipAmount == null ||\n\t\t\t\trelModifier == null){\n\n\t\t\tif(rch.collisionEntities.size() > 0){\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Maximum index limit for loops\n\t\tint maxIndex = Math.min(\n\t\t\t\t(Math.min(classRelationship.length, relationshipAmount.length)),\n\t\t\t\trelModifier.length);\n\n\t\trch.performCollisionAnalysis(\n\t\t\t\tclassRelationship,\n\t\t\t\tnull,\n\t\t\t\tentity.getChildren(),\n\t\t\t\tcolReplaceClass,\n\t\t\t\tmaxIndex,\n\t\t\t\tnull,\n\t\t\t\tfalse,\n\t\t\t\tnull);\n\n\t\t/*\n\t\t * If we are colliding with legal walls and floors, then permit.\n\t\t */\n\t\tif(!rch.hasIllegalCollisions(classRelationship, relationshipAmount, relModifier)){\n\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"public boolean isValid() {\n boolean isvalid = true;\n\n if (java.lang.Double.isInfinite(x) || java.lang.Double.isNaN(x) || java.lang.Double.isInfinite(y) || java.lang.Double.isNaN(y) || java.lang.Double.isInfinite(width) || java.lang.Double.isNaN(width) || java.lang.Double.isInfinite(height)\n || java.lang.Double.isNaN(height)) {\n isvalid = false;\n }\n\n return isvalid;\n }",
"@Override\n\tpublic boolean isSatisfied(Object arg0, Object arg1, OValContext arg2,\n\t\t\tValidator arg3) throws OValException {\n\t\treturn false;\n\t}",
"private boolean isValid(AStarNode start, AStarNode end) {\n boolean check = true;\n for (Obstacle obs : getObstacles()) {\n if (isOnTheWay(start, end, obs))\n check = false;\n }\n return check;\n }",
"List<Velocity> initialBallVelocities();",
"@Override\n public boolean isValidEntity(Entity entity, IGame game,\n boolean useValidNonInfantryCheck) {\n return (super.isValidEntity(entity, game, useValidNonInfantryCheck) \n && (unitNumber == entity.getUnitNumber()));\n }",
"public boolean verifyRoom() throws NotEnoughDoorsException {\n if (getDoors().get(\"N\") == null && getDoors().get(\"W\") == null\n && getDoors().get(\"S\") == null && getDoors().get(\"E\") == null) {\n throw new NotEnoughDoorsException();\n }\n\n for (String key: getDoors().keySet()) {\n Door doorHolder = getDoors().get(key);\n if (doorHolder != null) {\n if (doorHolder.getConnectedRooms().size() < 2 || doorHolder.getOtherRoom(this) == null) {\n return false;\n }\n }\n }\n\n for (Item singleItem: roomItems) {\n int itemX = (int) singleItem.getXyLocation().getX();\n int itemY = (int) singleItem.getXyLocation().getY();\n if (itemX >= getWidth() - 1 || itemX <= 0) {\n return false;\n }\n if (itemY >= getHeight() - 1 || itemY <= 0) {\n return false;\n }\n }\n\n if (isPlayerInRoom()) {\n int playerX = (int) getPlayer().getXyLocation().getX();\n int playerY = (int) getPlayer().getXyLocation().getY();\n if (playerX >= getWidth() - 1 || playerX <= 0) {\n return false;\n }\n if (playerY >= getHeight() - 1 || playerY <= 0) {\n return false;\n }\n }\n\n return true;\n }",
"private boolean isValidPosition(Point pos){\r\n return (0 <= pos.getFirst() && pos.getFirst() < 8 && \r\n 0 <= pos.getSecond() && pos.getSecond() < 8);\r\n }",
"public boolean isRangeValid()\n {\n return isRangeValid(((AnalogInput)m_echoChannel).getVoltage());\n }",
"public boolean isValidList(List<Employee> employees) {\n return isValidEmployeeNames(employees)\n && isValidEmployeeIds(employees)\n && isExactlyOneCEO(employees)\n && isValidManagerIds(employees);\n }",
"public void validate() throws org.apache.thrift.TException {\n if (ctpTradeId != null) {\n ctpTradeId.validate();\n }\n if (esunny3TradeId != null) {\n esunny3TradeId.validate();\n }\n if (esunny9TradeId != null) {\n esunny9TradeId.validate();\n }\n }",
"private boolean validVoter(long sid) {\n return self.getCurrentAndNextConfigVoters().contains(sid);\n }",
"public boolean checkAvailability(int x0, int y0, int newX, int newY) {\n\n int vectorX = newX - x0;\n int vectorY = newY - y0;\n\n if ((Math.abs(vectorX) == 1 && Math.abs(vectorY) == 2) ||\n (Math.abs(vectorX) == 2 && Math.abs(vectorY) == 1)) {\n return true;\n }\n\n return false;\n }",
"public boolean istVoll()\n\t{\n\t return (_spalte0 > 0) && (_spalte1 > 0) && (_spalte2 > 0);\n\t}",
"public boolean validate() {\n\t\tfor(int i=0; i<sensorData.size(); i++) {\n\t\t\tif(!sensorData.get(i).isValid()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"boolean is_inside(float v[])\r\n {\r\n int i;\r\n \r\n for (i = 0; i < dimension; i++)\r\n {\r\n if (v[i] < bounces[2*i] || // upper limit\r\n v[i] > bounces[2*i + 1]) // lower limit\r\n return false;\r\n }\r\n return true;\r\n }",
"public boolean hasTangents() {\n if (tangents != null) {\n return tangents.length > 0;\n }\n return false;\n }",
"public boolean checkCollisions(Tuple camera) {\n\n\t\t// already exploded\n\t\tif(disabled > 0) {\n\t\t\treturn false;\n\t\t} // if\n\t\t\n\t\t// collision detected\n\t\tif(location.distance(camera) - size < SHIP_SIZE) {\n\t\t\tdisabled = 1;\n\t\t\treturn true;\n\t\t} // if\n\t\treturn false;\n\t}",
"@Override\n public boolean hasValenceError() {\n String valenceCheck = atom.checkBadValence();\n//\n// System.out.println(\"valenceCheckBad \" + valenceCheck);\n// System.out.println(\"calling actual checkValence \" + atom.checkValence());\n// System.out.println(\"valenceCheckBad again \" + atom.checkBadValence());\n return !valenceCheck.isEmpty();\n }",
"private void checkCollisions() {\n float x = pacman.getPos().x;\n float y = pacman.getPos().y;\n\n GameEntity e;\n for (Iterator<GameEntity> i = entities.iterator(); i.hasNext(); ) {\n e = i.next();\n // auf kollision mit spielfigur pruefen\n if (Math.sqrt((x - e.getPos().x) * (x - e.getPos().x) + (y - e.getPos().y) * (y - e.getPos().y)) < 0.5f)\n if (e.collide(this, pacman))\n i.remove();\n }\n }",
"public void checkNextPosition(ArrayList<Entity> entities, XY nextPos) {\n for (Entity e : entities) {\n if (nextPos.getX() == e.getPos().getX()) {\n if (nextPos.getY() == e.getPos().getY()) {\n\n if (e instanceof GoodPlant) {\n this.updateEnergy(e.getEnergy());\n e.setAlive(false);\n } else {\n //toDo: handle other entities\n }\n }\n }\n }\n }",
"public void updateVelocity (Body[] bodies, int dt) {\n this.updateAcceleration(bodies);\n this.vx += 0.5 * (this.ax + this.axplusone) * dt;\n this.vy += 0.5 * (this.ay + this.ayplusone) * dt;\n }",
"public boolean isValid(){\n\t\treturn points.size() >= 2;\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}",
"public void validate() {\n transportStats.validate(this);\n\n for (String unitName : produces) {\n Args.validate(!UnitFactory.hasUnitForName(unitName), \"Illegal unit name \" + unitName + \" in build unit stats\");\n }\n\n for (Map.Entry<String, String> entry : buildCities.entrySet()) {\n String terrainName = entry.getKey();\n String cityName = entry.getValue();\n Args.validate(!TerrainFactory.hasTerrainForName(terrainName), \"Illegal terrain \" + terrainName + \" in build cities stats\");\n Args.validate(!CityFactory.hasCityForName(cityName), \"Illegal city \" + cityName + \" in build cities stats\");\n }\n\n for (String unitName : supplyUnits) {\n Args.validate(!UnitFactory.hasUnitForName(unitName), \"Illegal unit \" + unitName + \" in supply units stats\");\n }\n\n for (String unitName : supplyUnitsInTransport) {\n Args.validate(!UnitFactory.hasUnitForName(unitName), \"Illegal unit \" + unitName + \" in supply units in transport stats\");\n }\n\n Args.validate(StringUtil.hasContent(primaryWeaponName) && !WeaponFactory.hasWeapon(primaryWeaponName),\n \"Illegal primary weapon \" + primaryWeaponName + \" for unit \" + name);\n Args.validate(StringUtil.hasContent(secondaryWeaponName) && !WeaponFactory.hasWeapon(secondaryWeaponName),\n \"Illegal secondary weapon \" + secondaryWeaponName + \" for unit \" + name);\n }",
"private boolean isValidPosition(RotorPosition positionToValidate) {\n return !((positionToValidate == RotorPosition.GREEK && numberOfRotors != 4)\n || positionToValidate == RotorPosition.REFLECTOR);\n }",
"@Test\n public void checkValidEntity() {\n cleanEntity0();\n entity0 = EntityUtil.getSampleRole();\n final Set<ConstraintViolation<Object>> cv = PersistenceValidation.validate(entity0);\n assertTrue(cv.isEmpty());\n }",
"public static void checkCollisions() {\n\t \n\t\tfor (Ball b1 : Panel.balls) {\n\t\t\tfor (Ball b2 : Panel.balls) {\n\t\t\t\tif (b1.Bounds().intersects(b2.Bounds()) && !b1.equals(b2)) {\t\t\t//checking for collision and no equals comparisions\n\t\t\t\t\tint vX = b1.getxVelocity();\n\t\t\t\t\tint vY = b1.getyVelocity();\n\t\t\t\t\tb1.setxVelocity(b2.getxVelocity());\t\t\t\t\t\t\t\t//reversing velocities of each Ball object\n\t\t\t\t\tb1.setyVelocity(b2.getyVelocity());\n\t\t\t\t\tb2.setxVelocity(vX);\n\t\t\t\t\tb2.setyVelocity(vY);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void validate() throws org.apache.thrift.TException {\n if (limb == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'limb' was not present! Struct: \" + toString());\n }\n if (pos == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'pos' was not present! Struct: \" + toString());\n }\n if (ori == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'ori' was not present! Struct: \" + toString());\n }\n if (speed == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'speed' was not present! Struct: \" + toString());\n }\n if (angls == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'angls' was not present! Struct: \" + toString());\n }\n if (mode == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'mode' was not present! Struct: \" + toString());\n }\n if (kin == null) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'kin' was not present! Struct: \" + toString());\n }\n // check for sub-struct validity\n if (pos != null) {\n pos.validate();\n }\n if (ori != null) {\n ori.validate();\n }\n if (speed != null) {\n speed.validate();\n }\n if (angls != null) {\n angls.validate();\n }\n }",
"public boolean isValid(World world, BlockPos pos, IBlockState state) {\n return true;\n }",
"boolean checkValidPt(DoubleMatrix1D y){\n for(int dof=0; dof<numDOFs; dof++){\n if(y.get(dof)<DOFmin.get(dof) || y.get(dof)>DOFmax.get(dof))\n return false;\n }\n \n if(of.getValue(y)>thresh)\n return false;\n \n return true;\n }",
"public void checkWorldCollisions(Bounds bounds) {\n final boolean atRightBorder = getShape().getLayoutX() >= (bounds.getMaxX() - RADIUS);\n final boolean atLeftBorder = getShape().getLayoutX() <= RADIUS;\n final boolean atBottomBorder = getShape().getLayoutY() >= (bounds.getMaxY() - RADIUS);\n final boolean atTopBorder = getShape().getLayoutY() <= RADIUS;\n final double padding = 1.00;\n\n if (atRightBorder) {\n getShape().setLayoutX(bounds.getMaxX() - (RADIUS * padding));\n velX *= frictionX;\n velX *= -1;\n }\n if (atLeftBorder) {\n getShape().setLayoutX(RADIUS * padding);\n velX *= frictionX;\n velX *= -1;\n }\n if (atBottomBorder) {\n velY *= -1;\n velY *= frictionY;\n getShape().setLayoutY(bounds.getMaxY() - (RADIUS * padding));\n }\n if (atTopBorder) {\n velY *= -1;\n velY *= frictionY;\n getShape().setLayoutY(RADIUS * padding);\n }\n }",
"public boolean isValid() {\n\t\tboolean result;\n\t\tDate mySD = this.getStartDate();\n\t\tDate myED = this.getEndDate();\n\t\tTime myST = this.getStartTime();\n\t\tTime myET = this.getEndTime();\n\n\t\tif (myED.isBefore(mySD)) { //end is before start\n\t\t\tresult = false;\n\t\t} else if (myED.isEquals(mySD)) { //start and end same day\n\t\t\tif (myET.compareTo(myST) < 0) { //end time before start time\n\t\t\t\tresult = false;\n\t\t\t} else { result = true;\t}\n\t\t} else { result = true;\t}\n\n\t\treturn result;\n\t}",
"@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 overlapAnyEntity(){\n \treturn this.getSuperWorld().getEntities().stream().anyMatch(T ->this.overlap(T));\n }",
"private boolean isValid() throws InvalidStateException{\n if (this.homeTeam == null || this.visitingTeam == null){\n return false;\n }else{\n return true;\n }\n }",
"boolean hasVector2Value();",
"public static boolean checkVacuumCleaner(Criteria criteria) {\r\n\r\n\t\tif (criteria.containsKey(\"POWER_CONSUMPTION\")) {\r\n\t\t\tif (Integer.parseInt(criteria.getValue(\"POWER_CONSUMPTION\").toString()) <= 0\r\n\t\t\t\t\t|| Integer.parseInt(criteria.getValue(\"POWER_CONSUMPTION\").toString()) >= 1000) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (criteria.containsKey(\"CLEANING_WIDTH\")) {\r\n\t\t\tif (Integer.parseInt(criteria.getValue(\"CLEANING_WIDTH\").toString()) <= 0\r\n\t\t\t\t\t|| Integer.parseInt(criteria.getValue(\"CLEANING_WIDTH\").toString()) >= 100) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (criteria.containsKey(\"MOTOR_SPEED_REGULATION\")) {\r\n\t\t\tif (Integer.parseInt(criteria.getValue(\"MOTOR_SPEED_REGULATION\").toString()) <= 0\r\n\t\t\t\t\t|| Integer.parseInt(criteria.getValue(\"MOTOR_SPEED_REGULATION\").toString()) >= 100) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}",
"public boolean isAssetValid(T asset);",
"public boolean checkCollisionWithBall(Ball ball, float delta) {\n return false;\n }"
]
| [
"0.6149655",
"0.58437115",
"0.5670564",
"0.5538089",
"0.5451149",
"0.5377196",
"0.5123038",
"0.5120212",
"0.5079027",
"0.5065448",
"0.49767208",
"0.4968295",
"0.49564472",
"0.49489492",
"0.49390057",
"0.492618",
"0.4890504",
"0.48774245",
"0.48066264",
"0.4802815",
"0.47956502",
"0.47641346",
"0.47516173",
"0.47162372",
"0.4695324",
"0.46902925",
"0.467312",
"0.4665575",
"0.4649825",
"0.4647068",
"0.46425092",
"0.46239153",
"0.46228164",
"0.46070403",
"0.4588285",
"0.4587225",
"0.45854968",
"0.4585278",
"0.45817527",
"0.45758668",
"0.45709106",
"0.4553239",
"0.45476636",
"0.45414084",
"0.45399696",
"0.45373243",
"0.45288315",
"0.4513558",
"0.45087197",
"0.44958857",
"0.44930926",
"0.44917285",
"0.44907925",
"0.44881445",
"0.44845918",
"0.4481397",
"0.44796023",
"0.44626454",
"0.44623524",
"0.44546068",
"0.44468188",
"0.4446755",
"0.44399038",
"0.44392285",
"0.4438105",
"0.4424954",
"0.44234172",
"0.44203076",
"0.4415205",
"0.44077754",
"0.44072798",
"0.43972954",
"0.43908533",
"0.43723327",
"0.43708396",
"0.4368543",
"0.43661103",
"0.43405542",
"0.43397155",
"0.43365285",
"0.43292597",
"0.4328546",
"0.432098",
"0.43174887",
"0.43152714",
"0.43110198",
"0.43096587",
"0.43087864",
"0.43046588",
"0.4303534",
"0.43030396",
"0.42995617",
"0.42981866",
"0.4297477",
"0.42949185",
"0.4294389",
"0.42934108",
"0.42928347",
"0.42877308",
"0.4285717"
]
| 0.63415176 | 0 |
Returns the maximum velocity of the entity. | @Basic @Raw @Immutable
public double getMaxVelocity(){
return this.maxVelocity = SPEED_OF_LIGHT;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Basic\n\t@Raw\n\t@Immutable\n\tpublic static double getVelocityUpperBound() {\n\t\treturn VELOCITYUPPERBOUND;\n\t}",
"@Basic\n\tpublic double getVxmax() {\n\t\treturn this.vxmax;\n\t}",
"private double getVelocity() {\n \tif (currentState == DriveState.accelerating) {\n \t\treturn acceleration * timer.get();\n \t}\n \telse if (currentState == DriveState.cruisung) {\n \t\treturn maxVelocity;\n \t}\n \telse if (currentState == DriveState.decelerating) {\n \t\treturn maxVelocity - acceleration * (timer.get());\n \t}\n \t\t\n \treturn 0;\n }",
"public float getVerticalVelocity( )\r\n {\r\n return this.v_velocity;\r\n }",
"public Velocity getVelocity() {\r\n return this.v.getVelocity();\r\n }",
"public double getVelocity() {\n\t\treturn velocity.getlength();\n\t}",
"public float getMaxTranslationVel(int xform) {\n\t\treturn m_xforms[xform].m_maxTranslationVel;\n\t}",
"public double getVelocity() {\n return mV;\n }",
"public final double getMax() {\r\n\t\treturn this.m_max;\r\n\t}",
"public double getVelocity() {\n return _avTable.getDouble(ATTR_VELOCITY, 0.0);\n }",
"double getMax() {\n\t\t\treturn value_max;\n\t\t}",
"public Velocity getVelocity() {\n return this.velocity;\n }",
"public double getMaximum() {\n return (max);\n }",
"public double getVelocityY() {\n\t\treturn velocity.getY();\n\t}",
"public double getMaxSpeed() {\r\n return maxSpeed;\r\n }",
"public float maxSpeed();",
"public org.bukkit.util.Vector getVelocity ( ) {\n\t\treturn invokeSafe ( \"getVelocity\" );\n\t}",
"public Velocity getVelocity() {\r\n return this.vel;\r\n }",
"public float getMaxRotationVel(int xform) {\n\t\treturn m_xforms[xform].m_maxRotationVel;\n\t}",
"@Raw\n private void setMaxVelocity(double max){\n \tif (!isValidMaxVelocity(max)) this.maxVelocity = SPEED_OF_LIGHT;\n \telse this.maxVelocity = max;\n }",
"public Velocity getVelocity() {\n return this.v;\n\n }",
"public double getMaxVal() {\n return maxVal;\n }",
"public double getMaxSpeedValue() {\n return maxSpeedValue;\n }",
"@JSProperty(\"max\")\n double getMax();",
"public Point2D.Float getVelocity() {\r\n\t\treturn velocity;\r\n\t}",
"public float getOxygenMax() {\n return oxygenMax;\n }",
"public final Vector2D getVelocity() {\n return velocity;\n }",
"public double getMaxT() {\n return v[points_per_segment - 1];\n }",
"public double getYVel() {\n return this.yVel;\n }",
"public Vector2D getVelocity()\n\t{\n\t\treturn velocity;\n\t}",
"public Double getMaximum() {\n\t\treturn maximum;\n\t}",
"public long getPropertyVolumeMax()\n {\n return iPropertyVolumeMax.getValue();\n }",
"public float getMax()\n {\n parse_text();\n return max;\n }",
"public Vector3d getVelocity() {\n return getMotion().getVelocity();\n }",
"public double max() {\n\t\tif (count() > 0) {\n\t\t\treturn _max.get();\n\t\t}\n\t\treturn 0.0;\n\t}",
"public float maxTorque();",
"public double getVelocity()\n {\n return velocity * FPS;\n }",
"public Vector2f getVelocity()\n\t{\n\t\treturn this.vel;\n\t}",
"Double getMaximumValue();",
"public double getMaximumValue() { return this.maximumValue; }",
"public float getAngularVelocity () {\n\t\treturn body.getAngularVelocity();\n\t}",
"public Double getMaximumValue () {\r\n\t\treturn (maxValue);\r\n\t}",
"public float _getMax()\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n return (getMaximum() / max);\r\n } else\r\n {\r\n return getMaximum();\r\n }\r\n }",
"public double getVelocity() {\n return 360000./(projDensity * projRadius);\n }",
"@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 }",
"public double getMaxValue() {\r\n\t\treturn maxValue;\r\n\t}",
"public Point getMax () {\r\n\r\n\treturn getB();\r\n }",
"public DoubleMatrix1D getDeltaMax() { return deltaMax_; }",
"@Basic\n\tpublic double getYVelocity(){\n\t\treturn this.yVelocity;\n\t}",
"@Override\n\tpublic int getMaxSpeed() {\n\t\treturn super.getMaxSpeed();\n\t}",
"public int getMax() {\n\t\treturn getMax(0.0f);\n\t}",
"final static double getMaxVelocity(double distance) {\n final double decelTime = Math.max(1, Math.ceil(\n //sum of 0... decelTime, solving for decelTime\n //using quadratic formula, then simplified a lot\n Math.sqrt(distance + 1) - 0.5));\n\n final double decelDist = (decelTime) * (decelTime - 1);\n // sum of 0..(decelTime-1)\n // * Rules.DECELERATION*0.5;c\n\n return ((decelTime - 1) * 2) + ((distance - decelDist) / decelTime);\n }",
"double getMax();",
"double getMax();",
"public Vector2f getVelocity(){\n\t\treturn velocity.copy();\n\t}",
"public int getVelocity()\n\t{\n\t\treturn logDx;\n\t}",
"public long getPropertyVolumeMax();",
"public int getMaxSpeed() {\n\t\treturn this.maxSpeed;\n\t}",
"@Override\n\tpublic float getAngularVelocity() {\n\t\treturn body.getAngularVelocity();\n\t}",
"public float getMaxValue();",
"public double max() {\n return max(0.0);\n }",
"@Override\n\tpublic Vector2 getLinearVelocity() {\n\t\treturn body.getLinearVelocity();\n\t}",
"public int getMaxSpeed() {\n return MaxSpeed;\n }",
"public double getCurrentVelocity( )\r\n {\r\n return Math.sqrt( this.h_velocity * this.h_velocity + this.v_velocity * this.v_velocity );\r\n }",
"public double getVelocity() {\n \treturn this.currentSpeed;\n }",
"public double getmaxVolume() {\n\t return this.maxVolume;\n\t}",
"Expression getMax();",
"@Override\n\tpublic float getMaxAngularSpeed() {\n\t\treturn MaxAngularSpeed;\n\t}",
"E maxVal();",
"public float getMaxTorque() {\n return jniGetMaxTorque(addr);\n }",
"private Vector2d limitVelocity(Vector2d velocity) {\n\t\tdouble currentVelocity = velocity.length();\n\t\tif (course.maxVelocity < currentVelocity) {\n\t\t\treturn velocity.divide(currentVelocity).multiply(course.maxVelocity);\n\t\t}\n\t\treturn velocity;\n\t}",
"public Vector3f getAngularVelocity() {\n return Converter.convert(rBody.getAngularVelocity(tempVec));\n }",
"public double getxMaxSpeed() {\n return this.X_MAX_SPEED;\n }",
"public float getMaxForce() {\n return jniGetMaxForce(addr);\n }",
"public E calculateMaximum() {\n return FindMaximum.calculateMaximum(x , y , z);\n }",
"public double max()\n\n {\n double max=xyValueArray.get(0).getY();\n\n for (int i = 0; i < xyValueArray.size(); i++) {\n if (xyValueArray.get(i).getY() > max) {\n max = xyValueArray.get(i).getY();\n }\n }\n return max;\n }",
"public double getMaxCoordinateValue() {\n if (this.max_x > this.max_y)\n return this.max_x;\n else\n return this.max_y;\n }",
"public double max() {\n/* 323 */ Preconditions.checkState((this.count != 0L));\n/* 324 */ return this.max;\n/* */ }",
"public long getMax() {\n return m_Max;\n }",
"public double max(){\r\n\t\t//variable for max val\r\n\t\tdouble max = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the maximum is less than the current index, change max to that value\r\n\t\t\tif (max < this.data[i]){\r\n\t\t\t\tmax = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return the maximum val\r\n\t\treturn max;\r\n\t}",
"public Point2D.Float getVelocityPPT() {\n return velocityPPT;\n }",
"public Number getMaximum() {\n return ((ADocument) getDocument()).max;\n }",
"@Override\n public double getMaxSpeed() {\n return myMovable.getMaxSpeed();\n }",
"public double getMaxY() {\n\t\treturn my;\n\t}",
"public long getMaximum() {\n\t\treturn this._max;\n\t}",
"public double getVelocity() {\n return spark_encoder.getVelocity();\n }",
"public Long getMaximum() {\r\n\t\treturn maximum;\r\n\t}",
"public double getMaximumDouble() {\n/* 255 */ return this.max;\n/* */ }",
"@Model\n private boolean isValidMaxVelocity(double max){\n \treturn !(max > SPEED_OF_LIGHT || !Helper.isValidDouble(max) || max < 0);\n }",
"public double getAltMax() {\n\t\treturn altMax;\n\t}",
"public abstract float getMaxValue();",
"private double getMax() {\n return Collections.max(values.values());\n }",
"double getVy() { return vel[1]; }",
"public double getYRangeMax() {\n return yRangeMax;\n }",
"public Vector2D getVelocity ();",
"public Long getMaxValue() {\n return maxValue;\n }",
"public int getMaximum() {\r\n return max;\r\n }",
"public double getMaxVehicleLength() {\n return Math.max(maxCarLength, maxTruckLength);\n }",
"public BigDecimal maxPrice() {\n return this.maxPrice;\n }",
"public double getVelocitySize() {\r\n return Math.sqrt(this.dx * this.dx + this.dy * this.dy);\r\n }"
]
| [
"0.7145425",
"0.7119568",
"0.70385295",
"0.70384556",
"0.6882606",
"0.6842881",
"0.67973566",
"0.6766785",
"0.66919875",
"0.66754645",
"0.6672024",
"0.66366464",
"0.66136825",
"0.6586467",
"0.6568161",
"0.65602595",
"0.6558178",
"0.6544791",
"0.65384716",
"0.65170485",
"0.651041",
"0.6507653",
"0.6504166",
"0.6500021",
"0.64964277",
"0.649061",
"0.6487747",
"0.6484747",
"0.64838386",
"0.6479639",
"0.64774686",
"0.6472296",
"0.6467836",
"0.6455971",
"0.6449502",
"0.6438071",
"0.6424852",
"0.6424582",
"0.6413946",
"0.64112544",
"0.64004004",
"0.6396062",
"0.6390743",
"0.63904667",
"0.63766515",
"0.63559604",
"0.63556755",
"0.6350997",
"0.6350476",
"0.63365525",
"0.6324596",
"0.631803",
"0.63112015",
"0.63112015",
"0.63102955",
"0.62970084",
"0.6296843",
"0.6276576",
"0.6269601",
"0.62681025",
"0.626593",
"0.6244884",
"0.6239624",
"0.6236356",
"0.623533",
"0.62106544",
"0.6200475",
"0.61994225",
"0.6199165",
"0.61901814",
"0.6188425",
"0.61852944",
"0.61848646",
"0.61815405",
"0.61565655",
"0.6155982",
"0.6151329",
"0.6149491",
"0.61464226",
"0.61394286",
"0.61344343",
"0.6131039",
"0.612158",
"0.6116114",
"0.61058474",
"0.60990375",
"0.60923713",
"0.6081534",
"0.6068644",
"0.60652345",
"0.6059743",
"0.6058116",
"0.6057656",
"0.60504705",
"0.60373455",
"0.60297465",
"0.60241526",
"0.6017925",
"0.60141236",
"0.6007429"
]
| 0.78084594 | 0 |
A method which sets the value of the maximum (total) velocity of an entity. | @Raw
private void setMaxVelocity(double max){
if (!isValidMaxVelocity(max)) this.maxVelocity = SPEED_OF_LIGHT;
else this.maxVelocity = max;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Basic @Raw @Immutable\n public double getMaxVelocity(){\n return this.maxVelocity = SPEED_OF_LIGHT;\n }",
"@JSProperty(\"max\")\n void setMax(double value);",
"public void setMaxTranslationVel(float maxVel, int xform) {\n\t\tm_xforms[xform].m_maxTranslationVel = maxVel;\n\t}",
"protected void setVxmax(double vxmax) {\n\t\tthis.vxmax = vxmax;\n\t}",
"public void restrictVelocity() {\n\t\tif (velocity.x > MAX_VELOCITY.x)\r\n\t\t\tvelocity.x = MAX_VELOCITY.x;\r\n\t\tif (velocity.y > MAX_VELOCITY.y)\r\n\t\t\tvelocity.y = MAX_VELOCITY.y;\r\n\t\t\r\n\t\tif (velocity.x < -MAX_VELOCITY.x)\r\n\t\t\tvelocity.x = -MAX_VELOCITY.x;\r\n\t\tif (velocity.y < -MAX_VELOCITY.y)\r\n\t\t\tvelocity.y = -MAX_VELOCITY.y;\r\n\t}",
"private void updateVelocity() {\n\t \t//Update x velocity\n\t \tif (getNode().getTranslateX() > MAX_SPEED_X) {\n\t \t\tsetvX(MAX_SPEED_X);\n\t \t} else if (getNode().getTranslateX() < -MAX_SPEED_X) {\n\t \t\tsetvX(-MAX_SPEED_X);\n\t } else {\n\t \t\tsetvX(getNode().getTranslateX());\n\t \t}\n\n\t \t//Update x velocity\n\t \tif (getNode().getTranslateY() > MAX_SPEED_Y) {\n\t \t\tsetvY(MAX_SPEED_Y);\n\t \t} else if (getNode().getTranslateY() < -MAX_SPEED_Y) {\n\t \t\tsetvY(-MAX_SPEED_Y);\n\t \t} else {\n\t \t\tsetvY(getNode().getTranslateY());\n\t \t}\n\t }",
"public void setVelocity(double value) {\n _avTable.set(ATTR_VELOCITY, value);\n }",
"public void setMaxSpeed(double value) {\n super.setMaxSpeed(value);\n }",
"public void updateVelocity(){\r\n if (getPosition().x <= 0 || getPosition().x >= GameBoard.MAX_X) {\r\n setVelocity(getVelocity().add(getVelocity().mul(reverse)));\r\n }\r\n }",
"@Override\n public void setValue(Point3D value) {\n this.velocity = value;\n }",
"public void setMaxRotationVel(float maxVel, int xform) {\n\t\tm_xforms[xform].m_maxRotationVel = maxVel;\n\t}",
"void setVelocity(int vel) {\n\t\tthis.velocity = vel;\n\t}",
"public void setVelocity () {\n\t\t\tfb5.getCommunicationModule().setClientHandler(null);\n\t\t\tif(state == BotMove.SHARP_RIGHT){\n\t\t\t\tfb5.setVelocity((byte)200,(byte)0);\n\t\t\t}\n\t\t\telse if(state == BotMove.LEFT){\n\t\t\t\tfb5.setVelocity((byte)100,(byte)200);\n\t\t\t}\n\t\t\telse if(state == BotMove.SOFT_RIGHT){\n\t\t\t\tfb5.setVelocity((byte)200,(byte)100);\n\t\t\t}\n\t\t\telse if(state == BotMove.FORWARD){\n\t\t\t\twt.turning = false;\n\t\t\t\tLog.d(TAG,\"Setting forward velocity\");\n\t\t\t\tfb5.setVelocity((byte)150,(byte)150);\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(state == BotMove.STOP){\n\t\t\t\twt.turning = false;\n\t\t\t\tfb5.setVelocity((byte)0,(byte)0);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfb5.moveForward();\n\t\t\tfb5.accModifiedStart();\n\t\t}",
"public void setMax ( Point max ) {\r\n\r\n\tsetB ( max );\r\n }",
"protected void calcVelocity()\n\t{}",
"public void setMaxSpeed() {\n\t\tspeed = MAX_SPEED;\n\t}",
"private double getVelocity() {\n \tif (currentState == DriveState.accelerating) {\n \t\treturn acceleration * timer.get();\n \t}\n \telse if (currentState == DriveState.cruisung) {\n \t\treturn maxVelocity;\n \t}\n \telse if (currentState == DriveState.decelerating) {\n \t\treturn maxVelocity - acceleration * (timer.get());\n \t}\n \t\t\n \treturn 0;\n }",
"public void setMaxTranslationVel(float maxVel) {\n\t\tm_xforms[NvCameraXformType.MAIN].m_maxTranslationVel = maxVel;\n\t}",
"public float maxTorque();",
"public void setMaximum() {\n getReel().setMaxValue(getVerticalScrollBar().getMaximum());\n }",
"public void setMaximumValue(double maximumValue)\n {\n this.maximumValue = maximumValue;\n }",
"public void setMaxVal(double maxVal) {\n this.maxVal = maxVal;\n }",
"public void setMaximumValue (Double max) {\r\n\t\tmaxValue = max;\r\n\t}",
"public void setVelocity(Velocity v) {\n this.velocity = v;\n }",
"public void setVelocity(Velocity v) {\n this.velocity = v;\n }",
"public void setVelocity(Velocity v) {\n this.velocity = v;\n }",
"public void setMaximumValue (double max) {\r\n\t\tmaxValue = new Double(max);\r\n\t}",
"public void setVerticalVelocity( final float velocity )\r\n {\r\n this.v_velocity = velocity;\r\n }",
"@Override\n\tpublic void setMaxAngularSpeed(float maxAngularSpeed) {\n\t\tthis.MaxAngularSpeed = MaxAngularSpeed;\n\t\t\n\t}",
"private Vector2d limitVelocity(Vector2d velocity) {\n\t\tdouble currentVelocity = velocity.length();\n\t\tif (course.maxVelocity < currentVelocity) {\n\t\t\treturn velocity.divide(currentVelocity).multiply(course.maxVelocity);\n\t\t}\n\t\treturn velocity;\n\t}",
"void setMaxValue();",
"public void setMaximumPoint(BlockVector pt) {\r\n setMinMaxPoints(this.getMinimumPoint(), pt);\r\n }",
"public float getVerticalVelocity( )\r\n {\r\n return this.v_velocity;\r\n }",
"public double getVelocity() {\n return mV;\n }",
"public void setVelocity(String value) {\n setVelocity(Format.toDouble(value));\n }",
"@JSProperty(\"softMax\")\n void setSoftMax(double value);",
"public void setMaxprice(int value) {\n this.maxprice = value;\n }",
"public void setMaximum( final double max )\n\t{\n\t\tthis.max = max;\n\t\tthis.oneOverMax = 1d / this.max;\n\t}",
"public void setMaxSpeed(double maxSpeed) {\r\n this.maxSpeed = maxSpeed;\r\n }",
"public void SetMaxVal(int max_val);",
"public void setVelocity(Velocity v) {\r\n this.vel = v;\r\n }",
"public void setVelocity(Velocity velocity) {\n this.v = velocity;\n }",
"@JSProperty(\"maxRange\")\n void setMaxRange(double value);",
"@Basic\n\t@Raw\n\t@Immutable\n\tpublic static double getVelocityUpperBound() {\n\t\treturn VELOCITYUPPERBOUND;\n\t}",
"public void setVelocity ( org.bukkit.util.Vector velocity ) {\n\t\texecute ( handle -> handle.setVelocity ( velocity ) );\n\t}",
"public void update(Vehicle v, float dt) {\nPoint2D.Float p = v.getPosition();\r\nPoint2D.Float tp = target.getPosition();\r\nPoint2D.Float desired_velocity = new Point2D.Float(tp.x - p.x , tp.y - p.y);\r\nVehicle.scale(desired_velocity, v.getMaxSpeed());\r\nv.updateSteering(desired_velocity.x, desired_velocity.y);\r\n}",
"public void setMaxSpeed(double speed){\n\t\tthis.speed = speed;\n\t}",
"@Model\n private boolean isValidMaxVelocity(double max){\n \treturn !(max > SPEED_OF_LIGHT || !Helper.isValidDouble(max) || max < 0);\n }",
"public void setMaxSpeed(float max_speed)\n\t{\n\t\tthis.max_speed = max_speed;\n\t}",
"public void setMaxValue(double x) {\r\n\t\tmaxValue = x;\r\n\t}",
"@Override\n public Point3D getValue() {\n return velocity;\n }",
"public void setVelocityY(double y) {\n\t\tvelocity.setY(y);\n\t}",
"@Basic\n\tpublic double getVxmax() {\n\t\treturn this.vxmax;\n\t}",
"public float maxSpeed();",
"public float getMaxTranslationVel(int xform) {\n\t\treturn m_xforms[xform].m_maxTranslationVel;\n\t}",
"void addVelocityValue(int velocityValue);",
"public Velocity getVelocity() {\n return this.velocity;\n }",
"@Override\n\tpublic int getMaxSpeed() {\n\t\treturn super.getMaxSpeed();\n\t}",
"public Velocity getVelocity() {\n return this.v;\n\n }",
"@Raw\n protected void setVelocity(double xVelocity, double yVelocity){\n if ( !isValidVelocity(xVelocity, yVelocity)){\n this.velocity.setVelocity(0.0, 0.0);\n }\n else {\n this.velocity.setVelocity(xVelocity, yVelocity);\n }\n }",
"static void resetVelocity(){currentVelocity = INITIAL_SPEED;}",
"@Override\n\tprotected void execute() {\n\t\t// Code for finding max velocity of a given motor\n\t\t// var currentVel = kDrive.getLeftVelocity();\n\t\t// if (currentVel > maxVelocity) {\n\t\t// maxVelocity = currentVel;\n\t\t// System.out.println(maxVelocity);\n\t\t// }\n\n\t\t// Joystick configuration\n\t\tvar throttle = -OI.joy.getY();\n\t\tvar curve = OI.joy.getX() * 0.85;\n\n\t\tdrivetrain.vbusArcade(throttle, curve);\n\n\t\tdrivetrain.sendDebugInfo();\n\t}",
"@Override\n\tpublic float getMaxAngularSpeed() {\n\t\treturn MaxAngularSpeed;\n\t}",
"public void setMaxSpeed(int MaxSpeed) {\n this.MaxSpeed = MaxSpeed;\n }",
"public Velocity getVelocity() {\r\n return this.vel;\r\n }",
"public DynamicPart max(float max) {\n this.max = max;\n return this;\n }",
"protected final void setMax() {\n\n\tint prevmax = this.max;\n\n\tint i1 = this.high;\n\tint i2 = left.max;\n\tint i3 = right.max;\n\n\tif ((i1 >= i2) && (i1 >= i3)) {\n\t this.max = i1;\n\t} else if ((i2 >= i1) && (i2 >= i3)) {\n\t this.max = i2;\n\t} else {\n\t this.max = i3;\n\t}\n\t\n\tif ((p != IntervalNode.nullIntervalNode) &&\n\t (prevmax != this.max)) {\n \t p.setMax();\n\t}\n }",
"public double getMaximumValue() { return this.maximumValue; }",
"public void setActualHP(int hp) { this.actualHP = Math.max(0, hp); }",
"public abstract float getMaxValue();",
"protected final void setMax(Comparable max)\r\n {\r\n myMax = max;\r\n }",
"public double getMaxSpeedValue() {\n return maxSpeedValue;\n }",
"public void setVy( int vy ) {\n\t\t//every velocity is valid depending on the coordinate system\n\t\tthis.vy = vy;\n\t}",
"@Override\n public double getMaxSpeed() {\n return myMovable.getMaxSpeed();\n }",
"public void setVelocity(float horizontalInput, float verticalInput) {\n\t\tbody.setLinearVelocity(speed*horizontalInput , speed*verticalInput );\n\t}",
"public void setVelocity(double velocity) {\n //set the velocity of the motors\n m_masterMotor.set(ControlMode.Velocity, velocity);\n \n //set our slave motors to follow master\n m_closeSlaveMotor.follow(m_masterMotor, FollowerType.PercentOutput);\n m_farSlaveMotor1.follow(m_masterMotor, FollowerType.PercentOutput);\n m_farSlaveMotor2.follow(m_masterMotor, FollowerType.PercentOutput);\n }",
"public void set_max(byte value) {\n setSIntBEElement(offsetBits_max(), 8, value);\n }",
"public double getYVel() {\n return this.yVel;\n }",
"public float setYMax(){\n\t\tif (game.getDifficulty() == 0)\n\t\t\treturn 72;\n\t\telse if (game.getDifficulty() == 1)\n\t\t\treturn 108;\n\t\telse\n\t\t\treturn 144;\n\t}",
"public void setVelocity(Velocity velocity) {\r\n this.v.setVelocity(velocity);\r\n }",
"public void _setMax(float max)\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n setMaximum((int) (max * 100));\r\n } else\r\n {\r\n setMaximum((int) max);\r\n }\r\n }",
"public void setMax( float max )\n { \n this.max = max;\n show_text();\n }",
"public void setVelocity(double x, double y) {\n velocityX = x;\n velocityY = y;\n }",
"public void setVelY(int velY){\r\n\t\tthis.velY = velY;\r\n\t}",
"@Override\n public void setMaxSpeed(double ms) throws InvalidDataException {\n myMovable.setMaxSpeed(ms);\n }",
"public void setVelocity(float x, float y)\n\t{\n\t\tthis.vel.x = x;\n\t\tthis.vel.y = y;\n\t}",
"public boolean setPropertyVolumeMax(long aValue);",
"public void setMaxAlturaCM(float max);",
"public double getMaxValue() {\r\n\t\treturn maxValue;\r\n\t}",
"void setMaxActiveAltitude(double maxActiveAltitude);",
"void setMaximum(int max);",
"public float getMaxValue();",
"public void setVelocity(double velocity) {\n m_motor.set(ControlMode.Velocity, toEncoderPulsesPer100ms(velocity));\n }",
"public void setActualMaxTorque(float actualMaxTorque) {\n this.actualMaxTorque = actualMaxTorque;\n setTorque(desiredTorque);\n }",
"@Override\n public void set(double value)\n {\n final String funcName = \"set\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"value=%f\", value);\n }\n\n if (!TrcUtil.inRange(value, -1.0, 1.0))\n {\n throw new IllegalArgumentException(\"Value must be in the range of -1.0 to 1.0.\");\n }\n\n if (softLowerLimitEnabled && value < 0.0 && getPosition() <= softLowerLimit\n || softUpperLimitEnabled && value > 0.0 && getPosition() >= softUpperLimit)\n {\n value = 0.0;\n }\n\n if (maxVelocity == 0.0)\n {\n currPower = value;\n }\n // else\n // {\n // controlMode = ControlMode.Velocity;\n // value *= maxVelocity;\n // value = TrcUtil.round(value); // Velocity mode is in sensor units/100ms, and sensor units are in integers.\n // }\n motor.set(value);\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"! (value=%f)\", value);\n }\n }",
"public Point2D.Float getVelocity() {\r\n\t\treturn velocity;\r\n\t}",
"public GameObject setVelocity(Vector vel) {\n\t\tthis.velocity = vel;\n\t\treturn this;\n\t}",
"private void setMax(int max) { this.max = new SimplePosition(false,false,max); }",
"public void setVelocidad(int vel)\r\n\t{\r\n\t\tvelocidad=vel;\r\n\t}",
"public void setMaxUnit(int max) {\n maxUnit = max;\n }"
]
| [
"0.70102584",
"0.66170174",
"0.652067",
"0.650302",
"0.64209014",
"0.63919175",
"0.6362484",
"0.6343297",
"0.63248533",
"0.63068974",
"0.6280459",
"0.62531",
"0.6211856",
"0.619025",
"0.61717486",
"0.6147787",
"0.61211264",
"0.61086154",
"0.6096008",
"0.6055845",
"0.6036389",
"0.60213804",
"0.6013175",
"0.6010619",
"0.6010619",
"0.6010619",
"0.6001932",
"0.600162",
"0.5989285",
"0.597748",
"0.5967781",
"0.59667546",
"0.5963588",
"0.59629154",
"0.59544873",
"0.5941386",
"0.5936537",
"0.5936419",
"0.59361297",
"0.5931993",
"0.5923916",
"0.592202",
"0.5909026",
"0.59044147",
"0.58957654",
"0.5895702",
"0.5893323",
"0.5892767",
"0.5892076",
"0.588398",
"0.5867301",
"0.5855881",
"0.58389556",
"0.58235127",
"0.58086747",
"0.5799031",
"0.57953626",
"0.57912767",
"0.57856566",
"0.5774991",
"0.57717955",
"0.5766991",
"0.57613784",
"0.5755475",
"0.5747978",
"0.5746885",
"0.57378864",
"0.57366306",
"0.573055",
"0.5724945",
"0.5724193",
"0.5719709",
"0.57177836",
"0.57161736",
"0.5709846",
"0.5705896",
"0.57057834",
"0.57055074",
"0.5703314",
"0.57009906",
"0.56995773",
"0.56952935",
"0.5695184",
"0.56895596",
"0.5675105",
"0.5672538",
"0.5670278",
"0.5665795",
"0.5658471",
"0.56532645",
"0.5652766",
"0.5651933",
"0.56512547",
"0.5646783",
"0.56331265",
"0.56300145",
"0.56285757",
"0.5627418",
"0.5625631",
"0.56183004"
]
| 0.74434036 | 0 |
A method which checks whether or a not a given velocity is a valid maxVelocity. | @Model
private boolean isValidMaxVelocity(double max){
return !(max > SPEED_OF_LIGHT || !Helper.isValidDouble(max) || max < 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Model\n private boolean isValidVelocity(double velocityX, double velocityY){\n return (Math.hypot(velocityX, velocityY) <= maxVelocity && Velocity.isValidVelocity(velocityX, velocityY));\n }",
"@Raw\n private void setMaxVelocity(double max){\n \tif (!isValidMaxVelocity(max)) this.maxVelocity = SPEED_OF_LIGHT;\n \telse this.maxVelocity = max;\n }",
"private Vector2d limitVelocity(Vector2d velocity) {\n\t\tdouble currentVelocity = velocity.length();\n\t\tif (course.maxVelocity < currentVelocity) {\n\t\t\treturn velocity.divide(currentVelocity).multiply(course.maxVelocity);\n\t\t}\n\t\treturn velocity;\n\t}",
"public void restrictVelocity() {\n\t\tif (velocity.x > MAX_VELOCITY.x)\r\n\t\t\tvelocity.x = MAX_VELOCITY.x;\r\n\t\tif (velocity.y > MAX_VELOCITY.y)\r\n\t\t\tvelocity.y = MAX_VELOCITY.y;\r\n\t\t\r\n\t\tif (velocity.x < -MAX_VELOCITY.x)\r\n\t\t\tvelocity.x = -MAX_VELOCITY.x;\r\n\t\tif (velocity.y < -MAX_VELOCITY.y)\r\n\t\t\tvelocity.y = -MAX_VELOCITY.y;\r\n\t}",
"public boolean isVelocityValid() {\n return velocityValid;\n }",
"public boolean overMax() {\n if (this.levelMessage.getDoubleParameter() > this.configuration.getMaximalLimitLevel()) {\n return true;\n }\n return false;\n }",
"private static boolean isUnsafeVelocity(Vector vel) {\n/* 448 */ double x = vel.getX();\n/* 449 */ double y = vel.getY();\n/* 450 */ double z = vel.getZ();\n/* */ \n/* 452 */ if (x > 4.0D || x < -4.0D || y > 4.0D || y < -4.0D || z > 4.0D || z < -4.0D) {\n/* 453 */ return true;\n/* */ }\n/* */ \n/* 456 */ return false;\n/* */ }",
"@Basic @Raw @Immutable\n public double getMaxVelocity(){\n return this.maxVelocity = SPEED_OF_LIGHT;\n }",
"private boolean isValidOption(int choice, int maxChoice)\n {\n return choice > 0 && choice <= maxChoice;\n }",
"public boolean nearMaxMin() {\n double water = this.levelMessage.getDoubleParameter();\n double no = (this.configuration.getMaximalLimitLevel()\n - this.configuration.getMaximalNormalLevel()) / 4;\n if (water > this.configuration.getMaximalLimitLevel()\n || water > this.configuration.getMaximalLimitLevel() - no) {\n return true;\n } else if (water < this.configuration.getMinimalLimitLevel()\n || water < this.configuration.getMinimalLimitLevel() + no) {\n\n return true;\n }\n return false;\n }",
"public void setMaxRotationVel(float maxVel, int xform) {\n\t\tm_xforms[xform].m_maxRotationVel = maxVel;\n\t}",
"public boolean isValidVx(double vx) {\n\t\treturn ((-getVxmax() <= vx && vx <= -getVxi())\n\t\t\t\t|| (vx == 0)\n\t\t\t\t|| (getVxi() <= vx && vx <= getVxmax()));\n\t}",
"public void setMaxTranslationVel(float maxVel, int xform) {\n\t\tm_xforms[xform].m_maxTranslationVel = maxVel;\n\t}",
"public void setMaxTranslationVel(float maxVel) {\n\t\tm_xforms[NvCameraXformType.MAIN].m_maxTranslationVel = maxVel;\n\t}",
"public void validateMaximum() {\n/* */ double newMax;\n/* */ try {\n/* 392 */ newMax = Double.parseDouble(this.maximumRangeValue.getText());\n/* 393 */ if (newMax <= this.minimumValue) {\n/* 394 */ newMax = this.maximumValue;\n/* */ }\n/* */ }\n/* 397 */ catch (NumberFormatException e) {\n/* 398 */ newMax = this.maximumValue;\n/* */ } \n/* */ \n/* 401 */ this.maximumValue = newMax;\n/* 402 */ this.maximumRangeValue.setText(Double.toString(this.maximumValue));\n/* */ }",
"protected void setVxmax(double vxmax) {\n\t\tthis.vxmax = vxmax;\n\t}",
"public boolean nearMaxRescue() {\n double water = this.waterLevel;\n double no = (this.configuration.getMaximalLimitLevel()\n - this.configuration.getMaximalNormalLevel()) / 2;\n if (water > this.configuration.getMaximalLimitLevel()\n || water > this.configuration.getMaximalLimitLevel() - no) {\n return true;\n } else if (water < this.configuration.getMinimalLimitLevel()\n || water < this.configuration.getMinimalLimitLevel() + no) {\n\n return true;\n }\n return false;\n }",
"public void disableVelocityMode()\n {\n final String funcName = \"disableVelocityMode\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n this.maxVelocity = 0.0;\n }",
"public boolean isMaximumBetter(){\n return false;\n }",
"protected boolean isVmNameValidLength(VM vm) {\n\n // get VM name\n String vmName = vm.getvm_name();\n\n // get the max VM name (configuration parameter)\n int maxVmNameLengthWindows = Config.<Integer> GetValue(ConfigValues.MaxVmNameLengthWindows);\n int maxVmNameLengthNonWindows = Config.<Integer> GetValue(ConfigValues.MaxVmNameLengthNonWindows);\n\n // names are allowed different lengths in Windows and non-Windows OSs,\n // consider this when setting the max length.\n int maxLength = vm.getvm_os().isWindows() ? maxVmNameLengthWindows : maxVmNameLengthNonWindows;\n\n // check if name is longer than allowed name\n boolean nameLengthValid = (vmName.length() <= maxLength);\n\n // return result\n return nameLengthValid;\n }",
"@Override\n public void enableVelocityMode(double maxVelocity, TrcPidController.PidCoefficients pidCoefficients)\n {\n final String funcName = \"enableVelocityMode\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"maxVel=%f,pidCoefficients=%s\", maxVelocity,\n pidCoefficients == null ? \"N/A\" : pidCoefficients.toString());\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n this.maxVelocity = maxVelocity;\n\n if (pidCoefficients != null)\n {\n CANPIDController pidController = motor.getPIDController();\n pidController.setP(pidCoefficients.kP);\n pidController.setI(pidCoefficients.kI);\n pidController.setD(pidCoefficients.kD);\n pidController.setFF(pidCoefficients.kF);\n }\n }",
"private int validateMaxValue(int maxValue) {\n\t\tif (!(maxValue >= 1)) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"DawsonBallotItem Error - maxValue must be geater or equal to 1. Invalid value = \" + maxValue);\n\t\t}\n\t\treturn maxValue;\n\t}",
"public boolean checkLessThanMaxY() {\n return (currY + getYMargin) <= getMaxY;\n }",
"public void setMaxSpeed(float max_speed)\n\t{\n\t\tthis.max_speed = max_speed;\n\t}",
"boolean isSetMaximum();",
"public void setMaxSpeed(double maxSpeed) {\r\n this.maxSpeed = maxSpeed;\r\n }",
"public float maxSpeed();",
"@Basic\n\tpublic double getVxmax() {\n\t\treturn this.vxmax;\n\t}",
"public void tensionRangeCheck(){\n if(motor.get() < 0){\n if(Bottom_Limit_Switch.get() | tenPot.pidGet()> tenPotMAX ){\n motor.set(0.0);\n }\n }else if(motor.get() > 0){\n if(Top_Limit_Switch.get() | tenPot.pidGet()< tenPotMIN){\n motor.set(0.0);\n }\n }\n }",
"public static void isInRange(int userInput, int maxNum) {\n\t\tif (userInput < 1 || userInput > maxNum) {\n\t\t\tthrow new IllegalArgumentException(\"You must enter a number (1-\" + maxNum + \")! Please try again:\");\n\t\t}\n\t}",
"boolean hasMaxEXP();",
"boolean hasMaxEXP();",
"boolean hasMaxMP();",
"boolean hasMaxMP();",
"boolean hasMaxMP();",
"boolean hasMaxMP();",
"boolean hasMaxMP();",
"boolean hasMaxMP();",
"public void setMaxVal(double maxVal) {\n this.maxVal = maxVal;\n }",
"Boolean CheckForLimit(float xVal, float yVal) {\n double xCalc = Math.pow(xVal - this.oval.centerX(), 2) / Math.pow((this.oval.width() / 2), 2);\n double yCalc = Math.pow(yVal - this.oval.centerY(), 2) / Math.pow((this.oval.height() / 2), 2);\n xCalc += yCalc;\n if (xCalc <= 1) {\n return true;\n } else {\n return false;\n }\n }",
"@POST\n public FormValidation doCheckSpotMaxBidPrice(@QueryParameter String spotMaxBidPrice) {\n if (SpotConfiguration.normalizeBid(spotMaxBidPrice) != null) {\n return FormValidation.ok();\n }\n return FormValidation.error(\"Not a correct bid price\");\n }",
"public float getMaxTranslationVel(int xform) {\n\t\treturn m_xforms[xform].m_maxTranslationVel;\n\t}",
"public void setMaxSpeed(int maxSpeed) {\n\t\tthis.maxSpeed = maxSpeed;\n\t}",
"public boolean atVelocity() {\n return false;\n }",
"public boolean setPropertyVolumeMax(long aValue);",
"public boolean isAtVelocitySetPoint(double marginOfError) {\n return isNumberinRange(countsToUnits(velocitySetPoint) * 600.0,\n countsToUnits(motor.getSelectedSensorVelocity()) * 600.0, marginOfError);\n }",
"boolean stopWithAccLimits(PoseStamped global_pose, final PoseStamped robot_vel, Twist cmd_vel){\n double vx = sign(robot_vel.getPose().getPosition().getX()) * Math.max(0.0, (Math.abs(robot_vel.getPose().getPosition().getX()) - me.acc_lim_x_ * me.simPeriod));\n double vy = sign(robot_vel.getPose().getPosition().getY()) * Math.max(0.0, (Math.abs(robot_vel.getPose().getPosition().getY()) - me.acc_lim_y_ * me.simPeriod));\n\n double vel_yaw = LPutils.getYaw(robot_vel.getPose().getOrientation());\n double vth = sign(vel_yaw) * Math.max(0.0, (Math.abs(vel_yaw) - me.acc_lim_th_ * me.simPeriod));\n\n //we do want to check whether or not the command is valid?????????????\n boolean valid_cmd = true; //collision_planner_.checkTrajectory(vx, vy, vth, true);\n\n //if we have a valid command, we'll pass it on, otherwise we'll command all zeros\n if(valid_cmd){\n //ROS_DEBUG(\"Slowing down... using vx, vy, vth: %.2f, %.2f, %.2f\", vx, vy, vth);\n linear.setX(vx);\n linear.setY(vy);\n cmd_vel.setLinear(linear);\n angular.setZ(vth);\n cmd_vel.setAngular(angular);\n return true;\n }\n\n linear.setX(0.0);\n linear.setY(0.0);\n linear.setZ(0.0);\n cmd_vel.setLinear(linear);\n return false;\n }",
"private boolean checkRange(final int actualVerticalSize,\n final int actualHorizontalSize) {\n return actualVerticalSize >= 0\n && actualVerticalSize < values.length\n && actualHorizontalSize >= 0\n && actualHorizontalSize < values[0].length;\n }",
"@Basic\n\t@Raw\n\t@Immutable\n\tpublic static double getVelocityUpperBound() {\n\t\treturn VELOCITYUPPERBOUND;\n\t}",
"protected final boolean checkMaxDistances(\n\t\t\tfinal OpenLREncoderProperties properties,\n\t\t\tfinal LocRefData locRefData) throws OpenLRProcessingException {\n\t\t/*\n\t\t * check for the maximum distance between two successive LRP \n\t\t */\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tLOG.debug(\"check location reference (maximum distance check)\");\n\t\t}\n\t\tfinal List<LocRefPoint> locRefPoints = locRefData.getLocRefPoints();\n\t\tint maxDistance = properties.getMaximumDistanceLRP();\n\t\t\n\t\tboolean dnpsAreVAlid = true;\n\t\tfor (LocRefPoint lrPoint : locRefPoints) {\n\t\t\t// check the distance limit\n\t\t\tif (!lrPoint.isLastLRP()\n\t\t\t\t\t&& lrPoint.getDistanceToNext() > maxDistance) {\n\t\t\t\t// limit is exceeded\n LOG.error(String\n .format(\"maximum distance between two LRP is exceeded (LRP #: %s, distance: %s)\",\n lrPoint.getSequenceNumber(),\n lrPoint.getDistanceToNext()));\n\t\t\t\tdnpsAreVAlid = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn dnpsAreVAlid;\n\t}",
"public float getMaxRotationVel(int xform) {\n\t\treturn m_xforms[xform].m_maxRotationVel;\n\t}",
"public void setMaxSpeed(int MaxSpeed) {\n this.MaxSpeed = MaxSpeed;\n }",
"public boolean hasMaxMP() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }",
"public boolean hasMaxMP() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }",
"public static Matcher<View> hasMaxValue(final int maxValue) {\n return new TypeSafeMatcher<View>() {\n @Override\n protected boolean matchesSafely(View view) {\n if (!(view instanceof SeekBar)) {\n return false;\n }\n SeekBar seekBar = (SeekBar) view;\n\n return seekBar.getMax() == maxValue;\n }\n\n @Override\n public void describeTo(Description description) {\n description.appendText(\"expected to have max value: \" + maxValue);\n }\n };\n }",
"public boolean adjustToVelocity( double v )\n {\n if( v == velocity ){\n return false;\n }\n else if( v>velocity ){\n velocity = Math.min( velocity+COMFORTABLE_BRAKE_VELOCITY, v );\n }\n else {\n velocity = Math.max( velocity-COMFORTABLE_BRAKE_VELOCITY, v );\n }\n return true;\n }",
"public boolean hasMaxMP() {\n return ((bitField0_ & 0x00000100) == 0x00000100);\n }",
"public boolean hasMaxMP() {\n return ((bitField0_ & 0x00000100) == 0x00000100);\n }",
"public boolean checkSizeIsMax(int[] is) {\n\t\treturn is.length == MAX_BOARD_SIZE;\r\n\t}",
"public boolean isOverSpeed(){ return vehicleAvarageSpeed > roadMaxSpeed; }",
"public boolean hasMaxMP() {\n return ((bitField0_ & 0x00000100) == 0x00000100);\n }",
"public static boolean isValidVector(double x, double y){\r\n\t\treturn (isValidComponent(x) && isValidComponent(y));\r\n\t}",
"public boolean hasMaxMP() {\n return ((bitField0_ & 0x00000100) == 0x00000100);\n }",
"public boolean hasMaxMP() {\n return ((bitField0_ & 0x00000100) == 0x00000100);\n }",
"public boolean hasMaxMP() {\n return ((bitField0_ & 0x00000100) == 0x00000100);\n }",
"public void SetMaxVal(int max_val);",
"private boolean isMaxWeight(int[] V) {}",
"private void checkIndex(int pos, int max) {\n\t\tif (pos < 0 || pos >= max) {\n\t\t\tthrow new IndexOutOfBoundsException(\"The index must greater than 0 and less than \" + max + \", but was \" + pos);\n\t\t}\n\t}",
"public boolean isSetVertScanAngleMax() {\n return (this.vertScanAngleMax != null ? this.vertScanAngleMax.isSetValue() : false);\n }",
"Boolean CheckForLimit(float xVal, float yVal) {\r\n return (this.oval.contains(xVal, yVal) &&\r\n this.oval.contains(xVal, yVal+radius) &&\r\n this.oval.contains(xVal, yVal-radius) &&\r\n this.oval.contains(xVal+radius, yVal) &&\r\n this.oval.contains(xVal-radius, yVal));\r\n }",
"public void testVelocityNumerically() {\n // crud, I don't know, how much can we expect velocity and finite differences to agree?\n double bound = dt*dt*velocity*velocity; // sure, let's go with that. Keep in mind this changes with sampling rates, velocity, the order of the function, etc.\n double endtime = racetrack.getPerimeter() / racetrack.getVelocity();\n differentiatePosition(racetrack, 0.0, endtime, dt, bound);\n }",
"private boolean isEligibleForRealMax() {\n return eligibleForRealMax;\n }",
"public boolean hasMaxMP() {\n return ((bitField0_ & 0x00008000) == 0x00008000);\n }",
"public boolean hasMaxMP() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }",
"public float maxTorque();",
"public boolean isUpperLimit() {\n if (m_upperLimit != null) {\n return m_upperLimit.get();\n } else {\n return false;\n }\n }",
"public boolean relaxVelocity()\n {\n return adjustToVelocity( preferedVelocity );\n }",
"public boolean isSetMaxPower() {\n return (this.maxPower != null ? this.maxPower.isSetValue() : false);\n }",
"public boolean hasMaxMP() {\n return ((bitField0_ & 0x00008000) == 0x00008000);\n }",
"boolean hasMaxExperience();",
"private void notEligibleForRealMax() {\n eligibleForRealMax = false;\n }",
"public boolean isSetVertBwMax() {\n return (this.vertBwMax != null ? this.vertBwMax.isSetValue() : false);\n }",
"public boolean hasMaxMP() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }",
"public void setMaxSpeed() {\n\t\tspeed = MAX_SPEED;\n\t}",
"public double getMaxValue(double defaultMax, Date start, Date end)\n\t{\n\t\tdouble max = Double.NEGATIVE_INFINITY;\n\t\tfor(TimedVariable tv : vars)\n\t\t{\n\t\t\tDate t = tv.getTime();\n\t\t\tif (start != null && start.compareTo(t) > 0)\n\t\t\t\tcontinue;\n\t\t\tif (end != null && end.compareTo(t) < 0)\n\t\t\t\tcontinue;\n\t\t\tint fl = tv.getFlags();\n\t\t\tif ((fl & IFlags.IS_MISSING) == 0)\n\t\t\t{\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tdouble d = tv.getDoubleValue();\n\t\t\t\t\tif (d > max)\n\t\t\t\t\t\tmax = d;\n\t\t\t\t}\n\t\t\t\tcatch(NoConversionException ex) {}\n\t\t\t}\n\t\t}\n\t\treturn max == Double.NEGATIVE_INFINITY ? defaultMax : max;\n\t}",
"public boolean setPropertyVolumeMax(long aValue)\n {\n return setPropertyUint(iPropertyVolumeMax, aValue);\n }",
"@Override\n public boolean isMaximum(){\n return super.isMaximum() || speciallyMaximized;\n }",
"public boolean setMax(int barID, double value) {\r\n\t\t// If the index is valid;\r\n\t\tif (barID >= 0 && barID < barCount) {\r\n\t\t\t// Update the maximum capacity to the magnitude of the given value.\r\n\t\t\tmaxValue[barID] = Math.abs(value);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean isWithinLimit() {\n return assumptionsFailed.get() < assumptionLimit;\n }",
"public boolean isRangeValid()\n {\n return isRangeValid(((AnalogInput)m_echoChannel).getVoltage());\n }",
"boolean isNilMaximum();",
"public static boolean isSigned_max() {\n return true;\n }",
"boolean hasSequenceMaximumDuration();",
"private boolean validateOutOfRangeCoordinate() throws IOException {\n int maxValue = Integer.parseInt(Objects.requireNonNull(FileUtils.getProperty(\"max-coordinate-value\")));\n return (Math.abs(getX()) > maxValue) || (Math.abs(getY()) > maxValue);\n }",
"private double getVelocity() {\n \tif (currentState == DriveState.accelerating) {\n \t\treturn acceleration * timer.get();\n \t}\n \telse if (currentState == DriveState.cruisung) {\n \t\treturn maxVelocity;\n \t}\n \telse if (currentState == DriveState.decelerating) {\n \t\treturn maxVelocity - acceleration * (timer.get());\n \t}\n \t\t\n \treturn 0;\n }",
"public double getMaxSpeed() {\r\n return maxSpeed;\r\n }",
"public boolean checkLessThanMaxX() {\n return (currX + getXMargin) <= getMaxX;\n }",
"private boolean parseLimit(String param2String) {\n/* 565 */ int i = param2String.indexOf('=');\n/* 566 */ if (i < 0)\n/* */ {\n/* 568 */ return false;\n/* */ }\n/* 570 */ String str = param2String.substring(i + 1);\n/* 571 */ if (param2String.startsWith(\"maxdepth=\")) {\n/* 572 */ this.maxDepth = parseValue(str);\n/* 573 */ } else if (param2String.startsWith(\"maxarray=\")) {\n/* 574 */ this.maxArrayLength = parseValue(str);\n/* 575 */ } else if (param2String.startsWith(\"maxrefs=\")) {\n/* 576 */ this.maxReferences = parseValue(str);\n/* 577 */ } else if (param2String.startsWith(\"maxbytes=\")) {\n/* 578 */ this.maxStreamBytes = parseValue(str);\n/* */ } else {\n/* 580 */ throw new IllegalArgumentException(\"unknown limit: \" + param2String.substring(0, i));\n/* */ } \n/* 582 */ return true;\n/* */ }",
"public boolean hasVelocityInformation() {\n return _avTable.exists(ATTR_VELOCITY);\n }",
"public boolean isVersionInRange(String version, String maxVersion, String serviceName) {\n if (VersionUtil.compare(version, maxVersion) >= 0\n || VersionUtil.compare(version, services.getMinVersionFor(serviceName)) < 0) {\n return false;\n }\n return true;\n }"
]
| [
"0.75979644",
"0.6654128",
"0.6620114",
"0.65415055",
"0.64080346",
"0.62823534",
"0.6128476",
"0.59289056",
"0.58987933",
"0.58354795",
"0.58212644",
"0.580698",
"0.5764377",
"0.56933653",
"0.568432",
"0.5650626",
"0.562041",
"0.5535566",
"0.54972464",
"0.54274654",
"0.5422477",
"0.5411594",
"0.53996974",
"0.5339631",
"0.533863",
"0.53287476",
"0.53104323",
"0.5290875",
"0.52806324",
"0.5270344",
"0.5261188",
"0.5261188",
"0.5257287",
"0.5257287",
"0.5257287",
"0.5257287",
"0.5257287",
"0.5257287",
"0.5239927",
"0.52196544",
"0.5214275",
"0.52032554",
"0.5192775",
"0.51812136",
"0.51774645",
"0.5168458",
"0.51664263",
"0.5159599",
"0.51587087",
"0.5147164",
"0.5125319",
"0.51236296",
"0.5123017",
"0.5115055",
"0.51038593",
"0.51011664",
"0.50968283",
"0.50968283",
"0.5096455",
"0.5094857",
"0.5093499",
"0.5092668",
"0.5088812",
"0.5088812",
"0.50862634",
"0.50665134",
"0.5065093",
"0.50647986",
"0.5053424",
"0.5041277",
"0.50385946",
"0.5036292",
"0.50341177",
"0.5021242",
"0.50110006",
"0.50048864",
"0.5004533",
"0.50035423",
"0.5000239",
"0.49968585",
"0.49938074",
"0.49887246",
"0.49873757",
"0.49847803",
"0.4981085",
"0.497197",
"0.4958552",
"0.4954294",
"0.49533907",
"0.49517885",
"0.49476263",
"0.4932929",
"0.4911202",
"0.4909013",
"0.49067023",
"0.49010018",
"0.49007386",
"0.48944807",
"0.48909497",
"0.48899227"
]
| 0.81429744 | 0 |
Returns the radius of entity. | @Basic @Raw @Immutable
public double getRadius(){
return this.startRadius;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getRadius() { return radius.get(); }",
"public double getRadius() {\n return radius;\n }",
"public double getRadius() {\n return radius;\n }",
"public double getRadius() {\n return radius;\n }",
"public double getRadius() {\n return radius;\n }",
"public double getRadius() {\n return radius;\n }",
"public double getRadius() {\n return radius;\n }",
"public double getRadius() {\n return radius;\n }",
"public double getRadius() {\n return radius;\n }",
"public double getRadius() {\n return radius;\n }",
"public double getRadius() {\n return radius;\n }",
"public double getRadius() {\n return radius;\n }",
"public double getRadius()\r\n {\r\n return radius;\r\n }",
"public int radius()\n\t{\n\t\treturn radius;\n\t}",
"@Basic\n\t@Raw\n\tpublic double getRadius() {\n\t\treturn this.radius;\n\t}",
"public double getRadius()\r\n\t{\r\n\t\treturn radius;\r\n\t}",
"public int getRadius() {\n return radius;\n }",
"public float radius() {\n\t\treturn radius;\n\t}",
"public double getRadius() { return radius; }",
"long getRadius();",
"public double getRadius(){\n\t\treturn radius;\n\t}",
"double getRadius();",
"public double getRadius() {\r\n\t\treturn radius;\r\n\t}",
"public int getRadius() {\n return radius_;\n }",
"public Double getRadius() {\n return this.radius;\n }",
"public double getRadius() {\n\t\treturn radius;\n\t}",
"public double getRadius() {\n\t\treturn radius;\n\t}",
"public double getRadius() {\r\n\t\treturn _radius;\r\n\t}",
"public int getRadius()\n\t{\n\t\treturn radius;\n\t}",
"public float getRadius() {\r\n\t\treturn Float.parseFloat(getProperty(\"radius\").toString());\r\n\t}",
"public float getRadius() {\n return radius;\n }",
"public double getRadius(){\r\n return radius;\r\n }",
"public int getRadius() {\n return radius_;\n }",
"public int getRadius() {\n\t\treturn radius;\n\t}",
"public int getRadius()\n {\n return this.radius;\n }",
"public int getRadius() {\n return getType().getClaimableRadius();\n }",
"public double getRadius(){\n return radius;\n }",
"public double getRadius(){\n return r;\n }",
"public float getRadius()\n {\n return _radius;\n }",
"public int getRadius() {\r\n\t\treturn this.radius;\r\n\t}",
"public double getRadius() {\n\t\treturn r;\n\t}",
"public double getCircleRadius();",
"public int getRadius() { return radius; }",
"public double getRadius()\n {\n return m_Radius;\n }",
"public final float getRadius() {\n return radius;\n }",
"@Override\n public double getRadius() {\n return this.getRenderable().getRadius();\n }",
"public double getRadius() {\n double x = radius;\n return x;\n\n }",
"public double getRadius() {\n return radius; \n }",
"public int getRadius_() {\r\n\t\treturn radius_;\r\n\t}",
"public String getRadius()\n\t{\n\t\treturn radius.getText();\n\t}",
"int getRadius();",
"public double getRadius(){return radius;}",
"public abstract float getRadius();",
"public abstract float getRadius();",
"public double getRadius() {\n return getCenter().distance(new Coord3d(xmin, ymin, zmin));\n }",
"private double getRadius() {\n\t\treturn Math.min(getWidth(), getHeight()) / 2.0 * RADIUS_MODIFIER;\n\t}",
"public String getRadius() {\n\t\treturn null;\n\t}",
"public abstract double getBoundingCircleRadius();",
"@Nullable\n public DpProp getRadius() {\n if (mImpl.hasRadius()) {\n return DpProp.fromProto(mImpl.getRadius());\n } else {\n return null;\n }\n }",
"public DoubleProperty radiusProperty() { return radius; }",
"public int getLength(){ // getter method\n return length; // return the value of the class attribute radius\n }",
"public float getSphereRadius();",
"public int getSize() {\n return this.radius;\n }",
"int getRadiusUnitsValue();",
"public double getCentralRadius() {\r\n\t\t// Retrieve the radius of the center.\r\n\t\treturn centralRadius;\r\n\t}",
"public int getSize() {\r\n return this.radius;\r\n }",
"@Schema(description = \"Maximum distance in meters a user wants to travel to reach the travel option\")\n \n @Min(0) public Integer getRadius() {\n return radius;\n }",
"@Override\n\tpublic float getBoundingRadius() {\n\t\treturn boundingradius;\n\t}",
"@Override\r\n\tpublic double getSphereRadiusRightHand() {\n\t\treturn rechtSphereRadius;\r\n\t}",
"int findRadius() {\n GraphUtils u = new GraphUtils();\n int diameter = u.furthestDist(\n u.furthestPiece(u.furthestPiece(this.board.get(powerRow).get(powerCol), this.nodes),\n this.nodes),\n this.nodes);\n return diameter / 2 + 1;\n }",
"public int getRadius() {\r\n\t\treturn majorAxis;\r\n\t}",
"public abstract double getRadiusX();",
"@Override\r\n\tpublic double getRadius() {\n\t\treturn 0;\r\n\t}",
"public double getCircunference(){\n return 2.0 * radius * Math.PI; \n }",
"public SpatialUnits getRadiusUnitOverride() {\n return radiusUnitOverride;\n }",
"public float getSphereRadius() {\n\t\treturn sphereRadius;\n\t}",
"public double circumference() {\r\n\t\treturn 2 * PI * radius;\r\n\t}",
"public Optional<AuthLoginRadius> authLoginRadius() {\n return Codegen.objectProp(\"authLoginRadius\", AuthLoginRadius.class).config(config).get();\n }",
"public int getFixedRadius ( ) {\r\n\t\treturn plot_radius;\r\n\t}",
"public double getCircumference()\n\t{\n\t\tdouble circumference = 2 * Math.PI * radius;\n\t\treturn circumference;\n\t}",
"public abstract float getCollisionRadius();",
"public double getMinimalRadius() {\n\t\treturn minimalRadiusProperty().getValue();\n\t}",
"int getBallRadius();",
"public abstract double getRadiusY();",
"public CoordinateRadius getRegion();",
"public float sphereRadius() {\r\n\t\treturn LeapJNI.Hand_sphereRadius(this.swigCPtr, this);\r\n\t}",
"public Circle getCircleBound()\n {\n return form.getCircleBound();\n }",
"public double getMaxRadius() {\n return rrMaxRadius;\n }",
"public int getDiameter()\n\t{\n\t\treturn radius * 2;\n\t}",
"public double getCircumference()\r\n\t{\r\n\t\tdouble cir = 2*Math.PI*radius;\r\n\t\treturn cir;\r\n\t}",
"public Coordinate getCircle();",
"@Override\n public Map<SquadronConfig, Integer> getRadius() {\n return configuration\n .stream()\n .map(this::buildRadius)\n .collect(Collectors.toMap(Pair::getKey, Pair::getValue));\n }",
"private double getSatelliteCircleRadius() {\r\n GeoPoint satNadir = new GeoPoint(Math.toRadians(satLat), Math.toRadians(thetaP));\r\n double pointOnTheCircleLat = satLat + getSatelliteSemiEyeWidth();\r\n if (pointOnTheCircleLat > 90D || pointOnTheCircleLat < -90D)\r\n pointOnTheCircleLat = satLat - getSatelliteSemiEyeWidth();\r\n GeoPoint onTheCircle = new GeoPoint(Math.toRadians(pointOnTheCircleLat), Math.toRadians(thetaP));\r\n if (gc == null)\r\n gc = new GreatCircle();\r\n gc.setStart(satNadir);\r\n gc.setArrival(onTheCircle);\r\n gc.calculateGreatCircle(1);\r\n double dist = Math.toDegrees(gc.getDistance()) * 60.0;\r\n\r\n return dist;\r\n }",
"private final float getSingleCircleRadius() {\n float f2 = this.k;\n return f2 < ((float) 0) ? getCircleRadius() : f2;\n }",
"public int getItemsRadius();",
"public double getR(){\n return Math.sqrt(this.x * this.x + this.y * this.y);\n }",
"public double getArea() {\n return radius*radius*Math.PI;\n }",
"public double getCircleArea();",
"int getSightRadius(Unit unit);",
"public float getRad() {\n\t\treturn rad;\n\t}"
]
| [
"0.7854086",
"0.7804476",
"0.77997005",
"0.77997005",
"0.77997005",
"0.77997005",
"0.77997005",
"0.77997005",
"0.77997005",
"0.77997005",
"0.77997005",
"0.77997005",
"0.7765497",
"0.77506274",
"0.774746",
"0.7740513",
"0.77140385",
"0.77116823",
"0.7692556",
"0.7688755",
"0.7679246",
"0.76792175",
"0.76734865",
"0.76727915",
"0.767117",
"0.7668404",
"0.7668404",
"0.7653096",
"0.7640211",
"0.7634513",
"0.7619807",
"0.761617",
"0.7601652",
"0.7595913",
"0.7590273",
"0.75852036",
"0.7553508",
"0.75443435",
"0.7541588",
"0.751704",
"0.7509179",
"0.7502118",
"0.74945205",
"0.747105",
"0.7468476",
"0.7401696",
"0.73986924",
"0.73950094",
"0.7356546",
"0.73534703",
"0.7312084",
"0.7286906",
"0.7282436",
"0.7282436",
"0.7169985",
"0.71638405",
"0.714646",
"0.6992936",
"0.69247377",
"0.69144785",
"0.6826722",
"0.67455447",
"0.6670758",
"0.66536593",
"0.66420996",
"0.66419905",
"0.6559294",
"0.6558043",
"0.64836246",
"0.6480418",
"0.64572746",
"0.64556473",
"0.6445091",
"0.6438335",
"0.6426454",
"0.6403647",
"0.63928425",
"0.6377723",
"0.63768476",
"0.6349118",
"0.63445795",
"0.6338169",
"0.6305175",
"0.62721264",
"0.6264731",
"0.625427",
"0.6237133",
"0.62264025",
"0.6192484",
"0.6186944",
"0.6185797",
"0.6164932",
"0.6163614",
"0.6163539",
"0.6151254",
"0.61383075",
"0.61340296",
"0.612464",
"0.6122524",
"0.6113983"
]
| 0.74937826 | 43 |
Return the world of the entity. | @Basic @Raw
public World getSuperWorld() {
return this.superWorld;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public World getWorld() {\n return world;\n }",
"public World getWorld() {\n return world;\n }",
"public World getWorld() {\n return location.getWorld();\n }",
"public GameData getWorld() {\r\n return world;\r\n }",
"public World getWorld() {\n\t\treturn world;\n\t}",
"public World getWorld () {\n\t\treturn world;\n\t}",
"@Basic\n\tpublic World getWorld() {\n\t\treturn this.world;\n\t}",
"@Basic\n\tpublic World getWorld() {\n\t\treturn this.world;\n\t}",
"public final World getWorld() {\n\t\treturn location.getWorld();\n\t}",
"public World getWorld();",
"public static World getWorld() {\n\t\treturn world;\n\t}",
"@Override\n\tpublic World getWorld() { return world; }",
"public String getWorld() {\r\n\t\treturn mainSpawn.getWorld().toString();\r\n\t}",
"@NotNull\r\n World getWorld();",
"public World getWorld()\n {\n if (worldData == null)\n {\n return null;\n }\n\n return worldData.getWorld();\n }",
"World getWorld();",
"public final World getWorld() {\n\t\treturn baseTile.getWorld();\n\t}",
"public ThingNode getWorld()\n {\n return world;\n }",
"public HashMap<String, Location> getWorld() {\r\n\t\treturn this.world;\r\n\t}",
"public World getWorld() {\n\t\treturn Bukkit.getWorld(world);\n\t}",
"public World getWorld ( ) {\n\t\treturn invokeSafe ( \"getWorld\" );\n\t}",
"public static World getWorld() {\n\t\treturn ModLoader.getMinecraftInstance().theWorld;\n\t}",
"public Level getWorld() {\r\n return this;\r\n }",
"public String getWorldName() {\n\t\treturn world;\n\t}",
"public World getClientWorld()\n {\n return null;\n }",
"public long getWorldId() {\n return worldId_;\n }",
"public OdorWorldPanel getWorldPanel() {\n return worldPanel;\n }",
"public long getWorldId() {\n return worldId_;\n }",
"public static World getWorld(){\n Optional<World> worldOptional = Sponge.getServer().getWorld(\"world\");\n if(worldOptional.isPresent()){\n return worldOptional.get();\n }\n return null;\n }",
"public static World readWorld() {\n\t\treturn null;\n\t}",
"public World getWorld(String worldName);",
"@PersistField\n public WorldData getWorldData()\n {\n return worldData;\n }",
"public Vector2F getWorldLocation() {\n\t\treturn new Vector2F(xPos, yPos);\n\t}",
"public long getWorldid() {\n return worldid_;\n }",
"public long getWorldid() {\n return worldid_;\n }",
"public long getWorldid() {\n return worldid_;\n }",
"public long getWorldid() {\n return worldid_;\n }",
"public int[][] getworld(){\n return world;\n }",
"public WorldServer getWorldServer()\r\n {\r\n return this.theWorldServer;\r\n }",
"public Vector getWorldPosition(){\n\t\treturn this.absPos;\n\t}",
"public mat4 getMatrix() {\n return worldMatrix;\n }",
"public static List<World> getWorlds() {\n\t\treturn worlds;\n\t}",
"long getWorldId();",
"public World getCurrentWorld() {\n\t\tassert levelIndex >= 0 && levelIndex < levels.size();\n\t\treturn levels.get(levelIndex);\n\t}",
"public long getWorldTime()\n {\n return worldTime;\n }",
"public byte getWorldId()\r\n\t{\r\n\t\treturn mWorldId;\r\n\t}",
"public Pane getWorldDisplay() {\n return worldDisplay;\n }",
"private GameWorld getGameWorld(){\n\t\tHashMap<String, Location> locations = new HashMap<String, Location>();\n\t\tHashMap<Avatar, Location> avatarLocations = new HashMap<Avatar, Location>();\n\t\tArrayList<Avatar> avatars = new ArrayList<Avatar>();\n\t\t\n\t\tLocation testLocation = new Location(\"Test Location\");\n\t\tAvatar testAvatar = new Avatar(\"Slim\", 1);\n\t\t\n\t\tlocations.put(\"testLocation\", testLocation);\n\t\tavatarLocations.put(testAvatar, testLocation);\n\t\tavatars.add(testAvatar);\n\t\t\n\t\treturn new GameWorld(locations, avatarLocations, avatars);\n\t}",
"@Nonnull\n Texture getWorldMap();",
"public World getParent() {\r\n return ocean;\r\n }",
"public MBMWorld getWorld(int num){\n return worlds.get(num);\n }",
"WorldCoordinates getWCSCenter();",
"public ArrayList<MBMWorld> getWorldList(){\n return worlds;\n }",
"long getWorldid();",
"long getWorldid();",
"public World getWorld(int dim) {\n\t\treturn DimensionManager.getWorld(dim);\n\t}",
"public WorldLoader getWorldLoader() {\n\t\treturn loader;\n\t}",
"public static World getWorld(NetworkManager network) {\n\t\treturn getWorld();\n\t}",
"public static World getInstance() {\n return instance;\n }",
"public Location getCurrentLocation() { return entity.getLocation(); }",
"public SbVec3f getPoint() {\n \t return worldPoint; \n }",
"public String getWorldName()\n {\n return levelName;\n }",
"WorldGenerator getForWorld(World world);",
"public static World getMainWorld() {\n\t\tif (!mainWorld.isEmpty()) {\n\t\t\tWorld world = Bukkit.getWorld(mainWorld);\n\t\t\tif (world != null) {\n\t\t\t\treturn world;\n\t\t\t}\n\t\t}\n\t\treturn WorldUtil.getWorlds().iterator().next();\n\t}",
"public Location getLocation(){\n\t\tWorld w = Bukkit.getWorld(worldName);\n\t\tif(w==null){\n\t\t\tSystem.out.println(\"Error, null world in Location from SQL\");\n\t\t\treturn null;\n\t\t}\n\t\treturn new Location(w, x+0.5, y, z+0.5);\n\t\t\n\t}",
"@NotNull\n public Location<World> getCenterBlock() {\n int centerX = getMinChunk().getX() + 16;\n int centerZ = getMinChunk().getZ() + 16;\n return Tungsten.INSTANCE.getIslandWorld().getLocation(centerX * 16, 86, centerZ * 16);\n }",
"public World makeWorld() {\n World world = new World(1000, 1000);\n world.createEntity().addComponent(new CursorComponent());\n \n ProjectileSystem projectileSystem = new ProjectileSystem();\n world.addSystem(projectileSystem, 1);\n \n return world;\n }",
"public WorldRegions getWorldRegions()\n {\n return regions;\n }",
"public static World readWorld(GlowServer server, CompoundTag compound) {\n World world = compound\n .tryGetUniqueId(\"WorldUUIDMost\", \"WorldUUIDLeast\")\n .map(server::getWorld)\n .orElseGet(() -> compound.tryGetString(\"World\")\n .map(server::getWorld)\n .orElse(null));\n if (world == null) {\n world = compound\n .tryGetInt(\"Dimension\")\n .map(World.Environment::getEnvironment)\n .flatMap(env -> server.getWorlds().stream()\n .filter(serverWorld -> env == serverWorld.getEnvironment())\n .findFirst())\n .orElse(null);\n }\n return world;\n }",
"public String getWorldName() {\n\t\treturn MinecraftServer.getServer().worldServers[0].getSaveHandler()\n\t\t\t\t.getWorldDirectoryName();\n\t}",
"public long getTime(){\r\n\t\treturn world.getWorldTime();\r\n\t}",
"public Location getLocation()\n {\n if (worldData == null || position == null)\n {\n // Must have a world and position to make a location;\n return null;\n }\n\n if (orientation == null)\n {\n return new Location(worldData.getWorld(), position.getX(), position.getY(), position.getZ());\n }\n\n return new Location(worldData.getWorld(), position.getX(), position.getY(), position.getZ(), orientation.getYaw(), orientation.getPitch());\n }",
"public int getCurrentWorldIndex() {\n\t\treturn levelIndex;\n\t}",
"public abstract String getWorldType();",
"public World getWorld(String name) {\n String world = cfg.getString(name + \".World\");\n if (world != null)\n return Bukkit.getWorld(world);\n return null;\n }",
"public String toString() {\n\t\treturn position\n\t\t\t+ \" between \"\n\t\t\t+ worldOrigin\n\t\t\t+ \" and \"\n\t\t\t+ worldEnd;\n\t}",
"public static World getInstance() {\n\t\tif (world == null) {\n\t\t\tworld = new World();\n\t\t}\n\t\treturn world;\n\t}",
"public World() {\n\t\tblockIDArray = new byte[WORLD_SIZE][WORLD_HEIGHT][WORLD_SIZE];\n\t\tentities\t = new ArrayList<Entity>();\n\t\trand\t\t = new Random();\n\t\t\n new GravityThread(this);\n\t\t\t\t\n\t\tgenerateWorld();\n\t}",
"public boolean checkWorld(Entity entity) {\r\n return entity.getWorld() == worldFrom;\r\n }",
"public static synchronized World getWorld() {\n\t\tif (worldInstance == null) {\n\t\t\tworldInstance = new World();\n\t\t\ttry {\n\t\t\t\tworldInstance.wl = new WorldLoader();\n\t\t\t\ttry {\n\t\t\t\t\tServer.print(\"Loading World Data\", false);\n\t\t\t\t\tworldInstance.wl.loadWorld(worldInstance);\n\t\t\t\t\tworldInstance.loadScripts();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tServer.print(\"ERROR\", true);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\tServer.print(\"COMPLETE\", true);\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tServer.print(\"Loading Objects\", false);\n\t\t\t\t\tworldInstance.getDB().loadObjects(worldInstance);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tServer.print(\"ERROR\", true);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\tServer.print(\"COMPLETE\", true);\n\t\t\t\t}\n\n\n\t\t\t} catch (Exception e) {\n\t\t\t\tLogger.error(e);\n\t\t\t}\n\t\t}\n\t\treturn worldInstance;\n\t}",
"public GuiPositions getPosWorldAge() {\r\n\t\treturn posWorldAge;\r\n\t}",
"public Player getPlayer() {\r\n return world.getPlayer();\r\n }",
"protected Random rng() {\r\n\t\tif (entity == null || entity.world == null) {\r\n\t\t\treturn rand;\r\n\t\t}\r\n\t\treturn entity.world.rand;\r\n\t}",
"public Texture getWorldTexture() {\n return frameBuffer.getTexture(0);\n }",
"@Override\n public void world() {\n super.world();\n }",
"public SbVec3f getNormal() { return worldNormal; }",
"public WorldToScreenTransform getWorldToScreenTransform() { return this; }",
"public World getWorld(int i) {\n\t\treturn levels.get(i);\n\t}",
"public int numWorlds(){\n return worlds.size();\n }",
"public void setWorld(World world) {\n this.world = world;\n }",
"public World[] getAllWorlds() {\n\t\treturn levels.toArray(new World[levels.size()]);\n\t}",
"public String getPassworld() {\n return passworld;\n }",
"private IWorld worldCreator(){\n if (gameWorld == GameWorld.NORMAL) return\n new Normal();\n else return\n new Nether();\n }",
"public int getWorldLimit() {\n\t\treturn worldLimit;\n\t}",
"public void setWorld(GameData world) {\r\n this.world = world;\r\n }",
"public WorldConfig getSingleWorldConfiguration() {\n\t\treturn SingleWorldConfig;\n\t}",
"public MapEntity getEntity() {\n\t\treturn _entity;\n\t}",
"public Point getUniverseDimensions(){\n return this.physModel.getUniverseDimensions();\n }",
"public Vector2f getLocation() {\r\n\t\treturn location.getLocation();\r\n\t}",
"public long[] getWorldCoordinate(int screenX, int screenY);"
]
| [
"0.830314",
"0.830314",
"0.8262908",
"0.8251936",
"0.82396203",
"0.82269084",
"0.81514573",
"0.81514573",
"0.81009847",
"0.804801",
"0.80210865",
"0.7975219",
"0.7972123",
"0.7939353",
"0.78721327",
"0.7844861",
"0.7822843",
"0.78029716",
"0.7713928",
"0.7708079",
"0.76993656",
"0.75874335",
"0.74490535",
"0.7394641",
"0.7359471",
"0.7214702",
"0.7181691",
"0.7171",
"0.7105635",
"0.70843095",
"0.701995",
"0.70003974",
"0.6995783",
"0.69174653",
"0.69174653",
"0.6903845",
"0.6903845",
"0.6895685",
"0.6883702",
"0.6865698",
"0.68121815",
"0.681018",
"0.6784924",
"0.67578524",
"0.6734837",
"0.67311144",
"0.6729538",
"0.6711289",
"0.6668232",
"0.6608466",
"0.65224034",
"0.65146977",
"0.6483378",
"0.6448608",
"0.6448608",
"0.6435391",
"0.6424672",
"0.64146626",
"0.6409471",
"0.63911456",
"0.6375992",
"0.63669646",
"0.63314223",
"0.63300264",
"0.63145745",
"0.62782913",
"0.627617",
"0.6233365",
"0.6161087",
"0.6132334",
"0.6128739",
"0.6127384",
"0.6109849",
"0.60939807",
"0.60924315",
"0.60723126",
"0.6067381",
"0.6065846",
"0.6063042",
"0.6062357",
"0.60395163",
"0.60157585",
"0.6004852",
"0.5998195",
"0.5992317",
"0.5988619",
"0.5978093",
"0.5966114",
"0.59646183",
"0.5930118",
"0.59267235",
"0.5892214",
"0.5882704",
"0.58323807",
"0.58205765",
"0.5814913",
"0.57909244",
"0.5787351",
"0.57840616",
"0.5775756"
]
| 0.65741986 | 50 |
Set the superWorld of an entity to the given world. | @Raw
protected void setSuperWorld(World world) throws IllegalArgumentException{
if(world == null || isValidSuperWorld(world)) this.superWorld = world;
else throw new IllegalArgumentException("Isn't a valid world @setSuperWorld()");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setWorld(GameData world) {\r\n this.world = world;\r\n }",
"public void setWorld(World world) {\n this.world = world;\n }",
"@Model\n\tprotected void setWorld(World world) {\n\t\tthis.world = world;\n\t}",
"public void setWorld(World world) throws IllegalStateException {\n\t\tif (!canHaveAsWorld(world))\n\t\t\tthrow new IllegalStateException(\"Invalid position in the world trying to assign this entity to.\");\n\t\n\t\t//If current world is null, don't try to remove 'this' from it\n\t\t//If world is null, don't try to add anything to it\n\t\t//This allows us to provide 'null' as an argument in case we want to \n\t\t//undo the association for this entity.\n\t\tif (!(this.getWorld() == null) && !(world == null)) {\n\t\t\tthis.getWorld().removeEntity(this);\n\t\t\tworld.addEntity(this);\n\t\t}\n\n\t\tthis.world = world;\n\t\t\n\t}",
"public void setWorld(@Nullable World worldIn)\n {\n this.world = worldIn;\n\n if (worldIn == null)\n {\n this.field_78734_h = null;\n }\n }",
"@Basic @Raw\n\tpublic World getSuperWorld() {\n\t\treturn this.superWorld;\n\t}",
"public void setWorld(World world) {\n\t\tthis.world = world;\n\n\t\tsetPlaying(world.isPlayOnStart());\n\t}",
"public static void setWorld(World aWorld)\r\n/* */ {\r\n\t \tlogger.info(count++ + \" About to setWotld : \" + \"Agent\");\r\n/* 43 */ \tworldForAgent = aWorld;\r\n/* */ }",
"protected void updateWorld(World world) {\r\n\t\tthis.world = world;\r\n\t\tsetup(); //Call setup again to re assign certain variables that depend\r\n\t\t\t\t // on the world\r\n\t\tbufferWorld(); //Buffer the new world\r\n\t}",
"@Override\n public void world() {\n super.world();\n }",
"@Model\n private boolean isValidSuperWorld(World world){\n \t return (world == null || !world.isTerminatedWorld());\n }",
"public WorldRegion(GameWorldEntity entity) {\n gameWorldEntities.add(entity);\n }",
"public void setWorldData(WorldData worldData)\n {\n this.worldData = worldData;\n }",
"public void secondarySetSuperregion(com.hps.july.persistence.SuperRegion arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().secondarySetSuperregion(arg0);\n }",
"public void setWorldPosition(int worldPosition) {\n\t\tcurrChunk = worldPosition / MapChunk.WIDTH;\n\t\tgrowMap();\n\t}",
"public void setWorldDisplay(Pane worldDisplay) {\n this.worldDisplay = worldDisplay;\n }",
"public void updateWorld(Location loc)\n {\n worldData = getPersistence().get(loc.getWorld().getName(), WorldData.class);\n }",
"public void addToWorld(World world);",
"public void setSuperregion(com.hps.july.persistence.SuperRegion arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().setSuperregion(arg0);\n }",
"@Raw\n\tpublic void terminate(){\n\t\tif (superWorld != null)\n\t\tthis.superWorld.removeEntityFromWorld(this);\n\t\t\n\t\tthis.superWorld = null;\n\t\tthis.isTerminated = true;\n\t}",
"public void setPosWorldAge(GuiPositions posWorldAge) {\r\n\t\tthis.posWorldAge = posWorldAge;\r\n\t}",
"public void setWorldTime(long time)\n {\n worldTime = time;\n }",
"public World setCurrentWorld(int index) {\n\t\tassert index >= 0 && index < levels.size();\n\t\treturn levels.get(levelIndex = index);\n\t}",
"public void removeFromWorld(World world);",
"public Builder setWorldId(long value) {\n \n worldId_ = value;\n onChanged();\n return this;\n }",
"@Override\n\tpublic World getWorld() { return world; }",
"public void updateWorldRegion()\n\t{\n\t\tif(!isVisible)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tL2WorldRegion newRegion = WorldManager.getInstance().getRegion(getWorldPosition());\n\t\tL2WorldRegion oldRegion = region;\n\t\tif(!newRegion.equals(oldRegion))\n\t\t{\n\t\t\tif(oldRegion != null)\n\t\t\t{\n\t\t\t\toldRegion.removeVisibleObject(object);\n\t\t\t}\n\n\t\t\tsetWorldRegion(newRegion);\n\n\t\t\t// Add the L2Object spawn to _visibleObjects and if necessary to all players of its L2WorldRegion\n\t\t\tnewRegion.addVisibleObject(object);\n\t\t}\n\t}",
"protected abstract void initializeWorld();",
"public void setWorldDefault(WorldRef world, T value) {\n Objects.requireNonNull(world, \"world\");\n Objects.requireNonNull(value, \"value\");\n\n synchronized (mutationLock) {\n List<T> worldValues = this.allWorldValues.get(world);\n if (worldValues == null) {\n // Make world-specific values possible\n worldValues = singletonArrayList(value);\n this.allWorldValues.put(world, worldValues);\n return;\n }\n\n // Default value is stored in last slot\n worldValues.set(worldValues.size() - 1, value);\n }\n }",
"@SuppressWarnings(\"unchecked\") // Safe, as list is guarded\n public void setBiomeInWorldDefault(WorldRef world, Biome biome, T value) {\n Objects.requireNonNull(world, \"world\");\n Objects.requireNonNull(biome, \"biome\");\n Objects.requireNonNull(value, \"value\");\n\n synchronized (mutationLock) {\n List<T> worldValues = this.allWorldValues.get(world);\n if (worldValues == null) {\n worldValues = (List<T>) Arrays.asList(new Object[Biome.values().length + 1]);\n this.allWorldValues.put(world, worldValues);\n } else if (worldValues.size() == 1) {\n T worldDefault = worldValues.get(0);\n worldValues = (List<T>) Arrays.asList(new Object[Biome.values().length + 1]);\n worldValues.set(worldValues.size() - 1, worldDefault);\n this.allWorldValues.put(world, worldValues);\n }\n worldValues.set(biome.ordinal(), value);\n }\n }",
"public Level getWorld() {\r\n return this;\r\n }",
"public abstract boolean setLocation(World world, int coords[]);",
"void update(Env world) throws Exception;",
"public GameFrame(final World world) {\n this.world = world;\n }",
"public Builder setWorldid(long value) {\n bitField0_ |= 0x00000001;\n worldid_ = value;\n onChanged();\n return this;\n }",
"public Builder setWorldid(long value) {\n bitField0_ |= 0x00000001;\n worldid_ = value;\n onChanged();\n return this;\n }",
"public void set(CoreEntity coreEntity, CoreMorphComponent coreMorphComponent) {\r\n CoreJni.setInCoreMorphComponentManager1(this.agpCptrMorphComponentMgr, this, CoreEntity.getCptr(coreEntity), coreEntity, CoreMorphComponent.getCptr(coreMorphComponent), coreMorphComponent);\r\n }",
"public EntityItemEmpowerable(World world) {\n super(world);\n }",
"public ArrayWorld(ArrayWorld otherArrayWorld) {\n super(otherArrayWorld);\n world = cloneArray(otherArrayWorld.world);\n deadRow = otherArrayWorld.deadRow;\n }",
"public DouaneHal(World firstWorld){\n super(800, 400, 1);\n this.firstWorld = firstWorld;\n \n addObject(new Bericht(3), 400, 200);\n }",
"public void onWorldChanged(World world);",
"public final World getWorld() {\n\t\treturn baseTile.getWorld();\n\t}",
"public boolean setMainWorldUID(World world, boolean keepOldWorld) {\n if (gameState != GameState.LOBBY) {\n getUtils().log(Logger.Level.INFO, this.getClass(), \"Call to set main world for game \" + name + \" (ID \" + gameID + \") while not in lobby mode, rejecting\");\n return false;\n }\n if (keepOldWorld) {\n otherWorlds.add(mainWorldUID);\n } else {\n GameManager.unregisterWorldGame(mainWorldUID);\n }\n GameManager.registerWorldGame(world.getUID(), this);\n mainWorldUID = world.getUID();\n reset();\n return true;\n }",
"public void setPlayer(SuperMario mario){\r\n this.mario = mario;\r\n }",
"@Override\n\tpublic void update() {\n\t\tworld.update();\n\t}",
"public void setLocation(int x, int y){\n if(x < 0 || x > 19 || y < 0 || y > 19){\n // The user has tried to move outside the bounds of the world, so\n // we call the die() method which causes the Player to die.\n die();\n } else {\n // The user is trying to move within the bounds of the world. Run\n // the Actor class' own setLocation() method to move the Player.\n super.setLocation(x, y);\n }\n }",
"public static void writeWorld(World world, CompoundTag compound) {\n UUID worldUuid = world.getUID();\n // world UUID used by Bukkit and code above\n compound.putLong(\"WorldUUIDMost\", worldUuid.getMostSignificantBits());\n compound.putLong(\"WorldUUIDLeast\", worldUuid.getLeastSignificantBits());\n // leave a Dimension value for possible Vanilla use\n compound.putInt(\"Dimension\", world.getEnvironment().getId());\n }",
"public void unbanFromWorld(String player, String world) {\n Set<String> worldsTMP = bannedWorlds.get(player);\n \n if (worldsTMP == null) {\n return;\n }\n \n worldsTMP.remove(world);\n if (worldsTMP.isEmpty()) {\n bannedWorlds.remove(player);\n return;\n }\n bannedWorlds.put(player, (HashSet<String>) worldsTMP);\n }",
"public Minus(Background myWorld)\n {\n super(myWorld);\n }",
"public World(int width, int height, World other)\n {\n this(width, height, other, AIR_EL);\n }",
"public void privateSetSuperregionKey(com.hps.july.persistence.SuperRegionKey arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().privateSetSuperregionKey(arg0);\n }",
"public void setWeather(org.bukkit.World world, boolean storm) {\n\t\tignoreWeatherChanges = true;\n\t\tworld.setStorm(storm);\n\t\tignoreWeatherChanges = false;\n\t}",
"protected Body (World world, org.jbox2d.dynamics.Body body) {\n\t\tthis.world = world;\n\t\tthis.body = body;\n\t}",
"public World getWorld() {\n return world;\n }",
"public World getWorld() {\n return world;\n }",
"public World getWorld() {\n\t\treturn world;\n\t}",
"public void recreateFromExistingWorld(WorldInfo original) {\n this.worldName = original.getWorldName();\n this.worldSeed = Long.toString(original.getSeed());\n WorldType worldtype = original.getGenerator() == WorldType.CUSTOMIZED ? WorldType.DEFAULT : original.getGenerator();\n this.selectedIndex = worldtype.getId();\n this.chunkProviderSettingsJson = original.getGeneratorOptions();\n this.generateStructuresEnabled = original.isMapFeaturesEnabled();\n this.allowCheats = original.areCommandsAllowed();\n if (original.isHardcore()) {\n this.field_228197_f_ = CreateWorldScreen.GameMode.HARDCORE;\n } else if (original.getGameType().isSurvivalOrAdventure()) {\n this.field_228197_f_ = CreateWorldScreen.GameMode.SURVIVAL;\n } else if (original.getGameType().isCreative()) {\n this.field_228197_f_ = CreateWorldScreen.GameMode.CREATIVE;\n }\n\n }",
"public World getWorld () {\n\t\treturn world;\n\t}",
"public GameData getWorld() {\r\n return world;\r\n }",
"World getWorld();",
"@Override\n\tpublic void setUs(Party party) throws CTPException {\n\t\t\n\t}",
"public void changeLocation(World newWorld, int x, int y, DIRECTION facing, Color color);",
"public void banFromWorld(String player, String world) {\n Set<String> worldsTMP = bannedWorlds.get(player);\n \n if (worldsTMP == null) {\n worldsTMP = new HashSet<String>();\n }\n\n worldsTMP.add(world);\n bannedWorlds.put(player, (HashSet<String>) worldsTMP);\n }",
"public OverWorld()\n { \n // Create a new world with 800x600 cells with a cell size of 1x1 pixels.\n super(1024, 600, 1, false);\n Setup();\n }",
"@Override\n\tpublic LSystemBuilder setOrigin(double x, double y) {\n\t\tthis.origin = new Vector2D(x, y);\n\t\treturn this;\n\t}",
"public void setLocation(WotlasLocation myLocation) {\n getBasicChar().setLocation(myLocation);\n\n if (myLocation.isRoom()) {\n this.myRoom = ClientDirector.getDataManager().getWorldManager().getRoom(myLocation);\n } else {\n this.myRoom = null;\n }\n if (myLocation.isTileMap()) {\n this.myTileMap = ClientDirector.getDataManager().getWorldManager().getTileMap(myLocation);\n } else {\n this.myTileMap = null;\n }\n }",
"public void loadWorld() {\n\t\tint[][] tileTypes = new int[100][100];\n\t\tfor (int x = 0; x < 100; x++) {\n\t\t\tfor (int y = 0; y < 100; y++) {\n\t\t\t\ttileTypes[x][y] = 2;\n\t\t\t\tif (x > 40 && x < 60 && y > 40 && y < 60) {\n\t\t\t\t\ttileTypes[x][y] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tEntityList entities = new EntityList(0);\n\t\tPlayer player = new Player(Direction.SOUTH_WEST, 50, 50);\n\t\tentities.addEntity(player);\n\t\tentities.addEntity(new Tree(Direction.SOUTH_WEST,49, 49));\n\t\tworld = new World(new Map(tileTypes), player, entities);\n\t}",
"public static void addWorld(World world) {\n\t\tworlds.add(world);\n\t}",
"public World(final BoundingBox bounds, final Peer peer) {\n \t\tmyVirtualWorldBounds = bounds;\n \t\tmyPeer = peer;\n \t\tmyPeer.addObserver(this);\n \t\t\n \t\tmyForces = new LinkedList<Force>();\n \t\tmyObjects = new LinkedList<PhysicalObject>();\n \t\t\n \t\t// TODO: Should this go here?\n \t\tmyScene = new BranchGroup();\n \t\tmyScene.setCapability(BranchGroup.ALLOW_CHILDREN_EXTEND);\n \t\tmyScene.setCapability(BranchGroup.ALLOW_CHILDREN_WRITE);\n \t\t\n \t\tBoundingLeaf originLeaf = new BoundingLeaf(new BoundingSphere());\n \t\tmyScene.addChild(originLeaf);\n \t\t\n \t\tmyScene.addChild(createVirtualWorldBoundsShape());\n \t\t\n \t\taddLights();\n \t\taddHalfspaces();\n \t\t\n \t\tmyScene.compile();\n \t}",
"public void update(World world, Target target);",
"public AclBuilder setWorld(Permission... permissions) {\n if (world == null) {\n world = new ACL();\n }\n world.setId(new Id(\"world\", \"anyone\"));\n world.setPerms(Permission.encode(permissions));\n return this;\n }",
"public OdorWorldFrameMenu(final OdorWorldDesktopComponent frame,\n OdorWorld world) {\n parent = frame;\n this.world = world;\n }",
"@Basic\n\tpublic World getWorld() {\n\t\treturn this.world;\n\t}",
"@Basic\n\tpublic World getWorld() {\n\t\treturn this.world;\n\t}",
"public void setSuper(String sSuper)\n {\n ensureLoaded();\n m_clzSuper = (sSuper == null ? (ClassConstant) null : new ClassConstant(sSuper));\n setModified(true);\n }",
"public boolean checkWorld(Entity entity) {\r\n return entity.getWorld() == worldFrom;\r\n }",
"@NotNull\r\n World getWorld();",
"private World copyWorld(boolean useCloning) throws CloneNotSupportedException {\n\t \n\t if (useCloning == false) {\n\t \t\tif ( mWorld instanceof ArrayWorld) { // if mWorld (current) is an ArrayWorld\n\t \t\t\tWorld copy;\n\t \t\t\tcopy = new ArrayWorld((ArrayWorld)mWorld);\n\t \t\t\treturn (World)copy;\n\t \t\t}\n\t \t\telse if ( mWorld instanceof PackedWorld) {\n\t \t\t\tWorld copy = new PackedWorld((PackedWorld)mWorld);\n\t \t\t\treturn (World)copy;\n\t \t\t}\n \t \t}\n\t else {\n\t\t World copy = (World) mWorld.clone();\n\t\t \treturn copy;\n\t }\n\t \n\t return null;\n\t}",
"@BeforeClass\n\tpublic static void setup() {\n\t\tbaseWorld = new BaseWorld(1000 ,1500);\n \tGameManager.get().setWorld(new BaseWorld(1000, 1500));\n\t}",
"public void setEntityHere(Entity setThis) {\n \n entityHere_ = setThis;\n \n }",
"public ShamWorld(WorldSettings settings) {\n super(null, name, null, settings, null);\n }",
"public void secondarySetOrganization(com.hps.july.persistence.Organization anOrganization) throws java.rmi.RemoteException;",
"protected SpaceActor(GameView view, World world) {\n\t\tsuper(view, world);\n\t\texplosion = new Explosion(view, world);\n\t\tworld.addActor(explosion);\n\t}",
"public static World getWorld() {\n\t\treturn world;\n\t}",
"public abstract World create(World world);",
"public ThingNode getWorld()\n {\n return world;\n }",
"public void secondarySetOrganization(com.hps.july.persistence.Organization arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().secondarySetOrganization(arg0);\n }",
"public World() {\n\t\tblockIDArray = new byte[WORLD_SIZE][WORLD_HEIGHT][WORLD_SIZE];\n\t\tentities\t = new ArrayList<Entity>();\n\t\trand\t\t = new Random();\n\t\t\n new GravityThread(this);\n\t\t\t\t\n\t\tgenerateWorld();\n\t}",
"public void setEnemy(Enemy enemy){\n this.enemy = enemy;\n enemy.setXGrid(getXGrid());\n enemy.setYGrid(getYGrid());\n setEntity(enemy);\n }",
"public void\nsetObjectNormal(final SbVec3f normal)\n//\n////////////////////////////////////////////////////////////////////////\n{\n // Transform the object space normal by the current modeling\n // matrix o get the world space normal. Use the inverse transpose\n // of the odel matrix so that normals are not scaled incorrectly.\n SbMatrix normalMatrix =\n SoModelMatrixElement.get(state).inverse().transpose();\n\n normalMatrix.multDirMatrix(normal, worldNormal);\n worldNormal.normalize();\n}",
"@Override\n\tpublic void pasteInWorld(World world, int xCoord, int yCoord ,int zCoord) {\n\n\t\t//Set all the blocks\n\t\tfor(int x = 0; x < sizeX; x++) {\n\t\t\tfor(int z = 0; z < sizeZ; z++) {\n\t\t\t\tfor(int y = 0; y< sizeY; y++) {\n\n\t\t\t\t\tif(blocks[x][y][z] != null) {\n\t\t\t\t\t\tworld.setBlockState(new BlockPos(xCoord + x, yCoord + y, zCoord + z), blocks[x][y][z].getStateFromMeta(metas[x][y][z]), 2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Set tiles for each block\n\t\tfor(TileEntity tile : tileEntities) {\n\t\t\tNBTTagCompound nbt = new NBTTagCompound();\n\t\t\ttile.writeToNBT(nbt);\n\t\t\tint x = nbt.getInteger(\"x\");\n\t\t\tint y = nbt.getInteger(\"y\");\n\t\t\tint z = nbt.getInteger(\"z\");\n\n\t\t\tint tmpX = x + xCoord;\n\t\t\tint tmpY = y + yCoord;\n\t\t\tint tmpZ = z + zCoord;\n\n\t\t\t//Set blocks of tiles again to avoid weirdness caused by updates\n\t\t\t//world.setBlock(xCoord + x, yCoord + y, zCoord + z, blocks[x][y][z], metas[x][y][z], 2);\n\n\n\t\t\tnbt.setInteger(\"x\",tmpX);\n\t\t\tnbt.setInteger(\"y\",tmpY);\n\t\t\tnbt.setInteger(\"z\",tmpZ);\n\n\t\t\tTileEntity entity = world.getTileEntity(new BlockPos(tmpX, tmpY, tmpZ));\n\n\t\t\tif(entity != null)\n\t\t\t\tentity.readFromNBT(nbt);\n\t\t}\n\t}",
"WorldGenerator getForWorld(World world);",
"public void setSuperEntityURI(String superEntityURI) {\r\n\t\tthis.superEntityURI = superEntityURI;\r\n\t}",
"public MyAgent(World world)\n {\n w = world; \n }",
"public void switchTo(GridWorld world)\n\t{\n\t\tonDeactivation();\n\t\tworld.makeCurrent();\n\t\tworld.onActivation();\n\t}",
"int enableWorld(String worldName, Server server);",
"public boolean apply(BlockPos pos, ServerLevel world);",
"public SideScrollingWorld()\n { \n // Create a new world with 640x480 cells with a cell size of 1x1 pixels.\n // Final argument of 'false' means that actors in the world are not restricted to the world boundary.\n // See: https://www.greenfoot.org/files/javadoc/greenfoot/World.html#World-int-int-int-boolean-\n super(VISIBLE_WIDTH, VISIBLE_HEIGHT, 1, false);\n\n // Set up the starting scene\n setup();\n\n // Game on\n isGameOver = false;\n\n }",
"public World getWorld();",
"public World()\n\t{\n\t\tinitWorld();\t\n\t}"
]
| [
"0.71022457",
"0.69955146",
"0.6941929",
"0.69377",
"0.62751853",
"0.6251795",
"0.6242015",
"0.6229278",
"0.6070291",
"0.5930362",
"0.5726795",
"0.5665045",
"0.56253004",
"0.56020564",
"0.55864704",
"0.5571826",
"0.54681903",
"0.5461153",
"0.54587674",
"0.5419764",
"0.53257954",
"0.5261427",
"0.51711535",
"0.51509494",
"0.5144162",
"0.5112946",
"0.50931615",
"0.5093079",
"0.5077129",
"0.50373536",
"0.50368285",
"0.5012971",
"0.50106275",
"0.49692997",
"0.49417317",
"0.49417317",
"0.49326536",
"0.49306098",
"0.49084666",
"0.4877251",
"0.48706272",
"0.48538655",
"0.4836032",
"0.48152494",
"0.48078266",
"0.48027465",
"0.4798183",
"0.4789731",
"0.47784847",
"0.4775267",
"0.47694355",
"0.4769307",
"0.4765319",
"0.47610405",
"0.47610405",
"0.47603008",
"0.4744468",
"0.47406605",
"0.47393876",
"0.47302315",
"0.4725235",
"0.4724997",
"0.4687539",
"0.46769017",
"0.46738496",
"0.46602976",
"0.4656607",
"0.4653337",
"0.4648541",
"0.46402586",
"0.46302977",
"0.46277678",
"0.46238366",
"0.46238366",
"0.46179318",
"0.46159053",
"0.4613968",
"0.46086994",
"0.46064192",
"0.45947453",
"0.4579896",
"0.457776",
"0.45718154",
"0.45573637",
"0.45489937",
"0.45485535",
"0.45415148",
"0.4538988",
"0.4531929",
"0.4526646",
"0.45233238",
"0.4513972",
"0.45123005",
"0.45012364",
"0.4496441",
"0.4496404",
"0.4494093",
"0.4488843",
"0.4487993",
"0.448306"
]
| 0.811025 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.